From 828312e04510315dd9ee87c3d5b9f53a4099852d Mon Sep 17 00:00:00 2001 From: "p.delpy@dkfz-heidelberg.de" Date: Fri, 2 Dec 2022 15:38:33 +0100 Subject: [PATCH] Added MTBA Module --- ccp/mtba-compose.yml | 33 +++++++++++++++++++++++++++++++++ ccp/nngm-setup.sh | 12 ++++++++++++ ccp/vars | 1 + 3 files changed, 46 insertions(+) create mode 100644 ccp/mtba-compose.yml diff --git a/ccp/mtba-compose.yml b/ccp/mtba-compose.yml new file mode 100644 index 0000000..53fd327 --- /dev/null +++ b/ccp/mtba-compose.yml @@ -0,0 +1,33 @@ +version: "3.7" + +services: + mtba: + image: samply/mtba:develop + container_name: bridgehead-mtba + environment: + BLAZE_STORE_URL: http://bridgehead-ccp-blaze:8080/fhir + # NOTE: Aktuell Berechtigungen wie MagicPL!!! + # TODO: Add separate ApiKey to Patientlist only for MTBA! + ID_MANAGER_API_KEY: ${IDMANAGER_LOCAL_PATIENTLIST_APIKEY} + ID_MANAGER_PSEUDONYM_ID_TYPE: BK_${IDMANAGEMENT_FRIENDLY_ID}_L-ID + ID_MANAGER_URL: http://bridgehead-id-manager:8080 + PATIENT_CSV_FIRST_NAME_HEADER: ${PATIENT_CSV_FIRST_NAME_HEADER:-"FIRST_NAME"} + PATIENT_CSV_LAST_NAME_HEADER: ${PATIENT_CSV_LAST_NAME_HEADER:-"LAST_NAME"} + PATIENT_CSV_GENDER_HEADER: ${PATIENT_CSV_GENDER_HEADER:-"GENDER"} + PATIENT_CSV_BIRTHDAY_HEADER: ${PATIENT_CSV_BIRTHDAY_HEADER:-"BIRTHDAY"} + CBIOPORTAL_URL: http://bridgehead-ccp-cbioportal:8080 + MUTATIONS_CSV_SCRIPT_INTERPRETER: "python3" + labels: + - "traefik.enable=true" + - "traefik.http.routers.mtba.rule=PathPrefix(`/`)" + - "traefik.http.services.mtba.loadbalancer.server.port=80" + - "traefik.http.routers.mtba.tls=true" + volumes: + # This directory persists the FHIR Resources that are needed to import data into blaze. + - /var/data/bridgehead/mtba:/app/mtba-files/persist + # Place new import files in this directory + - /tmp/bridgehead/mtba/:/app/mtba-files/input + + # TODO: Include CBioPortal in Deployment ... + # NOTE: CBioPortal can't load data while the system is running. So after import of data bridgehead needs to be restarted! + # TODO: Find a trigger to let mtba signal a restart for CBioPortal diff --git a/ccp/nngm-setup.sh b/ccp/nngm-setup.sh index d5b80eb..b55d48e 100644 --- a/ccp/nngm-setup.sh +++ b/ccp/nngm-setup.sh @@ -7,3 +7,15 @@ function nngmSetup() { fi CONNECTOR_POSTGRES_PASSWORD="$(echo \"This is a salt string to generate one consistent password. It is not required to be secret.\" | openssl rsautl -sign -inkey /etc/bridgehead/pki/${SITE_ID}.priv.pem | base64 | head -c 30)" } + +function mtbaSetup() { + # TODO: Check if ID-Management Module is activated! + if [ -n "$ENABLE_MTBA" ];then + log INFO "MTBA setup detected -- will start MTBA Service and CBioPortal." + if [ -n "$IDMANAGER_UPLOAD_APIKEY" ]; then + log ERROR "Detected MTBA Module configuration but ID-Management Module seems not to be configured!" + exit 1; + fi + OVERRIDE+=" -f ./$PROJECT/mtba-compose.yml" + fi +} diff --git a/ccp/vars b/ccp/vars index 89deae0..5172d24 100644 --- a/ccp/vars +++ b/ccp/vars @@ -16,3 +16,4 @@ source $PROJECT/nngm-setup.sh nngmSetup source $PROJECT/exliquid-setup.sh exliquidSetup +mtbaSetup \ No newline at end of file