Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -318,19 +318,26 @@ To enable it, you will need to explicitly set the username and password variable
DS_DIRECTORY_USER_NAME=your_directory_username
DS_DIRECTORY_USER_PASS=your_directory_password
```
Alternatively, if you have obtained a token from the Directory, you can insert the following into the configuration file:
```
DS_DIRECTORY_USER_TOKEN=your_directory_token
```
If you don't supply any authentification information (either login credentials or a token), Directory sync will not start.

Please contact your National Node or Directory support (directory-dev@helpdesk.bbmri-eric.eu) to obtain these credentials.

The following environment variables can be used from within your config file to control the behavior of Directory sync:

| Variable | Purpose | Default if not specified |
|:-----------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------|:---------------------------------------|
| DS_DIRECTORY_URL | Base URL of the Directory | https://directory-backend.molgenis.net |
| DS_DIRECTORY_USER_NAME | User name for logging in to Directory **Mandatory** | |
| DS_DIRECTORY_USER_PASS | Password for logging in to Directory **Mandatory** | |
| DS_DIRECTORY_USER_NAME | User name for logging in to Directory | |
| DS_DIRECTORY_USER_PASS | Password for logging in to Directory | |
| DS_DIRECTORY_USER_TOKEN | Token for logging in to Directory | |
| DS_DIRECTORY_DEFAULT_COLLECTION_ID | ID of collection to be used if not in samples | |
| DS_DIRECTORY_ALLOW_STAR_MODEL | Set to 'True' to send star model info to Directory | True |
| DS_FHIR_STORE_URL | URL for FHIR store | http://bridgehead-bbmri-blaze:8080 |
| DS_TIMER_CRON | Execution interval for Directory sync, [cron](https://crontab.guru) format | 0 22 * * * |
| DS_TIMER_CRON | Execution interval for Directory sync, [cron](https://crontab.guru) format | 30 22 * * * |
| DS_IMPORT_BIOBANKS | Set to 'True' to import biobank metadata from Directory | True |
| DS_IMPORT_COLLECTIONS | Set to 'True' to import collection metadata from Directory | True |

Expand Down
6 changes: 5 additions & 1 deletion bbmri/modules/directory-sync-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ services:
DS_DIRECTORY_URL: ${DS_DIRECTORY_URL:-https://directory.bbmri-eric.eu}
DS_DIRECTORY_USER_NAME: ${DS_DIRECTORY_USER_NAME}
DS_DIRECTORY_USER_PASS: ${DS_DIRECTORY_USER_PASS}
DS_TIMER_CRON: ${DS_TIMER_CRON:-0 22 * * *}
DS_DIRECTORY_USER_TOKEN: ${DS_DIRECTORY_USER_TOKEN}
DS_TIMER_CRON: ${DS_TIMER_CRON:-30 22 * * *}
DS_DIRECTORY_ALLOW_STAR_MODEL: ${DS_DIRECTORY_ALLOW_STAR_MODEL:-true}
DS_DIRECTORY_MOCK: ${DS_DIRECTORY_MOCK}
DS_DIRECTORY_DEFAULT_COLLECTION_ID: ${DS_DIRECTORY_DEFAULT_COLLECTION_ID}
Expand All @@ -16,3 +17,6 @@ services:
DS_IMPORT_COLLECTIONS: ${DS_IMPORT_COLLECTIONS:-true}
depends_on:
- "blaze"
volumes:
- /etc/localtime:/etc/localtime:ro # inherit host timezone
- /etc/timezone:/etc/timezone:ro # inherit host timezone name
2 changes: 1 addition & 1 deletion bbmri/modules/directory-sync.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

if [ -n "${DS_DIRECTORY_USER_NAME}" ]; then
if [ -n "${DS_DIRECTORY_USER_NAME}" ] || [ -n "${DS_DIRECTORY_USER_TOKEN}" ]; then
Comment thread
TKussel marked this conversation as resolved.
log INFO "Directory sync setup detected -- will start directory sync service."
OVERRIDE+=" -f ./$PROJECT/modules/directory-sync-compose.yml"
fi
1 change: 1 addition & 0 deletions bbmri/modules/eric-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ services:
BLAZE_URL: "http://blaze:8080/fhir/"
BEAM_PROXY_URL: http://beam-proxy-eric:8081
RETRY_COUNT: ${FOCUS_RETRY_COUNT}
OBFUSCATE_BBMRI_ERIC_WAY: "true"
depends_on:
- "beam-proxy-eric"
- "blaze"
Expand Down
6 changes: 6 additions & 0 deletions bridgehead
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ case "$PROJECT" in
cce)
#nothing extra to do
;;
pscc)
#nothing extra to do
;;
itcc)
#nothing extra to do
;;
Expand All @@ -44,6 +47,9 @@ case "$PROJECT" in
dhki)
#nothing extra to do
;;
nngm)
#nothing extra to do
;;
minimal)
#nothing extra to do
;;
Expand Down
40 changes: 27 additions & 13 deletions cce/modules/lens-compose.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,46 @@
version: "3.7"
services:
landing:
lens:
container_name: lens_federated-search
image: docker.verbis.dkfz.de/ccp/lens:${SITE_ID}
image: samply/cce-explorer:main
environment:
PUBLIC_SPOT_URL: https://${HOST}/prod
labels:
- "traefik.http.services.lens.loadbalancer.server.port=3000"
- "traefik.enable=true"
- "traefik.http.routers.landing.rule=PathPrefix(`/`)"
- "traefik.http.services.landing.loadbalancer.server.port=80"
- "traefik.http.routers.landing.tls=true"
- "traefik.http.routers.lens.rule=Host(`${HOST}`)"
- "traefik.http.routers.lens.tls=true"

spot:
image: docker.verbis.dkfz.de/ccp-private/central-spot
image: samply/rustyspot:latest
environment:
HTTP_PROXY: ${HTTP_PROXY_URL}
HTTPS_PROXY: ${HTTPS_PROXY_URL}
NO_PROXY: beam-proxy
BEAM_SECRET: "${FOCUS_BEAM_SECRET_SHORT}"
BEAM_URL: http://beam-proxy:8081
BEAM_PROXY_ID: ${SITE_ID}
BEAM_BROKER_ID: ${BROKER_ID}
BEAM_APP_ID: "focus"
BEAM_PROXY_URL: http://beam-proxy:8081
BEAM_APP_ID: "spot.${SITE_ID}.${BROKER_ID}"
CORS_ORIGIN: "https://${HOST}"
SITES: ${SITES}
TRANSFORM: LENS
PROJECT: cce
BIND_ADDR: 0.0.0.0:8055
depends_on:
- "beam-proxy"
labels:
- "traefik.enable=true"
- "traefik.http.services.spot.loadbalancer.server.port=8080"
- "traefik.http.services.spot.loadbalancer.server.port=8055"
- "traefik.http.middlewares.corsheaders2.headers.accesscontrolallowmethods=GET,OPTIONS,POST"
- "traefik.http.middlewares.corsheaders2.headers.accesscontrolallowheaders=content-type"
- "traefik.http.middlewares.corsheaders2.headers.accesscontrolalloworiginlist=https://${HOST}"
- "traefik.http.middlewares.corsheaders2.headers.accesscontrolallowcredentials=true"
- "traefik.http.middlewares.corsheaders2.headers.accesscontrolmaxage=-1"
- "traefik.http.routers.spot.rule=Host(`${HOST}`) && PathPrefix(`/backend`)"
- "traefik.http.middlewares.stripprefix_spot.stripprefix.prefixes=/backend"
- "traefik.http.routers.spot.rule=Host(`${HOST}`) && PathPrefix(`/prod`)"
- "traefik.http.middlewares.stripprefix_spot.stripprefix.prefixes=/prod"
- "traefik.http.routers.spot.tls=true"
- "traefik.http.routers.spot.middlewares=corsheaders2,stripprefix_spot,auth"

beam-proxy:
environment:
APP_spot_KEY: ${FOCUS_BEAM_SECRET_SHORT}

6 changes: 6 additions & 0 deletions cce/modules/osiris2fhir-setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash
if [ -n "$ENABLE_OSIRIS2FHIR" ]; then
log INFO "OSIRIS2FHIR-REST setup detected -- will start osiris2fhir module."
OVERRIDE+=" -f ./pscc/modules/osiris2fhir-compose.yml"
LOCAL_SALT="$(echo \"local-random-salt\" | openssl pkeyutl -sign -inkey /etc/bridgehead/pki/${SITE_ID}.priv.pem | base64 | head -c 30)"
fi
2 changes: 1 addition & 1 deletion cce/vars
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ for module in $PROJECT/modules/*.sh
do
log DEBUG "sourcing $module"
source $module
done
done
1 change: 1 addition & 0 deletions ccp/modules/dnpm-node-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ services:
- HATEOAS_HOST=https://${HOST}
- CONNECTOR_TYPE=broker
- AUTHUP_URL=robot://system:${DNPM_AUTHUP_SECRET}@http://dnpm-authup:3000
- TZ=Europe/Berlin
volumes:
- /etc/bridgehead/dnpm/config:/dnpm_config
- /var/cache/bridgehead/dnpm/backend-data:/dnpm_data
Expand Down
2 changes: 1 addition & 1 deletion itcc/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ services:
- "blaze-data:/app/data"
labels:
- "traefik.enable=true"
- "traefik.http.routers.blaze_itcc.rule=PathPrefix(`/itcc-localdatamanagement`)"
- "traefik.http.routers.blaze_itcc.rule=Host(`${HOST}`) && PathPrefix(`/itcc-localdatamanagement`)"
- "traefik.http.middlewares.itcc_b_strip.stripprefix.prefixes=/itcc-localdatamanagement"
- "traefik.http.services.blaze_itcc.loadbalancer.server.port=8080"
- "traefik.http.routers.blaze_itcc.middlewares=itcc_b_strip,auth"
Expand Down
6 changes: 6 additions & 0 deletions itcc/modules/itcc-omics-ingest.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

if [ -n "$ENABLE_OMICS" ];then
OVERRIDE+=" -f ./$PROJECT/modules/itcc-omics-ingest.yaml"
GENERATE_API_KEY="$(generate_simple_password 'omics')"
fi
14 changes: 14 additions & 0 deletions itcc/modules/itcc-omics-ingest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
services:
omics-endpoint:
image: ghcr.io/samply/itcc-omics-ingest:main
environment:
- API_KEY=${GENERATE_API_KEY}
volumes:
- /var/cache/bridgehead/omics/data:/data/uploads
labels:
- "traefik.http.routers.omics.rule=Host(`${HOST}`) && PathPrefix(`/api/omics`)"
- "traefik.enable=true"
- "traefik.http.services.omics.loadbalancer.server.port=6080"
- "traefik.http.routers.omics.tls=true"
- "traefik.http.middlewares.omics-stripprefix.stripprefix.prefixes=/api"
- "traefik.http.routers.omics.middlewares=omics-stripprefix"
39 changes: 27 additions & 12 deletions itcc/modules/lens-compose.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,47 @@
version: "3.7"
services:
landing:
container_name: lens_federated-search
image: docker.verbis.dkfz.de/ccp/lens:${SITE_ID}
itcc-explorer:
container_name: lens_itcc_explorer
image: samply/itcc-explorer:main
environment:
HOST: "0.0.0.0"
BIND_ADDR: "0.0.0.0:3000"
PUBLIC_ENVIRONMENT: ${PUBLIC_ENVIRONMENT}
labels:
- "traefik.enable=true"
- "traefik.http.routers.landing.rule=PathPrefix(`/`)"
- "traefik.http.services.landing.loadbalancer.server.port=80"
- "traefik.http.routers.landing.tls=true"
- "traefik.http.routers.itcc.rule=Host(`${HOST}`) && PathPrefix(`/`)"
- "traefik.http.routers.itcc.entrypoints=websecure"
- "traefik.http.services.itcc.loadbalancer.server.port=3000"
- "traefik.http.routers.itcc.tls=true"

spot:
image: docker.verbis.dkfz.de/ccp-private/central-spot
image: samply/rustyspot:latest
environment:
BEAM_SECRET: "${FOCUS_BEAM_SECRET_SHORT}"
BEAM_URL: http://beam-proxy:8081
BEAM_PROXY_URL: http://beam-proxy:8081
BEAM_PROXY_ID: ${SITE_ID}
BEAM_BROKER_ID: ${BROKER_ID}
BEAM_APP_ID: "focus"
BEAM_APP_ID: "spot.${SITE_ID}.${BROKER_ID}"
CORS_ORIGIN: "https://${HOST}"
SITES: ${SITES}
TRANSFORM: LENS
PROJECT: "itcc"
BIND_ADDR: 0.0.0.0:8055
depends_on:
- "beam-proxy"
labels:
- "traefik.enable=true"
- "traefik.http.services.spot.loadbalancer.server.port=8080"
- "traefik.http.services.spot.loadbalancer.server.port=8055"
- "traefik.http.middlewares.corsheaders2.headers.accesscontrolallowmethods=GET,OPTIONS,POST"
- "traefik.http.middlewares.corsheaders2.headers.accesscontrolallowheaders=content-type"
- "traefik.http.middlewares.corsheaders2.headers.accesscontrolalloworiginlist=https://${HOST}"
- "traefik.http.middlewares.corsheaders2.headers.accesscontrolallowcredentials=true"
- "traefik.http.middlewares.corsheaders2.headers.accesscontrolmaxage=-1"
- "traefik.http.routers.spot.rule=Host(`${HOST}`) && PathPrefix(`/backend`)"
- "traefik.http.middlewares.stripprefix_spot.stripprefix.prefixes=/backend"
- "traefik.http.routers.spot.rule=Host(`${HOST}`) && PathPrefix(`/prod`)"
- "traefik.http.middlewares.stripprefix_spot.stripprefix.prefixes=/prod"
- "traefik.http.routers.spot.tls=true"
- "traefik.http.routers.spot.middlewares=corsheaders2,stripprefix_spot,auth"

beam-proxy:
environment:
APP_spot_KEY: ${FOCUS_BEAM_SECRET_SHORT}
1 change: 1 addition & 0 deletions itcc/vars
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ FOCUS_RETRY_COUNT=${FOCUS_RETRY_COUNT:-64}
SUPPORT_EMAIL=arturo.macias@dkfz-heidelberg.de
PRIVATEKEYFILENAME=/etc/bridgehead/pki/${SITE_ID}.priv.pem
BROKER_URL_FOR_PREREQ=$BROKER_URL
PUBLIC_ENVIRONMENT=prod

for module in $PROJECT/modules/*.sh
do
Expand Down
3 changes: 2 additions & 1 deletion kr/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ services:
BASE_URL: "http://bridgehead-kr-blaze:8080"
JAVA_TOOL_OPTIONS: "-Xmx${BLAZE_MEMORY_CAP:-4096}m"
DB_RESOURCE_CACHE_SIZE: ${BLAZE_RESOURCE_CACHE_CAP:-2500000}
DB_BLOCK_CACHE_SIZE: $BLAZE_MEMORY_CAP
DB_BLOCK_CACHE_SIZE: ${BLAZE_MEMORY_CAP}
CQL_EXPR_CACHE_SIZE: ${BLAZE_CQL_CACHE_CAP:-32}
ENFORCE_REFERENTIAL_INTEGRITY: "false"
volumes:
- "blaze-data:/app/data"
Expand Down
6 changes: 0 additions & 6 deletions kr/modules/export-and-qb.curl-templates

This file was deleted.

37 changes: 23 additions & 14 deletions kr/modules/lens-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,41 @@ services:
deploy:
replicas: 1 #reactivate if lens is in use
container_name: lens_federated-search
image: docker.verbis.dkfz.de/ccp/lens:${SITE_ID}
image: docker.verbis.dkfz.de/ccp/kr-explorer:main
environment:
PUBLIC_SPOT_URL: https://${HOST}/prod
labels:
- "traefik.http.services.lens.loadbalancer.server.port=3000"
- "traefik.enable=true"
- "traefik.http.routers.landing.rule=PathPrefix(`/`)"
- "traefik.http.services.landing.loadbalancer.server.port=80"
- "traefik.http.routers.landing.tls=true"
- "traefik.http.routers.lens.rule=Host(`${HOST}`)"
- "traefik.http.routers.lens.tls=true"

spot:
image: docker.verbis.dkfz.de/ccp-private/central-spot
image: samply/rustyspot:latest
environment:
BEAM_SECRET: "${FOCUS_BEAM_SECRET_SHORT}"
BEAM_URL: http://beam-proxy:8081
BEAM_PROXY_ID: ${SITE_ID}
BEAM_BROKER_ID: ${BROKER_ID}
BEAM_APP_ID: "focus"
PROJECT_METADATA: "kr_supervisors"
BEAM_PROXY_URL: http://beam-proxy:8081
BEAM_APP_ID: "spot.${SITE_ID}.${BROKER_ID}"
CORS_ORIGIN: "https://${HOST}"
SITES: ${SITES}
TRANSFORM: LENS
PROJECT: kr
BIND_ADDR: 0.0.0.0:8055
depends_on:
- "beam-proxy"
labels:
- "traefik.enable=true"
- "traefik.http.services.spot.loadbalancer.server.port=8080"
- "traefik.http.services.spot.loadbalancer.server.port=8055"
- "traefik.http.middlewares.corsheaders2.headers.accesscontrolallowmethods=GET,OPTIONS,POST"
- "traefik.http.middlewares.corsheaders2.headers.accesscontrolallowheaders=content-type"
- "traefik.http.middlewares.corsheaders2.headers.accesscontrolalloworiginlist=https://${HOST}"
- "traefik.http.middlewares.corsheaders2.headers.accesscontrolallowcredentials=true"
- "traefik.http.middlewares.corsheaders2.headers.accesscontrolmaxage=-1"
- "traefik.http.routers.spot.rule=Host(`${HOST}`) && PathPrefix(`/backend`)"
- "traefik.http.middlewares.stripprefix_spot.stripprefix.prefixes=/backend"
- "traefik.http.routers.spot.rule=Host(`${HOST}`) && PathPrefix(`/prod`)"
- "traefik.http.middlewares.stripprefix_spot.stripprefix.prefixes=/prod"
- "traefik.http.routers.spot.tls=true"
- "traefik.http.routers.spot.middlewares=corsheaders2,stripprefix_spot"
- "traefik.http.routers.spot.middlewares=corsheaders2,stripprefix_spot,auth"

beam-proxy:
environment:
APP_spot_KEY: ${FOCUS_BEAM_SECRET_SHORT}
2 changes: 1 addition & 1 deletion kr/modules/obds2fhir-rest-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: "3.7"
services:
obds2fhir-rest:
container_name: bridgehead-obds2fhir-rest
image: docker.verbis.dkfz.de/ccp/obds2fhir-rest:main
image: docker.verbis.dkfz.de/samply/obds2fhir-rest:main
environment:
IDTYPE: BK_${IDMANAGEMENT_FRIENDLY_ID}_L-ID
MAINZELLISTE_APIKEY: ${IDMANAGER_LOCAL_PATIENTLIST_APIKEY}
Expand Down
2 changes: 1 addition & 1 deletion kr/vars
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ BROKER_URL=https://${BROKER_ID}
PROXY_ID=${SITE_ID}.${BROKER_ID}
FOCUS_BEAM_SECRET_SHORT="$(cat /proc/sys/kernel/random/uuid | sed 's/[-]//g' | head -c 20)"
FOCUS_RETRY_COUNT=${FOCUS_RETRY_COUNT:-64}
SUPPORT_EMAIL=arturo.macias@dkfz-heidelberg.de
SUPPORT_EMAIL=p.delpy@dkfz-heidelberg.de
PRIVATEKEYFILENAME=/etc/bridgehead/pki/${SITE_ID}.priv.pem
BROKER_URL_FOR_PREREQ=$BROKER_URL

Expand Down
6 changes: 3 additions & 3 deletions lib/functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ checkOwner(){

printUsage() {
echo "Usage: bridgehead start|stop|logs|docker-logs|is-running|update|check|install|uninstall|adduser|enroll PROJECTNAME"
echo "PROJECTNAME should be one of ccp|bbmri|cce|itcc|kr|dhki"
echo "PROJECTNAME should be one of ccp|bbmri|cce|itcc|kr|dhki|nngm"
}

checkRequirements() {
Expand Down Expand Up @@ -327,7 +327,7 @@ function sync_secrets() {
-e ALL_PROXY=$HTTPS_PROXY_FULL_URL \
-e PROXY_ID=$proxy_id \
-e BROKER_URL=$broker_url \
-e OIDC_PROVIDER=secret-sync-central.test-secret-sync.$broker_id \
-e OIDC_PROVIDER=secret-sync-central.central-secret-sync.$broker_id \
-e SECRET_DEFINITIONS=$secret_sync_args \
docker.verbis.dkfz.de/cache/samply/secret-sync-local:latest

Expand All @@ -337,7 +337,7 @@ function sync_secrets() {
}

function secret_sync_gitlab_token() {
if [ "$PROJECT" == "minimal" ]; then
if [[ "$PROJECT" != "dktk" && "$PROJECT" != "bbmri" ]]; then
log "INFO" "Not running Secret Sync for project minimal"
return
fi
Expand Down
Loading
Loading