Added setting bridgehead path to enviroment

This commit is contained in:
root 2022-01-04 15:26:34 +01:00
parent c23c1a8d3d
commit ca7e3a641a
6 changed files with 149 additions and 90 deletions

View File

@ -28,7 +28,7 @@ services:
SITEID: ${SITEID}
CENTRAL_SEARCH: ${CCP_CENTRALSEARCH_URL}
DECENTRAL_SEARCH: ${CCP_DECENTRALSEARCH_URL}
MDR_URL: ${MDR_URL}
MDR_URL: ${CCP_MDR_URL}
MONITOR_URL: ${CCP_MONITOR_URL}
SHARE_URL: "${PROTOCOL}://${HOST}:${PORT}"
ID_MANAGER_URL: ${ID_MANAGER_URL}
@ -39,8 +39,7 @@ services:
POSTGRES_PORT: ${CONNECTOR_DB_PORT}
POSTGRES_DB: ${CONNECTOR_POSTGRES_DB}
POSTGRES_USER: ${CONNECTOR_POSTGRES_USER}
POSTGRES_PASS: ${C4_CONNECTOR_POSTGRES_PASSWORD}
DEPLOYMENT_CONTEXT: ${COMPOSE_PROJECT_NAME}-connector
POSTGRES_PASS: ${CONNECTOR_POSTGRES_PASS}
HTTP_PROXY_URL: ${HTTP_PROXY_URL}
HTTP_PROXY_USERNAME: ${HTTP_PROXY_USERNAME}
HTTP_PROXY_PASSWORD: ${HTTP_PROXY_PASSWORD}
@ -53,54 +52,104 @@ services:
depends_on:
- connector_db
ports:
- "8082:8080"
- "65496:65395"
- "8080:8080"
restart: always
connector_db:
container_name: bridgehead_connector_db
image: postgres:10.17
environment:
POSTGRES_HOST: ${CONNECTOR_POSTGRES_HOST}
POSTGRES_DB: ${CONNECTOR_POSTGRES_DB}
POSTGRES_USER: ${CONNECTOR_POSTGRES_USER}
POSTGRES_PASSWORD: ${C4_CONNECTOR_POSTGRES_PASSWORD}
POSTGRES_PASSWORD: ${CONNECTOR_POSTGRES_PASS}
TZ: Europe/Berlin
volumes:
- "connector_db_data:/var/lib/postgresql/data"
restart: always
## ID-Management
idmanager:
container_name: bridgehead_idmanager
image: docker.verbis.dkfz.de/ccp/idmanager:deploy-c4
image: docker.verbis.dkfz.de/pseudonymisierung/magicpl:0.2.0-RC23
environment:
MAGICPL_MAINZELLISTE_CENTRAL_URL: ${CCP_PATIENTLIST_URL}
MAGICPL_CENTRAL_URL: ${CCP_CONTROLLNUMBERGENERATOR_URL}
MAGICPL_SITE: ${SITEID}
MAGICPL_MAINZELLISTE_URL: ${MAGICPL_MAINZELLISTE_URL}
MAGICPL_MAINZELLISTE_API_KEY: ${MAGICPL_MAINZELLISTE_API_KEY}
MAGICPL_API_KEY: ${MAGICPL_API_KEY}
MAGICPL_API_KEY_CONNECTOR: ${MAGICPL_API_KEY_CONNECTOR}
MAGICPL_PASSPHRASE: ${MAGICPL_PASSPHRASE}
MAGICPL_MAINZELLISTE_CENTRAL_URL: ${MAGICPL_MAINZELLISTE_CENTRAL_URL}
MAGICPL_MAINZELLISTE_CENTRAL_API_KEY: ${MAGICPL_MAINZELLISTE_CENTRAL_API_KEY}
MAGICPL_CENTRAL_URL: ${MAGICPL_CENTRAL_URL}
MAGICPL_CENTRAL_API_KEY: ${MAGICPL_CENTRAL_API_KEY}
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
GLOBAL_ID: DKTK
TZ: Europe/Berlin
volumes:
- "idmanager_logs:/usr/local/tomcat/logs"
ports:
- "8084:8080"
secrets:
- magicpl.docker.xml
- dktk_bridgehead_info.docker.xml
- proxy.docker.xml
depends_on:
- patientlist
ports:
- "8085:8080"
patientlist:
container_name: bridgehead_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_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
volumes:
- "patientlist_logs:/usr/local/tomcat/logs"
secrets:
- mainzelliste.docker.conf
- centralSearchPublicKey
depends_on:
- patientlist_db
ports:
- "8086:8080"
patientlist_db:
container_name: bridgehead_patientlist_db
image: postgres:13.1-alpine
environment:
POSTGRES_HOST: ${ML_DB_HOST}
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"
store:
container_name: bridgehead_store
image: docker.verbis.dkfz.de/ccp/samply.store:release-5.1.2
environment:
MDR_URL: ${CCP_MDR_URL}
MDR_NAMESPACE: adt,dktk,marker
MDR_VALIDATION: "false"
POSTGRES_HOST: bridgehead_store_db
POSTGRES_PORT: 5432
POSTGRES_DB: samplystore
POSTGRES_USER: samplystore
POSTGRES_PASSWORD: ${C4_SAMPLY_STORE_PASS}
MDR_NAMESPACE: ${MDR_NAMESPACE}
MDR_VALIDATION: ${MDR_VALIDATION}
POSTGRES_HOST: ${STORE_POSTGRES_HOST}
POSTGRES_PORT: ${STORE_POSTGRES_PORT}
POSTGRES_DB: ${STORE_POSTGRES_DB}
POSTGRES_USER: ${STORE_POSTGRES_USER}
POSTGRES_PASSWORD: ${STORE_POSTGRES_PASS}
TZ: Europe/Berlin
volumes:
- "store_logs:/usr/local/tomcat/logs"
@ -108,7 +157,6 @@ services:
- store_db
ports:
- "8083:8080"
- "65495:65395"
restart: always
store_db:
@ -116,11 +164,11 @@ services:
image: postgres:10.17
command: postgres -c datestyle='iso, dmy'
environment:
POSTGRES_HOST: store_db
POSTGRES_PORT: 5432
POSTGRES_DB: samplystore
POSTGRES_USER: samplystore
POSTGRES_PASSWORD: ${C4_SAMPLY_STORE_PASS}
POSTGRES_HOST: ${STORE_POSTGRES_HOST}
POSTGRES_PORT: ${STORE_POSTGRES_PORT}
POSTGRES_DB: ${STORE_POSTGRES_DB}
POSTGRES_USER: ${STORE_POSTGRES_USER}
POSTGRES_PASSWORD: ${STORE_POSTGRES_PASS}
TZ: Europe/Berlin
volumes:
- "store_db_data:/var/lib/postgresql/data"

View File

@ -1,10 +1,12 @@
version: "3.7"
volumes:
connector_db_data:
connector_logs:
patientlist_db_data:
patientlist_logs:
idmanager_logs:
connector_db_data: null
connector_logs: null
patientlist_db_data: null
patientlist_logs: null
idmanager_logs: null
store_db_data: null
store_logs: null
secrets:
mainzelliste.docker.conf:
file: ../internal-configuration/mainzelliste.conf
@ -19,12 +21,11 @@ secrets:
services:
connector:
container_name: bridgehead_dktk_connector
image: samply/share-client:dktk-develop
container_name: bridgehead_c4_connector
image: "samply/share-client:c4-7"
environment:
SITE: ${SITE}
SITEID: ${SITEID}
TOMCAT_REVERSEPROXY_FQDN: ${HOST}/${COMPOSE_PROJECT_NAME}-connector
CENTRAL_SEARCH: ${CCP_CENTRALSEARCH_URL}
DECENTRAL_SEARCH: ${CCP_DECENTRALSEARCH_URL}
MDR_URL: ${CCP_MDR_URL}
@ -35,11 +36,10 @@ services:
PATIENTLIST_URL: ${PATIENTLIST_URL}
STORE_URL: ${LDM_URL}
POSTGRES_HOST: ${CONNECTOR_DB_HOST}
POSTGRES_PORT: 5432
POSTGRES_PORT: ${CONNECTOR_DB_PORT}
POSTGRES_DB: ${CONNECTOR_POSTGRES_DB}
POSTGRES_USER: ${CONNECTOR_POSTGRES_USER}
POSTGRES_PASS: ${DKTK_CONNECTOR_POSTGRES_PASSWORD}
DEPLOYMENT_CONTEXT: ${COMPOSE_PROJECT_NAME}-connector
POSTGRES_PASS: ${CONNECTOR_POSTGRES_PASS}
HTTP_PROXY_URL: ${HTTP_PROXY_URL}
HTTP_PROXY_USERNAME: ${HTTP_PROXY_USERNAME}
HTTP_PROXY_PASSWORD: ${HTTP_PROXY_PASSWORD}
@ -51,48 +51,41 @@ services:
- "connector_logs:/usr/local/tomcat/logs"
depends_on:
- connector_db
ports:
- "8080:8080"
restart: always
extra_hosts:
- "host.docker.internal:host-gateway"
- "${HOST}:${HOSTIP}"
connector_db:
container_name: bridgead_connector_db
container_name: bridgehead_connector_db
image: postgres:10.17
environment:
POSTGRES_HOST: ${CONNECTOR_POSTGRES_HOST}
POSTGRES_DB: ${CONNECTOR_POSTGRES_DB}
POSTGRES_USER: ${CONNECTOR_POSTGRES_USER}
POSTGRES_PASSWORD: ${DKTK_CONNECTOR_POSTGRES_PASSWORD}
POSTGRES_PASSWORD: ${CONNECTOR_POSTGRES_PASS}
TZ: Europe/Berlin
volumes:
- "connector_db_data:/var/lib/postgresql/data"
restart: always
extra_hosts:
- "host.docker.internal:host-gateway"
- "${HOST}:${HOSTIP}"
## ID-Management
idmanager:
container_name: bridgehead_idmanager
image: docker.verbis.dkfz.de/pseudonymisierung/magicpl:release-0.2.0
image: docker.verbis.dkfz.de/pseudonymisierung/magicpl:0.2.0-RC23
environment:
TOMCAT_REVERSEPROXY_FQDN: ${HOST}/ID-Manager
TOMCAT_REVERSEPROXY_SCHEME: ${PROTOCOL}
TOMCAT_REVERSEPROXY_PORT: ${PORT}
MAGICPL_MAINZELLISTE_URL: http://patientlist:8080/Patientlist
MAGICPL_MAINZELLISTE_API_KEY: ${LOCAL_IDMANAGER_MAINZELLISTE_APIKEY}
MAGICPL_API_KEY: ${LOCAL_IDMANAGER_LDM_APIKEY}
MAGICPL_API_KEY_CONNECTOR: ${LOCAL_IDMANAGER_CONNECTOR_APIKEY}
MAGICPL_PASSPHRASE: notUsedInThisConfigurationButMandatory
### Configuration for communication with central identity management
MAGICPL_MAINZELLISTE_CENTRAL_URL: ${CCP_PATIENTLIST_URL}
MAGICPL_MAINZELLISTE_CENTRAL_API_KEY: ${CCP_PATIENTLISTE_APIKEY}
MAGICPL_CENTRAL_URL: ${CCP_CONTROLLNUMBERGENERATOR_URL}
MAGICPL_CENTRAL_API_KEY: ${CCP_CONTROLLNUMBERGENERATOR_APIKEY}
MAGICPL_OIDC_PROVIDER: ${CCP_OIDC_PROVIDER_URL}/oauth2
MAGICPL_OIDC_CLIENT_ID: ${CCP_OIDC_CLIENT_ID}
MAGICPL_OIDC_CLIENT_SECRET: ${CCP_OIDC_CLIENT_SECRET}
MAGICPL_SITE: ${SITEID}
MAGICPL_MAINZELLISTE_URL: ${MAGICPL_MAINZELLISTE_URL}
MAGICPL_MAINZELLISTE_API_KEY: ${MAGICPL_MAINZELLISTE_API_KEY}
MAGICPL_API_KEY: ${MAGICPL_API_KEY}
MAGICPL_API_KEY_CONNECTOR: ${MAGICPL_API_KEY_CONNECTOR}
MAGICPL_PASSPHRASE: ${MAGICPL_PASSPHRASE}
MAGICPL_MAINZELLISTE_CENTRAL_URL: ${MAGICPL_MAINZELLISTE_CENTRAL_URL}
MAGICPL_MAINZELLISTE_CENTRAL_API_KEY: ${MAGICPL_MAINZELLISTE_CENTRAL_API_KEY}
MAGICPL_CENTRAL_URL: ${MAGICPL_CENTRAL_URL}
MAGICPL_CENTRAL_API_KEY: ${MAGICPL_CENTRAL_API_KEY}
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:
@ -103,24 +96,23 @@ services:
- proxy.docker.xml
depends_on:
- patientlist
ports:
- "8085:8080"
patientlist:
container_name: bridgehead_patientlist
image: medicalinformatics/mainzelliste:develop
environment:
TOMCAT_REVERSEPROXY_FQDN: ${HOST}/Patientlist
TOMCAT_REVERSEPROXY_SCHEME: ${PROTOCOL}
TOMCAT_REVERSEPROXY_PORT: ${PORT}
ML_DB_DRIVER: org.postgresql.Driver
ML_DB_TYPE: postgresql
ML_DB_HOST: patientlist_db
ML_DB_PORT: 5432
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_PASS: ${DKTK_PATIENTLIST_DBPASS}
ML_API_KEY: ${DKTK_IDMANAGER_MAINZELLISTE_APIKEY}
ML_DB_PASS: ${ML_DB_PASS}
ML_API_KEY: ${ML_API_KEY}
ML_LOG_LEVEL: warning
ML_SITE: ${SITEID}
ML_SITE: adt
TZ: Europe/Berlin
env_file:
- ./site-config/patientlist.env
@ -131,15 +123,17 @@ services:
- centralSearchPublicKey
depends_on:
- patientlist_db
ports:
- "8086:8080"
patientlist_db:
container_name: bridgehead_patientlist_db
image: postgres:13.1-alpine
environment:
POSTGRES_HOST: ${ML_DB_HOST}
POSTGRES_DB: ${ML_DB_NAME}
POSTGRES_USER: ${ML_DB_USER}
POSTGRES_PASSWORD: ${DKTK_PATIENTLIST_DBPASS}
POSTGRES_PASSWORD: ${ML_DB_PASS}
TZ: Europe/Berlin
volumes:
- "patientlist_db_data:/var/lib/postgresql/data"

View File

@ -5,7 +5,7 @@ services:
container_name: "bridgehead_blaze_store"
image: "samply/blaze:0.15"
environment:
BASE_URL: "http://store:8080"
BASE_URL: "http://bridgehead_blzae_store:8080"
JAVA_TOOL_OPTIONS: "-Xmx4g"
networks:
- "samply"
@ -16,14 +16,14 @@ services:
restart: "always"
connector:
container_name: "bridgehead_connector"
container_name: "bridgehead_gbn_connector"
image: "samply/share-client:gbn-7"
environment:
POSTGRES_HOST: "connector-db"
POSTGRES_HOST: "bridgehead_connector_db"
POSTGRES_DB: "samply.connector"
POSTGRES_USER: "samply"
POSTGRES_PASS: ${GBN_CONNECTOR_POSTGRES_PASS}
STORE_URL: "http://store:8080/fhir"
POSTGRES_PASS: ${CONNECTOR_POSTGRES_PASS}
STORE_URL: "http://bridgehead_store:8080/fhir"
QUERY_LANGUAGE: "CQL"
MDR_URL: "https://mdr.germanbiobanknode.de/v3/api/mdr"
networks:
@ -36,11 +36,11 @@ services:
restart: "always"
connector-db:
container_name: "bridgehead_connector-db"
container_name: "bridgehead_connector_db"
image: "postgres:10.17"
environment:
POSTGRES_USER: "samply"
POSTGRES_PASSWORD: "samply"
POSTGRES_PASSWORD: ${CONNECTOR_POSTGRES_PASS}
POSTGRES_DB: "samply.connector"
networks:
- "connector-db"

View File

@ -1,18 +1,29 @@
#!/bin/bash
### Note: Currently not complete, needs some features before useable for production
./prerequisites.sh
if ! ./prerequisites.sh; then
echo "Prerequisites failed, exiting"
exiting
fi
source site.conf
echo "Installing bridgehead"
if ! grep -E 'BRIDGEHEAD_PATH=' /etc/environment; then
echo "BRIDGEHEAD_PATH=${PWD}" >> /etc/environment
echo "Please reboot the system to properly set the enviroment"
exit
fi
sed -i -e "s|\BRIDGEHEAD_PATH=.*|\BRIDGEHEAD_PATH=${PWD}|" environment
cd /etc/systemd/system/
echo "Installing bridgehead\@.service in systemd ..."
sudo cp /srv/docker/bridgehead/convenience/bridgehead\@.service ./
sudo cp ${BRIDGEHEAD_PATH}/convenience/bridgehead\@.service ./
echo "Installing bridgehead\@.update.service in systemd ..."
sudo cp /srv/docker/bridgehead/convenience/bridgehead-update\@.service ./
sudo cp /srv/docker/bridgehead/convenience/bridgehead-update\@.timer ./
sudo cp ${BRIDGEHEAD_PATH}/convenience/bridgehead-update\@.service ./
sudo cp ${BRIDGEHEAD_PATH}/convenience/bridgehead-update\@.timer ./
echo "Loading the bridgehead definitions in systemd"
sudo systemctl daemon-reload

View File

@ -1,7 +1,10 @@
#!/bin/bash
### Note: Currently not complete, needs some features before useable for production
./prerequisites.sh
if ! ./prerequisites.sh; then
echo "Prerequisites failed, exiting"
exiting
fi
source site.conf
echo "Starting bridgehead"

View File

@ -6,6 +6,9 @@ systemctl stop bridgehead@"${project}".service
systemctl stop bridgehead-update@"${project}".timer
systemctl stop bridgehead-update@"${project}".service
sed -i -e "s|BRIDGEHEAD_PATH=.*||" /etc/environment
cd /etc/systemd/system/
rm bridgehead\@.service
rm bridgehead-update\@.timer