From 735787067042662cdb0828c9134989d7e28c885e Mon Sep 17 00:00:00 2001 From: root Date: Wed, 19 Jan 2022 10:52:25 +0100 Subject: [PATCH] Manges changes and moving vars to the correct file --- c4/internal.env | 47 +++++++++++++++++++++++++++++++++ dktk/docker-compose.yml | 57 ++++++++++++----------------------------- dktk/internal.env | 56 ++++++++++++++++++++++++++++++++++++++++ gbn/docker-compose.yml | 41 ++++++++++++++--------------- gbn/internal.env | 26 +++++++++++++++++++ install-bridgehead.sh | 8 +++--- site.dev.conf | 10 +++++++- update-bridgehead.sh | 2 +- 8 files changed, 181 insertions(+), 66 deletions(-) create mode 100644 c4/internal.env create mode 100644 dktk/internal.env create mode 100644 gbn/internal.env diff --git a/c4/internal.env b/c4/internal.env new file mode 100644 index 0000000..f0c0daa --- /dev/null +++ b/c4/internal.env @@ -0,0 +1,47 @@ +SITE=bridgehead_test +SITEID=BRIDGEHEAD_TEST + +CONNECTOR_SHARE_URL="http://${HOST}:8080" +CONNECTOR_ENABLE_METRICS=false +CONNECTOR_MONITOR_INTERVAL= +CONNECTOR_UPDATE_SERVER= + +CONNECTOR_POSTGRES_PORT=5432 +CONNECTOR_POSTGRES_DB=samply.connector +CONNECTOR_POSTGRES_USER=samply.connector + +HTTP_PROXY_HOST=${PROXY_URL} +HTTP_PROXY_USER= +HTTP_PROXY_PASSWORD= +HTTPS_PROXY_HOST=${PROXY_URL} +HTTPS_PROXY_USER= +HTTPS_PROXY_PASSWORD= +HTTP_PROXY=${PROXY_URL} +HTTPS_PROXY=${PROXY_URL} +http_proxy=${PROXY_URL} +https_proxy=${PROXY_URL} + +CCP_CENTRALSEARCH_URL=https://centralsearch-test.dktk.dkfz.de/ +CCP_DECENTRALSEARCH_URL=https://decentralsearch-test.ccp-it.dktk.dkfz.de/ + +CCP_MDR_URL=https://mdr.ccp-it.dktk.dkfz.de/v3/api/mdr +CCP_MONITOR_URL= +MONITOR_OPTOUT= + +## nNGM +#NNGM_URL=http://bridgeheadstore:8080 +#NNGM_PROFILE=http://uk-koeln.de/fhir/StructureDefinition/Patient/nNGM/pseudonymisiert +#NNGM_MAINZELLISTE_URL=https://test.verbis.dkfz.de/mpl + +##MDR +MDR_NAMESPACE=adt,dktk,marker +#MDR_MAP= +MDR_VALIDATION=false + +ML_DB_NAME=mainzelliste +ML_DB_PORT=5432 +ML_DB_USER=mainzelliste + +CENTRAL_CONTROL_NUMBER_GENERATPR_URL=http://e260-serv-03/central/api +GLOBAL_ID=DKTK +MAINZELLISTE_URL=https://patientlist-test.ccpit.dktk.dkfz.de/mainzelliste \ No newline at end of file diff --git a/dktk/docker-compose.yml b/dktk/docker-compose.yml index c8ef8fd..defaea7 100644 --- a/dktk/docker-compose.yml +++ b/dktk/docker-compose.yml @@ -24,30 +24,9 @@ services: container_name: bridgehead_dktk_connector image: "samply/share-client:dktk-7" environment: - SITE: ${SITE} - SITEID: ${SITEID} - CENTRAL_SEARCH: ${CCP_CENTRALSEARCH_URL} - DECENTRAL_SEARCH: ${CCP_DECENTRALSEARCH_URL} - MDR_URL: ${CCP_MDR_URL} - MONITOR_URL: ${CCP_MONITOR_URL} - SHARE_URL: "${PROTOCOL}://${HOST}:${PORT}" - ID_MANAGER_URL: ${ID_MANAGER_URL} - PROJECTPSEUDONYMISATION_URL: ${PROJECTPSEUDONYMISATION_URL} - PATIENTLIST_URL: ${PATIENTLIST_URL} - STORE_URL: ${LDM_URL} + STORE_URL: ${STORE_URL} POSTGRES_HOST: ${CONNECTOR_DB_HOST} - POSTGRES_PORT: ${CONNECTOR_POSTGRES_PORT} - POSTGRES_DB: ${CONNECTOR_POSTGRES_DB} - POSTGRES_USER: ${CONNECTOR_POSTGRES_USER} POSTGRES_PASS: ${CONNECTOR_POSTGRES_PASS} - HTTP_PROXY_URL: ${HTTP_PROXY_URL} - HTTP_PROXY_USERNAME: ${HTTP_PROXY_USER} - HTTP_PROXY_PASSWORD: ${HTTP_PROXY_PASSWORD} - HTTPS_PROXY_URL: ${HTTPS_PROXY_URL} - HTTPS_PROXY_USERNAME: ${HTTPS_PROXY_USER} - HTTPS_PROXY_PASSWORD: ${HTTPS_PROXY_PASSWORD} - NO_PROXY: ${NO_PROXY} - TZ: Europe/Berlin volumes: - "connector_logs:/usr/local/tomcat/logs" depends_on: @@ -55,6 +34,9 @@ services: ports: - "8080:8080" restart: always + env_file: + ###TODO: Move into Image + - internal.env networks: - "samply" - "connector-db" @@ -64,20 +46,20 @@ services: image: postgres:10.17 environment: POSTGRES_HOST: ${CONNECTOR_DB_HOST} - POSTGRES_DB: ${CONNECTOR_POSTGRES_DB} - POSTGRES_USER: ${CONNECTOR_POSTGRES_USER} POSTGRES_PASSWORD: ${CONNECTOR_POSTGRES_PASS} - TZ: Europe/Berlin volumes: - "connector_db_data:/var/lib/postgresql/data" restart: always + env_file: + ###TODO: Move into Image + - internal.env networks: - "connector-db" idmanager: container_name: bridgehead_dktk_idmanager - image: docker.verbis.dkfz.de/pseudonymisierung/magicpl:0.2.0-RC23 + image: docker.verbis.dkfz.de/pseudonymisierung/magicpl:release-0.2.0 environment: MAGICPL_MAINZELLISTE_URL: ${MAGICPL_MAINZELLISTE_URL} MAGICPL_MAINZELLISTE_API_KEY: ${MAGICPL_MAINZELLISTE_API_KEY} @@ -91,8 +73,7 @@ services: MAGICPL_OIDC_PROVIDER: ${MAGICPL_OIDC_PROVIDER} MAGICPL_OIDC_CLIENT_ID: ${MAGICPL_OIDC_CLIENT_ID} MAGICPL_OIDC_CLIENT_SECRET: ${MAGICPL_OIDC_CLIENT_SECRET} - MAGICPL_SITE: adt - MAGICPL_LOG_LEVEL: info + TZ: Europe/Berlin volumes: - "idmanager_logs:/usr/local/tomcat/logs" @@ -102,6 +83,9 @@ services: - proxy.docker.xml depends_on: - patientlist + env_file: + ###TODO: Move into Image + - internal.env ports: - "8085:8080" networks: @@ -111,19 +95,12 @@ services: container_name: bridgehead_dktk_patientlist image: medicalinformatics/mainzelliste:develop environment: - ML_DB_DRIVER: org.postgresql.Driver - ML_DB_TYPE: postgresql - ML_DB_HOST: ${ML_DB_HOST} - ML_DB_PORT: ${ML_DB_PORT} - ML_DB_NAME: ${ML_DB_NAME} - ML_DB_USER: ${ML_DB_USER} + ML_DB_HOST: bridgehead_dktk_patientlist_db ML_DB_PASS: ${ML_DB_PASS} ML_API_KEY: ${ML_API_KEY} - ML_LOG_LEVEL: warning - ML_SITE: adt - TZ: Europe/Berlin env_file: - ../site-config/patientlist.env + - internal.env volumes: - "patientlist_logs:/usr/local/tomcat/logs" secrets: @@ -140,12 +117,12 @@ services: container_name: bridgehead_dktk_patientlist_db image: postgres:13.1-alpine environment: - POSTGRES_DB: ${ML_DB_NAME} - POSTGRES_USER: ${ML_DB_USER} POSTGRES_PASSWORD: ${ML_DB_PASS} - TZ: Europe/Berlin volumes: - "patientlist_db_data:/var/lib/postgresql/data" + env_file: + ###TODO: Move into Image + - internal.env networks: - "samply" diff --git a/dktk/internal.env b/dktk/internal.env new file mode 100644 index 0000000..94b7261 --- /dev/null +++ b/dktk/internal.env @@ -0,0 +1,56 @@ +SITE=bridgehead_dktk_test +SITEID=BRIDGEHEAD_DKTK_TEST + +CONNECTOR_SHARE_URL="http://${HOST}:8080" +CONNECTOR_ENABLE_METRICS=false +CONNECTOR_MONITOR_INTERVAL= +CONNECTOR_UPDATE_SERVER= + +POSTGRES_PORT=5432 +POSTGRES_DB=samply.connector +POSTGRES_USER=samply.connector + +HTTP_PROXY_HOST=${PROXY_URL} +HTTP_PROXY_USER= +HTTP_PROXY_PASSWORD= +HTTPS_PROXY_HOST=${PROXY_URL} +HTTPS_PROXY_USER= +HTTPS_PROXY_PASSWORD= +HTTP_PROXY=${PROXY_URL} +HTTPS_PROXY=${PROXY_URL} +http_proxy=${PROXY_URL} +https_proxy=${PROXY_URL} + +CCP_CENTRALSEARCH_URL=https://centralsearch-test.dktk.dkfz.de/ +CCP_DECENTRALSEARCH_URL=https://decentralsearch-test.ccp-it.dktk.dkfz.de/ + +CCP_MDR_URL=https://mdr.ccp-it.dktk.dkfz.de/v3/api/mdr +CCP_MONITOR_URL= +MONITOR_OPTOUT= + +## nNGM +#NNGM_URL=http://bridgeheadstore:8080 +#NNGM_PROFILE=http://uk-koeln.de/fhir/StructureDefinition/Patient/nNGM/pseudonymisiert +#NNGM_MAINZELLISTE_URL=https://test.verbis.dkfz.de/mpl + +##MDR +MDR_NAMESPACE=adt,dktk,marker +#MDR_MAP= +MDR_VALIDATION=false + +ML_DB_NAME=samply.connector +ML_DB_PORT=5432 +ML_DB_USER=samply.connector + +CENTRAL_CONTROL_NUMBER_GENERATPR_URL=http://e260-serv-03/central/api +GLOBAL_ID=DKTK +MAINZELLISTE_URL=https://patientlist-test.ccpit.dktk.dkfz.de/mainzelliste +ML_DB_DRIVER=org.postgresql.Driver +ML_DB_TYPE=postgresql + +ML_LOG_LEVEL=warning +ML_SITE=BRIDGEHEAD_DKTK_TEST +TZ=Europe/Berlin + +MAGICPL_SITE=adt +MAGICPL_LOG_LEVEL=info \ No newline at end of file diff --git a/gbn/docker-compose.yml b/gbn/docker-compose.yml index e2f6bad..684e693 100644 --- a/gbn/docker-compose.yml +++ b/gbn/docker-compose.yml @@ -1,6 +1,17 @@ version: '3.4' -services: +networks: + samply: + driver: "bridge" + connector-db: + driver: "bridge" +volumes: + store-db-data: + name: "store-db-data" + connector-db-data: + name: "connector-db-data" + +services: store: container_name: "bridgehead_gbn_blaze_store" image: "samply/blaze:0.15" @@ -20,12 +31,12 @@ services: image: "samply/share-client:gbn-7" environment: POSTGRES_HOST: "bridgehead_gbn_connector_db" - POSTGRES_DB: "samply.connector" - POSTGRES_USER: "samply" POSTGRES_PASS: ${CONNECTOR_POSTGRES_PASS} - STORE_URL: "http://bridgehead_store:8080/fhir" - QUERY_LANGUAGE: "CQL" - MDR_URL: "https://mdr.germanbiobanknode.de/v3/api/mdr" + POSTGRES_PORT: 5432 + STORE_URL: "http://bridgehead_gbn_blaze_store:8080/fhir" + env_file: + ###TODO: Move into Image + - internal.env networks: - "samply" - "connector-db" @@ -39,23 +50,13 @@ services: container_name: "bridgehead_gbn_connector_db" image: "postgres:10.17" environment: - POSTGRES_USER: "samply" POSTGRES_PASSWORD: ${CONNECTOR_POSTGRES_PASS} - POSTGRES_DB: "samply.connector" + POSTGRES_PORT: 5432 networks: - "connector-db" volumes: - "connector-db-data:/var/lib/postgresql/data" restart: "always" - -networks: - samply: - driver: "bridge" - connector-db: - driver: "bridge" - -volumes: - store-db-data: - name: "store-db-data" - connector-db-data: - name: "connector-db-data" + env_file: + ###TODO: Move into Image + - internal.env \ No newline at end of file diff --git a/gbn/internal.env b/gbn/internal.env new file mode 100644 index 0000000..0fa1a6f --- /dev/null +++ b/gbn/internal.env @@ -0,0 +1,26 @@ +POSTGRES_DB=samply.connector +POSTGRES_USER=samply +QUERY_LANGUAGE=CQL +CONNECTOR_SHARE_URL="http://${HOST}:8080" +MDR_URL="https://mdr.germanbiobanknode.de/v3/api/mdr" +MONITOR_URL=https://ccpit.dktk.dkfz.de/dktk.monitor/rest/info +no_proxy=bridgehead_gbn_connector,bridgehead_gbn_blaze_store,bridgehead_gbn_connector_db +CONNECTOR_MONITOR_INTERVAL= +CONNECTOR_UPDATE_SERVER= +feature_BBMRI_DIRECTORY_SYNC=false +feature_DKTK_CENTRAL_SEARCH=false +feature_NNGM_CTS=false +LOG_LEVEL=info + +HTTP_PROXY_HOST=${PROXY_URL} +HTTP_PROXY_USER= +HTTP_PROXY_PASSWORD= +HTTPS_PROXY_HOST=${PROXY_URL} +HTTPS_PROXY_USER= +HTTPS_PROXY_PASSWORD= +HTTP_PROXY=${PROXY_URL} +HTTPS_PROXY=${PROXY_URL} +http_proxy=${PROXY_URL} +https_proxy=${PROXY_URL} + +CONNECTOR_ENABLE_METRICS=false diff --git a/install-bridgehead.sh b/install-bridgehead.sh index d360453..7a6793c 100755 --- a/install-bridgehead.sh +++ b/install-bridgehead.sh @@ -11,7 +11,7 @@ if ! ./lib/prerequisites.sh; then fi source site.conf -log -e "\nInstalling systemd units ..." +echo -e "\nInstalling systemd units ..." cp -v \ lib/systemd/bridgehead\@.service \ lib/systemd/bridgehead-update\@.service \ @@ -23,12 +23,12 @@ systemctl daemon-reload echo if ! systemctl is-active --quiet bridgehead@"${project}"; then - log "Enabling autostart of bridgehead@${project}.service" + echo "Enabling autostart of bridgehead@${project}.service" systemctl enable bridgehead@"${project}" - log "Enabling nightly updates for bridgehead@${project}.service ..." + echo "Enabling nightly updates for bridgehead@${project}.service ..." systemctl enable --now bridgehead-update@"${project}".timer fi -log -e "\nDone - now start your bridgehead by running\n\tsystemctl start bridgehead@${project}.service\nor by rebooting your machine." +echo -e "\nDone - now start your bridgehead by running\n\tsystemctl start bridgehead@${project}.service\nor by rebooting your machine." # TODO: Configuration of the different modules diff --git a/site.dev.conf b/site.dev.conf index e39140b..662c644 100644 --- a/site.dev.conf +++ b/site.dev.conf @@ -4,9 +4,17 @@ ##Setting Network properties export HOSTIP=$(MSYS_NO_PATHCONV=1 docker run --rm --add-host=host.docker.internal:host-gateway ubuntu cat /etc/hosts | grep 'host.docker.internal' | awk '{print $1}'); export HOST= +export PROXY_URL= export site_name= ### Write the Project you want to start with the brigdehead ##Exmaple project=gbn -project=c4 +project= +###secrets +## Connector Password +export CONNECTOR_POSTGRES_PASS= + +##ID-Manager +#This needs to be set if the project is either c4 or dktk +export \ No newline at end of file diff --git a/update-bridgehead.sh b/update-bridgehead.sh index b00e376..fdd9a9f 100755 --- a/update-bridgehead.sh +++ b/update-bridgehead.sh @@ -3,7 +3,7 @@ service="bridgehead" source lib/functions.sh -if ! ./prerequisites.sh; then +if ! lib/prerequisites.sh; then log "Prerequisites failed, exiting" exit fi