beautiful config
This commit is contained in:
parent
82f6f886db
commit
969469db04
|
@ -1,6 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
function exliquidSetup() {
|
||||
case ${SITE_ID} in
|
||||
berlin|dresden|essen|frankfurt|freiburg|luebeck|mainz|muenchen-lmu|muenchen-tu|mannheim|tuebingen)
|
||||
EXLIQUID=1
|
||||
|
@ -16,4 +15,3 @@ function exliquidSetup() {
|
|||
log INFO "EXLIQUID setup detected -- will start Report-Hub."
|
||||
OVERRIDE+=" -f ./$PROJECT/modules/exliquid-compose.yml"
|
||||
fi
|
||||
}
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
#!/bin/bash
|
||||
|
||||
function exporterSetup() {
|
||||
if [ -n "$ENABLE_EXPORTER" ];then
|
||||
log INFO "Exporter setup detected -- will start Exporter service."
|
||||
OVERRIDE+=" -f ./$PROJECT/modules/exporter-compose.yml"
|
||||
fi
|
||||
# TODO: Generate password in another way so that not all passwords are the same?
|
||||
EXPORTER_DB_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)"
|
||||
}
|
||||
|
|
|
@ -1,21 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
function idManagementSetup() {
|
||||
if [ -n "$IDMANAGER_UPLOAD_APIKEY" ]; then
|
||||
log INFO "id-management setup detected -- will start id-management (mainzelliste & magicpl)."
|
||||
OVERRIDE+=" -f ./$PROJECT/modules/id-management-compose.yml"
|
||||
|
||||
# Auto Generate local Passwords
|
||||
PATIENTLIST_POSTGRES_PASSWORD="$(echo \"id-management-module-db-password-salt\" | openssl rsautl -sign -inkey /etc/bridgehead/pki/${SITE_ID}.priv.pem | base64 | head -c 30)"
|
||||
IDMANAGER_LOCAL_PATIENTLIST_APIKEY="$(cat /proc/sys/kernel/random/uuid | sed 's/[-]//g' | head -c 20)"
|
||||
|
||||
# Transform Seeds Configuration to pass it to the Mainzelliste Container
|
||||
PATIENTLIST_SEEDS_TRANSFORMED="$(declare -p PATIENTLIST_SEEDS | tr -d '\"' | sed 's/\[/\[\"/g' | sed 's/\]/\"\]/g')"
|
||||
|
||||
# Ensure old ids are working !!!
|
||||
export IDMANAGEMENT_FRIENDLY_ID=$(legacyIdMapping "$SITE_ID")
|
||||
fi
|
||||
}
|
||||
|
||||
# Transform into single string array, e.g. 'dktk-test' to 'dktk test'
|
||||
# Usage: transformToSingleStringArray 'dktk-test' -> 'dktk test'
|
||||
|
@ -50,3 +34,18 @@ function legacyIdMapping() {
|
|||
normalized_string=$(applySpecialCases "$uppercase_string");
|
||||
echo "$normalized_string" | tr -d ' '
|
||||
}
|
||||
|
||||
if [ -n "$IDMANAGER_UPLOAD_APIKEY" ]; then
|
||||
log INFO "id-management setup detected -- will start id-management (mainzelliste & magicpl)."
|
||||
OVERRIDE+=" -f ./$PROJECT/modules/id-management-compose.yml"
|
||||
|
||||
# Auto Generate local Passwords
|
||||
PATIENTLIST_POSTGRES_PASSWORD="$(echo \"id-management-module-db-password-salt\" | openssl rsautl -sign -inkey /etc/bridgehead/pki/${SITE_ID}.priv.pem | base64 | head -c 30)"
|
||||
IDMANAGER_LOCAL_PATIENTLIST_APIKEY="$(cat /proc/sys/kernel/random/uuid | sed 's/[-]//g' | head -c 20)"
|
||||
|
||||
# Transform Seeds Configuration to pass it to the Mainzelliste Container
|
||||
PATIENTLIST_SEEDS_TRANSFORMED="$(declare -p PATIENTLIST_SEEDS | tr -d '\"' | sed 's/\[/\[\"/g' | sed 's/\]/\"\]/g')"
|
||||
|
||||
# Ensure old ids are working !!!
|
||||
export IDMANAGEMENT_FRIENDLY_ID=$(legacyIdMapping "$SITE_ID")
|
||||
fi
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
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
|
||||
|
@ -10,4 +8,3 @@ function mtbaSetup() {
|
|||
fi
|
||||
OVERRIDE+=" -f ./$PROJECT/modules/mtba-compose.yml"
|
||||
fi
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ version: "3.7"
|
|||
|
||||
services:
|
||||
connector:
|
||||
container_name: bridgehead-connector
|
||||
container_name: bridgehead-nngm-connector
|
||||
image: docker.verbis.dkfz.de/ccp/connector:bk2
|
||||
environment:
|
||||
POSTGRES_PASSWORD: ${CONNECTOR_POSTGRES_PASSWORD}
|
||||
|
@ -19,7 +19,7 @@ services:
|
|||
|
||||
connector_db:
|
||||
image: postgres:9.5-alpine
|
||||
container_name: bridgehead-ccp-connector-db
|
||||
container_name: bridgehead-nngm-connector-db
|
||||
volumes:
|
||||
- "connector_db_data:/var/lib/postgresql/data"
|
||||
environment:
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
function nngmSetup() {
|
||||
if [ -n "$NNGM_CTS_APIKEY" ]; then
|
||||
log INFO "nNGM setup detected -- will start nNGM Connector."
|
||||
OVERRIDE+=" -f ./$PROJECT/modules/nngm-compose.yml"
|
||||
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)"
|
||||
}
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
function teilerUiSetup() {
|
||||
if [ -n "$ENABLE_TEILER" ];then
|
||||
if [ "$ENABLE_TEILER" == true ];then
|
||||
log INFO "Teiler-UI setup detected -- will start Teiler-UI services."
|
||||
OVERRIDE+=" -f ./$PROJECT/modules/teiler-ui-compose.yml"
|
||||
fi
|
||||
KEYCLOAK_DB_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)"
|
||||
}
|
||||
|
|
19
ccp/vars
19
ccp/vars
|
@ -8,17 +8,8 @@ REPORTHUB_BEAM_SECRET_LONG="ApiKey report-hub.${PROXY_ID} ${REPORTHUB_BEAM_SECRE
|
|||
SUPPORT_EMAIL=support-ccp@dkfz-heidelberg.de
|
||||
PRIVATEKEYFILENAME=/etc/bridgehead/pki/${SITE_ID}.priv.pem
|
||||
|
||||
# This will load id-management setup. Effective only if id-management configuration is defined.
|
||||
source $PROJECT/modules/id-management-setup.sh
|
||||
idManagementSetup
|
||||
# This will load nngm setup. Effective only if nngm configuration is defined.
|
||||
source $PROJECT/modules/nngm-setup.sh
|
||||
nngmSetup
|
||||
source $PROJECT/modules/exliquid-setup.sh
|
||||
exliquidSetup
|
||||
source $PROJECT/modules/mtba-setup.sh
|
||||
mtbaSetup
|
||||
source $PROJECT/modules/exporter-setup.sh
|
||||
exporterSetup
|
||||
source $PROJECT/modules/teiler-ui-setup.sh
|
||||
teilerUiSetup
|
||||
for module in $PROJECT/modules/*.sh
|
||||
do
|
||||
log INFO "sourcing $module"
|
||||
source $module
|
||||
done
|
||||
|
|
Loading…
Reference in New Issue