update dashboard to use remote image
This commit is contained in:
parent
4693c0b007
commit
bc19f18bc5
4 changed files with 62 additions and 11 deletions
|
@ -35,7 +35,7 @@
|
||||||
satosa_certbot: false
|
satosa_certbot: false
|
||||||
proxy: 'https://test-sso-proxy1.cert.sunet.se/idp'
|
proxy: 'https://test-sso-proxy1.cert.sunet.se/idp'
|
||||||
entity_id: 'https://test-sso-proxy.cert.sunet.se/idp'
|
entity_id: 'https://test-sso-proxy.cert.sunet.se/idp'
|
||||||
# soc::vuln_dashboard:
|
soc::vuln_dashboard:
|
||||||
|
|
||||||
'^internal-sto3-dev-ci-1.cert.sunet.se$':
|
'^internal-sto3-dev-ci-1.cert.sunet.se$':
|
||||||
sunet::dockerhost2:
|
sunet::dockerhost2:
|
||||||
|
|
|
@ -1,19 +1,24 @@
|
||||||
class soc::vuln_dashboard(
|
class soc::vuln_dashboard(
|
||||||
String $allowed_hosts = $facts['networking']['fqdn'],
|
String $allowed_origins = $facts['networking']['fqdn'],
|
||||||
String $docker_tag = 'latest',
|
String $docker_tag = 'latest',
|
||||||
String $db_datadir = '/opt/vuln-dashboard/dbdata',
|
String $db_datadir = '/opt/vuln-dashboard/dbdata',
|
||||||
String $pocs_storage_dir = '/opt/vuln-dashboard/pocsdata',
|
String $pocs_storage_dir = '/opt/vuln-dashboard/pocsdata',
|
||||||
String $sso_service_name = 'dashboard-dev',
|
String $sso_service_name = 'dashboard-dev',
|
||||||
|
String $admin_contact = 'cert@cert.sunet.se',
|
||||||
|
String $docker_image = 'platform.sunet.se/verglasz/vuln-management/dashboard-dev',
|
||||||
|
String $sso_proxy_network= 'sso',
|
||||||
) {
|
) {
|
||||||
|
|
||||||
$db_name=lookup('vuln-dashboard.dn_name', undef, undef, 'sunet')
|
$db_name=lookup('vuln-dashboard.dn_name', undef, undef, 'vuln_dashboard')
|
||||||
$db_user=lookup('vuln-dashboard.db_user', undef, undef, 'playground')
|
$db_user=lookup('vuln-dashboard.db_user', undef, undef, 'dashboard_app')
|
||||||
$db_pass=lookup('vuln-dashboard.db_pass', undef, undef, 'password')
|
$db_pass=lookup('vuln-dashboard.db_pass', undef, undef, 'password')
|
||||||
$db_port=lookup('vuln-dashbaord.db_port', undef, undef, '5432')
|
$db_port=lookup('vuln-dashbaord.db_port', undef, undef, '5432')
|
||||||
$db_host=lookup('vuln-dashboard.db_host', undef, undef, 'postgres')
|
$db_host=lookup('vuln-dashboard.db_host', undef, undef, 'postgres')
|
||||||
$censys_api_secret=lookup('vuln-dashboard.censys_api_secret', undef, undef, 'null')
|
$censys_api_secret=lookup('vuln-dashboard.censys_api_secret', undef, undef, 'null')
|
||||||
$censys_api_id=lookup('vuln-dashboard.censys.api_id', undef, undef, 'null')
|
$censys_api_id=lookup('vuln-dashboard.censys.api_id', undef, undef, 'null')
|
||||||
|
|
||||||
|
$app_config_file='/opt/vuln-dashboard/app-config.yaml'
|
||||||
|
|
||||||
file {
|
file {
|
||||||
'/opt/vuln-dashboard':
|
'/opt/vuln-dashboard':
|
||||||
ensure => directory,
|
ensure => directory,
|
||||||
|
@ -24,6 +29,12 @@ file {
|
||||||
$pocs_storage_dir:
|
$pocs_storage_dir:
|
||||||
ensure => directory,
|
ensure => directory,
|
||||||
;
|
;
|
||||||
|
$app_config_file:
|
||||||
|
ensure => file,
|
||||||
|
mode => '0600',
|
||||||
|
content => template('soc/vuln-dashboard/app-config.yaml.erb'),
|
||||||
|
;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sunet::docker_compose { 'vuln-dashboard':
|
sunet::docker_compose { 'vuln-dashboard':
|
||||||
|
|
|
@ -0,0 +1,39 @@
|
||||||
|
config:
|
||||||
|
poc_dir: "<%= @pocs_storage_dir %>"
|
||||||
|
admin_contact: "<%= @admin_contact %>"
|
||||||
|
asn_list:
|
||||||
|
- 1653
|
||||||
|
- 2831
|
||||||
|
- 2832
|
||||||
|
- 2833
|
||||||
|
- 2834
|
||||||
|
- 2835
|
||||||
|
- 2837
|
||||||
|
- 2838
|
||||||
|
- 2839
|
||||||
|
- 2840
|
||||||
|
- 2841
|
||||||
|
- 2842
|
||||||
|
- 2843
|
||||||
|
- 2844
|
||||||
|
- 2845
|
||||||
|
- 2846
|
||||||
|
- 3224
|
||||||
|
- 5601
|
||||||
|
- 8748
|
||||||
|
- 8973
|
||||||
|
- 9088
|
||||||
|
- 12384
|
||||||
|
- 15980
|
||||||
|
- 16251
|
||||||
|
- 25072
|
||||||
|
- 39590
|
||||||
|
- 41001
|
||||||
|
- 42307
|
||||||
|
- 42381
|
||||||
|
- 43018
|
||||||
|
- 43665
|
||||||
|
- 43844
|
||||||
|
- 48514
|
||||||
|
- 61282
|
||||||
|
- 207113
|
|
@ -5,10 +5,10 @@ services:
|
||||||
# app files are mounted for quick-reload and fast iterations
|
# app files are mounted for quick-reload and fast iterations
|
||||||
dev:
|
dev:
|
||||||
container_name: <%= @sso_service_name %>
|
container_name: <%= @sso_service_name %>
|
||||||
|
hostname: <%= @sso_service_name %>
|
||||||
depends_on:
|
depends_on:
|
||||||
- postgres
|
- postgres
|
||||||
image: dashboard-dev:<%= @docker_tag %>
|
image: <%= @docker_image %>:<%= @docker_tag %>
|
||||||
pull_policy: never
|
|
||||||
environment:
|
environment:
|
||||||
DB_NAME: <%= @db_name %>
|
DB_NAME: <%= @db_name %>
|
||||||
DB_USER: <%= @db_user %>
|
DB_USER: <%= @db_user %>
|
||||||
|
@ -17,15 +17,15 @@ services:
|
||||||
DB_PORT: <%= @db_port %>
|
DB_PORT: <%= @db_port %>
|
||||||
CENSYS_API_ID: <%= @censys_api_id %>
|
CENSYS_API_ID: <%= @censys_api_id %>
|
||||||
CENSYS_API_SECRET: <%= @censys_api_secret %>
|
CENSYS_API_SECRET: <%= @censys_api_secret %>
|
||||||
DJANGO_ALLOWED_HOSTS: <%= @allowed_hosts %>
|
DJANGO_ALLOWED_HOSTS: <%= @sso_service_name %>
|
||||||
ports:
|
DJANGO_ALLOWED_ORIGINS: <%= @allowed_origins %>
|
||||||
- "127.0.0.1:8000:8000"
|
|
||||||
init: true
|
init: true
|
||||||
volumes:
|
volumes:
|
||||||
- pocs-data:/app/stored_pocs
|
- pocs-data:/app/stored_pocs
|
||||||
|
- "<%= @app_config_file %>:/app/config.yml:ro"
|
||||||
networks:
|
networks:
|
||||||
- default
|
- default
|
||||||
- sso
|
- sso-proxy
|
||||||
|
|
||||||
postgres:
|
postgres:
|
||||||
container_name: postgres
|
container_name: postgres
|
||||||
|
@ -55,5 +55,6 @@ volumes:
|
||||||
type: none
|
type: none
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
sso:
|
sso-proxy:
|
||||||
external: true
|
external: true
|
||||||
|
name: <%= @sso_proxy_network %>
|
||||||
|
|
Loading…
Add table
Reference in a new issue