diff --git a/bbmri/modules/dnpm-compose-bwhc.yml b/bbmri/modules/dnpm-compose-bwhc.yml deleted file mode 100644 index a264728..0000000 --- a/bbmri/modules/dnpm-compose-bwhc.yml +++ /dev/null @@ -1,50 +0,0 @@ -version: "3.7" - -services: - dnpm-frontend: - depends_on: [ dnpm-backend ] - build: - context: ../../minimal/modules - dockerfile: dnpm-frontend.Dockerfile - args: - NUXT_HOST: 0.0.0.0 - NUXT_PORT: 3000 - BACKEND_PROTOCOL: http - BACKEND_HOSTNAME: dnpm-backend - BACKEND_PORT: 9000 - DNPM_BWHC_FRONTEND_ZIP: ${DNPM_BWHC_FRONTEND_ZIP} - HTTP_PROXY: ${http_proxy} - HTTPS_PROXY: ${https_proxy} - environment: - BACKEND_PROTOCOL: http - BACKEND_HOSTNAME: dnpm-backend - BACKEND_PORT: 9000 - no_proxy: dnpm-backend - labels: - - "traefik.enable=true" - - "traefik.http.routers.dnpm-frontend.rule=PathPrefix(`/dnpm-frontend`)" - - "traefik.http.services.dnpm-frontend.loadbalancer.server.port=3000" - - "traefik.http.routers.dnpm-frontend.tls=true" - - dnpm-backend: - build: - context: ../../minimal/modules - dockerfile: dnpm-backend.Dockerfile - args: - BWHC_BASE_DIR: /bwhc-backend - DNPM_BWHC_BACKEND_ZIP: ${DNPM_BWHC_BACKEND_ZIP} - environment: - APPLICATION_SECRET: ${DNPM_APPLICATION_SECRET} - ZPM_SITE: ${ZPM_SITE} - noproxy: dnpm-frontend,dnpm-beam-connect - # PLAY_HTTP_PORT: 9000 - # PLAY_HTTP_ADDRESS: 0.0.0.0 - volumes: - - /etc/bridgehead/dnpm/bwhcConnectorConfig.xml:/bwhc-backend/bwhcConnectorConfig.xml:ro - - /etc/bridgehead/dnpm/production.conf:/bwhc-backend/production.conf:ro - - bwhc_data:/bwhc-backend/data/ - - bwhc_hgnc_data:/bwhc-backend/hgnc_data/ - -volumes: - bwhc_data: - bwhc_hgnc_data: diff --git a/bbmri/modules/dnpm-compose-beamconnect.yml b/bbmri/modules/dnpm-compose.yml similarity index 100% rename from bbmri/modules/dnpm-compose-beamconnect.yml rename to bbmri/modules/dnpm-compose.yml diff --git a/bbmri/modules/dnpm-setup.sh b/bbmri/modules/dnpm-setup.sh index ca98542..4ece115 100644 --- a/bbmri/modules/dnpm-setup.sh +++ b/bbmri/modules/dnpm-setup.sh @@ -2,7 +2,7 @@ if [ -n "${ENABLE_DNPM}" ]; then log INFO "DNPM setup detected (Beam.Connect) -- will start Beam.Connect for DNPM." - OVERRIDE+=" -f ./$PROJECT/modules/dnpm-compose-beamconnect.yml" + OVERRIDE+=" -f ./$PROJECT/modules/dnpm-compose.yml" # Set variables required for Beam-Connect DNPM_APPLICATION_SECRET="$(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)" @@ -10,20 +10,4 @@ if [ -n "${ENABLE_DNPM}" ]; then DNPM_BROKER_ID="broker.dev.ccp-it.dktk.dkfz.de" DNPM_BROKER_URL="https://${DNPM_BROKER_ID}" DNPM_PROXY_ID="${SITE_ID}.${DNPM_BROKER_ID}" - - # Optionally, start bwhc as well. This is currently only experimental - if [ -n "${ENABLE_DNPM_BWHC}" ]; then - log INFO "DNPM setup detected (with Frontend/Backend) -- will start BWHC Frontend/Backend. This is highly experimental!" - OVERRIDE+=" -f ./$PROJECT/modules/dnpm-compose-bwhc.yml" - - if [ -z "${DNPM_BWHC_FRONTEND_ZIP}" ]; then - fail_and_report 1 "Variable DNPM_BWHC_FRONTEND_ZIP is not set." - fi - if [ -z "${DNPM_BWHC_BACKEND_ZIP}" ]; then - fail_and_report 1 "Variable DNPM_BWHC_BACKEND_ZIP is not set." - fi - if [ -z "${ZPM_SITE}" ]; then - fail_and_report 1 "Variable ZPM_SITE is not set." - fi - fi fi diff --git a/ccp/modules/dnpm-compose-bwhc.yml b/ccp/modules/dnpm-compose-bwhc.yml deleted file mode 100644 index a264728..0000000 --- a/ccp/modules/dnpm-compose-bwhc.yml +++ /dev/null @@ -1,50 +0,0 @@ -version: "3.7" - -services: - dnpm-frontend: - depends_on: [ dnpm-backend ] - build: - context: ../../minimal/modules - dockerfile: dnpm-frontend.Dockerfile - args: - NUXT_HOST: 0.0.0.0 - NUXT_PORT: 3000 - BACKEND_PROTOCOL: http - BACKEND_HOSTNAME: dnpm-backend - BACKEND_PORT: 9000 - DNPM_BWHC_FRONTEND_ZIP: ${DNPM_BWHC_FRONTEND_ZIP} - HTTP_PROXY: ${http_proxy} - HTTPS_PROXY: ${https_proxy} - environment: - BACKEND_PROTOCOL: http - BACKEND_HOSTNAME: dnpm-backend - BACKEND_PORT: 9000 - no_proxy: dnpm-backend - labels: - - "traefik.enable=true" - - "traefik.http.routers.dnpm-frontend.rule=PathPrefix(`/dnpm-frontend`)" - - "traefik.http.services.dnpm-frontend.loadbalancer.server.port=3000" - - "traefik.http.routers.dnpm-frontend.tls=true" - - dnpm-backend: - build: - context: ../../minimal/modules - dockerfile: dnpm-backend.Dockerfile - args: - BWHC_BASE_DIR: /bwhc-backend - DNPM_BWHC_BACKEND_ZIP: ${DNPM_BWHC_BACKEND_ZIP} - environment: - APPLICATION_SECRET: ${DNPM_APPLICATION_SECRET} - ZPM_SITE: ${ZPM_SITE} - noproxy: dnpm-frontend,dnpm-beam-connect - # PLAY_HTTP_PORT: 9000 - # PLAY_HTTP_ADDRESS: 0.0.0.0 - volumes: - - /etc/bridgehead/dnpm/bwhcConnectorConfig.xml:/bwhc-backend/bwhcConnectorConfig.xml:ro - - /etc/bridgehead/dnpm/production.conf:/bwhc-backend/production.conf:ro - - bwhc_data:/bwhc-backend/data/ - - bwhc_hgnc_data:/bwhc-backend/hgnc_data/ - -volumes: - bwhc_data: - bwhc_hgnc_data: diff --git a/ccp/modules/dnpm-compose-beamconnect.yml b/ccp/modules/dnpm-compose.yml similarity index 100% rename from ccp/modules/dnpm-compose-beamconnect.yml rename to ccp/modules/dnpm-compose.yml diff --git a/ccp/modules/dnpm-setup.sh b/ccp/modules/dnpm-setup.sh index c6c2b29..c9250cb 100644 --- a/ccp/modules/dnpm-setup.sh +++ b/ccp/modules/dnpm-setup.sh @@ -2,25 +2,9 @@ if [ -n "${ENABLE_DNPM}" ]; then log INFO "DNPM setup detected (Beam.Connect) -- will start Beam.Connect for DNPM." - OVERRIDE+=" -f ./$PROJECT/modules/dnpm-compose-beamconnect.yml" + OVERRIDE+=" -f ./$PROJECT/modules/dnpm-compose.yml" # Set variables required for Beam-Connect DNPM_APPLICATION_SECRET="$(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)" DNPM_BEAM_SECRET_SHORT="$(cat /proc/sys/kernel/random/uuid | sed 's/[-]//g' | head -c 20)" - - # Optionally, start bwhc as well. This is currently only experimental - if [ -n "${ENABLE_DNPM_BWHC}" ]; then - log INFO "DNPM setup detected (with Frontend/Backend) -- will start BWHC Frontend/Backend. This is highly experimental!" - OVERRIDE+=" -f ./$PROJECT/modules/dnpm-compose-bwhc.yml" - - if [ -z "${DNPM_BWHC_FRONTEND_ZIP}" ]; then - fail_and_report 1 "Variable DNPM_BWHC_FRONTEND_ZIP is not set." - fi - if [ -z "${DNPM_BWHC_BACKEND_ZIP}" ]; then - fail_and_report 1 "Variable DNPM_BWHC_BACKEND_ZIP is not set." - fi - if [ -z "${ZPM_SITE}" ]; then - fail_and_report 1 "Variable ZPM_SITE is not set." - fi - fi fi diff --git a/minimal/modules/dnpm-backend.Dockerfile b/minimal/modules/dnpm-backend.Dockerfile deleted file mode 100644 index e37c008..0000000 --- a/minimal/modules/dnpm-backend.Dockerfile +++ /dev/null @@ -1,66 +0,0 @@ -FROM openjdk:11-jre AS builder - -ARG DNPM_BWHC_BACKEND_ZIP - -# Change to latest release -ARG VERSION=broker - -ARG BWHC_BASE_DIR=/bwhc-backend - -ENV BWHC_BASE_DIR=$BWHC_BASE_DIR -ENV BWHC_USER_DB_DIR=$BWHC_BASE_DIR/data/user-db -ENV BWHC_DATA_ENTRY_DIR=$BWHC_BASE_DIR/data/data-entry -ENV BWHC_QUERY_DATA_DIR=$BWHC_BASE_DIR/data/query-data - -ADD ${DNPM_BWHC_BACKEND_ZIP} / -RUN unzip $(basename ${DNPM_BWHC_BACKEND_ZIP}) && rm $(basename ${DNPM_BWHC_BACKEND_ZIP}) - -WORKDIR $BWHC_BASE_DIR - -# Prepare config file to use environment variables from docker -RUN sed -i -r "s/APPLICATION_SECRET(.*)/#APPLICATION_SECRET\1/" ./config -RUN sed -i -r "s/ZPM_SITE(.*)/#ZPM_SITE\1/" ./config - -# Prepare config file to use fix environment variables for this image -RUN sed -i -r "s~BWHC_DATA_ENTRY_DIR.*~BWHC_DATA_ENTRY_DIR=$BWHC_DATA_ENTRY_DIR~" ./config -RUN sed -i -r "s~BWHC_QUERY_DATA_DIR.*~BWHC_QUERY_DATA_DIR=$BWHC_QUERY_DATA_DIR~" ./config -RUN sed -i -r "s~BWHC_USER_DB_DIR.*~BWHC_USER_DB_DIR=$BWHC_USER_DB_DIR~" ./config - -RUN ./install.sh $BWHC_BASE_DIR - -RUN mv bwhc-rest-api-gateway-*/ bwhc-rest-api-gateway/ - -FROM openjdk:11-jre - -ARG BWHC_BASE_DIR=/bwhc-backend - -ENV BWHC_BASE_DIR=$BWHC_BASE_DIR -ENV BWHC_USER_DB_DIR=$BWHC_BASE_DIR/data/user-db -ENV BWHC_DATA_ENTRY_DIR=$BWHC_BASE_DIR/data/data-entry -ENV BWHC_QUERY_DATA_DIR=$BWHC_BASE_DIR/data/query-data -ENV BWHC_CONNECTOR_CONFIG=$BWHC_BASE_DIR/bwhcConnectorConfig.xml - -COPY --from=builder $BWHC_BASE_DIR/config $BWHC_BASE_DIR/ -COPY --from=builder $BWHC_BASE_DIR/bwhcConnectorConfig.xml $BWHC_BASE_DIR/ -COPY --from=builder $BWHC_BASE_DIR/logback.xml $BWHC_BASE_DIR/ -COPY --from=builder $BWHC_BASE_DIR/production.conf $BWHC_BASE_DIR/ -COPY --from=builder $BWHC_BASE_DIR/bwhc-rest-api-gateway/ $BWHC_BASE_DIR/bwhc-rest-api-gateway/ - -VOLUME $BWHC_BASE_DIR/data -VOLUME $BWHC_BASE_DIR/hgnc_data - -EXPOSE ${BWHC_BACKEND_PORT} - -WORKDIR $BWHC_BASE_DIR - -CMD $BWHC_BASE_DIR/bwhc-rest-api-gateway/bin/bwhc-rest-api-gateway \ - -Dplay.http.secret.key=$APPLICATION_SECRET \ - -Dconfig.file=$BWHC_BASE_DIR/production.conf \ - -Dlogger.file=$BWHC_BASE_DIR/logback.xml \ - -Dpidfile.path=/dev/null \ - -Dbwhc.zpm.site=$ZPM_SITE \ - -Dbwhc.data.entry.dir=$BWHC_DATA_ENTRY_DIR \ - -Dbwhc.query.data.dir=$BWHC_QUERY_DATA_DIR \ - -Dbwhc.user.data.dir=$BWHC_USER_DB_DIR \ - -Dbwhc.hgnc.dir=$BWHC_HGNC_DIR \ - -Dbwhc.connector.configFile=$BWHC_CONNECTOR_CONFIG diff --git a/minimal/modules/dnpm-compose-bwhc.yml b/minimal/modules/dnpm-compose-bwhc.yml deleted file mode 100644 index a264728..0000000 --- a/minimal/modules/dnpm-compose-bwhc.yml +++ /dev/null @@ -1,50 +0,0 @@ -version: "3.7" - -services: - dnpm-frontend: - depends_on: [ dnpm-backend ] - build: - context: ../../minimal/modules - dockerfile: dnpm-frontend.Dockerfile - args: - NUXT_HOST: 0.0.0.0 - NUXT_PORT: 3000 - BACKEND_PROTOCOL: http - BACKEND_HOSTNAME: dnpm-backend - BACKEND_PORT: 9000 - DNPM_BWHC_FRONTEND_ZIP: ${DNPM_BWHC_FRONTEND_ZIP} - HTTP_PROXY: ${http_proxy} - HTTPS_PROXY: ${https_proxy} - environment: - BACKEND_PROTOCOL: http - BACKEND_HOSTNAME: dnpm-backend - BACKEND_PORT: 9000 - no_proxy: dnpm-backend - labels: - - "traefik.enable=true" - - "traefik.http.routers.dnpm-frontend.rule=PathPrefix(`/dnpm-frontend`)" - - "traefik.http.services.dnpm-frontend.loadbalancer.server.port=3000" - - "traefik.http.routers.dnpm-frontend.tls=true" - - dnpm-backend: - build: - context: ../../minimal/modules - dockerfile: dnpm-backend.Dockerfile - args: - BWHC_BASE_DIR: /bwhc-backend - DNPM_BWHC_BACKEND_ZIP: ${DNPM_BWHC_BACKEND_ZIP} - environment: - APPLICATION_SECRET: ${DNPM_APPLICATION_SECRET} - ZPM_SITE: ${ZPM_SITE} - noproxy: dnpm-frontend,dnpm-beam-connect - # PLAY_HTTP_PORT: 9000 - # PLAY_HTTP_ADDRESS: 0.0.0.0 - volumes: - - /etc/bridgehead/dnpm/bwhcConnectorConfig.xml:/bwhc-backend/bwhcConnectorConfig.xml:ro - - /etc/bridgehead/dnpm/production.conf:/bwhc-backend/production.conf:ro - - bwhc_data:/bwhc-backend/data/ - - bwhc_hgnc_data:/bwhc-backend/hgnc_data/ - -volumes: - bwhc_data: - bwhc_hgnc_data: diff --git a/minimal/modules/dnpm-compose-beamconnect.yml b/minimal/modules/dnpm-compose.yml similarity index 100% rename from minimal/modules/dnpm-compose-beamconnect.yml rename to minimal/modules/dnpm-compose.yml diff --git a/minimal/modules/dnpm-frontend.Dockerfile b/minimal/modules/dnpm-frontend.Dockerfile deleted file mode 100644 index 1d4bb30..0000000 --- a/minimal/modules/dnpm-frontend.Dockerfile +++ /dev/null @@ -1,42 +0,0 @@ -FROM node:10-alpine - -ARG DNPM_BWHC_FRONTEND_ZIP - -# Change to latest release -# Required for image build using local copy of zip file -ARG VERSION=2207 - -# nuxt host and port to be replaced in package.json. (See 2.3 in bwHCPrototypeManual) -# NUXT_HOST should have a value with public available IP address from within container. -# If changing NUXT_PORT, also change exposed port. -ARG NUXT_HOST=0.0.0.0 -ARG NUXT_PORT=3000 - -# Backend access setup. (See 2.4 in bwHCPrototypeManual) -ARG BACKEND_PROTOCOL=http -ARG BACKEND_HOSTNAME=localhost -ARG BACKEND_PORT=8080 - -ARG HTTP_PROXY="" -ARG HTTPS_PROXY="" - -ADD ${DNPM_BWHC_FRONTEND_ZIP} / -RUN unzip $(basename ${DNPM_BWHC_FRONTEND_ZIP}) && rm $(basename ${DNPM_BWHC_FRONTEND_ZIP}) - -WORKDIR /bwhc-frontend - -RUN npm install - -# Prepare package.json -RUN sed -i -r "s/^(\s*)\"host\"[^,]*(,?)/\1\"host\": \"$NUXT_HOST\"\2/" ./package.json -RUN sed -i -r "s/^(\s*)\"port\"[^,]*(,?)/\1\"port\": \"$NUXT_PORT\"\2/" ./package.json - -# Prepare nuxt.config.js -RUN sed -i -r "s/^(\s*)baseUrl[^,]*(,?)/\1baseUrl: process.env.BASE_URL || '$BACKEND_PROTOCOL:\/\/$BACKEND_HOSTNAME'\2/" ./nuxt.config.js -RUN sed -i -r "s/^(\s*)port[^,]*(,?)/\1port: process.env.port || ':$BACKEND_PORT'\2/" ./nuxt.config.js - -RUN npm run generate - -EXPOSE $NUXT_PORT - -CMD npm start diff --git a/minimal/modules/dnpm-setup.sh b/minimal/modules/dnpm-setup.sh index ca98542..4ece115 100644 --- a/minimal/modules/dnpm-setup.sh +++ b/minimal/modules/dnpm-setup.sh @@ -2,7 +2,7 @@ if [ -n "${ENABLE_DNPM}" ]; then log INFO "DNPM setup detected (Beam.Connect) -- will start Beam.Connect for DNPM." - OVERRIDE+=" -f ./$PROJECT/modules/dnpm-compose-beamconnect.yml" + OVERRIDE+=" -f ./$PROJECT/modules/dnpm-compose.yml" # Set variables required for Beam-Connect DNPM_APPLICATION_SECRET="$(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)" @@ -10,20 +10,4 @@ if [ -n "${ENABLE_DNPM}" ]; then DNPM_BROKER_ID="broker.dev.ccp-it.dktk.dkfz.de" DNPM_BROKER_URL="https://${DNPM_BROKER_ID}" DNPM_PROXY_ID="${SITE_ID}.${DNPM_BROKER_ID}" - - # Optionally, start bwhc as well. This is currently only experimental - if [ -n "${ENABLE_DNPM_BWHC}" ]; then - log INFO "DNPM setup detected (with Frontend/Backend) -- will start BWHC Frontend/Backend. This is highly experimental!" - OVERRIDE+=" -f ./$PROJECT/modules/dnpm-compose-bwhc.yml" - - if [ -z "${DNPM_BWHC_FRONTEND_ZIP}" ]; then - fail_and_report 1 "Variable DNPM_BWHC_FRONTEND_ZIP is not set." - fi - if [ -z "${DNPM_BWHC_BACKEND_ZIP}" ]; then - fail_and_report 1 "Variable DNPM_BWHC_BACKEND_ZIP is not set." - fi - if [ -z "${ZPM_SITE}" ]; then - fail_and_report 1 "Variable ZPM_SITE is not set." - fi - fi fi