From 6afb8d53dc2150456f24717fa4aa71aeaef916a3 Mon Sep 17 00:00:00 2001 From: juarez Date: Fri, 10 Feb 2023 13:11:50 +0100 Subject: [PATCH] Add nngm and exliquid modules --- ccp/{ => modules}/exliquid-compose.yml | 0 ccp/{ => modules}/exliquid-setup.sh | 0 ccp/{ => modules}/mtba-compose.yml | 0 ccp/modules/mtba-setup.sh | 13 +++++++++++++ ccp/{ => modules}/nngm-compose.yml | 0 ccp/{ => modules}/nngm-setup.sh | 12 ------------ ccp/modules/teiler-setup.sh | 2 ++ ccp/modules/teiler-ui-setup.sh | 2 ++ ccp/vars | 5 +++-- 9 files changed, 20 insertions(+), 14 deletions(-) rename ccp/{ => modules}/exliquid-compose.yml (100%) rename ccp/{ => modules}/exliquid-setup.sh (100%) rename ccp/{ => modules}/mtba-compose.yml (100%) create mode 100644 ccp/modules/mtba-setup.sh rename ccp/{ => modules}/nngm-compose.yml (100%) rename ccp/{ => modules}/nngm-setup.sh (50%) diff --git a/ccp/exliquid-compose.yml b/ccp/modules/exliquid-compose.yml similarity index 100% rename from ccp/exliquid-compose.yml rename to ccp/modules/exliquid-compose.yml diff --git a/ccp/exliquid-setup.sh b/ccp/modules/exliquid-setup.sh similarity index 100% rename from ccp/exliquid-setup.sh rename to ccp/modules/exliquid-setup.sh diff --git a/ccp/mtba-compose.yml b/ccp/modules/mtba-compose.yml similarity index 100% rename from ccp/mtba-compose.yml rename to ccp/modules/mtba-compose.yml diff --git a/ccp/modules/mtba-setup.sh b/ccp/modules/mtba-setup.sh new file mode 100644 index 0000000..d8f5038 --- /dev/null +++ b/ccp/modules/mtba-setup.sh @@ -0,0 +1,13 @@ +#!/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 + 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/nngm-compose.yml b/ccp/modules/nngm-compose.yml similarity index 100% rename from ccp/nngm-compose.yml rename to ccp/modules/nngm-compose.yml diff --git a/ccp/nngm-setup.sh b/ccp/modules/nngm-setup.sh similarity index 50% rename from ccp/nngm-setup.sh rename to ccp/modules/nngm-setup.sh index ba2e77f..d5b80eb 100644 --- a/ccp/nngm-setup.sh +++ b/ccp/modules/nngm-setup.sh @@ -7,15 +7,3 @@ 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/modules/teiler-setup.sh b/ccp/modules/teiler-setup.sh index d651107..e4c4945 100644 --- a/ccp/modules/teiler-setup.sh +++ b/ccp/modules/teiler-setup.sh @@ -1,3 +1,5 @@ +#!/bin/bash + function teilerSetup() { if [ -n "$ENABLE_TEILER" ];then log INFO "Teiler setup detected -- will start Teiler service." diff --git a/ccp/modules/teiler-ui-setup.sh b/ccp/modules/teiler-ui-setup.sh index c1f3933..1ff6f3b 100644 --- a/ccp/modules/teiler-ui-setup.sh +++ b/ccp/modules/teiler-ui-setup.sh @@ -1,3 +1,5 @@ +#!/bin/bash + function teilerUiSetup() { if [ -n "$ENABLE_TEILER" ];then log INFO "Teiler-UI setup detected -- will start Teiler-UI services." diff --git a/ccp/vars b/ccp/vars index 894fdee..85a1cb4 100644 --- a/ccp/vars +++ b/ccp/vars @@ -12,10 +12,11 @@ PRIVATEKEYFILENAME=/etc/bridgehead/pki/${SITE_ID}.priv.pem source $PROJECT/modules/id-management-setup.sh idManagementSetup # This will load nngm setup. Effective only if nngm configuration is defined. -source $PROJECT/nngm-setup.sh +source $PROJECT/modules/nngm-setup.sh nngmSetup -source $PROJECT/exliquid-setup.sh +source $PROJECT/modules/exliquid-setup.sh exliquidSetup +source $PROJECT/modules/mtba-setup.sh mtbaSetup source $PROJECT/modules/teiler-setup.sh teilerSetup