mirror of
https://github.com/samply/bridgehead.git
synced 2025-06-16 23:00:15 +02:00
Compare commits
175 Commits
qr_bbmri
...
feature/cb
Author | SHA1 | Date | |
---|---|---|---|
5ca134c35d | |||
c565d14ee4 | |||
a9c09c0d05 | |||
2f663c45e8 | |||
ebbe64abee | |||
26c9e1286d | |||
92984d24f3 | |||
abedfdaf64 | |||
c751b72e0e | |||
65eee84a4f | |||
c0f497255c | |||
56c2955b5d | |||
0ced9b0e4e | |||
bb23d6f25b | |||
8ac4e36ac1 | |||
4e809f66cb | |||
ca9f88421c | |||
8579bc879f | |||
18dda72e84 | |||
164d1a66fb | |||
ca7772421b | |||
2ec44c9d48 | |||
9231c99141 | |||
2542c478c1 | |||
7fb27efae3 | |||
efd26aa761 | |||
cd36ab455b | |||
e9eccd5cab | |||
381633d4a0 | |||
30760075a6 | |||
1299ee2ab4 | |||
fe56cbbc19 | |||
bd784e703a | |||
109426cf43 | |||
40d6c7cae5 | |||
a3c7a002fd | |||
91903fae24 | |||
ea0435bee3 | |||
ad1b00d16e | |||
e696d3b5dd | |||
b683d07f48 | |||
eea53cd877 | |||
b0ced71197 | |||
185143c084 | |||
0a1070c3a5 | |||
8505057863 | |||
72d37c87f9 | |||
8aa851bfe4 | |||
67831ba57b | |||
0545189cec | |||
faf46f9fea | |||
c8e215199c | |||
c2b994e0d1 | |||
4cd66f6689 | |||
e99913cdc3 | |||
afacdae20e | |||
33d955f17d | |||
c0ff03da6b | |||
6582db0523 | |||
27948c2a64 | |||
c8e7cd5f25 | |||
f2c55ade84 | |||
b20758bc3d | |||
8d22ea2c19 | |||
9eaaeb5064 | |||
c9b19a9368 | |||
b0b599c96b | |||
b7c6b15425 | |||
8e181a85c2 | |||
b9dbfd4803 | |||
3389145c1d | |||
7d8b83b10c | |||
d799554f86 | |||
4a4a1d76a7 | |||
785dff29bf | |||
1f9733aa4d | |||
c5578f81ee | |||
fa5459c4dd | |||
31320a856c | |||
a340b959c2 | |||
c7d0bcf94d | |||
51ca9efe11 | |||
1ef6142306 | |||
e71495c70f | |||
e6b7a63ef7 | |||
86ca652e8d | |||
d1a0153a6e | |||
5b88df4912 | |||
8345a9b1f1 | |||
3d210ea303 | |||
d8451c0426 | |||
b63eb141f6 | |||
f24dfa43ef | |||
b6e03f3a78 | |||
8d1a7e7374 | |||
4b705be264 | |||
3e79598533 | |||
6a97630bf1 | |||
3fdda8b8d4 | |||
de0193b99b | |||
08c9e6c822 | |||
61bfd661eb | |||
9e0c7fb5ca | |||
ce5f94881f | |||
cb332142c3 | |||
0cad79575b | |||
5f77168f65 | |||
361950ba7f | |||
cb659b87f1 | |||
0801ebe5a5 | |||
ceb089ddd7 | |||
f71832dd65 | |||
17036d459e | |||
146417f103 | |||
0cd0dc555b | |||
d3ecef5f04 | |||
0caf98224f | |||
412419494c | |||
2f7797b1f1 | |||
dcd31bfd7c | |||
90afe71b1b | |||
d5924e64a3 | |||
dfa12ca686 | |||
213ac6370a | |||
9732ef33b7 | |||
dc6e0a349f | |||
cb909dbcd4 | |||
69f1748ae7 | |||
0cbbee6906 | |||
7170612376 | |||
44134550ac | |||
4ba5144140 | |||
0d07a09296 | |||
5b62a1a248 | |||
bdf943f94e | |||
bc476ed0a8 | |||
f351cc931c | |||
9dd3c24a6d | |||
b4581e8b3a | |||
da49437ada | |||
1f4c2cad03 | |||
cae40aa39a | |||
8679d46b62 | |||
1438c32455 | |||
bfd33c0c1b | |||
0230303bd5 | |||
a86e594e85 | |||
0807e52160 | |||
75f9b73e98 | |||
90e2f2e40b | |||
b0da23ac1c | |||
c836a7554f | |||
fdd26083b6 | |||
3dcf83e4e8 | |||
a13b851edd | |||
a2e9a86bc0 | |||
1bb6df65fe | |||
8e591773f4 | |||
d915debbbb | |||
2c7bdfd868 | |||
cf255bf08b | |||
813a698dbb | |||
30090f3633 | |||
52f311ba1c | |||
f32d124fda | |||
8140b6dd7b | |||
a63bdbde54 | |||
7b24e2b427 | |||
5a9ab31fa4 | |||
85d333cfe8 | |||
0b61fc7f29 | |||
39981c310c | |||
2f72ac2dc9 | |||
81c0db0349 | |||
005e5a1bf0 |
@ -1,6 +1,6 @@
|
|||||||
version: "3.7"
|
version: "3.7"
|
||||||
|
|
||||||
# This includes only the shared persistence for BBMRI-ERIC and GBN. Federation components are included as modules, see ccp vars.
|
# This includes only the shared persistence for BBMRI-ERIC and GBN. Federation components are included as modules, see vars.
|
||||||
|
|
||||||
services:
|
services:
|
||||||
blaze:
|
blaze:
|
||||||
@ -8,9 +8,8 @@ services:
|
|||||||
container_name: bridgehead-bbmri-blaze
|
container_name: bridgehead-bbmri-blaze
|
||||||
environment:
|
environment:
|
||||||
BASE_URL: "http://bridgehead-bbmri-blaze:8080"
|
BASE_URL: "http://bridgehead-bbmri-blaze:8080"
|
||||||
JAVA_TOOL_OPTIONS: "-Xmx${BLAZE_MEMORY_CAP:-4096}m"
|
JAVA_TOOL_OPTIONS: "-Xmx4g"
|
||||||
DB_RESOURCE_CACHE_SIZE: ${BLAZE_RESOURCE_CACHE_CAP:-2500000}
|
LOG_LEVEL: "debug"
|
||||||
DB_BLOCK_CACHE_SIZE: $BLAZE_MEMORY_CAP
|
|
||||||
ENFORCE_REFERENTIAL_INTEGRITY: "false"
|
ENFORCE_REFERENTIAL_INTEGRITY: "false"
|
||||||
volumes:
|
volumes:
|
||||||
- "blaze-data:/app/data"
|
- "blaze-data:/app/data"
|
||||||
|
53
bbmri/modules/dnpm-compose.yml
Normal file
53
bbmri/modules/dnpm-compose.yml
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
version: "3.7"
|
||||||
|
|
||||||
|
services:
|
||||||
|
dnpm-beam-proxy:
|
||||||
|
image: docker.verbis.dkfz.de/cache/samply/beam-proxy:develop
|
||||||
|
container_name: bridgehead-dnpm-beam-proxy
|
||||||
|
environment:
|
||||||
|
BROKER_URL: ${DNPM_BROKER_URL}
|
||||||
|
PROXY_ID: ${DNPM_PROXY_ID}
|
||||||
|
APP_dnpm-connect_KEY: ${DNPM_BEAM_SECRET_SHORT}
|
||||||
|
PRIVKEY_FILE: /run/secrets/proxy.pem
|
||||||
|
ALL_PROXY: http://forward_proxy:3128
|
||||||
|
TLS_CA_CERTIFICATES_DIR: /conf/trusted-ca-certs
|
||||||
|
ROOTCERT_FILE: /conf/root.crt.pem
|
||||||
|
secrets:
|
||||||
|
- proxy.pem
|
||||||
|
depends_on:
|
||||||
|
- "forward_proxy"
|
||||||
|
volumes:
|
||||||
|
- /etc/bridgehead/trusted-ca-certs:/conf/trusted-ca-certs:ro
|
||||||
|
- /srv/docker/bridgehead/ccp/root.crt.pem:/conf/root.crt.pem:ro
|
||||||
|
|
||||||
|
dnpm-beam-connect:
|
||||||
|
depends_on: [ dnpm-beam-proxy ]
|
||||||
|
image: docker.verbis.dkfz.de/cache/samply/beam-connect:develop
|
||||||
|
container_name: bridgehead-dnpm-beam-connect
|
||||||
|
environment:
|
||||||
|
PROXY_URL: http://dnpm-beam-proxy:8081
|
||||||
|
PROXY_APIKEY: ${DNPM_BEAM_SECRET_SHORT}
|
||||||
|
APP_ID: dnpm-connect.${DNPM_PROXY_ID}
|
||||||
|
DISCOVERY_URL: "./conf/central_targets.json"
|
||||||
|
LOCAL_TARGETS_FILE: "./conf/connect_targets.json"
|
||||||
|
HTTP_PROXY: http://forward_proxy:3128
|
||||||
|
HTTPS_PROXY: http://forward_proxy:3128
|
||||||
|
NO_PROXY: dnpm-beam-proxy,dnpm-backend, host.docker.internal
|
||||||
|
RUST_LOG: ${RUST_LOG:-info}
|
||||||
|
NO_AUTH: "true"
|
||||||
|
extra_host:
|
||||||
|
- "host.docker.internal:host-gateway"
|
||||||
|
volumes:
|
||||||
|
- /etc/bridgehead/dnpm/local_targets.json:/conf/connect_targets.json:ro
|
||||||
|
- /etc/bridgehead/dnpm/central_targets.json:/conf/central_targets.json:ro
|
||||||
|
labels:
|
||||||
|
- "traefik.enable=true"
|
||||||
|
- "traefik.http.routers.dnpm-connect.rule=PathPrefix(`/dnpm-connect`)"
|
||||||
|
- "traefik.http.middlewares.dnpm-connect-strip.stripprefix.prefixes=/dnpm-connect"
|
||||||
|
- "traefik.http.routers.dnpm-connect.middlewares=dnpm-connect-strip"
|
||||||
|
- "traefik.http.services.dnpm-connect.loadbalancer.server.port=8062"
|
||||||
|
- "traefik.http.routers.dnpm-connect.tls=true"
|
||||||
|
|
||||||
|
secrets:
|
||||||
|
proxy.pem:
|
||||||
|
file: /etc/bridgehead/pki/${SITE_ID}.priv.pem
|
33
bbmri/modules/dnpm-node-compose.yml
Normal file
33
bbmri/modules/dnpm-node-compose.yml
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
version: "3.7"
|
||||||
|
|
||||||
|
services:
|
||||||
|
dnpm-backend:
|
||||||
|
image: ghcr.io/kohlbacherlab/bwhc-backend:1.0-snapshot-broker-connector
|
||||||
|
container_name: bridgehead-dnpm-backend
|
||||||
|
environment:
|
||||||
|
- ZPM_SITE=${ZPM_SITE}
|
||||||
|
volumes:
|
||||||
|
- /etc/bridgehead/dnpm:/bwhc_config:ro
|
||||||
|
- ${DNPM_DATA_DIR}:/bwhc_data
|
||||||
|
labels:
|
||||||
|
- "traefik.enable=true"
|
||||||
|
- "traefik.http.routers.bwhc-backend.rule=PathPrefix(`/bwhc`)"
|
||||||
|
- "traefik.http.services.bwhc-backend.loadbalancer.server.port=9000"
|
||||||
|
- "traefik.http.routers.bwhc-backend.tls=true"
|
||||||
|
|
||||||
|
dnpm-frontend:
|
||||||
|
image: ghcr.io/kohlbacherlab/bwhc-frontend:2209
|
||||||
|
container_name: bridgehead-dnpm-frontend
|
||||||
|
links:
|
||||||
|
- dnpm-backend
|
||||||
|
environment:
|
||||||
|
- NUXT_HOST=0.0.0.0
|
||||||
|
- NUXT_PORT=8080
|
||||||
|
- BACKEND_PROTOCOL=https
|
||||||
|
- BACKEND_HOSTNAME=$HOST
|
||||||
|
- BACKEND_PORT=443
|
||||||
|
labels:
|
||||||
|
- "traefik.enable=true"
|
||||||
|
- "traefik.http.routers.bwhc-frontend.rule=PathPrefix(`/`)"
|
||||||
|
- "traefik.http.services.bwhc-frontend.loadbalancer.server.port=8080"
|
||||||
|
- "traefik.http.routers.bwhc-frontend.tls=true"
|
27
bbmri/modules/dnpm-node-setup.sh
Normal file
27
bbmri/modules/dnpm-node-setup.sh
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [ -n "${ENABLE_DNPM_NODE}" ]; then
|
||||||
|
log INFO "DNPM setup detected (BwHC Node) -- will start BwHC node."
|
||||||
|
OVERRIDE+=" -f ./$PROJECT/modules/dnpm-node-compose.yml"
|
||||||
|
|
||||||
|
# Set variables required for BwHC Node. ZPM_SITE is assumed to be set in /etc/bridgehead/<project>.conf
|
||||||
|
DNPM_APPLICATION_SECRET="$(echo \"This is a salt string to generate one consistent password for DNPM. It is not required to be secret.\" | sha1sum | openssl pkeyutl -sign -inkey /etc/bridgehead/pki/${SITE_ID}.priv.pem | base64 | head -c 30)"
|
||||||
|
if [ -z "${ZPM_SITE+x}" ]; then
|
||||||
|
log ERROR "Mandatory variable ZPM_SITE not defined!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
if [ -z "${DNPM_DATA_DIR+x}" ]; then
|
||||||
|
log ERROR "Mandatory variable DNPM_DATA_DIR not defined!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
if grep -q 'traefik.http.routers.landing.rule=PathPrefix(`/landing`)' /srv/docker/bridgehead/minimal/docker-compose.override.yml 2>/dev/null; then
|
||||||
|
echo "Override of landing page url already in place"
|
||||||
|
else
|
||||||
|
echo "Adding override of landing page url"
|
||||||
|
if [ -f /srv/docker/bridgehead/minimal/docker-compose.override.yml ]; then
|
||||||
|
echo -e ' landing:\n labels:\n - "traefik.http.routers.landing.rule=PathPrefix(`/landing`)"' >> /srv/docker/bridgehead/minimal/docker-compose.override.yml
|
||||||
|
else
|
||||||
|
echo -e 'version: "3.7"\nservices:\n landing:\n labels:\n - "traefik.http.routers.landing.rule=PathPrefix(`/landing`)"' >> /srv/docker/bridgehead/minimal/docker-compose.override.yml
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
12
bbmri/modules/dnpm-setup.sh
Normal file
12
bbmri/modules/dnpm-setup.sh
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [ -n "${ENABLE_DNPM}" ]; then
|
||||||
|
log INFO "DNPM setup detected (Beam.Connect) -- will start Beam and Beam.Connect for DNPM."
|
||||||
|
OVERRIDE+=" -f ./$PROJECT/modules/dnpm-compose.yml"
|
||||||
|
|
||||||
|
# Set variables required for Beam-Connect
|
||||||
|
DNPM_BEAM_SECRET_SHORT="$(cat /proc/sys/kernel/random/uuid | sed 's/[-]//g' | head -c 20)"
|
||||||
|
DNPM_BROKER_ID="broker.ccp-it.dktk.dkfz.de"
|
||||||
|
DNPM_BROKER_URL="https://${DNPM_BROKER_ID}"
|
||||||
|
DNPM_PROXY_ID="${SITE_ID}.${DNPM_BROKER_ID}"
|
||||||
|
fi
|
@ -1,67 +0,0 @@
|
|||||||
version: "3.7"
|
|
||||||
|
|
||||||
services:
|
|
||||||
exporter:
|
|
||||||
image: docker.verbis.dkfz.de/ccp/dktk-exporter:latest
|
|
||||||
container_name: bridgehead-ccp-exporter
|
|
||||||
environment:
|
|
||||||
JAVA_OPTS: "-Xms1G -Xmx8G -XX:+UseG1GC"
|
|
||||||
LOG_LEVEL: "INFO"
|
|
||||||
EXPORTER_API_KEY: "${EXPORTER_API_KEY}" # Set in exporter-setup.sh
|
|
||||||
CROSS_ORIGINS: "https://${HOST}"
|
|
||||||
EXPORTER_DB_USER: "exporter"
|
|
||||||
EXPORTER_DB_PASSWORD: "${EXPORTER_DB_PASSWORD}" # Set in exporter-setup.sh
|
|
||||||
EXPORTER_DB_URL: "jdbc:postgresql://exporter-db:5432/exporter"
|
|
||||||
HTTP_RELATIVE_PATH: "/ccp-exporter"
|
|
||||||
SITE: "${SITE_ID}"
|
|
||||||
HTTP_SERVLET_REQUEST_SCHEME: "https"
|
|
||||||
OPAL_PASSWORD: "${EXPORTER_OPAL_PASSWORD}"
|
|
||||||
labels:
|
|
||||||
- "traefik.enable=true"
|
|
||||||
- "traefik.http.routers.exporter_ccp.rule=PathPrefix(`/ccp-exporter`)"
|
|
||||||
- "traefik.http.services.exporter_ccp.loadbalancer.server.port=8092"
|
|
||||||
- "traefik.http.routers.exporter_ccp.tls=true"
|
|
||||||
- "traefik.http.middlewares.exporter_ccp_strip.stripprefix.prefixes=/ccp-exporter"
|
|
||||||
- "traefik.http.routers.exporter_ccp.middlewares=exporter_ccp_strip"
|
|
||||||
volumes:
|
|
||||||
- "/var/cache/bridgehead/ccp/exporter-files:/app/exporter-files/output"
|
|
||||||
|
|
||||||
exporter-db:
|
|
||||||
image: docker.verbis.dkfz.de/cache/postgres:${POSTGRES_TAG}
|
|
||||||
container_name: bridgehead-ccp-exporter-db
|
|
||||||
environment:
|
|
||||||
POSTGRES_USER: "exporter"
|
|
||||||
POSTGRES_PASSWORD: "${EXPORTER_DB_PASSWORD}" # Set in exporter-setup.sh
|
|
||||||
POSTGRES_DB: "exporter"
|
|
||||||
volumes:
|
|
||||||
# Consider removing this volume once we find a solution to save Lens-queries to be executed in the explorer.
|
|
||||||
- "/var/cache/bridgehead/ccp/exporter-db:/var/lib/postgresql/data"
|
|
||||||
|
|
||||||
reporter:
|
|
||||||
image: docker.verbis.dkfz.de/ccp/dktk-reporter:latest
|
|
||||||
container_name: bridgehead-ccp-reporter
|
|
||||||
environment:
|
|
||||||
JAVA_OPTS: "-Xms1G -Xmx8G -XX:+UseG1GC"
|
|
||||||
LOG_LEVEL: "INFO"
|
|
||||||
CROSS_ORIGINS: "https://${HOST}"
|
|
||||||
HTTP_RELATIVE_PATH: "/ccp-reporter"
|
|
||||||
SITE: "${SITE_ID}"
|
|
||||||
EXPORTER_API_KEY: "${EXPORTER_API_KEY}" # Set in exporter-setup.sh
|
|
||||||
EXPORTER_URL: "http://exporter:8092"
|
|
||||||
LOG_FHIR_VALIDATION: "false"
|
|
||||||
HTTP_SERVLET_REQUEST_SCHEME: "https"
|
|
||||||
|
|
||||||
# In this initial development state of the bridgehead, we are trying to have so many volumes as possible.
|
|
||||||
# However, in the first executions in the CCP sites, this volume seems to be very important. A report is
|
|
||||||
# a process that can take several hours, because it depends on the exporter.
|
|
||||||
# There is a risk that the bridgehead restarts, losing the already created export.
|
|
||||||
|
|
||||||
volumes:
|
|
||||||
- "/var/cache/bridgehead/ccp/reporter-files:/app/reports"
|
|
||||||
labels:
|
|
||||||
- "traefik.enable=true"
|
|
||||||
- "traefik.http.routers.reporter_ccp.rule=PathPrefix(`/ccp-reporter`)"
|
|
||||||
- "traefik.http.services.reporter_ccp.loadbalancer.server.port=8095"
|
|
||||||
- "traefik.http.routers.reporter_ccp.tls=true"
|
|
||||||
- "traefik.http.middlewares.reporter_ccp_strip.stripprefix.prefixes=/ccp-reporter"
|
|
||||||
- "traefik.http.routers.reporter_ccp.middlewares=reporter_ccp_strip"
|
|
@ -1,8 +0,0 @@
|
|||||||
#!/bin/bash -e
|
|
||||||
|
|
||||||
if [ "$ENABLE_EXPORTER" == true ]; then
|
|
||||||
log INFO "Exporter setup detected -- will start Exporter service."
|
|
||||||
OVERRIDE+=" -f ./$PROJECT/modules/exporter-compose.yml"
|
|
||||||
EXPORTER_DB_PASSWORD="$(echo \"This is a salt string to generate one consistent password for the exporter. It is not required to be secret.\" | sha1sum | openssl pkeyutl -sign -inkey /etc/bridgehead/pki/${SITE_ID}.priv.pem | base64 | head -c 30)"
|
|
||||||
EXPORTER_API_KEY="$(echo \"This is a salt string to generate one consistent API KEY for the exporter. It is not required to be secret.\" | sha1sum | openssl pkeyutl -sign -inkey /etc/bridgehead/pki/${SITE_ID}.priv.pem | base64 | head -c 64)"
|
|
||||||
fi
|
|
@ -1,15 +0,0 @@
|
|||||||
# Exporter and Reporter
|
|
||||||
|
|
||||||
|
|
||||||
## Exporter
|
|
||||||
The exporter is a REST API that exports the data of the different databases of the bridgehead in a set of tables.
|
|
||||||
It can accept different output formats as CSV, Excel, JSON or XML. It can also export data into Opal.
|
|
||||||
|
|
||||||
## Exporter-DB
|
|
||||||
It is a database to save queries for its execution in the exporter.
|
|
||||||
The exporter manages also the different executions of the same query in through the database.
|
|
||||||
|
|
||||||
## Reporter
|
|
||||||
This component is a plugin of the exporter that allows to create more complex Excel reports described in templates.
|
|
||||||
It is compatible with different template engines as Groovy, Thymeleaf,...
|
|
||||||
It is perfect to generate a document as our traditional CCP quality report.
|
|
@ -1,81 +0,0 @@
|
|||||||
version: "3.7"
|
|
||||||
|
|
||||||
services:
|
|
||||||
|
|
||||||
teiler-orchestrator:
|
|
||||||
image: docker.verbis.dkfz.de/cache/samply/teiler-orchestrator:latest
|
|
||||||
container_name: bridgehead-teiler-orchestrator
|
|
||||||
labels:
|
|
||||||
- "traefik.enable=true"
|
|
||||||
- "traefik.http.routers.teiler_orchestrator_ccp.rule=PathPrefix(`/ccp-teiler`)"
|
|
||||||
- "traefik.http.services.teiler_orchestrator_ccp.loadbalancer.server.port=9000"
|
|
||||||
- "traefik.http.routers.teiler_orchestrator_ccp.tls=true"
|
|
||||||
- "traefik.http.middlewares.teiler_orchestrator_ccp_strip.stripprefix.prefixes=/ccp-teiler"
|
|
||||||
- "traefik.http.routers.teiler_orchestrator_ccp.middlewares=teiler_orchestrator_ccp_strip"
|
|
||||||
environment:
|
|
||||||
TEILER_BACKEND_URL: "https://${HOST}/ccp-teiler-backend"
|
|
||||||
TEILER_DASHBOARD_URL: "https://${HOST}/ccp-teiler-dashboard"
|
|
||||||
DEFAULT_LANGUAGE: "${TEILER_DEFAULT_LANGUAGE_LOWER_CASE}"
|
|
||||||
HTTP_RELATIVE_PATH: "/ccp-teiler"
|
|
||||||
|
|
||||||
teiler-dashboard:
|
|
||||||
image: docker.verbis.dkfz.de/cache/samply/teiler-dashboard:develop
|
|
||||||
container_name: bridgehead-teiler-dashboard
|
|
||||||
labels:
|
|
||||||
- "traefik.enable=true"
|
|
||||||
- "traefik.http.routers.teiler_dashboard_ccp.rule=PathPrefix(`/ccp-teiler-dashboard`)"
|
|
||||||
- "traefik.http.services.teiler_dashboard_ccp.loadbalancer.server.port=80"
|
|
||||||
- "traefik.http.routers.teiler_dashboard_ccp.tls=true"
|
|
||||||
- "traefik.http.middlewares.teiler_dashboard_ccp_strip.stripprefix.prefixes=/ccp-teiler-dashboard"
|
|
||||||
- "traefik.http.routers.teiler_dashboard_ccp.middlewares=teiler_dashboard_ccp_strip"
|
|
||||||
environment:
|
|
||||||
DEFAULT_LANGUAGE: "${TEILER_DEFAULT_LANGUAGE}"
|
|
||||||
TEILER_BACKEND_URL: "https://${HOST}/ccp-teiler-backend"
|
|
||||||
OIDC_URL: "${OIDC_URL}"
|
|
||||||
OIDC_REALM: "${OIDC_REALM}"
|
|
||||||
OIDC_CLIENT_ID: "${OIDC_PUBLIC_CLIENT_ID}"
|
|
||||||
OIDC_TOKEN_GROUP: "${OIDC_GROUP_CLAIM}"
|
|
||||||
TEILER_ADMIN_NAME: "${OPERATOR_FIRST_NAME} ${OPERATOR_LAST_NAME}"
|
|
||||||
TEILER_ADMIN_EMAIL: "${OPERATOR_EMAIL}"
|
|
||||||
TEILER_ADMIN_PHONE: "${OPERATOR_PHONE}"
|
|
||||||
TEILER_PROJECT: "${PROJECT}"
|
|
||||||
EXPORTER_API_KEY: "${EXPORTER_API_KEY}"
|
|
||||||
TEILER_ORCHESTRATOR_URL: "https://${HOST}/ccp-teiler"
|
|
||||||
TEILER_DASHBOARD_HTTP_RELATIVE_PATH: "/ccp-teiler-dashboard"
|
|
||||||
TEILER_ORCHESTRATOR_HTTP_RELATIVE_PATH: "/ccp-teiler"
|
|
||||||
TEILER_USER: "${OIDC_USER_GROUP}"
|
|
||||||
TEILER_ADMIN: "${OIDC_ADMIN_GROUP}"
|
|
||||||
REPORTER_DEFAULT_TEMPLATE_ID: "bbmri-qb"
|
|
||||||
EXPORTER_DEFAULT_TEMPLATE_ID: "bbmri"
|
|
||||||
|
|
||||||
|
|
||||||
teiler-backend:
|
|
||||||
image: docker.verbis.dkfz.de/ccp/dktk-teiler-backend:latest
|
|
||||||
container_name: bridgehead-teiler-backend
|
|
||||||
labels:
|
|
||||||
- "traefik.enable=true"
|
|
||||||
- "traefik.http.routers.teiler_backend_ccp.rule=PathPrefix(`/ccp-teiler-backend`)"
|
|
||||||
- "traefik.http.services.teiler_backend_ccp.loadbalancer.server.port=8085"
|
|
||||||
- "traefik.http.routers.teiler_backend_ccp.tls=true"
|
|
||||||
- "traefik.http.middlewares.teiler_backend_ccp_strip.stripprefix.prefixes=/ccp-teiler-backend"
|
|
||||||
- "traefik.http.routers.teiler_backend_ccp.middlewares=teiler_backend_ccp_strip"
|
|
||||||
environment:
|
|
||||||
LOG_LEVEL: "INFO"
|
|
||||||
APPLICATION_PORT: "8085"
|
|
||||||
APPLICATION_ADDRESS: "${HOST}"
|
|
||||||
DEFAULT_LANGUAGE: "${TEILER_DEFAULT_LANGUAGE}"
|
|
||||||
CONFIG_ENV_VAR_PATH: "/run/secrets/ccp.conf"
|
|
||||||
TEILER_ORCHESTRATOR_HTTP_RELATIVE_PATH: "/ccp-teiler"
|
|
||||||
TEILER_ORCHESTRATOR_URL: "https://${HOST}/ccp-teiler"
|
|
||||||
TEILER_DASHBOARD_DE_URL: "https://${HOST}/ccp-teiler-dashboard/de"
|
|
||||||
TEILER_DASHBOARD_EN_URL: "https://${HOST}/ccp-teiler-dashboard/en"
|
|
||||||
CENTRAX_URL: "${CENTRAXX_URL}"
|
|
||||||
HTTP_PROXY: "http://forward_proxy:3128"
|
|
||||||
ENABLE_MTBA: "${ENABLE_MTBA}"
|
|
||||||
ENABLE_DATASHIELD: "${ENABLE_DATASHIELD}"
|
|
||||||
secrets:
|
|
||||||
- ccp.conf
|
|
||||||
|
|
||||||
secrets:
|
|
||||||
ccp.conf:
|
|
||||||
file: /etc/bridgehead/ccp.conf
|
|
@ -1,9 +0,0 @@
|
|||||||
#!/bin/bash -e
|
|
||||||
|
|
||||||
if [ "$ENABLE_TEILER" == true ];then
|
|
||||||
log INFO "Teiler setup detected -- will start Teiler services."
|
|
||||||
OVERRIDE+=" -f ./$PROJECT/modules/teiler-compose.yml"
|
|
||||||
TEILER_DEFAULT_LANGUAGE=DE
|
|
||||||
TEILER_DEFAULT_LANGUAGE_LOWER_CASE=${TEILER_DEFAULT_LANGUAGE,,}
|
|
||||||
add_public_oidc_redirect_url "/ccp-teiler/*"
|
|
||||||
fi
|
|
@ -1,19 +0,0 @@
|
|||||||
# Teiler
|
|
||||||
This module orchestrates the different microfrontends of the bridgehead as a single page application.
|
|
||||||
|
|
||||||
## Teiler Orchestrator
|
|
||||||
Single SPA component that consists on the root HTML site of the single page application and a javascript code that
|
|
||||||
gets the information about the microfrontend calling the teiler backend and is responsible for registering them. With the
|
|
||||||
resulting mapping, it can initialize, mount and unmount the required microfrontends on the fly.
|
|
||||||
|
|
||||||
The microfrontends run independently in different containers and can be based on different frameworks (Angular, Vue, React,...)
|
|
||||||
This microfrontends can run as single alone but need an extension with Single-SPA (https://single-spa.js.org/docs/ecosystem).
|
|
||||||
There are also available three templates (Angular, Vue, React) to be directly extended to be used directly in the teiler.
|
|
||||||
|
|
||||||
## Teiler Dashboard
|
|
||||||
It consists on the main dashboard and a set of embedded services.
|
|
||||||
### Login
|
|
||||||
user and password in ccp.local.conf
|
|
||||||
|
|
||||||
## Teiler Backend
|
|
||||||
In this component, the microfrontends are configured.
|
|
12
bbmri/vars
12
bbmri/vars
@ -7,18 +7,6 @@
|
|||||||
FOCUS_RETRY_COUNT=32
|
FOCUS_RETRY_COUNT=32
|
||||||
PRIVATEKEYFILENAME=/etc/bridgehead/pki/${SITE_ID}.priv.pem
|
PRIVATEKEYFILENAME=/etc/bridgehead/pki/${SITE_ID}.priv.pem
|
||||||
|
|
||||||
OIDC_USER_GROUP="DKTK_CCP_$(capitalize_first_letter ${SITE_ID})"
|
|
||||||
OIDC_ADMIN_GROUP="DKTK_CCP_$(capitalize_first_letter ${SITE_ID})_Verwalter"
|
|
||||||
OIDC_PRIVATE_CLIENT_ID=${SITE_ID}-private
|
|
||||||
OIDC_PUBLIC_CLIENT_ID=${SITE_ID}-public
|
|
||||||
# Use "test-realm-01" for testing
|
|
||||||
OIDC_REALM="${OIDC_REALM:-master}"
|
|
||||||
OIDC_URL="https://login.verbis.dkfz.de"
|
|
||||||
OIDC_ISSUER_URL="${OIDC_URL}/realms/${OIDC_REALM}"
|
|
||||||
OIDC_GROUP_CLAIM="groups"
|
|
||||||
|
|
||||||
POSTGRES_TAG=15.6-alpine
|
|
||||||
|
|
||||||
for module in $PROJECT/modules/*.sh
|
for module in $PROJECT/modules/*.sh
|
||||||
do
|
do
|
||||||
log DEBUG "sourcing $module"
|
log DEBUG "sourcing $module"
|
||||||
|
11
bridgehead
11
bridgehead
@ -41,6 +41,7 @@ case "$PROJECT" in
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
# TODO: Please add proper documentation for variable priorities (1. secrets, 2. vars, 3. PROJECT.local.conf, 4. PROJECT.conf, 5. ???
|
||||||
loadVars() {
|
loadVars() {
|
||||||
# Load variables from /etc/bridgehead and /srv/docker/bridgehead
|
# Load variables from /etc/bridgehead and /srv/docker/bridgehead
|
||||||
set -a
|
set -a
|
||||||
@ -51,7 +52,6 @@ loadVars() {
|
|||||||
fi
|
fi
|
||||||
fetchVarsFromVaultByFile /etc/bridgehead/$PROJECT.conf || fail_and_report 1 "Unable to fetchVarsFromVaultByFile"
|
fetchVarsFromVaultByFile /etc/bridgehead/$PROJECT.conf || fail_and_report 1 "Unable to fetchVarsFromVaultByFile"
|
||||||
setHostname
|
setHostname
|
||||||
optimizeBlazeMemoryUsage
|
|
||||||
[ -e ./$PROJECT/vars ] && source ./$PROJECT/vars
|
[ -e ./$PROJECT/vars ] && source ./$PROJECT/vars
|
||||||
set +a
|
set +a
|
||||||
|
|
||||||
@ -90,14 +90,12 @@ case "$ACTION" in
|
|||||||
loadVars
|
loadVars
|
||||||
hc_send log "Bridgehead $PROJECT startup: Checking requirements ..."
|
hc_send log "Bridgehead $PROJECT startup: Checking requirements ..."
|
||||||
checkRequirements
|
checkRequirements
|
||||||
sync_secrets
|
sync_secrets
|
||||||
hc_send log "Bridgehead $PROJECT startup: Requirements checked out. Now starting bridgehead ..."
|
hc_send log "Bridgehead $PROJECT startup: Requirements checked out. Now starting bridgehead ..."
|
||||||
exec $COMPOSE -p $PROJECT -f ./minimal/docker-compose.yml -f ./$PROJECT/docker-compose.yml $OVERRIDE up --abort-on-container-exit
|
exec $COMPOSE -p $PROJECT -f ./minimal/docker-compose.yml -f ./$PROJECT/docker-compose.yml $OVERRIDE up --abort-on-container-exit
|
||||||
;;
|
;;
|
||||||
stop)
|
stop)
|
||||||
loadVars
|
loadVars
|
||||||
# Kill stale secret-sync instances if present
|
|
||||||
docker kill $(docker ps -q --filter ancestor=docker.verbis.dkfz.de/cache/samply/secret-sync-local) 2>/dev/null || true
|
|
||||||
# HACK: This is temporarily to properly shut down false bridgehead instances (bridgehead-ccp instead ccp)
|
# HACK: This is temporarily to properly shut down false bridgehead instances (bridgehead-ccp instead ccp)
|
||||||
$COMPOSE -p bridgehead-$PROJECT -f ./minimal/docker-compose.yml -f ./$PROJECT/docker-compose.yml $OVERRIDE down
|
$COMPOSE -p bridgehead-$PROJECT -f ./minimal/docker-compose.yml -f ./$PROJECT/docker-compose.yml $OVERRIDE down
|
||||||
exec $COMPOSE -p $PROJECT -f ./minimal/docker-compose.yml -f ./$PROJECT/docker-compose.yml $OVERRIDE down
|
exec $COMPOSE -p $PROJECT -f ./minimal/docker-compose.yml -f ./$PROJECT/docker-compose.yml $OVERRIDE down
|
||||||
@ -106,11 +104,6 @@ case "$ACTION" in
|
|||||||
bk_is_running
|
bk_is_running
|
||||||
exit $?
|
exit $?
|
||||||
;;
|
;;
|
||||||
logs)
|
|
||||||
loadVars
|
|
||||||
shift 2
|
|
||||||
exec $COMPOSE -p $PROJECT -f ./minimal/docker-compose.yml -f ./$PROJECT/docker-compose.yml $OVERRIDE logs -f $@
|
|
||||||
;;
|
|
||||||
update)
|
update)
|
||||||
loadVars
|
loadVars
|
||||||
exec ./lib/update-bridgehead.sh $PROJECT
|
exec ./lib/update-bridgehead.sh $PROJECT
|
||||||
|
@ -6,9 +6,7 @@ services:
|
|||||||
container_name: bridgehead-ccp-blaze
|
container_name: bridgehead-ccp-blaze
|
||||||
environment:
|
environment:
|
||||||
BASE_URL: "http://bridgehead-ccp-blaze:8080"
|
BASE_URL: "http://bridgehead-ccp-blaze:8080"
|
||||||
JAVA_TOOL_OPTIONS: "-Xmx${BLAZE_MEMORY_CAP:-4096}m"
|
JAVA_TOOL_OPTIONS: "-Xmx4g"
|
||||||
DB_RESOURCE_CACHE_SIZE: ${BLAZE_RESOURCE_CACHE_CAP:-2500000}
|
|
||||||
DB_BLOCK_CACHE_SIZE: $BLAZE_MEMORY_CAP
|
|
||||||
ENFORCE_REFERENTIAL_INTEGRITY: "false"
|
ENFORCE_REFERENTIAL_INTEGRITY: "false"
|
||||||
volumes:
|
volumes:
|
||||||
- "blaze-data:/app/data"
|
- "blaze-data:/app/data"
|
||||||
@ -21,7 +19,7 @@ services:
|
|||||||
- "traefik.http.routers.blaze_ccp.tls=true"
|
- "traefik.http.routers.blaze_ccp.tls=true"
|
||||||
|
|
||||||
focus:
|
focus:
|
||||||
image: docker.verbis.dkfz.de/cache/samply/focus:0.4.4
|
image: docker.verbis.dkfz.de/cache/samply/focus:main
|
||||||
container_name: bridgehead-focus
|
container_name: bridgehead-focus
|
||||||
environment:
|
environment:
|
||||||
API_KEY: ${FOCUS_BEAM_SECRET_SHORT}
|
API_KEY: ${FOCUS_BEAM_SECRET_SHORT}
|
||||||
@ -54,6 +52,12 @@ services:
|
|||||||
- /etc/bridgehead/trusted-ca-certs:/conf/trusted-ca-certs:ro
|
- /etc/bridgehead/trusted-ca-certs:/conf/trusted-ca-certs:ro
|
||||||
- /srv/docker/bridgehead/ccp/root.crt.pem:/conf/root.crt.pem:ro
|
- /srv/docker/bridgehead/ccp/root.crt.pem:/conf/root.crt.pem:ro
|
||||||
|
|
||||||
|
traefik:
|
||||||
|
labels:
|
||||||
|
- "traefik.http.middlewares.oidcAuth.forwardAuth.address=http://oauth2_proxy:4180/"
|
||||||
|
- "traefik.http.middlewares.oidcAuth.forwardAuth.trustForwardHeader=true"
|
||||||
|
- "traefik.http.middlewares.oidcAuth.forwardAuth.authResponseHeaders=X-Auth-Request-Access-Token,Authorization"
|
||||||
|
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
blaze-data:
|
blaze-data:
|
||||||
|
53
ccp/modules/cbioportal-compose.yml
Normal file
53
ccp/modules/cbioportal-compose.yml
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
version: '3.7'
|
||||||
|
|
||||||
|
services:
|
||||||
|
cbioportal:
|
||||||
|
# image: docker.verbis.dkfz.de/ccp/dktk-cbioportal:latest
|
||||||
|
image: dktk-cbioportal
|
||||||
|
container_name: bridgehead-cbioportal
|
||||||
|
environment:
|
||||||
|
DB_PASSWORD: ${CBIOPORTAL_DB_PASSWORD}
|
||||||
|
HTTP_RELATIVE_PATH: "/cbioportal"
|
||||||
|
UPLOAD_HTTP_RELATIVE_PATH: "/cbioportal-upload"
|
||||||
|
depends_on:
|
||||||
|
- cbioportal-database
|
||||||
|
- cbioportal-session
|
||||||
|
labels:
|
||||||
|
- "traefik.enable=true"
|
||||||
|
- "traefik.http.routers.cbioportal.rule=PathPrefix(`/cbioportal`)"
|
||||||
|
- "traefik.http.routers.cbioportal.service=cbioportal"
|
||||||
|
- "traefik.http.services.cbioportal.loadbalancer.server.port=8080"
|
||||||
|
- "traefik.http.routers.cbioportal.tls=true"
|
||||||
|
- "traefik.http.routers.cbioportal-upload.rule=PathPrefix(`/cbioportal-upload`)"
|
||||||
|
- "traefik.http.routers.cbioportal-upload.service=cbioportal-upload"
|
||||||
|
- "traefik.http.routers.cbioportal-upload.tls=true"
|
||||||
|
- "traefik.http.services.cbioportal-upload.loadbalancer.server.port=8001"
|
||||||
|
|
||||||
|
|
||||||
|
cbioportal-database:
|
||||||
|
image: docker.verbis.dkfz.de/ccp/dktk-cbioportal-database:latest
|
||||||
|
container_name: bridgehead-cbioportal-database
|
||||||
|
environment:
|
||||||
|
MYSQL_DATABASE: cbioportal
|
||||||
|
MYSQL_USER: cbio_user
|
||||||
|
MYSQL_PASSWORD: ${CBIOPORTAL_DB_PASSWORD}
|
||||||
|
MYSQL_ROOT_PASSWORD: ${CBIOPORTAL_DB_ROOT_PASSWORD}
|
||||||
|
volumes:
|
||||||
|
- /var/cache/bridgehead/ccp/cbioportal_db_data:/var/lib/mysql
|
||||||
|
|
||||||
|
cbioportal-session:
|
||||||
|
image: cbioportal/session-service:0.6.1
|
||||||
|
container_name: bridgehead-cbioportal-session
|
||||||
|
environment:
|
||||||
|
SERVER_PORT: 5000
|
||||||
|
JAVA_OPTS: -Dspring.data.mongodb.uri=mongodb://cbioportal-session-database:27017/session-service
|
||||||
|
depends_on:
|
||||||
|
- cbioportal-session-database
|
||||||
|
|
||||||
|
cbioportal-session-database:
|
||||||
|
image: mongo:4.2
|
||||||
|
container_name: bridgehead-cbioportal-session-database
|
||||||
|
environment:
|
||||||
|
MONGO_INITDB_DATABASE: session_service
|
||||||
|
volumes:
|
||||||
|
- /var/cache/bridgehead/ccp/cbioportal_session_db_data:/data/db
|
8
ccp/modules/cbioportal-setup.sh
Normal file
8
ccp/modules/cbioportal-setup.sh
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/bash -e
|
||||||
|
|
||||||
|
if [ "$ENABLE_CBIOPORTAL" == true ]; then
|
||||||
|
log INFO "cBioPortal setup detected -- will start cBioPortal service."
|
||||||
|
OVERRIDE+=" -f ./$PROJECT/modules/cbioportal-compose.yml"
|
||||||
|
CBIOPORTAL_DB_PASSWORD="$(echo \"This is a salt string to generate one consistent password for the cbioportal database. It is not required to be secret.\" | openssl rsautl -sign -inkey /etc/bridgehead/pki/${SITE_ID}.priv.pem | base64 | head -c 30)"
|
||||||
|
CBIOPORTAL_DB_ROOT_PASSWORD="$(echo \"This is a salt string to generate one consistent root password for the cbioportal database. It is not required to be secret.\" | openssl rsautl -sign -inkey /etc/bridgehead/pki/${SITE_ID}.priv.pem | base64 | head -c 64)"
|
||||||
|
fi
|
10
ccp/modules/cbioportal.md
Normal file
10
ccp/modules/cbioportal.md
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
# CBioPortal Data uploader
|
||||||
|
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
We have integrated an API that allows you to upload data directly to cbioportal without the need to have cbioportal installed in your system.
|
||||||
|
|
||||||
|
## Tech stack
|
||||||
|
|
||||||
|
We used Flask to add this feature
|
@ -44,11 +44,11 @@ services:
|
|||||||
APP_CONTEXT_PATH: "/opal"
|
APP_CONTEXT_PATH: "/opal"
|
||||||
OPAL_PRIVATE_KEY: "/run/secrets/opal-key.pem"
|
OPAL_PRIVATE_KEY: "/run/secrets/opal-key.pem"
|
||||||
OPAL_CERTIFICATE: "/run/secrets/opal-cert.pem"
|
OPAL_CERTIFICATE: "/run/secrets/opal-cert.pem"
|
||||||
OIDC_URL: "${OIDC_URL}"
|
KEYCLOAK_URL: "${KEYCLOAK_URL}"
|
||||||
OIDC_REALM: "${OIDC_REALM}"
|
KEYCLOAK_REALM: "${KEYCLOAK_REALM}"
|
||||||
OIDC_CLIENT_ID: "${OIDC_PRIVATE_CLIENT_ID}"
|
KEYCLOAK_CLIENT_ID: "${KEYCLOAK_PRIVATE_CLIENT_ID}"
|
||||||
OIDC_CLIENT_SECRET: "${OIDC_CLIENT_SECRET}"
|
KEYCLOAK_CLIENT_SECRET: "${OIDC_CLIENT_SECRET}"
|
||||||
OIDC_ADMIN_GROUP: "${OIDC_ADMIN_GROUP}"
|
KEYCLOAK_ADMIN_GROUP: "${KEYCLOAK_ADMIN_GROUP}"
|
||||||
TOKEN_MANAGER_PASSWORD: "${TOKEN_MANAGER_OPAL_PASSWORD}"
|
TOKEN_MANAGER_PASSWORD: "${TOKEN_MANAGER_OPAL_PASSWORD}"
|
||||||
EXPORTER_PASSWORD: "${EXPORTER_OPAL_PASSWORD}"
|
EXPORTER_PASSWORD: "${EXPORTER_OPAL_PASSWORD}"
|
||||||
BEAM_APP_ID: token-manager.${PROXY_ID}
|
BEAM_APP_ID: token-manager.${PROXY_ID}
|
||||||
@ -62,7 +62,7 @@ services:
|
|||||||
|
|
||||||
opal-db:
|
opal-db:
|
||||||
container_name: bridgehead-opal-db
|
container_name: bridgehead-opal-db
|
||||||
image: docker.verbis.dkfz.de/cache/postgres:${POSTGRES_TAG}
|
image: docker.verbis.dkfz.de/cache/postgres:15.4-alpine
|
||||||
environment:
|
environment:
|
||||||
POSTGRES_PASSWORD: "${OPAL_DB_PASSWORD}" # Set in datashield-setup.sh
|
POSTGRES_PASSWORD: "${OPAL_DB_PASSWORD}" # Set in datashield-setup.sh
|
||||||
POSTGRES_USER: "opal"
|
POSTGRES_USER: "opal"
|
||||||
@ -96,12 +96,8 @@ services:
|
|||||||
networks:
|
networks:
|
||||||
- default
|
- default
|
||||||
- rstudio
|
- rstudio
|
||||||
|
|
||||||
traefik:
|
traefik:
|
||||||
labels:
|
|
||||||
- "traefik.http.middlewares.oidcAuth.forwardAuth.address=http://oauth2-proxy:4180/"
|
|
||||||
- "traefik.http.middlewares.oidcAuth.forwardAuth.trustForwardHeader=true"
|
|
||||||
- "traefik.http.middlewares.oidcAuth.forwardAuth.authResponseHeaders=X-Auth-Request-Access-Token,Authorization"
|
|
||||||
networks:
|
networks:
|
||||||
- default
|
- default
|
||||||
- rstudio
|
- rstudio
|
||||||
@ -115,15 +111,15 @@ services:
|
|||||||
APP_datashield-connect_KEY: ${DATASHIELD_CONNECT_SECRET}
|
APP_datashield-connect_KEY: ${DATASHIELD_CONNECT_SECRET}
|
||||||
APP_token-manager_KEY: ${TOKEN_MANAGER_SECRET}
|
APP_token-manager_KEY: ${TOKEN_MANAGER_SECRET}
|
||||||
|
|
||||||
# TODO: Allow users of group /DataSHIELD and OIDC_USER_GROUP at the same time:
|
# TODO: Allow users of group /DataSHIELD and KEYCLOAK_USER_GROUP at the same time:
|
||||||
# Maybe a solution would be (https://oauth2-proxy.github.io/oauth2-proxy/configuration/oauth_provider):
|
# Maybe a solution would be (https://oauth2-proxy.github.io/oauth2-proxy/docs/configuration/overview/):
|
||||||
# --allowed-groups=/DataSHIELD,OIDC_USER_GROUP
|
# --allowed-groups=/DataSHIELD,KEYCLOAK_USER_GROUP
|
||||||
oauth2-proxy:
|
oauth2_proxy:
|
||||||
image: docker.verbis.dkfz.de/cache/oauth2-proxy/oauth2-proxy:latest
|
image: quay.io/oauth2-proxy/oauth2-proxy
|
||||||
container_name: bridgehead-oauth2proxy
|
container_name: bridgehead_oauth2_proxy
|
||||||
command: >-
|
command: >-
|
||||||
--allowed-group=DataSHIELD
|
--allowed-group=/DataSHIELD
|
||||||
--oidc-groups-claim=${OIDC_GROUP_CLAIM}
|
--oidc-groups-claim=${KEYCLOAK_GROUP_CLAIM}
|
||||||
--auth-logging=true
|
--auth-logging=true
|
||||||
--whitelist-domain=${HOST}
|
--whitelist-domain=${HOST}
|
||||||
--http-address="0.0.0.0:4180"
|
--http-address="0.0.0.0:4180"
|
||||||
@ -138,10 +134,10 @@ services:
|
|||||||
#OIDC settings
|
#OIDC settings
|
||||||
--provider="keycloak-oidc"
|
--provider="keycloak-oidc"
|
||||||
--provider-display-name="VerbIS Login"
|
--provider-display-name="VerbIS Login"
|
||||||
--client-id="${OIDC_PRIVATE_CLIENT_ID}"
|
--client-id="${KEYCLOAK_PRIVATE_CLIENT_ID}"
|
||||||
--client-secret="${OIDC_CLIENT_SECRET}"
|
--client-secret="${OIDC_CLIENT_SECRET}"
|
||||||
--redirect-url="https://${HOST}${OAUTH2_CALLBACK}"
|
--redirect-url="https://${HOST}${OAUTH2_CALLBACK}"
|
||||||
--oidc-issuer-url="${OIDC_ISSUER_URL}"
|
--oidc-issuer-url="${KEYCLOAK_ISSUER_URL}"
|
||||||
--scope="openid email profile"
|
--scope="openid email profile"
|
||||||
--code-challenge-method="S256"
|
--code-challenge-method="S256"
|
||||||
--skip-provider-button=true
|
--skip-provider-button=true
|
||||||
@ -154,12 +150,6 @@ services:
|
|||||||
- "traefik.http.routers.oauth2_proxy.rule=Host(`${HOST}`) && PathPrefix(`/oauth2`, `/oauth2/callback`)"
|
- "traefik.http.routers.oauth2_proxy.rule=Host(`${HOST}`) && PathPrefix(`/oauth2`, `/oauth2/callback`)"
|
||||||
- "traefik.http.services.oauth2_proxy.loadbalancer.server.port=4180"
|
- "traefik.http.services.oauth2_proxy.loadbalancer.server.port=4180"
|
||||||
- "traefik.http.routers.oauth2_proxy.tls=true"
|
- "traefik.http.routers.oauth2_proxy.tls=true"
|
||||||
environment:
|
|
||||||
http_proxy: "http://forward_proxy:3128"
|
|
||||||
https_proxy: "http://forward_proxy:3128"
|
|
||||||
depends_on:
|
|
||||||
forward_proxy:
|
|
||||||
condition: service_healthy
|
|
||||||
|
|
||||||
secrets:
|
secrets:
|
||||||
opal-cert.pem:
|
opal-cert.pem:
|
||||||
|
@ -9,6 +9,5 @@
|
|||||||
"frankfurt",
|
"frankfurt",
|
||||||
"essen",
|
"essen",
|
||||||
"dktk-datashield-test",
|
"dktk-datashield-test",
|
||||||
"dktk-test",
|
"dktk-test"
|
||||||
"mannheim"
|
|
||||||
]
|
]
|
@ -1,14 +1,6 @@
|
|||||||
#!/bin/bash -e
|
#!/bin/bash -e
|
||||||
|
|
||||||
if [ "$ENABLE_DATASHIELD" == true ]; then
|
if [ "$ENABLE_DATASHIELD" == true ]; then
|
||||||
# HACK: This only works because exporter-setup.sh and teiler-setup.sh are sourced after datashield-setup.sh
|
|
||||||
if [ -z "${ENABLE_EXPORTER}" ] || [ "${ENABLE_EXPORTER}" != "true" ]; then
|
|
||||||
log WARN "The ENABLE_EXPORTER variable is either not set or not set to 'true'."
|
|
||||||
fi
|
|
||||||
OAUTH2_CALLBACK=/oauth2/callback
|
|
||||||
OAUTH2_PROXY_SECRET="$(echo \"This is a salt string to generate one consistent encryption key for the oauth2_proxy. It is not required to be secret.\" | sha1sum | openssl pkeyutl -sign -inkey /etc/bridgehead/pki/${SITE_ID}.priv.pem | base64 | head -c 32)"
|
|
||||||
add_private_oidc_redirect_url "${OAUTH2_CALLBACK}"
|
|
||||||
|
|
||||||
log INFO "DataSHIELD setup detected -- will start DataSHIELD services."
|
log INFO "DataSHIELD setup detected -- will start DataSHIELD services."
|
||||||
OVERRIDE+=" -f ./$PROJECT/modules/datashield-compose.yml"
|
OVERRIDE+=" -f ./$PROJECT/modules/datashield-compose.yml"
|
||||||
EXPORTER_OPAL_PASSWORD="$(generate_password \"exporter in Opal\")"
|
EXPORTER_OPAL_PASSWORD="$(generate_password \"exporter in Opal\")"
|
||||||
@ -20,25 +12,22 @@ if [ "$ENABLE_DATASHIELD" == true ]; then
|
|||||||
TOKEN_MANAGER_SECRET="$(echo \"Token Manager\" | generate_simple_password)"
|
TOKEN_MANAGER_SECRET="$(echo \"Token Manager\" | generate_simple_password)"
|
||||||
if [ ! -e /tmp/bridgehead/opal-cert.pem ]; then
|
if [ ! -e /tmp/bridgehead/opal-cert.pem ]; then
|
||||||
mkdir -p /tmp/bridgehead/
|
mkdir -p /tmp/bridgehead/
|
||||||
|
chown -R bridgehead:docker /tmp/bridgehead/
|
||||||
openssl req -x509 -newkey rsa:4096 -nodes -keyout /tmp/bridgehead/opal-key.pem -out /tmp/bridgehead/opal-cert.pem -days 3650 -subj "/CN=opal/C=DE"
|
openssl req -x509 -newkey rsa:4096 -nodes -keyout /tmp/bridgehead/opal-key.pem -out /tmp/bridgehead/opal-cert.pem -days 3650 -subj "/CN=opal/C=DE"
|
||||||
|
chmod g+r /tmp/bridgehead/opal-key.pem
|
||||||
fi
|
fi
|
||||||
mkdir -p /tmp/bridgehead/opal-map
|
mkdir -p /tmp/bridgehead/opal-map
|
||||||
sites="$(cat ./$PROJECT/modules/datashield-sites.json)"
|
jq -n '{"sites": input | map({
|
||||||
echo "$sites" | docker_jq -n --args '{"sites": input | map({
|
|
||||||
"name": .,
|
"name": .,
|
||||||
"id": .,
|
"id": .,
|
||||||
"virtualhost": "\(.):443",
|
"virtualhost": "\(.):443",
|
||||||
"beamconnect": "datashield-connect.\(.).'"$BROKER_ID"'"
|
"beamconnect": "datashield-connect.\(.).'"$BROKER_ID"'"
|
||||||
})}' $sites >/tmp/bridgehead/opal-map/central.json
|
})}' ./$PROJECT/modules/datashield-mappings.json > /tmp/bridgehead/opal-map/central.json
|
||||||
echo "$sites" | docker_jq -n --args '[{
|
jq -n '[{
|
||||||
"external": "'"$SITE_ID"':443",
|
"external": "'"$SITE_ID"':443",
|
||||||
"internal": "opal:8443",
|
"internal": "opal:8443",
|
||||||
"allowed": input | map("datashield-connect.\(.).'"$BROKER_ID"'")
|
"allowed": input | map("datashield-connect.\(.).'"$BROKER_ID"'")
|
||||||
}]' >/tmp/bridgehead/opal-map/local.json
|
}]' ./$PROJECT/modules/datashield-mappings.json > /tmp/bridgehead/opal-map/local.json
|
||||||
if [ "$USER" == "root" ]; then
|
chown -R bridgehead:docker /tmp/bridgehead/
|
||||||
chown -R bridgehead:docker /tmp/bridgehead
|
|
||||||
chmod g+wr /tmp/bridgehead/opal-map/*
|
|
||||||
chmod g+r /tmp/bridgehead/opal-key.pem
|
|
||||||
fi
|
|
||||||
add_private_oidc_redirect_url "/opal/*"
|
add_private_oidc_redirect_url "/opal/*"
|
||||||
fi
|
fi
|
||||||
|
@ -16,14 +16,12 @@ services:
|
|||||||
LOCAL_TARGETS_FILE: "./conf/connect_targets.json"
|
LOCAL_TARGETS_FILE: "./conf/connect_targets.json"
|
||||||
HTTP_PROXY: "http://forward_proxy:3128"
|
HTTP_PROXY: "http://forward_proxy:3128"
|
||||||
HTTPS_PROXY: "http://forward_proxy:3128"
|
HTTPS_PROXY: "http://forward_proxy:3128"
|
||||||
NO_PROXY: beam-proxy,dnpm-backend,host.docker.internal${DNPM_ADDITIONAL_NO_PROXY}
|
NO_PROXY: beam-proxy,dnpm-backend,host.docker.internal
|
||||||
RUST_LOG: ${RUST_LOG:-info}
|
RUST_LOG: ${RUST_LOG:-info}
|
||||||
NO_AUTH: "true"
|
NO_AUTH: "true"
|
||||||
TLS_CA_CERTIFICATES_DIR: ./conf/trusted-ca-certs
|
|
||||||
extra_hosts:
|
extra_hosts:
|
||||||
- "host.docker.internal:host-gateway"
|
- "host.docker.internal:host-gateway"
|
||||||
volumes:
|
volumes:
|
||||||
- /etc/bridgehead/trusted-ca-certs:/conf/trusted-ca-certs:ro
|
|
||||||
- /etc/bridgehead/dnpm/local_targets.json:/conf/connect_targets.json:ro
|
- /etc/bridgehead/dnpm/local_targets.json:/conf/connect_targets.json:ro
|
||||||
- /etc/bridgehead/dnpm/central_targets.json:/conf/central_targets.json:ro
|
- /etc/bridgehead/dnpm/central_targets.json:/conf/central_targets.json:ro
|
||||||
labels:
|
labels:
|
||||||
@ -33,7 +31,3 @@ services:
|
|||||||
- "traefik.http.routers.dnpm-connect.middlewares=dnpm-connect-strip"
|
- "traefik.http.routers.dnpm-connect.middlewares=dnpm-connect-strip"
|
||||||
- "traefik.http.services.dnpm-connect.loadbalancer.server.port=8062"
|
- "traefik.http.services.dnpm-connect.loadbalancer.server.port=8062"
|
||||||
- "traefik.http.routers.dnpm-connect.tls=true"
|
- "traefik.http.routers.dnpm-connect.tls=true"
|
||||||
|
|
||||||
dnpm-echo:
|
|
||||||
image: docker.verbis.dkfz.de/cache/samply/bridgehead-echo:latest
|
|
||||||
container_name: bridgehead-dnpm-echo
|
|
||||||
|
@ -6,7 +6,6 @@ services:
|
|||||||
container_name: bridgehead-dnpm-backend
|
container_name: bridgehead-dnpm-backend
|
||||||
environment:
|
environment:
|
||||||
- ZPM_SITE=${ZPM_SITE}
|
- ZPM_SITE=${ZPM_SITE}
|
||||||
- N_RANDOM_FILES=${DNPM_SYNTH_NUM}
|
|
||||||
volumes:
|
volumes:
|
||||||
- /etc/bridgehead/dnpm:/bwhc_config:ro
|
- /etc/bridgehead/dnpm:/bwhc_config:ro
|
||||||
- ${DNPM_DATA_DIR}:/bwhc_data
|
- ${DNPM_DATA_DIR}:/bwhc_data
|
||||||
|
@ -14,15 +14,14 @@ if [ -n "${ENABLE_DNPM_NODE}" ]; then
|
|||||||
log ERROR "Mandatory variable DNPM_DATA_DIR not defined!"
|
log ERROR "Mandatory variable DNPM_DATA_DIR not defined!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
DNPM_SYNTH_NUM=${DNPM_SYNTH_NUM:-0}
|
if grep -q 'traefik.http.routers.landing.rule=PathPrefix(`/landing`)' /srv/docker/bridgehead/minimal/docker-compose.override.yml 2>/dev/null; then
|
||||||
if grep -q 'traefik.http.routers.landing.rule=PathPrefix(`/landing`)' /srv/docker/bridgehead/minimal/docker-compose.override.yml 2>/dev/null; then
|
echo "Override of landing page url already in place"
|
||||||
echo "Override of landing page url already in place"
|
else
|
||||||
else
|
echo "Adding override of landing page url"
|
||||||
echo "Adding override of landing page url"
|
if [ -f /srv/docker/bridgehead/minimal/docker-compose.override.yml ]; then
|
||||||
if [ -f /srv/docker/bridgehead/minimal/docker-compose.override.yml ]; then
|
echo -e ' landing:\n labels:\n - "traefik.http.routers.landing.rule=PathPrefix(`/landing`)"' >> /srv/docker/bridgehead/minimal/docker-compose.override.yml
|
||||||
echo -e ' landing:\n labels:\n - "traefik.http.routers.landing.rule=PathPrefix(`/landing`)"' >> /srv/docker/bridgehead/minimal/docker-compose.override.yml
|
else
|
||||||
else
|
echo -e 'version: "3.7"\nservices:\n landing:\n labels:\n - "traefik.http.routers.landing.rule=PathPrefix(`/landing`)"' >> /srv/docker/bridgehead/minimal/docker-compose.override.yml
|
||||||
echo -e 'version: "3.7"\nservices:\n landing:\n labels:\n - "traefik.http.routers.landing.rule=PathPrefix(`/landing`)"' >> /srv/docker/bridgehead/minimal/docker-compose.override.yml
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
@ -6,10 +6,4 @@ if [ -n "${ENABLE_DNPM}" ]; then
|
|||||||
|
|
||||||
# Set variables required for Beam-Connect
|
# Set variables required for Beam-Connect
|
||||||
DNPM_BEAM_SECRET_SHORT="$(cat /proc/sys/kernel/random/uuid | sed 's/[-]//g' | head -c 20)"
|
DNPM_BEAM_SECRET_SHORT="$(cat /proc/sys/kernel/random/uuid | sed 's/[-]//g' | head -c 20)"
|
||||||
# If the DNPM_NO_PROXY variable is set, prefix it with a comma (as it gets added to a comma separated list)
|
|
||||||
if [ -n "${DNPM_NO_PROXY}" ]; then
|
|
||||||
DNPM_ADDITIONAL_NO_PROXY=",${DNPM_NO_PROXY}"
|
|
||||||
else
|
|
||||||
DNPM_ADDITIONAL_NO_PROXY=""
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
@ -27,7 +27,7 @@ services:
|
|||||||
- "/var/cache/bridgehead/ccp/exporter-files:/app/exporter-files/output"
|
- "/var/cache/bridgehead/ccp/exporter-files:/app/exporter-files/output"
|
||||||
|
|
||||||
exporter-db:
|
exporter-db:
|
||||||
image: docker.verbis.dkfz.de/cache/postgres:${POSTGRES_TAG}
|
image: docker.verbis.dkfz.de/cache/postgres:15.4-alpine
|
||||||
container_name: bridgehead-ccp-exporter-db
|
container_name: bridgehead-ccp-exporter-db
|
||||||
environment:
|
environment:
|
||||||
POSTGRES_USER: "exporter"
|
POSTGRES_USER: "exporter"
|
||||||
|
@ -3,6 +3,6 @@
|
|||||||
if [ "$ENABLE_EXPORTER" == true ]; then
|
if [ "$ENABLE_EXPORTER" == true ]; then
|
||||||
log INFO "Exporter setup detected -- will start Exporter service."
|
log INFO "Exporter setup detected -- will start Exporter service."
|
||||||
OVERRIDE+=" -f ./$PROJECT/modules/exporter-compose.yml"
|
OVERRIDE+=" -f ./$PROJECT/modules/exporter-compose.yml"
|
||||||
EXPORTER_DB_PASSWORD="$(echo \"This is a salt string to generate one consistent password for the exporter. It is not required to be secret.\" | sha1sum | openssl pkeyutl -sign -inkey /etc/bridgehead/pki/${SITE_ID}.priv.pem | base64 | head -c 30)"
|
EXPORTER_DB_PASSWORD="$(echo \"This is a salt string to generate one consistent password for the exporter. It is not required to be secret.\" | openssl rsautl -sign -inkey /etc/bridgehead/pki/${SITE_ID}.priv.pem | base64 | head -c 30)"
|
||||||
EXPORTER_API_KEY="$(echo \"This is a salt string to generate one consistent API KEY for the exporter. It is not required to be secret.\" | sha1sum | openssl pkeyutl -sign -inkey /etc/bridgehead/pki/${SITE_ID}.priv.pem | base64 | head -c 64)"
|
EXPORTER_API_KEY="$(echo \"This is a salt string to generate one consistent API KEY for the exporter. It is not required to be secret.\" | openssl rsautl -sign -inkey /etc/bridgehead/pki/${SITE_ID}.priv.pem | base64 | head -c 64)"
|
||||||
fi
|
fi
|
||||||
|
@ -29,7 +29,6 @@ services:
|
|||||||
container_name: bridgehead-patientlist
|
container_name: bridgehead-patientlist
|
||||||
environment:
|
environment:
|
||||||
- TOMCAT_REVERSEPROXY_FQDN=${HOST}
|
- TOMCAT_REVERSEPROXY_FQDN=${HOST}
|
||||||
- TOMCAT_REVERSEPROXY_SSL=true
|
|
||||||
- ML_SITE=${IDMANAGEMENT_FRIENDLY_ID}
|
- ML_SITE=${IDMANAGEMENT_FRIENDLY_ID}
|
||||||
- ML_DB_PASS=${PATIENTLIST_POSTGRES_PASSWORD}
|
- ML_DB_PASS=${PATIENTLIST_POSTGRES_PASSWORD}
|
||||||
- ML_API_KEY=${IDMANAGER_LOCAL_PATIENTLIST_APIKEY}
|
- ML_API_KEY=${IDMANAGER_LOCAL_PATIENTLIST_APIKEY}
|
||||||
@ -45,7 +44,7 @@ services:
|
|||||||
- patientlist-db
|
- patientlist-db
|
||||||
|
|
||||||
patientlist-db:
|
patientlist-db:
|
||||||
image: docker.verbis.dkfz.de/cache/postgres:${POSTGRES_TAG}
|
image: docker.verbis.dkfz.de/cache/postgres:15.6-alpine
|
||||||
container_name: bridgehead-patientlist-db
|
container_name: bridgehead-patientlist-db
|
||||||
environment:
|
environment:
|
||||||
POSTGRES_USER: "mainzelliste"
|
POSTGRES_USER: "mainzelliste"
|
||||||
|
47
ccp/modules/login-compose.yml
Normal file
47
ccp/modules/login-compose.yml
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
version: "3.7"
|
||||||
|
|
||||||
|
services:
|
||||||
|
|
||||||
|
login-db:
|
||||||
|
image: docker.verbis.dkfz.de/cache/postgres:15.4-alpine
|
||||||
|
container_name: bridgehead-login-db
|
||||||
|
environment:
|
||||||
|
POSTGRES_USER: "keycloak"
|
||||||
|
POSTGRES_PASSWORD: "${KEYCLOAK_DB_PASSWORD}" # Set in login-setup.sh
|
||||||
|
POSTGRES_DB: "keycloak"
|
||||||
|
tmpfs:
|
||||||
|
- /var/lib/postgresql/data
|
||||||
|
# Consider removing this comment once we have collected experience in production.
|
||||||
|
# volumes:
|
||||||
|
# - "bridgehead-login-db:/var/lib/postgresql/data"
|
||||||
|
|
||||||
|
login:
|
||||||
|
image: docker.verbis.dkfz.de/ccp/dktk-keycloak:latest
|
||||||
|
container_name: bridgehead-login
|
||||||
|
environment:
|
||||||
|
KEYCLOAK_ADMIN: "admin"
|
||||||
|
KEYCLOAK_ADMIN_PASSWORD: "${LDM_AUTH}"
|
||||||
|
TEILER_ADMIN: "${PROJECT}"
|
||||||
|
TEILER_ADMIN_PASSWORD: "${LDM_AUTH}"
|
||||||
|
TEILER_ADMIN_FIRST_NAME: "${OPERATOR_FIRST_NAME}"
|
||||||
|
TEILER_ADMIN_LAST_NAME: "${OPERATOR_LAST_NAME}"
|
||||||
|
TEILER_ADMIN_EMAIL: "${OPERATOR_EMAIL}"
|
||||||
|
KC_DB_PASSWORD: "${KEYCLOAK_DB_PASSWORD}" # Set in login-setup.sh
|
||||||
|
KC_HOSTNAME_URL: "https://${HOST}/login"
|
||||||
|
KC_HOSTNAME_STRICT: "false"
|
||||||
|
KC_PROXY_ADDRESS_FORWARDING: "true"
|
||||||
|
TEILER_ORCHESTRATOR_EXTERN_URL: "https://${HOST}/ccp-teiler"
|
||||||
|
command:
|
||||||
|
- start-dev --import-realm --proxy edge --http-relative-path=/login
|
||||||
|
labels:
|
||||||
|
- "traefik.enable=true"
|
||||||
|
- "traefik.http.routers.login.rule=PathPrefix(`/login`)"
|
||||||
|
- "traefik.http.services.login.loadbalancer.server.port=8080"
|
||||||
|
- "traefik.http.routers.login.tls=true"
|
||||||
|
depends_on:
|
||||||
|
- login-db
|
||||||
|
|
||||||
|
# Consider removing this comment once we have collected experience in production.
|
||||||
|
#volumes:
|
||||||
|
# bridgehead-login-db:
|
||||||
|
# name: "bridgehead-login-db"
|
7
ccp/modules/login-setup.sh
Normal file
7
ccp/modules/login-setup.sh
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/bash -e
|
||||||
|
|
||||||
|
if [ "$ENABLE_LOGIN" == true ]; then
|
||||||
|
log INFO "Login setup detected -- will start Login services."
|
||||||
|
OVERRIDE+=" -f ./$PROJECT/modules/login-compose.yml"
|
||||||
|
KEYCLOAK_DB_PASSWORD="$(generate_password \"local Keycloak\")"
|
||||||
|
fi
|
13
ccp/modules/login.md
Normal file
13
ccp/modules/login.md
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
# Login
|
||||||
|
The login component is a local Keycloak instance. In the future will be replaced by the central keycloak instance
|
||||||
|
or maybe can be used to add local identity providers to the bridgehead or just to simplify the configuration of
|
||||||
|
the central keycloak instance for the integration of every new bridgehead.
|
||||||
|
The basic configuration of our Keycloak instance is contained in a small json file.
|
||||||
|
|
||||||
|
### Teiler User
|
||||||
|
Currently, the local keycloak is used by the teiler. There is a basic admin user in the basic configuration of keycloak.
|
||||||
|
The user can be configured with the environment variables TEILER_ADMIN_XXX.
|
||||||
|
|
||||||
|
## Login-DB
|
||||||
|
Keycloak requires a local database for its configuration. However, as we use an initial json configuration file, if no
|
||||||
|
local identity provider is configured nor any local user, theoretically we don't need a volume for the login.
|
@ -2,6 +2,7 @@ version: "3.7"
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
mtba:
|
mtba:
|
||||||
|
#image: docker.verbis.dkfz.de/cache/samply/mtba:latest
|
||||||
image: docker.verbis.dkfz.de/cache/samply/mtba:develop
|
image: docker.verbis.dkfz.de/cache/samply/mtba:develop
|
||||||
container_name: bridgehead-mtba
|
container_name: bridgehead-mtba
|
||||||
environment:
|
environment:
|
||||||
@ -20,11 +21,11 @@ services:
|
|||||||
FILE_END_OF_LINE: ${MTBA_FILE_END_OF_LINE:-LF}
|
FILE_END_OF_LINE: ${MTBA_FILE_END_OF_LINE:-LF}
|
||||||
CSV_DELIMITER: ${MTBA_CSV_DELIMITER:-TAB}
|
CSV_DELIMITER: ${MTBA_CSV_DELIMITER:-TAB}
|
||||||
HTTP_RELATIVE_PATH: "/mtba"
|
HTTP_RELATIVE_PATH: "/mtba"
|
||||||
OIDC_ADMIN_GROUP: "${OIDC_ADMIN_GROUP}"
|
KEYCLOAK_ADMIN_GROUP: "${KEYCLOAK_ADMIN_GROUP}"
|
||||||
OIDC_CLIENT_ID: "${OIDC_PRIVATE_CLIENT_ID}"
|
KEYCLOAK_CLIENT_ID: "${KEYCLOAK_PRIVATE_CLIENT_ID}"
|
||||||
OIDC_CLIENT_SECRET: "${OIDC_CLIENT_SECRET}"
|
KEYCLOAK_CLIENT_SECRET: "${OIDC_CLIENT_SECRET}"
|
||||||
OIDC_REALM: "${OIDC_REALM}"
|
KEYCLOAK_REALM: "${KEYCLOAK_REALM}"
|
||||||
OIDC_URL: "${OIDC_URL}"
|
KEYCLOAK_URL: "${KEYCLOAK_URL}"
|
||||||
|
|
||||||
labels:
|
labels:
|
||||||
- "traefik.enable=true"
|
- "traefik.enable=true"
|
||||||
|
@ -15,11 +15,11 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
TEILER_BACKEND_URL: "https://${HOST}/ccp-teiler-backend"
|
TEILER_BACKEND_URL: "https://${HOST}/ccp-teiler-backend"
|
||||||
TEILER_DASHBOARD_URL: "https://${HOST}/ccp-teiler-dashboard"
|
TEILER_DASHBOARD_URL: "https://${HOST}/ccp-teiler-dashboard"
|
||||||
DEFAULT_LANGUAGE: "${TEILER_DEFAULT_LANGUAGE_LOWER_CASE}"
|
DEFAULT_LANGUAGE: "${DEFAULT_LANGUAGE_LOWER_CASE}"
|
||||||
HTTP_RELATIVE_PATH: "/ccp-teiler"
|
HTTP_RELATIVE_PATH: "/ccp-teiler"
|
||||||
|
|
||||||
teiler-dashboard:
|
teiler-dashboard:
|
||||||
image: docker.verbis.dkfz.de/cache/samply/teiler-dashboard:develop
|
image: docker.verbis.dkfz.de/cache/samply/teiler-dashboard:latest
|
||||||
container_name: bridgehead-teiler-dashboard
|
container_name: bridgehead-teiler-dashboard
|
||||||
labels:
|
labels:
|
||||||
- "traefik.enable=true"
|
- "traefik.enable=true"
|
||||||
@ -29,12 +29,12 @@ services:
|
|||||||
- "traefik.http.middlewares.teiler_dashboard_ccp_strip.stripprefix.prefixes=/ccp-teiler-dashboard"
|
- "traefik.http.middlewares.teiler_dashboard_ccp_strip.stripprefix.prefixes=/ccp-teiler-dashboard"
|
||||||
- "traefik.http.routers.teiler_dashboard_ccp.middlewares=teiler_dashboard_ccp_strip"
|
- "traefik.http.routers.teiler_dashboard_ccp.middlewares=teiler_dashboard_ccp_strip"
|
||||||
environment:
|
environment:
|
||||||
DEFAULT_LANGUAGE: "${TEILER_DEFAULT_LANGUAGE}"
|
DEFAULT_LANGUAGE: "${DEFAULT_LANGUAGE}"
|
||||||
TEILER_BACKEND_URL: "https://${HOST}/ccp-teiler-backend"
|
TEILER_BACKEND_URL: "https://${HOST}/ccp-teiler-backend"
|
||||||
OIDC_URL: "${OIDC_URL}"
|
KEYCLOAK_URL: "${KEYCLOAK_URL}"
|
||||||
OIDC_REALM: "${OIDC_REALM}"
|
KEYCLOAK_REALM: "${KEYCLOAK_REALM}"
|
||||||
OIDC_CLIENT_ID: "${OIDC_PUBLIC_CLIENT_ID}"
|
KEYCLOAK_CLIENT_ID: "${KEYCLOAK_PUBLIC_CLIENT_ID}"
|
||||||
OIDC_TOKEN_GROUP: "${OIDC_GROUP_CLAIM}"
|
KEYCLOAK_TOKEN_GROUP: "${KEYCLOAK_GROUP_CLAIM}"
|
||||||
TEILER_ADMIN_NAME: "${OPERATOR_FIRST_NAME} ${OPERATOR_LAST_NAME}"
|
TEILER_ADMIN_NAME: "${OPERATOR_FIRST_NAME} ${OPERATOR_LAST_NAME}"
|
||||||
TEILER_ADMIN_EMAIL: "${OPERATOR_EMAIL}"
|
TEILER_ADMIN_EMAIL: "${OPERATOR_EMAIL}"
|
||||||
TEILER_ADMIN_PHONE: "${OPERATOR_PHONE}"
|
TEILER_ADMIN_PHONE: "${OPERATOR_PHONE}"
|
||||||
@ -43,14 +43,15 @@ services:
|
|||||||
TEILER_ORCHESTRATOR_URL: "https://${HOST}/ccp-teiler"
|
TEILER_ORCHESTRATOR_URL: "https://${HOST}/ccp-teiler"
|
||||||
TEILER_DASHBOARD_HTTP_RELATIVE_PATH: "/ccp-teiler-dashboard"
|
TEILER_DASHBOARD_HTTP_RELATIVE_PATH: "/ccp-teiler-dashboard"
|
||||||
TEILER_ORCHESTRATOR_HTTP_RELATIVE_PATH: "/ccp-teiler"
|
TEILER_ORCHESTRATOR_HTTP_RELATIVE_PATH: "/ccp-teiler"
|
||||||
TEILER_USER: "${OIDC_USER_GROUP}"
|
TEILER_USER: "${KEYCLOAK_USER_GROUP}"
|
||||||
TEILER_ADMIN: "${OIDC_ADMIN_GROUP}"
|
TEILER_ADMIN: "${KEYCLOAK_ADMIN_GROUP}"
|
||||||
REPORTER_DEFAULT_TEMPLATE_ID: "ccp-qb"
|
REPORTER_DEFAULT_TEMPLATE_ID: "ccp-qb"
|
||||||
EXPORTER_DEFAULT_TEMPLATE_ID: "ccp"
|
EXPORTER_DEFAULT_TEMPLATE_ID: "ccp"
|
||||||
|
|
||||||
|
|
||||||
teiler-backend:
|
teiler-backend:
|
||||||
image: docker.verbis.dkfz.de/ccp/dktk-teiler-backend:latest
|
# image: docker.verbis.dkfz.de/ccp/dktk-teiler-backend:latest
|
||||||
|
image: dktk-teiler-backend
|
||||||
container_name: bridgehead-teiler-backend
|
container_name: bridgehead-teiler-backend
|
||||||
labels:
|
labels:
|
||||||
- "traefik.enable=true"
|
- "traefik.enable=true"
|
||||||
@ -63,7 +64,7 @@ services:
|
|||||||
LOG_LEVEL: "INFO"
|
LOG_LEVEL: "INFO"
|
||||||
APPLICATION_PORT: "8085"
|
APPLICATION_PORT: "8085"
|
||||||
APPLICATION_ADDRESS: "${HOST}"
|
APPLICATION_ADDRESS: "${HOST}"
|
||||||
DEFAULT_LANGUAGE: "${TEILER_DEFAULT_LANGUAGE}"
|
DEFAULT_LANGUAGE: "${DEFAULT_LANGUAGE}"
|
||||||
CONFIG_ENV_VAR_PATH: "/run/secrets/ccp.conf"
|
CONFIG_ENV_VAR_PATH: "/run/secrets/ccp.conf"
|
||||||
TEILER_ORCHESTRATOR_HTTP_RELATIVE_PATH: "/ccp-teiler"
|
TEILER_ORCHESTRATOR_HTTP_RELATIVE_PATH: "/ccp-teiler"
|
||||||
TEILER_ORCHESTRATOR_URL: "https://${HOST}/ccp-teiler"
|
TEILER_ORCHESTRATOR_URL: "https://${HOST}/ccp-teiler"
|
||||||
|
@ -3,7 +3,5 @@
|
|||||||
if [ "$ENABLE_TEILER" == true ];then
|
if [ "$ENABLE_TEILER" == true ];then
|
||||||
log INFO "Teiler setup detected -- will start Teiler services."
|
log INFO "Teiler setup detected -- will start Teiler services."
|
||||||
OVERRIDE+=" -f ./$PROJECT/modules/teiler-compose.yml"
|
OVERRIDE+=" -f ./$PROJECT/modules/teiler-compose.yml"
|
||||||
TEILER_DEFAULT_LANGUAGE=DE
|
|
||||||
TEILER_DEFAULT_LANGUAGE_LOWER_CASE=${TEILER_DEFAULT_LANGUAGE,,}
|
|
||||||
add_public_oidc_redirect_url "/ccp-teiler/*"
|
add_public_oidc_redirect_url "/ccp-teiler/*"
|
||||||
fi
|
fi
|
||||||
|
0
ccp/modules/teiler-ui-compose.yml
Normal file
0
ccp/modules/teiler-ui-compose.yml
Normal file
27
ccp/vars
27
ccp/vars
@ -7,18 +7,25 @@ SUPPORT_EMAIL=support-ccp@dkfz-heidelberg.de
|
|||||||
PRIVATEKEYFILENAME=/etc/bridgehead/pki/${SITE_ID}.priv.pem
|
PRIVATEKEYFILENAME=/etc/bridgehead/pki/${SITE_ID}.priv.pem
|
||||||
|
|
||||||
BROKER_URL_FOR_PREREQ=$BROKER_URL
|
BROKER_URL_FOR_PREREQ=$BROKER_URL
|
||||||
|
DEFAULT_LANGUAGE=DE
|
||||||
|
DEFAULT_LANGUAGE_LOWER_CASE=${DEFAULT_LANGUAGE,,}
|
||||||
|
ENABLE_EXPORTER=true
|
||||||
|
ENABLE_TEILER=true
|
||||||
|
#ENABLE_DATASHIELD=true
|
||||||
|
|
||||||
OIDC_USER_GROUP="DKTK_CCP_$(capitalize_first_letter ${SITE_ID})"
|
KEYCLOAK_USER_GROUP="DKTK_CCP_$(capitalize_first_letter ${SITE_ID})"
|
||||||
OIDC_ADMIN_GROUP="DKTK_CCP_$(capitalize_first_letter ${SITE_ID})_Verwalter"
|
KEYCLOAK_ADMIN_GROUP="DKTK_CCP_$(capitalize_first_letter ${SITE_ID})_Verwalter"
|
||||||
OIDC_PRIVATE_CLIENT_ID=${SITE_ID}-private
|
KEYCLOAK_PRIVATE_CLIENT_ID=${SITE_ID}-private
|
||||||
OIDC_PUBLIC_CLIENT_ID=${SITE_ID}-public
|
KEYCLOAK_PUBLIC_CLIENT_ID=${SITE_ID}-public
|
||||||
# Use "test-realm-01" for testing
|
# TODO: Change Keycloak Realm to productive. "test-realm-01" is only for testing
|
||||||
OIDC_REALM="${OIDC_REALM:-master}"
|
KEYCLOAK_REALM="${KEYCLOAK_REALM:-test-realm-01}"
|
||||||
OIDC_URL="https://login.verbis.dkfz.de"
|
KEYCLOAK_URL="https://login.verbis.dkfz.de"
|
||||||
OIDC_ISSUER_URL="${OIDC_URL}/realms/${OIDC_REALM}"
|
KEYCLOAK_ISSUER_URL="${KEYCLOAK_URL}/realms/${KEYCLOAK_REALM}"
|
||||||
OIDC_GROUP_CLAIM="groups"
|
KEYCLOAK_GROUP_CLAIM="groups"
|
||||||
|
OAUTH2_CALLBACK=/oauth2/callback
|
||||||
|
OAUTH2_PROXY_SECRET="$(echo \"This is a salt string to generate one consistent encryption key for the oauth2_proxy. It is not required to be secret.\" | openssl rsautl -sign -inkey /etc/bridgehead/pki/${SITE_ID}.priv.pem | base64 | head -c 32)"
|
||||||
|
|
||||||
POSTGRES_TAG=15.6-alpine
|
add_private_oidc_redirect_url "${OAUTH2_CALLBACK}"
|
||||||
|
|
||||||
for module in $PROJECT/modules/*.sh
|
for module in $PROJECT/modules/*.sh
|
||||||
do
|
do
|
||||||
|
@ -53,7 +53,7 @@ checkOwner(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
printUsage() {
|
printUsage() {
|
||||||
echo "Usage: bridgehead start|stop|logs|is-running|update|install|uninstall|adduser|enroll PROJECTNAME"
|
echo "Usage: bridgehead start|stop|is-running|update|install|uninstall|adduser|enroll PROJECTNAME"
|
||||||
echo "PROJECTNAME should be one of ccp|bbmri"
|
echo "PROJECTNAME should be one of ccp|bbmri"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -155,28 +155,6 @@ setHostname() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# This function optimizes the usage of memory through blaze, according to the official performance tuning guide:
|
|
||||||
# https://github.com/samply/blaze/blob/master/docs/tuning-guide.md
|
|
||||||
# Short summary of the adjustments made:
|
|
||||||
# - set blaze memory cap to a quarter of the system memory
|
|
||||||
# - set db block cache size to a quarter of the system memory
|
|
||||||
# - limit resource count allowed in blaze to 1,25M per 4GB available system memory
|
|
||||||
optimizeBlazeMemoryUsage() {
|
|
||||||
if [ -z "$BLAZE_MEMORY_CAP" ]; then
|
|
||||||
system_memory_in_mb=$(LC_ALL=C free -m | grep 'Mem:' | awk '{print $2}');
|
|
||||||
export BLAZE_MEMORY_CAP=$(($system_memory_in_mb/4));
|
|
||||||
fi
|
|
||||||
if [ -z "$BLAZE_RESOURCE_CACHE_CAP" ]; then
|
|
||||||
available_system_memory_chunks=$((BLAZE_MEMORY_CAP / 1000))
|
|
||||||
if [ $available_system_memory_chunks -eq 0 ]; then
|
|
||||||
log WARN "Only ${BLAZE_MEMORY_CAP} system memory available for Blaze. If your Blaze stores more than 128000 fhir ressources it will run significally slower."
|
|
||||||
export BLAZE_RESOURCE_CACHE_CAP=128000;
|
|
||||||
else
|
|
||||||
export BLAZE_RESOURCE_CACHE_CAP=$((available_system_memory_chunks * 312500))
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# Takes 1) The Backup Directory Path 2) The name of the Service to be backuped
|
# Takes 1) The Backup Directory Path 2) The name of the Service to be backuped
|
||||||
# Creates 3 Backups: 1) For the past seven days 2) For the current month and 3) for each calendar week
|
# Creates 3 Backups: 1) For the past seven days 2) For the current month and 3) for each calendar week
|
||||||
createEncryptedPostgresBackup(){
|
createEncryptedPostgresBackup(){
|
||||||
@ -289,47 +267,32 @@ function sync_secrets() {
|
|||||||
if [[ $OIDC_PRIVATE_REDIRECT_URLS != "" ]]; then
|
if [[ $OIDC_PRIVATE_REDIRECT_URLS != "" ]]; then
|
||||||
secret_sync_args="OIDC:OIDC_CLIENT_SECRET:private;$OIDC_PRIVATE_REDIRECT_URLS"
|
secret_sync_args="OIDC:OIDC_CLIENT_SECRET:private;$OIDC_PRIVATE_REDIRECT_URLS"
|
||||||
fi
|
fi
|
||||||
if [[ $OIDC_PUBLIC_REDIRECT_URLS != "" ]]; then
|
if [[ $OIDC_PRIVATE_REDIRECT_URLS != "" ]]; then
|
||||||
if [[ $secret_sync_args == "" ]]; then
|
if [[ $secret_sync_args == "" ]]; then
|
||||||
secret_sync_args="OIDC:OIDC_PUBLIC:public;$OIDC_PUBLIC_REDIRECT_URLS"
|
secret_sync_args="OIDC:OIDC_PUBLIC:public;$OIDC_PUBLIC_REDIRECT_URLS"
|
||||||
else
|
else
|
||||||
secret_sync_args+="${delimiter}OIDC:OIDC_PUBLIC:public;$OIDC_PUBLIC_REDIRECT_URLS"
|
secret_sync_args+="${delimiter}OIDC:OIDC_PUBLIC:public;$OIDC_PUBLIC_REDIRECT_URLS"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if [[ $secret_sync_args == "" ]]; then
|
if [[ $secret_sync_args == "" ]]; then
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
mkdir -p /var/cache/bridgehead/secrets/
|
||||||
if [ "${ENABLE_ERIC}" == "true" ]; then
|
|
||||||
BROKER_ROOT_CERT=/srv/docker/bridgehead/bbmri/$ERIC_ROOT_CERT.crt.pem
|
|
||||||
PROXY_ID=$ERIC_PROXY_ID
|
|
||||||
BROKER_ID=$ERIC_BROKER_ID
|
|
||||||
elif [ "${ENABLE_GBN}" == "true" ]; then
|
|
||||||
BROKER_ROOT_CERT=/srv/docker/bridgehead/bbmri/$GBN_ROOT_CERT.crt.pem
|
|
||||||
PROXY_ID=$GBN_PROXY_ID
|
|
||||||
BROKER_ID=$GBN_BROKER_ID
|
|
||||||
elif [ "${PROJECT}" == "ccp"]; then
|
|
||||||
BROKER_ROOT_CERT=/srv/docker/bridgehead/ccp/root.crt.pem
|
|
||||||
else
|
|
||||||
fail_and_report 1 "Could not start secret sync as the configuration does not seem to use beam"
|
|
||||||
fi
|
|
||||||
local broker_url="https://$BROKER_ID"
|
|
||||||
mkdir -p /var/cache/bridgehead/secrets/ || fail_and_report 1 "Failed to create '/var/cache/bridgehead/secrets/'. Please run sudo './bridgehead install $PROJECT' again."
|
|
||||||
touch /var/cache/bridgehead/secrets/oidc
|
touch /var/cache/bridgehead/secrets/oidc
|
||||||
|
chown -R bridgehead:docker /var/cache/bridgehead/secrets
|
||||||
|
# The oidc provider will need to be switched based on the project at some point I guess
|
||||||
docker run --rm \
|
docker run --rm \
|
||||||
-v /var/cache/bridgehead/secrets/oidc:/usr/local/cache \
|
-v /var/cache/bridgehead/secrets/oidc:/usr/local/cache \
|
||||||
-v $PRIVATEKEYFILENAME:/run/secrets/privkey.pem:ro \
|
-v $PRIVATEKEYFILENAME:/run/secrets/privkey.pem:ro \
|
||||||
-v $BROKER_ROOT_CERT:/run/secrets/root.crt.pem:ro \
|
-v /srv/docker/bridgehead/$PROJECT/root.crt.pem:/run/secrets/root.crt.pem:ro \
|
||||||
-v /etc/bridgehead/trusted-ca-certs:/conf/trusted-ca-certs:ro \
|
-v /etc/bridgehead/trusted-ca-certs:/conf/trusted-ca-certs:ro \
|
||||||
-e TLS_CA_CERTIFICATES_DIR=/conf/trusted-ca-certs \
|
-e TLS_CA_CERTIFICATES_DIR=/conf/trusted-ca-certs \
|
||||||
-e NO_PROXY=localhost,127.0.0.1 \
|
-e HTTPS_PROXY=$HTTPS_PROXY_FULL_URL \
|
||||||
-e ALL_PROXY=$HTTPS_PROXY_FULL_URL \
|
|
||||||
-e PROXY_ID=$PROXY_ID \
|
-e PROXY_ID=$PROXY_ID \
|
||||||
-e BROKER_URL=$broker_url \
|
-e BROKER_URL=$BROKER_URL \
|
||||||
-e OIDC_PROVIDER=secret-sync-central.oidc-client-enrollment.$BROKER_ID \
|
-e OIDC_PROVIDER=secret-sync-central.oidc-client-enrollment.$BROKER_ID \
|
||||||
-e SECRET_DEFINITIONS=$secret_sync_args \
|
-e SECRET_DEFINITIONS=$secret_sync_args \
|
||||||
docker.verbis.dkfz.de/cache/samply/secret-sync-local:latest
|
docker.verbis.dkfz.de/cache/samply/secret-sync-local:latest
|
||||||
|
|
||||||
set -a # Export variables as environment variables
|
set -a # Export variables as environment variables
|
||||||
source /var/cache/bridgehead/secrets/*
|
source /var/cache/bridgehead/secrets/*
|
||||||
set +a # Export variables in the regular way
|
set +a # Export variables in the regular way
|
||||||
@ -371,7 +334,7 @@ generate_password(){
|
|||||||
local random_special=${special:$n:1}
|
local random_special=${special:$n:1}
|
||||||
|
|
||||||
local combined_text="This is a salt string to generate one consistent password for ${seed_text}. It is not required to be secret."
|
local combined_text="This is a salt string to generate one consistent password for ${seed_text}. It is not required to be secret."
|
||||||
local main_password=$(echo "${combined_text}" | sha1sum | openssl pkeyutl -sign -inkey "/etc/bridgehead/pki/${SITE_ID}.priv.pem" 2> /dev/null | base64 | head -c 26 | sed 's/\//A/g')
|
local main_password=$(echo "${combined_text}" | openssl rsautl -sign -inkey "/etc/bridgehead/pki/${SITE_ID}.priv.pem" 2> /dev/null | base64 | head -c 26 | sed 's/\//A/g')
|
||||||
|
|
||||||
echo "${main_password}${random_digit}${random_upper}${random_lower}${random_special}"
|
echo "${main_password}${random_digit}${random_upper}${random_lower}${random_special}"
|
||||||
}
|
}
|
||||||
@ -380,9 +343,5 @@ generate_password(){
|
|||||||
generate_simple_password(){
|
generate_simple_password(){
|
||||||
local seed_text="$1"
|
local seed_text="$1"
|
||||||
local combined_text="This is a salt string to generate one consistent password for ${seed_text}. It is not required to be secret."
|
local combined_text="This is a salt string to generate one consistent password for ${seed_text}. It is not required to be secret."
|
||||||
echo "${combined_text}" | sha1sum | openssl pkeyutl -sign -inkey "/etc/bridgehead/pki/${SITE_ID}.priv.pem" 2> /dev/null | base64 | head -c 26 | sed 's/[+\/]/A/g'
|
echo "${combined_text}" | openssl rsautl -sign -inkey "/etc/bridgehead/pki/${SITE_ID}.priv.pem" 2> /dev/null | base64 | head -c 26 | sed 's/[+\/]/A/g'
|
||||||
}
|
|
||||||
|
|
||||||
docker_jq() {
|
|
||||||
docker run --rm -i docker.verbis.dkfz.de/cache/jqlang/jq:latest "$@"
|
|
||||||
}
|
}
|
||||||
|
@ -89,9 +89,6 @@ elif [[ "$DEV_MODE" == "DEV" ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
chown -R bridgehead /etc/bridgehead /srv/docker/bridgehead
|
chown -R bridgehead /etc/bridgehead /srv/docker/bridgehead
|
||||||
mkdir -p /tmp/bridgehead /var/cache/bridgehead
|
|
||||||
chown -R bridgehead:docker /tmp/bridgehead /var/cache/bridgehead
|
|
||||||
chmod -R g+wr /var/cache/bridgehead /tmp/bridgehead
|
|
||||||
|
|
||||||
log INFO "System preparation is completed and configuration is present."
|
log INFO "System preparation is completed and configuration is present."
|
||||||
|
|
||||||
|
@ -67,30 +67,29 @@ log INFO "Checking network access ($BROKER_URL_FOR_PREREQ) ..."
|
|||||||
source /etc/bridgehead/${PROJECT}.conf
|
source /etc/bridgehead/${PROJECT}.conf
|
||||||
source ${PROJECT}/vars
|
source ${PROJECT}/vars
|
||||||
|
|
||||||
if [ "${PROJECT}" != "minimal" ]; then
|
set +e
|
||||||
set +e
|
SERVERTIME="$(https_proxy=$HTTPS_PROXY_FULL_URL curl -m 5 -s -I $BROKER_URL_FOR_PREREQ 2>&1 | grep -i -e '^Date: ' | sed -e 's/^Date: //i')"
|
||||||
SERVERTIME="$(https_proxy=$HTTPS_PROXY_FULL_URL curl -m 5 -s -I $BROKER_URL_FOR_PREREQ 2>&1 | grep -i -e '^Date: ' | sed -e 's/^Date: //i')"
|
RET=$?
|
||||||
RET=$?
|
set -e
|
||||||
set -e
|
if [ $RET -ne 0 ]; then
|
||||||
if [ $RET -ne 0 ]; then
|
log WARN "Unable to connect to Samply.Beam broker at $BROKER_URL_FOR_PREREQ. Please check your proxy settings.\nThe currently configured proxy was \"$HTTPS_PROXY_URL\". This error is normal when using proxy authentication."
|
||||||
log WARN "Unable to connect to Samply.Beam broker at $BROKER_URL_FOR_PREREQ. Please check your proxy settings.\nThe currently configured proxy was \"$HTTPS_PROXY_URL\". This error is normal when using proxy authentication."
|
log WARN "Unable to check clock skew due to previous error."
|
||||||
log WARN "Unable to check clock skew due to previous error."
|
else
|
||||||
else
|
log INFO "Checking clock skew ..."
|
||||||
log INFO "Checking clock skew ..."
|
|
||||||
|
|
||||||
SERVERTIME_AS_TIMESTAMP=$(date --date="$SERVERTIME" +%s)
|
SERVERTIME_AS_TIMESTAMP=$(date --date="$SERVERTIME" +%s)
|
||||||
MYTIME=$(date +%s)
|
MYTIME=$(date +%s)
|
||||||
SKEW=$(($SERVERTIME_AS_TIMESTAMP - $MYTIME))
|
SKEW=$(($SERVERTIME_AS_TIMESTAMP - $MYTIME))
|
||||||
SKEW=$(echo $SKEW | awk -F- '{print $NF}')
|
SKEW=$(echo $SKEW | awk -F- '{print $NF}')
|
||||||
SYNCTEXT="For example, consider entering a correct NTP server (e.g. your institution's Active Directory Domain Controller in /etc/systemd/timesyncd.conf (option NTP=) and restart systemd-timesyncd."
|
SYNCTEXT="For example, consider entering a correct NTP server (e.g. your institution's Active Directory Domain Controller in /etc/systemd/timesyncd.conf (option NTP=) and restart systemd-timesyncd."
|
||||||
if [ $SKEW -ge 300 ]; then
|
if [ $SKEW -ge 300 ]; then
|
||||||
report_error 5 "Your clock is not synchronized (${SKEW}s off). This will cause Samply.Beam's certificate will fail. Please setup time synchronization. $SYNCTEXT"
|
report_error 5 "Your clock is not synchronized (${SKEW}s off). This will cause Samply.Beam's certificate will fail. Please setup time synchronization. $SYNCTEXT"
|
||||||
exit 1
|
exit 1
|
||||||
elif [ $SKEW -ge 60 ]; then
|
elif [ $SKEW -ge 60 ]; then
|
||||||
log WARN "Your clock is more than a minute off (${SKEW}s). Consider syncing to a time server. $SYNCTEXT"
|
log WARN "Your clock is more than a minute off (${SKEW}s). Consider syncing to a time server. $SYNCTEXT"
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
checkPrivKey() {
|
checkPrivKey() {
|
||||||
if [ -e /etc/bridgehead/pki/${SITE_ID}.priv.pem ]; then
|
if [ -e /etc/bridgehead/pki/${SITE_ID}.priv.pem ]; then
|
||||||
log INFO "Success - private key found."
|
log INFO "Success - private key found."
|
||||||
@ -101,7 +100,7 @@ checkPrivKey() {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
if [[ "$@" =~ "noprivkey" || "${PROJECT}" != "minimal" ]]; then
|
if [[ "$@" =~ "noprivkey" ]]; then
|
||||||
log INFO "Skipping check for private key for now."
|
log INFO "Skipping check for private key for now."
|
||||||
else
|
else
|
||||||
checkPrivKey || exit 1
|
checkPrivKey || exit 1
|
||||||
|
@ -86,7 +86,7 @@ done
|
|||||||
# Check docker updates
|
# Check docker updates
|
||||||
log "INFO" "Checking for updates to running docker images ..."
|
log "INFO" "Checking for updates to running docker images ..."
|
||||||
docker_updated="false"
|
docker_updated="false"
|
||||||
for IMAGE in $($COMPOSE -p $PROJECT -f ./minimal/docker-compose.yml -f ./$PROJECT/docker-compose.yml $OVERRIDE config | grep "image:" | sed -e 's_^.*image: \(.*\).*$_\1_g; s_\"__g'); do
|
for IMAGE in $(cat $PROJECT/docker-compose.yml ${OVERRIDE//-f/} minimal/docker-compose.yml | grep -v "^#" | grep "image:" | sed -e 's_^.*image: \(.*\).*$_\1_g; s_\"__g'); do
|
||||||
log "INFO" "Checking for Updates of Image: $IMAGE"
|
log "INFO" "Checking for Updates of Image: $IMAGE"
|
||||||
if docker pull $IMAGE | grep "Downloaded newer image"; then
|
if docker pull $IMAGE | grep "Downloaded newer image"; then
|
||||||
CHANGE="Image $IMAGE updated."
|
CHANGE="Image $IMAGE updated."
|
||||||
|
@ -42,9 +42,6 @@ services:
|
|||||||
- /var/spool/squid
|
- /var/spool/squid
|
||||||
volumes:
|
volumes:
|
||||||
- /etc/bridgehead/trusted-ca-certs:/docker/custom-certs/:ro
|
- /etc/bridgehead/trusted-ca-certs:/docker/custom-certs/:ro
|
||||||
healthcheck:
|
|
||||||
# Wait 1s before marking this service healthy. Required for the oauth2-proxy to talk to the OIDC provider on startup which will fail if the forward proxy is not started yet.
|
|
||||||
test: ["CMD", "sleep", "1"]
|
|
||||||
|
|
||||||
landing:
|
landing:
|
||||||
container_name: bridgehead-landingpage
|
container_name: bridgehead-landingpage
|
||||||
@ -58,3 +55,5 @@ services:
|
|||||||
HOST: ${HOST}
|
HOST: ${HOST}
|
||||||
PROJECT: ${PROJECT}
|
PROJECT: ${PROJECT}
|
||||||
SITE_NAME: ${SITE_NAME}
|
SITE_NAME: ${SITE_NAME}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,2 +0,0 @@
|
|||||||
OIDC_USER_GROUP="DKTK_CCP_$(capitalize_first_letter ${SITE_ID})"
|
|
||||||
OIDC_ADMIN_GROUP="DKTK_CCP_$(capitalize_first_letter ${SITE_ID})_Verwalter"
|
|
@ -1,7 +0,0 @@
|
|||||||
OIDC_PRIVATE_CLIENT_ID=${SITE_ID}-private
|
|
||||||
OIDC_PUBLIC_CLIENT_ID=${SITE_ID}-public
|
|
||||||
# Use "test-realm-01" for testing
|
|
||||||
OIDC_REALM="${OIDC_REALM:-master}"
|
|
||||||
OIDC_URL="https://login.verbis.dkfz.de"
|
|
||||||
OIDC_ISSUER_URL="${OIDC_URL}/realms/${OIDC_REALM}"
|
|
||||||
OIDC_GROUP_CLAIM="groups"
|
|
@ -32,14 +32,12 @@ services:
|
|||||||
LOCAL_TARGETS_FILE: "./conf/connect_targets.json"
|
LOCAL_TARGETS_FILE: "./conf/connect_targets.json"
|
||||||
HTTP_PROXY: http://forward_proxy:3128
|
HTTP_PROXY: http://forward_proxy:3128
|
||||||
HTTPS_PROXY: http://forward_proxy:3128
|
HTTPS_PROXY: http://forward_proxy:3128
|
||||||
NO_PROXY: dnpm-beam-proxy,dnpm-backend, host.docker.internal${DNPM_ADDITIONAL_NO_PROXY}
|
NO_PROXY: dnpm-beam-proxy,dnpm-backend, host.docker.internal
|
||||||
RUST_LOG: ${RUST_LOG:-info}
|
RUST_LOG: ${RUST_LOG:-info}
|
||||||
NO_AUTH: "true"
|
NO_AUTH: "true"
|
||||||
TLS_CA_CERTIFICATES_DIR: ./conf/trusted-ca-certs
|
|
||||||
extra_hosts:
|
extra_hosts:
|
||||||
- "host.docker.internal:host-gateway"
|
- "host.docker.internal:host-gateway"
|
||||||
volumes:
|
volumes:
|
||||||
- /etc/bridgehead/trusted-ca-certs:/conf/trusted-ca-certs:ro
|
|
||||||
- /etc/bridgehead/dnpm/local_targets.json:/conf/connect_targets.json:ro
|
- /etc/bridgehead/dnpm/local_targets.json:/conf/connect_targets.json:ro
|
||||||
- /etc/bridgehead/dnpm/central_targets.json:/conf/central_targets.json:ro
|
- /etc/bridgehead/dnpm/central_targets.json:/conf/central_targets.json:ro
|
||||||
labels:
|
labels:
|
||||||
@ -50,10 +48,6 @@ services:
|
|||||||
- "traefik.http.services.dnpm-connect.loadbalancer.server.port=8062"
|
- "traefik.http.services.dnpm-connect.loadbalancer.server.port=8062"
|
||||||
- "traefik.http.routers.dnpm-connect.tls=true"
|
- "traefik.http.routers.dnpm-connect.tls=true"
|
||||||
|
|
||||||
dnpm-echo:
|
|
||||||
image: docker.verbis.dkfz.de/cache/samply/bridgehead-echo:latest
|
|
||||||
container_name: bridgehead-dnpm-echo
|
|
||||||
|
|
||||||
secrets:
|
secrets:
|
||||||
proxy.pem:
|
proxy.pem:
|
||||||
file: /etc/bridgehead/pki/${SITE_ID}.priv.pem
|
file: /etc/bridgehead/pki/${SITE_ID}.priv.pem
|
||||||
|
@ -6,7 +6,6 @@ services:
|
|||||||
container_name: bridgehead-dnpm-backend
|
container_name: bridgehead-dnpm-backend
|
||||||
environment:
|
environment:
|
||||||
- ZPM_SITE=${ZPM_SITE}
|
- ZPM_SITE=${ZPM_SITE}
|
||||||
- N_RANDOM_FILES=${DNPM_SYNTH_NUM}
|
|
||||||
volumes:
|
volumes:
|
||||||
- /etc/bridgehead/dnpm:/bwhc_config:ro
|
- /etc/bridgehead/dnpm:/bwhc_config:ro
|
||||||
- ${DNPM_DATA_DIR}:/bwhc_data
|
- ${DNPM_DATA_DIR}:/bwhc_data
|
||||||
|
@ -14,15 +14,14 @@ if [ -n "${ENABLE_DNPM_NODE}" ]; then
|
|||||||
log ERROR "Mandatory variable DNPM_DATA_DIR not defined!"
|
log ERROR "Mandatory variable DNPM_DATA_DIR not defined!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
DNPM_SYNTH_NUM=${DNPM_SYNTH_NUM:-0}
|
if grep -q 'traefik.http.routers.landing.rule=PathPrefix(`/landing`)' /srv/docker/bridgehead/minimal/docker-compose.override.yml 2>/dev/null; then
|
||||||
if grep -q 'traefik.http.routers.landing.rule=PathPrefix(`/landing`)' /srv/docker/bridgehead/minimal/docker-compose.override.yml 2>/dev/null; then
|
echo "Override of landing page url already in place"
|
||||||
echo "Override of landing page url already in place"
|
else
|
||||||
else
|
echo "Adding override of landing page url"
|
||||||
echo "Adding override of landing page url"
|
if [ -f /srv/docker/bridgehead/minimal/docker-compose.override.yml ]; then
|
||||||
if [ -f /srv/docker/bridgehead/minimal/docker-compose.override.yml ]; then
|
echo -e ' landing:\n labels:\n - "traefik.http.routers.landing.rule=PathPrefix(`/landing`)"' >> /srv/docker/bridgehead/minimal/docker-compose.override.yml
|
||||||
echo -e ' landing:\n labels:\n - "traefik.http.routers.landing.rule=PathPrefix(`/landing`)"' >> /srv/docker/bridgehead/minimal/docker-compose.override.yml
|
else
|
||||||
else
|
echo -e 'version: "3.7"\nservices:\n landing:\n labels:\n - "traefik.http.routers.landing.rule=PathPrefix(`/landing`)"' >> /srv/docker/bridgehead/minimal/docker-compose.override.yml
|
||||||
echo -e 'version: "3.7"\nservices:\n landing:\n labels:\n - "traefik.http.routers.landing.rule=PathPrefix(`/landing`)"' >> /srv/docker/bridgehead/minimal/docker-compose.override.yml
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
@ -13,10 +13,4 @@ if [ -n "${ENABLE_DNPM}" ]; then
|
|||||||
log DEBUG "No Broker for clock check set; using $DNPM_BROKER_URL"
|
log DEBUG "No Broker for clock check set; using $DNPM_BROKER_URL"
|
||||||
fi
|
fi
|
||||||
DNPM_PROXY_ID="${SITE_ID}.${DNPM_BROKER_ID}"
|
DNPM_PROXY_ID="${SITE_ID}.${DNPM_BROKER_ID}"
|
||||||
# If the DNPM_NO_PROXY variable is set, prefix it with a comma (as it gets added to a comma separated list)
|
|
||||||
if [ -n "${DNPM_NO_PROXY}" ]; then
|
|
||||||
DNPM_ADDITIONAL_NO_PROXY=",${DNPM_NO_PROXY}"
|
|
||||||
else
|
|
||||||
DNPM_ADDITIONAL_NO_PROXY=""
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
Reference in New Issue
Block a user