Skip to content

Commit

Permalink
move config into own file
Browse files Browse the repository at this point in the history
  • Loading branch information
hillalex committed Aug 3, 2023
1 parent 640b508 commit c4bcf7b
Show file tree
Hide file tree
Showing 7 changed files with 155 additions and 9 deletions.
1 change: 0 additions & 1 deletion config/basic/montagu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,4 +122,3 @@ fake_smtp_server:

orderly_web_api_url: https://localhost/reports/api/v2
orderly_volume_name: montagu_orderly_volume

4 changes: 4 additions & 0 deletions config/ci/montagu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ volumes:
api:
name: montagu-api
tag: master
email:
password: "changeme"
flow_url: "fakeurl"
admin:
name: montagu-cli
tag: master
Expand Down Expand Up @@ -143,3 +146,4 @@ fake_smtp_server:
tag: latest

orderly_web_api_url: https://localhost/reports/api/v2
orderly_volume_name: montagu_orderly_volume
9 changes: 9 additions & 0 deletions config/guidance/diagnostic-reports.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
testGroup:
testDisease:
- report_name: diagnostic
assignee: a.hill
success_email:
recipients:
- [email protected]
- [email protected]
subject: "VIMC diagnostic report: {touchstone} - {group} - {disease}"
140 changes: 140 additions & 0 deletions config/guidance/montagu.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
## Prefix for container names; we'll use {container_prefix}-(container_name)
container_prefix: montagu

## Set this flag to true to prevent use of --volumes in the cli to remove
## volumes on stop
protect_data: false

## Docker org for images
repo: vimc

## The name of the docker network that containers will be attached to.
## If you want to proxy Packit to the host, you will need to
## arrange a proxy on this network
network: montagu-network

# Domain where this instance of Montagu will be deployed. E.g. science.montagu.dide.ic.uk
hostname: localhost

## Names of the docker volumes to use
volumes:
db: db_volume
burden_estimates: burden_estimate_files
emails: emails
templates: template_volume
guidance: guidance_volume
static: static_volume
static_logs: static_logs
mq: mq

api:
name: montagu-api
tag: master
email:
password: "changeme"
flow_url: "fakeurl"
admin:
name: montagu-cli
tag: master
db:
name: montagu-db
tag: master
root_user: vimc
root_password: "changeme"
migrate:
name: montagu-migrate
tag: master
users:
api:
password: "apipassword"
permissions: all
import:
password: "importpassword"
permissions: all
orderly:
password: "orderlypassword"
permissions: all
readonly:
password: "readonlypassword"
permissions: readonly
barman:
password: "barmanpassword"
option: superuser
streaming_barman:
password: "streamingpassword"
option: replication
protected_tables:
- gavi_support_level
- activity_type
- burden_outcome
- gender
- responsibility_set_status
- impact_outcome
- gavi_support_level
- support_type
- touchstone_status
- permission
- role
- role_permission
proxy:
name: montagu-reverse-proxy
tag: master
port_http: 80
port_https: 443
metrics:
repo: nginx
name: nginx-prometheus-exporter
tag: 0.4.1
contrib:
name: montagu-contrib-portal
tag: master
guidance_reports:
- internal-2017-demography-childmortality/20171114-152328-da1957c2/
- internal-2017-demography-kosovo/20171109-204911-45436ef8/
- internal-2017-demography-tuvalu/20171109-205800-aa3a35c2/
- internal-2017-demography-over80/20171114-094012-ed43d81c/
- internal-2017-demography-marshall/20171109-205347-89919a97/
admin:
name: montagu-admin-portal
tag: master
static:
name: montagu-static
tag: master
mq:
repo: docker.io
name: redis
tag: latest
port: 6379
flower:
repo: mher
name: flower
tag: 0.9.5
port: 5555
task_queue:
name: task-queue-worker
tag: master
youtrack_token: "faketoken"
servers:
montagu:
user: [email protected]
password: password
orderlyweb:
url: http://orderly-web-web:8888
youtrack:
token: faketoken
smtp:
host: smtp.cc.ic.ac.uk
port: 587
user: montagu
password: p@ssword
from: [email protected]
tasks:
diagnostic_reports:
use_additional_recipients: true
poll_seconds: 5
reports:
archive_folder_contents:
min_file_age_seconds: 3600

orderly_web_api_url: https://localhost/reports/api/v2
orderly_volume_name: montagu_orderly_volume
6 changes: 0 additions & 6 deletions config/ssl/montagu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,6 @@ proxy:
contrib:
name: montagu-contrib-portal
tag: master
guidance_reports:
- internal-2017-demography-childmortality/20171114-152328-da1957c2/
- internal-2017-demography-kosovo/20171109-204911-45436ef8/
- internal-2017-demography-tuvalu/20171109-205800-aa3a35c2/
- internal-2017-demography-over80/20171114-094012-ed43d81c/
- internal-2017-demography-marshall/20171109-205347-89919a97/
admin:
name: montagu-admin-portal
tag: master
Expand Down
2 changes: 1 addition & 1 deletion tests/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def test_config_ssl():
def test_config_guidance():
cfg = MontaguConfig("config/basic")
assert cfg.guidance_reports is None
cfg = MontaguConfig("config/ssl")
cfg = MontaguConfig("config/guidance")
assert len(cfg.guidance_reports) == 5
assert cfg.guidance_reports[0] == "internal-2017-demography-childmortality/20171114-152328-da1957c2/"

Expand Down
2 changes: 1 addition & 1 deletion tests/test_constellation.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def test_api_configured():

obj.stop(kill=True, remove_volumes=True)

cfg = MontaguConfig("config/ssl")
cfg = MontaguConfig("config/ci")
obj = MontaguConstellation(cfg)

obj.start()
Expand Down

0 comments on commit c4bcf7b

Please sign in to comment.