Compare commits

..

16 Commits

Author SHA1 Message Date
6bb922fa99 Add Opal 2023-03-01 14:06:36 +01:00
dc4829bd5f Add Teiler Core 2023-02-21 15:41:51 +01:00
1dc146d8f4 Add Endpoint for Teiler 2023-02-21 15:37:12 +01:00
ee554f24cb Merge remote-tracking branch 'origin/feature/teiler' into feature/teiler
# Conflicts:
#	ccp/modules/teiler-ui-compose.yml
2023-02-20 15:37:13 +01:00
d46c100220 update keykloak config 2023-02-20 14:49:45 +01:00
a90d6855b0 Update Teiler Core config 2023-02-15 16:25:55 +01:00
2785365182 Add original Keycloak config 2023-02-14 15:55:44 +01:00
969469db04 beautiful config 2023-02-14 10:42:38 +01:00
82f6f886db Rename teiler to exporter (bugfix) 2023-02-13 18:28:55 +01:00
7b15e7a3d5 Rename teiler to exporter 2023-02-13 15:29:45 +01:00
9a924df0e5 Configure login extern URLs 2023-02-13 10:23:14 +01:00
1c9edf93d4 Bugfix: services in teiler-ui-compose.yml 2023-02-10 16:04:42 +01:00
168967aace Bugfix: fix modules path 2023-02-10 16:01:04 +01:00
c757c35e65 Change images of dktk-teiler and dktk-keycloak 2023-02-10 15:47:19 +01:00
6afb8d53dc Add nngm and exliquid modules 2023-02-10 13:11:50 +01:00
5a5a95d76d Add Teiler UI and Teiler module 2023-02-10 12:54:38 +01:00
31 changed files with 562 additions and 368 deletions

2
.gitignore vendored
View File

@ -1,6 +1,6 @@
##Ignore site configuration
.gitmodules
site-config/*
.idea
## Ignore site configuration
*/docker-compose.override.yml

198
README.md
View File

@ -6,29 +6,24 @@ This repository is the starting point for any information and tools you will nee
1. [Requirements](#requirements)
- [Hardware](#hardware)
- [Software](#software)
- [Network](#network)
- [System](#system)
- [Git](#git)
- [Docker](#docker)
2. [Deployment](#deployment)
- [Site name](#site-name)
- [Projects](#projects)
- [GitLab repository](#gitlab-repository)
- [Base Installation](#base-installation)
- [Installation](#installation)
- [Register with Samply.Beam](#register-with-samplybeam)
- [Starting and stopping your Bridgehead](#starting-and-stopping-your-bridgehead)
- [Testing your new Bridgehead](#testing-your-new-bridgehead)
- [De-installing a Bridgehead](#de-installing-a-bridgehead)
3. [Site-specific configuration](#site-specific-configuration)
- [HTTPS Access](#https-access)
- [TLS terminating proxies](#tls-terminating-proxies)
- [File structure](#file-structure)
4. [Things you should know](#things-you-should-know)
- [Auto-Updates](#auto-updates)
- [Auto-Backups](#auto-backups)
- [Non-Linux OS](#non-linux-os)
5. [Troubleshooting](#troubleshooting)
- [Docker Daemon Proxy Configuration](#docker-daemon-proxy-configuration)
- [Auto-starting your Bridgehead when the server starts](#auto-starting-your-bridgehead-when-the-server-starts)
3. [Additional Services](#additional-Services)
- [Monitoring](#monitoring)
6. [License](#license)
- [Register with a Directory](#register-with-a-Directory)
4. [Site-specific configuration](#site-specific-configuration)
- [HTTPS Access](#https-access)
- [Locally Managed Secrets](#locally-managed-secrets)
- [Git Proxy Configuration](#git-proxy-configuration)
- [Docker Daemon Proxy Configuration](#docker-daemon-proxy-configuration)
- [Non-Linux OS](#non-linux-os)
5. [License](#license)
## Requirements
@ -63,62 +58,10 @@ Note for Ubuntu: Please note that the uncomplicated firewall (ufw) is known to c
## Deployment
### Site name
You will need to choose a short name for your site. This is not a URL, just a simple identifying string. For the examples below, we will use "your-site-name", but you should obviously choose something that is meaningful to you and which is unique.
Site names should adhere to the following conventions:
- They should be lower-case.
- They should generally be named after the city where your site is based, e.g. ```karlsruhe```.
- If you have a multi-part name, please use a hypen ("-") as separator, e.g. ```le-havre```.
- If your site is for testing purposes, rather than production, please append "-test", e.g. ```zaragoza-test```.
- If you are a developer and you are making changes to the Bridgehead, please use your name and prepend "dev-", e.g. ```dev-joe-doe```.
### GitLab repository
In order to be able to install, you will need to have your own repository in GitLab for your site's configuration settings. This allows automated updates of the Bridgehead software.
To request a new repository, please contact your research network administration or send an email to one of the project specific addresses:
- For the bbmri project: bridgehead@helpdesk.bbmri-eric.eu.
- For the ccp project: support-ccp@dkfz-heidelberg.de
Mention:
- which project you belong to, i.e. "bbmri" or "ccp"
- site name (According to conventions listed above)
- operator name and email
We will set the repository up for you. We will then send you:
- A Repository Short Name (RSN). Beware: this is distinct from your site name.
- Repository URL containing the acces token eg. https://BH_Dummy:dummy_token@git.verbis.dkfz.de/bbmri-bridgehead-configs/dummy.git
During the installation, your Bridgehead will download your site's configuration from GitLab and you can review the details provided to us by email.
### Base Installation
First, download your site specific configuration repository:
```shell
sudo mkdir -p /etc/bridgehead/
sudo git clone <REPO_URL_FROM_EMAIL> /etc/bridgehead/
```
First, clone the repository to the directory `/srv/docker/bridgehead`:
Review the site configuration:
```shell
sudo cat /etc/bridgehead/bbmri.conf
```
Pay special attention to:
- SITE_NAME
- SITE_ID
- OPERATOR_FIRST_NAME
- OPERATOR_LAST_NAME
- OPERATOR_EMAIL
Clone the bridgehead repository:
```shell
sudo mkdir -p /srv/docker/
sudo git clone https://github.com/samply/bridgehead.git /srv/docker/bridgehead
@ -131,6 +74,8 @@ cd /srv/docker/bridgehead
sudo ./bridgehead install <PROJECT>
```
... and follow the instructions on the screen. You should then be prompted to do the next step:
### Register with Samply.Beam
Many Bridgehead services rely on the secure, performant and flexible messaging middleware called [Samply.Beam](https://github.com/samply/beam). You will need to register ("enroll") with Samply.Beam by creating a cryptographic key pair for your bridgehead:
@ -164,60 +109,6 @@ To enable/disable autostart, run
sudo systemctl [enable|disable] bridgehead@<PROJECT>.service
```
### Testing your new Bridgehead
After starting the Bridgehead, you can watch the initialization process with the following command:
```shell
journalctl -u bridgehead@bbmri -f
```
if this exits with something similar to the following:
```
bridgehead@bbmri.service: Main process exited, code=exited, status=1/FAILURE
```
Then you know that there was a problem with starting the Bridgehead. Scroll up the printout to find the cause of the error.
Once the Bridgehead is running, you can also view the individual Docker processes with:
```shell
docker ps
```
There should be 6 - 10 Docker proceses. If there are fewer, then you know that something has gone wrong. To see what is going on, run:
```shell
journalctl -u bridgehead@bbmri -f
```
Once the Bridgehead has passed these checks, take a look at the landing page:
```
https://localhost
```
You can either do this in a browser or with curl. If you visit the URL in the browser, you will neet to click through several warnings, because you will initially be using a self-signed certificate. With curl, you can bypass these checks:
```shell
curl -k https://localhost
```
If you get errors when you do this, you need to use ```docker logs``` to examine your landing page container in order to determine what is going wrong.
If you have chosen to take part in our monitoring program (by setting the ```MONITOR_APIKEY``` variable in the configuration), you will be informed by email when problems are detected in your Bridgehead.
### De-installing a Bridgehead
You may decide that you want to remove a Bridgehead installation from your machine, e.g. if you want to migrate it to a new location or if you want to start a fresh installation because the initial attempts did not work.
To do this, run:
```shell
sh bridgehead uninstall
```
## Site-specific configuration
### HTTPS Access
@ -240,29 +131,6 @@ All of the Bridgehead's outgoing connections are secured by transport encryption
Your Bridgehead's actual data is not stored in the above directories, but in named docker volumes, see `docker volume ls` and `docker volume inspect <volume_name>`.
### Directory sync
This is an optional feature for bbmri projects. It keeps the [BBMRI Directory](https://directory.bbmri-eric.eu/) up to date with your local data eg. number of samples. It also updates the local FHIR store with the latest contact details etc. from the Directory. You must explicitly set your country specific directory url, username and password to enable this feature.
Full details can be found in [directory_sync_service](https://github.com/samply/directory_sync_service).
To enable it, you will need to set these variables to the ```bbmri.conf``` file of your GitLab repository. Here is an example config:
```
### Directory sync service
DS_DIRECTORY_URL=https://directory.bbmri-eric.eu
DS_DIRECTORY_USER_NAME=your_directory_username
DS_DIRECTORY_USER_PASS=qwdnqwswdvqHBVGFR9887
DS_TIMER_CRON="0 22 * * *"
```
You must contact the Directory for your national node to find the URL, and to register as a user.
Additionally, you should choose when you want Directory sync to run. In the example above, this is set to happen at 10 pm every evening. You can modify this to suit your requirements. The timer specification should follow the [cron](https://crontab.guru) convention.
Once you edited the gitlab config. The bridgehead will autoupdate the config with the values and will sync the data.
There will be a delay before the effects of Directory sync become visible. First, you will need to wait until the time you have specified in ```TIMER_CRON```. Second, the information will then be synchronized from your national node with the central European Directory. This can take up to 24 hours.
## Things you should know
### Auto-Updates
@ -272,7 +140,6 @@ Your Bridgehead will automatically and regularly check for updates. Whenever som
If you would like to understand what happens exactly and when, please check the systemd units deployed during the [installation](#base-installation) via `systemctl cat bridgehead-update@<PROJECT>.service` and `systemctl cat bridgehead-update@<PROJECT.timer`.
### Auto-Backups
Some of the components in the bridgehead will store persistent data. For those components, we integrated an automated backup solution in the bridgehead updates. It will automatically save the backup in multiple files
1) Last-XX, were XX represents a weekday to allow re-import of at least one version of the database for each of the past seven days.
@ -281,9 +148,20 @@ Some of the components in the bridgehead will store persistent data. For those c
To enable the Auto-Backup feature, please set the Variable `BACKUP_DIRECTORY` in your sites configuration.
### Development Installation
### Monitoring
By using `./bridgehead dev-install <projectname>` instead of `install`, you can install a developer bridgehead. The difference is, that you can provide an arbitrary configuration repository during the installation, meaning that it does not have to adhere to the usual naming scheme. This allows for better decoupling between development and production configurations.
To keep all Bridgeheads up and working and detect any errors before a user does, a central monitoring
- Your Bridgehead itself will report relevant system events, such as successful/failed updates, restarts, performance metrics or version numbers.
- Your Bridgehead is also monitored from the outside by your network's central components. For example, the federated search will regularly perform a black-box test by sending an empty query to your Bridgehead and checking if the results make sense.
In all monitoring cases, obviously no sensitive information is transmitted, in particular not any patient-related data. Aggregated data, e.g. total amount of datasets, may be transmitted for diagnostic purposes.
## Troubleshooting
### Docker Daemon Proxy Configuration
Docker has a background daemon, responsible for downloading images and starting them. Sometimes, proxy configuration from your system won't carry over and it will fail to download images. In that case, configure the proxy for this daemon as described in the [official documentation](https://docs.docker.com).
### Non-Linux OS
@ -302,22 +180,6 @@ We have tested the installation procedure with an Ubuntu 22.04 guest system runn
Installation under WSL ought to work, but we have not tested this.
## Troubleshooting
### Docker Daemon Proxy Configuration
Docker has a background daemon, responsible for downloading images and starting them. Sometimes, proxy configuration from your system won't carry over and it will fail to download images. In that case, configure the proxy for this daemon as described in the [official documentation](https://docs.docker.com).
### Monitoring
To keep all Bridgeheads up and working and detect any errors before a user does, a central monitoring
- Your Bridgehead itself will report relevant system events, such as successful/failed updates, restarts, performance metrics or version numbers.
- Your Bridgehead is also monitored from the outside by your network's central components. For example, the federated search will regularly perform a black-box test by sending an empty query to your Bridgehead and checking if the results make sense.
In all monitoring cases, obviously no sensitive information is transmitted, in particular not any patient-related data. Aggregated data, e.g. total amount of datasets, may be transmitted for diagnostic purposes.
## License
Copyright 2019 - 2022 The Samply Community

View File

@ -1,8 +0,0 @@
services:
directory_sync_service:
image: "docker.verbis.dkfz.de/cache/samply/directory_sync_service"
environment:
DS_DIRECTORY_URL: ${DS_DIRECTORY_URL}
DS_DIRECTORY_USER_NAME: ${DS_DIRECTORY_USER_NAME}
DS_DIRECTORY_PASS_CODE: ${DS_DIRECTORY_PASS_CODE}
DS_TIMER_CRON: ${DS_TIMER_CRON}

View File

@ -1,8 +0,0 @@
#!/bin/bash
function dirSetup() {
if [ -n "$DS_DIRECTORY_USER_NAME" ]; then
log INFO "Directory sync setup detected -- will start directory sync service."
OVERRIDE+=" -f ./$PROJECT/directory-sync-compose.yml"
fi
}

View File

@ -3,7 +3,7 @@ version: "3.7"
services:
traefik:
container_name: bridgehead-traefik
image: docker.verbis.dkfz.de/cache/traefik:latest
image: traefik:latest
command:
- --entrypoints.web.address=:80
- --entrypoints.websecure.address=:443
@ -32,7 +32,7 @@ services:
forward_proxy:
container_name: bridgehead-forward-proxy
image: docker.verbis.dkfz.de/cache/samply/bridgehead-forward-proxy:latest
image: samply/bridgehead-forward-proxy:latest
environment:
HTTPS_PROXY: ${HTTPS_PROXY_URL}
USERNAME: ${HTTPS_PROXY_USERNAME}
@ -42,7 +42,7 @@ services:
landing:
container_name: bridgehead-landingpage
image: docker.verbis.dkfz.de/cache/samply/bridgehead-landingpage:master
image: samply/bridgehead-landingpage:master
labels:
- "traefik.enable=true"
- "traefik.http.routers.landing.rule=PathPrefix(`/`)"
@ -54,7 +54,7 @@ services:
SITE_NAME: ${SITE_NAME}
blaze:
image: docker.verbis.dkfz.de/cache/samply/blaze:0.19
image: "samply/blaze:0.19"
container_name: bridgehead-bbmri-blaze
environment:
BASE_URL: "http://bridgehead-bbmri-blaze:8080"
@ -71,28 +71,27 @@ services:
- "traefik.http.routers.blaze_ccp.middlewares=ccp_b_strip,auth"
- "traefik.http.routers.blaze_ccp.tls=true"
focus:
image: docker.verbis.dkfz.de/cache/samply/focus:develop
container_name: bridgehead-focus
spot:
image: samply/spot:latest
container_name: bridgehead-spot
environment:
API_KEY: ${FOCUS_BEAM_SECRET_SHORT}
BEAM_APP_ID_LONG: focus.${PROXY_ID}
SECRET: ${SPOT_BEAM_SECRET_LONG}
APPID: spot
PROXY_ID: ${PROXY_ID}
BLAZE_URL: "http://bridgehead-bbmri-blaze:8080/fhir/"
BEAM_PROXY_URL: http://beam-proxy:8081
RETRY_COUNT: ${FOCUS_RETRY_COUNT}
LDM_URL: http://bridgehead-bbmri-blaze:8080/fhir
BEAM_PROXY: http://beam-proxy:8081
depends_on:
- "beam-proxy"
- "blaze"
beam-proxy:
image: docker.verbis.dkfz.de/cache/samply/beam-proxy:develop
image: samply/beam-proxy:main
container_name: bridgehead-beam-proxy
environment:
BROKER_URL: ${BROKER_URL}
PROXY_ID: ${PROXY_ID}
APP_0_ID: focus
APP_0_KEY: ${FOCUS_BEAM_SECRET_SHORT}
APP_0_ID: spot
APP_0_KEY: ${SPOT_BEAM_SECRET_SHORT}
PRIVKEY_FILE: /run/secrets/proxy.pem
ALL_PROXY: http://forward_proxy:3128
TLS_CA_CERTIFICATES_DIR: /conf/trusted-ca-certs

View File

@ -1,11 +1,7 @@
BROKER_ID=broker.bbmri.samply.de
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=32
SPOT_BEAM_SECRET_SHORT="$(cat /proc/sys/kernel/random/uuid | sed 's/[-]//g' | head -c 20)"
SPOT_BEAM_SECRET_LONG="ApiKey spot.${PROXY_ID} ${SPOT_BEAM_SECRET_SHORT}"
SUPPORT_EMAIL=bridgehead@helpdesk.bbmri-eric.eu
PRIVATEKEYFILENAME=/etc/bridgehead/pki/${SITE_ID}.priv.pem
# This will load directory-sync setup.
source $PROJECT/directory-sync.sh
dirSetup

View File

@ -70,25 +70,14 @@ case "$ACTION" in
;;
stop)
loadVars
# HACK: This is tempoarily to properly shut down false bridgehead instances (bridgehead-ccp instead ccp)
$COMPOSE -p bridgehead-$PROJECT -f ./$PROJECT/docker-compose.yml $OVERRIDE down
exec $COMPOSE -f ./$PROJECT/docker-compose.yml $OVERRIDE down
;;
is-running)
bk_is_running
exit $?
;;
update)
loadVars
exec ./lib/update-bridgehead.sh $PROJECT
;;
install)
source ./lib/prepare-system.sh NODEV
loadVars
exec ./lib/install-bridgehead.sh $PROJECT
;;
dev-install)
exec ./lib/prepare-system.sh DEV
source ./lib/prepare-system.sh
loadVars
exec ./lib/install-bridgehead.sh $PROJECT
;;

View File

@ -3,7 +3,7 @@ version: "3.7"
services:
traefik:
container_name: bridgehead-traefik
image: docker.verbis.dkfz.de/cache/traefik:latest
image: traefik:latest
command:
- --entrypoints.web.address=:80
- --entrypoints.websecure.address=:443
@ -32,7 +32,7 @@ services:
forward_proxy:
container_name: bridgehead-forward-proxy
image: docker.verbis.dkfz.de/cache/samply/bridgehead-forward-proxy:latest
image: samply/bridgehead-forward-proxy:latest
environment:
HTTPS_PROXY: ${HTTPS_PROXY_URL}
USERNAME: ${HTTPS_PROXY_USERNAME}
@ -42,7 +42,7 @@ services:
landing:
container_name: bridgehead-landingpage
image: docker.verbis.dkfz.de/cache/samply/bridgehead-landingpage:master
image: samply/bridgehead-landingpage:master
labels:
- "traefik.enable=true"
- "traefik.http.routers.landing.rule=PathPrefix(`/`)"
@ -54,7 +54,7 @@ services:
SITE_NAME: ${SITE_NAME}
blaze:
image: docker.verbis.dkfz.de/cache/samply/blaze:0.19
image: "samply/blaze:0.19"
container_name: bridgehead-ccp-blaze
environment:
BASE_URL: "http://bridgehead-ccp-blaze:8080"
@ -72,7 +72,7 @@ services:
- "traefik.http.routers.blaze_ccp.tls=true"
spot:
image: docker.verbis.dkfz.de/cache/samply/spot:latest
image: samply/spot:latest
container_name: bridgehead-spot
environment:
SECRET: ${SPOT_BEAM_SECRET_LONG}
@ -85,7 +85,7 @@ services:
- "blaze"
beam-proxy:
image: docker.verbis.dkfz.de/cache/samply/beam-proxy:develop
image: samply/beam-proxy:main
container_name: bridgehead-beam-proxy
environment:
BROKER_URL: ${BROKER_URL}

View File

@ -1,19 +0,0 @@
#!/bin/bash
function exliquidSetup() {
case ${SITE_ID} in
berlin|dresden|essen|frankfurt|freiburg|luebeck|mainz|muenchen-lmu|muenchen-tum|mannheim|tuebingen)
EXLIQUID=1
;;
dktk-test)
EXLIQUID=1
;;
*)
EXLIQUID=0
;;
esac
if [[ $EXLIQUID -eq 1 ]]; then
log INFO "EXLIQUID setup detected -- will start Report-Hub."
OVERRIDE+=" -f ./$PROJECT/exliquid-compose.yml"
fi
}

View File

@ -2,7 +2,7 @@ version: "3.7"
services:
exliquid-task-store:
image: docker.verbis.dkfz.de/cache/samply/blaze:0.19
image: "samply/blaze:0.19"
container_name: bridgehead-exliquid-task-store
environment:
BASE_URL: "http://bridgehead-exliquid-task-store:8080"
@ -13,7 +13,7 @@ services:
- "traefik.enable=false"
exliquid-report-hub:
image: docker.verbis.dkfz.de/cache/samply/report-hub:latest
image: "samply/report-hub:latest"
container_name: bridgehead-exliquid-report-hub
environment:
SPRING_WEBFLUX_BASE_PATH: "/exliquid"

View File

@ -0,0 +1,17 @@
#!/bin/bash
case ${SITE_ID} in
berlin|dresden|essen|frankfurt|freiburg|luebeck|mainz|muenchen-lmu|muenchen-tu|mannheim|tuebingen)
EXLIQUID=1
;;
dktk-test)
EXLIQUID=1
;;
*)
EXLIQUID=0
;;
esac
if [[ $EXLIQUID -eq 1 ]]; then
log INFO "EXLIQUID setup detected -- will start Report-Hub."
OVERRIDE+=" -f ./$PROJECT/modules/exliquid-compose.yml"
fi

View File

@ -0,0 +1,42 @@
version: "3.7"
services:
exporter:
image: docker.verbis.dkfz.de/ccp/dktk-exporter:latest
container_name: bridgehead-ccp-exporter
environment:
LOG_LEVEL: "INFO"
EXPORTER_API_KEY: "${EXPORTER_API_KEY}"
CROSS_ORIGINS: "https://${HOST}/ccp-teiler-root-config"
EXPORTER_DB_USER: "exporter"
EXPORTER_DB_PASSWORD: "${EXPORTER_DB_PASSWORD}" # Set in exporter-setup.sh
EXPORTER_DB_URL: "jdbc:postgresql://exporter-db:5432/exporter"
CLEAN_TEMP_FILES_CRON_EXPRESSION: "0 0 1 * * *"
TEMP_FILES_LIFETIME_IN_DAYS: "1"
CLEAN_WRITE_FILES_CRON_EXPRESSION: "0 0 2 * * *"
WRITE_FILES_LIFETIME_IN_DAYS: "30"
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.routers.exporter_ccp.middlewares=auth"
volumes:
- "exporter:/app/exporter-files"
exporter-db:
image: postgres:15.1-alpine
container_name: bridgehead-ccp-exporter-db
environment:
POSTGRES_USER: "exporter"
POSTGRES_PASSWORD: "${EXPORTER_DB_PASSWORD}" # Set in exporter-setup.sh
POSTGRES_DB: "exporter"
volumes:
- "exporter-db:/var/lib/postgresql/data"
volumes:
exporter-db:
name: "exporter-db"
exporter:
name: "exporter"

View File

@ -0,0 +1,8 @@
#!/bin/bash
if [ -n "$ENABLE_EXPORTER" ];then
log INFO "Exporter setup detected -- will start Exporter service."
OVERRIDE+=" -f ./$PROJECT/modules/exporter-compose.yml"
fi
# TODO: Generate password in another way so that not all passwords are the same?
EXPORTER_DB_PASSWORD="$(echo \"This is a salt string to generate one consistent password. It is not required to be secret.\" | openssl rsautl -sign -inkey /etc/bridgehead/pki/${SITE_ID}.priv.pem | base64 | head -c 30)"

View File

@ -42,7 +42,7 @@ services:
- patientlist-db
patientlist-db:
image: docker.verbis.dkfz.de/cache/postgres:15.1-alpine
image: postgres:15.1-alpine
container_name: bridgehead-patientlist-db
environment:
POSTGRES_USER: "mainzelliste"

View File

@ -1,21 +1,5 @@
#!/bin/bash
function idManagementSetup() {
if [ -n "$IDMANAGER_UPLOAD_APIKEY" ]; then
log INFO "id-management setup detected -- will start id-management (mainzelliste & magicpl)."
OVERRIDE+=" -f ./$PROJECT/modules/id-management-compose.yml"
# Auto Generate local Passwords
PATIENTLIST_POSTGRES_PASSWORD="$(echo \"id-management-module-db-password-salt\" | openssl rsautl -sign -inkey /etc/bridgehead/pki/${SITE_ID}.priv.pem | base64 | head -c 30)"
IDMANAGER_LOCAL_PATIENTLIST_APIKEY="$(cat /proc/sys/kernel/random/uuid | sed 's/[-]//g' | head -c 20)"
# Transform Seeds Configuration to pass it to the Mainzelliste Container
PATIENTLIST_SEEDS_TRANSFORMED="$(declare -p PATIENTLIST_SEEDS | tr -d '\"' | sed 's/\[/\[\"/g' | sed 's/\]/\"\]/g')"
# Ensure old ids are working !!!
export IDMANAGEMENT_FRIENDLY_ID=$(legacyIdMapping "$SITE_ID")
fi
}
# Transform into single string array, e.g. 'dktk-test' to 'dktk test'
# Usage: transformToSingleStringArray 'dktk-test' -> 'dktk test'
@ -50,3 +34,18 @@ function legacyIdMapping() {
normalized_string=$(applySpecialCases "$uppercase_string");
echo "$normalized_string" | tr -d ' '
}
if [ -n "$IDMANAGER_UPLOAD_APIKEY" ]; then
log INFO "id-management setup detected -- will start id-management (mainzelliste & magicpl)."
OVERRIDE+=" -f ./$PROJECT/modules/id-management-compose.yml"
# Auto Generate local Passwords
PATIENTLIST_POSTGRES_PASSWORD="$(echo \"id-management-module-db-password-salt\" | openssl rsautl -sign -inkey /etc/bridgehead/pki/${SITE_ID}.priv.pem | base64 | head -c 30)"
IDMANAGER_LOCAL_PATIENTLIST_APIKEY="$(cat /proc/sys/kernel/random/uuid | sed 's/[-]//g' | head -c 20)"
# Transform Seeds Configuration to pass it to the Mainzelliste Container
PATIENTLIST_SEEDS_TRANSFORMED="$(declare -p PATIENTLIST_SEEDS | tr -d '\"' | sed 's/\[/\[\"/g' | sed 's/\]/\"\]/g')"
# Ensure old ids are working !!!
export IDMANAGEMENT_FRIENDLY_ID=$(legacyIdMapping "$SITE_ID")
fi

View File

@ -2,7 +2,7 @@ version: "3.7"
services:
mtba:
image: docker.verbis.dkfz.de/cache/samply/mtba:develop
image: samply/mtba:develop
container_name: bridgehead-mtba
environment:
BLAZE_STORE_URL: http://blaze:8080

10
ccp/modules/mtba-setup.sh Normal file
View File

@ -0,0 +1,10 @@
#!/bin/bash
if [ -n "$ENABLE_MTBA" ];then
log INFO "MTBA setup detected -- will start MTBA Service and CBioPortal."
if [ ! -n "$IDMANAGER_UPLOAD_APIKEY" ]; then
log ERROR "Detected MTBA Module configuration but ID-Management Module seems not to be configured!"
exit 1;
fi
OVERRIDE+=" -f ./$PROJECT/modules/mtba-compose.yml"
fi

View File

@ -0,0 +1,32 @@
version: "3.7"
services:
connector:
container_name: bridgehead-nngm-connector
image: docker.verbis.dkfz.de/ccp/connector:bk2
environment:
POSTGRES_PASSWORD: ${CONNECTOR_POSTGRES_PASSWORD}
NNGM_MAGICPL_APIKEY: ${NNGM_MAGICPL_APIKEY}
NNGM_MAINZELLISTE_APIKEY: ${NNGM_MAINZELLISTE_APIKEY}
NNGM_CTS_APIKEY: ${NNGM_CTS_APIKEY}
NNGM_CRYPTKEY: ${NNGM_CRYPTKEY}
restart: always
labels:
- "traefik.enable=true"
- "traefik.http.routers.connector.rule=PathPrefix(`/ccp-connector`)"
- "traefik.http.services.connector.loadbalancer.server.port=8080"
- "traefik.http.routers.connector.tls=true"
connector_db:
image: postgres:9.5-alpine
container_name: bridgehead-nngm-connector-db
volumes:
- "connector_db_data:/var/lib/postgresql/data"
environment:
POSTGRES_DB: "samplyconnector"
POSTGRES_USER: "samplyconnector"
POSTGRES_PASSWORD: ${CONNECTOR_POSTGRES_PASSWORD}
restart: always
volumes:
connector_db_data:

View File

@ -0,0 +1,7 @@
#!/bin/bash
if [ -n "$NNGM_CTS_APIKEY" ]; then
log INFO "nNGM setup detected -- will start nNGM Connector."
OVERRIDE+=" -f ./$PROJECT/modules/nngm-compose.yml"
fi
CONNECTOR_POSTGRES_PASSWORD="$(echo \"This is a salt string to generate one consistent password. It is not required to be secret.\" | openssl rsautl -sign -inkey /etc/bridgehead/pki/${SITE_ID}.priv.pem | base64 | head -c 30)"

View File

@ -0,0 +1,79 @@
version: "3.7"
services:
############################################ DataSHIELD Client (Rocker R-Studio)
rstudio:
image: docker.verbis.dkfz.de/dktk/bridgehead-rstudio:latest
container_name: bridgehead-rstudio
#TODO: Connect with Keycloak: https://rocker-project.org/images/versioned/rstudio.html
environment:
USER: "ruser"
PASSWORD: "${RSTUDIO_PASSWORD}"
labels:
- "traefik.enable=true"
- "traefik.http.routers.login.rule=PathPrefix(`/rstudio`)"
- "traefik.http.services.login.loadbalancer.server.port=8787"
- "traefik.http.routers.login.tls=true"
volumes:
- "rstudio-config:/home/rstudio/.config/rstudio"
- "rstudio-workspace:/home/rstudio/workspace"
- "rstudio-user-files:/home/user-files"
############################################ DataSHIELD Server (Opal)
opal:
image: obiba/opal:4.5
container_name: bridgehead-opal
labels:
- "traefik.enable=true"
- "traefik.http.routers.login.rule=PathPrefix(`/opal`)"
- "traefik.http.services.login.loadbalancer.server.port=8080" #TODO: HTTPS -> 8443
- "traefik.http.routers.login.tls=true"
links:
- opal-rserver
- opal-mongo
- opal-db
environment:
JAVA_OPTS: "-Xms1G -Xmx8G -XX:+UseG1GC"
# OPAL_ADMINISTRATOR_USER: "administrator"
OPAL_ADMINISTRATOR_PASSWORD: "${OPAL_ADMINISTRATOR_PASSWORD}"
MONGO_HOST: "opal-mongo"
MONGO_PORT: "27017"
POSTGRESDATA_HOST: "opal-db"
POSTGRESDATA_DATABASE: "opal"
POSTGRESDATA_USER: "opal"
POSTGRESDATA_PASSWORD: "${OPAL_DB_PASSWORD}"
ROCK_HOSTS: "opal-rserver:8085"
volumes:
- "opal:/srv"
opal-mongo: # IDs
image: mongo:4.2 # TODO: Update mongo:6.0.4
container_name: bridgehead-opal-mongo
opal-db: # Data
image: postgres:15.1
container_name: bridgehead-opal-db
environment:
POSTGRES_PASSWORD: "${OPAL_DB_PASSWORD}"
POSTGRES_USER: "opal"
POSTGRES_DB: "opal"
volumes:
- "opal-db:/var/lib/postgresql/data"
opal-rserver:
image: datashield/rock-base:6.2-R4.2 # https://datashield.discourse.group/t/ds-aggregate-method-error/416/4
container_name: bridgehead-opal-rserver
volumes:
rstudio-config:
name: "rstudio-config"
rstudio-workspace:
name: "rstudio-workspace"
rstudio-user-files:
name: "rstudio-user-files"
opal-db:
name: "opal-db"
opal:
name: "opal"

View File

@ -0,0 +1,7 @@
#!/bin/bash
if [ "$ENABLE_OPAL" == true ];then
log INFO "Opal setup detected -- will start Opal services."
OVERRIDE+=" -f ./$PROJECT/modules/opal-compose.yml"
fi
OPAL_DB_PASSWORD="$(echo \"This is a salt string to generate one consistent password. It is not required to be secret.\" | openssl rsautl -sign -inkey /etc/bridgehead/pki/${SITE_ID}.priv.pem | base64 | head -c 30)"

0
ccp/modules/opal.md Normal file
View File

View File

@ -0,0 +1,267 @@
version: "3.7"
services:
############################################ Keycloak
login-db:
image: "postgres:15.1"
container_name: bridgehead-login-db
environment:
POSTGRES_USER: "keycloak"
POSTGRES_PASSWORD: "${KEYCLOAK_DB_PASSWORD}" # Set in teiler-setup.sh
POSTGRES_DB: "keycloak"
volumes:
- "login-db:/var/lib/postgresql/data"
login:
#image: "jboss/keycloak:16.1.1"
image: docker.verbis.dkfz.de/ccp/dktk-keycloak:latest
container_name: bridgehead-login
environment:
KEYCLOAK_ADMIN: "admin"
KEYCLOAK_ADMIN_PASSWORD: "${KEYCLOAK_ADMIN_PASSWORD}"
KC_DB_PASSWORD: "${KEYCLOAK_DB_PASSWORD}" # Set in teiler-setup.sh
KC_HOSTNAME_URL: "https://${HOST}/login"
KC_HOSTNAME_STRICT: "false"
KC_PROXY_ADDRESS_FORWARDING: "true"
TEILER_ROOT_CONFIG_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
############################################ Teiler-UI
teiler-root-config:
image: samply/teiler-root-config:developer
container_name: bridgehead-teiler-root-config
labels:
- "traefik.enable=true"
- "traefik.http.routers.teiler_root_config_ccp.rule=PathPrefix(`/ccp-teiler`)"
- "traefik.http.services.teiler_root_config_ccp.loadbalancer.server.port=9000"
- "traefik.http.routers.teiler_root_config_ccp.tls=true"
environment:
TEILER_CORE_URL: "https://${HOST}/ccp-teiler-core"
TEILER_UI_URL: "https://${HOST}/ccp-teiler-ui"
DEFAULT_LANGUAGE: "de"
teiler-ui:
image: samply/teiler-ui:developer
container_name: bridgehead-teiler-ui
# ports:
# - 4200:80
labels:
- "traefik.enable=true"
- "traefik.http.routers.teiler_ui_ccp.rule=PathPrefix(`/ccp-teiler-ui`)"
- "traefik.http.services.teiler_ui_ccp.loadbalancer.server.port=80"
- "traefik.http.routers.teiler_ui_ccp.tls=true"
environment:
DEFAULT_LANGUAGE: "DE"
TEILER_CORE_URL: "https://${HOST}/ccp-teiler-core"
KEYCLOAK_URL: "https://${HOST}/login"
KEYCLOAK_REALM: "teiler-ui"
KEYCLOAK_CLIENT_ID: "teiler-ui"
TEILER_ADMIN_NAME: "${OPERATOR_FIRST_NAME} ${OPERATOR_LAST_NAME}"
TEILER_ADMIN_EMAIL: "${OPERATOR_EMAIL}"
TEILER_ADMIN_PHONE: "${OPERATOR_PHONE}"
TEILER_PROJECT: "${PROJECT}"
teiler-core:
image: samply/teiler-core:developer
container_name: bridgehead-teiler-core
volumes:
- "/etc/bridgehead/ccp.conf:/app/ccp.conf"
labels:
- "traefik.enable=true"
- "traefik.http.routers.teiler_core_ccp.rule=PathPrefix(`/ccp-teiler-core`)"
- "traefik.http.services.teiler_core_ccp.loadbalancer.server.port=8085"
- "traefik.http.routers.teiler_core_ccp.tls=true"
environment:
LOG_LEVEL: "INFO"
APPLICATION_PORT: "8085"
DEFAULT_LANGUAGE: "DE"
CONFIG_ENV_VAR_PATH: "/app/ccp.conf"
TEILER_CONFIG_UPDATER_CRON: "0 1 * * * *"
TEILER_ROOT_CONFIG_URL: "https://${HOST}/ccp-teiler"
TEILER_UI_DE_URL: "https://${HOST}/ccp-teiler-ui/de"
TEILER_UI_EN_URL: "https://${HOST}/ccp-teiler-ui/en"
TEILER_APP1_NAME: "config"
# TEILER_APP2_NAME: "quality-report"
TEILER_APP3_NAME: "keycloak"
TEILER_APP3_TITLE: "Keycloak"
TEILER_APP4_DESCRIPTION_EN: "Authentication site"
TEILER_APP4_DESCRIPTION_DE: "Authentifizierungsseite"
TEILER_APP4_SOURCEURL: "https://${HOST}/login/auth/"
TEILER_APP4_ROLES: "TEILER_ADMIN"
TEILER_APP4_ISACTIVATED: "true"
TEILER_APP4_ICONSOURCEURL: "https://upload.wikimedia.org/wikipedia/commons/2/29/Keycloak_Logo.png"
TEILER_APP4_ORDER: "5"
TEILER_APP4_ISEXTERNALLINK: "true"
TEILER_APP4_ISLOCAL: "true"
# TEILER_APP5_NAME: "pgadmin"
# TEILER_APP5_TITLE: "PgAdmin"
# TEILER_APP5_DESCRIPTION: "Database Management"
# TEILER_APP5_SOURCEURL: "http://localhost:5000"
# TEILER_APP5_ROLES: "TEILER_ADMIN"
# TEILER_APP5_ISACTIVATED: "true"
# TEILER_APP5_ICONSOURCEURL: "https://user-images.githubusercontent.com/24623425/36042969-f87531d4-0d8a-11e8-9dee-e87ab8c6a9e3.png"
# TEILER_APP5_ORDER: "6"
# TEILER_APP5_ISEXTERNALLINK: "true"
# TEILER_APP5_ISLOCAL: "true"
TEILER_APP6_NAME: "ldm"
TEILER_APP6_TITLE_EN: "Local data management"
TEILER_APP6_TITLE_DE: "Lokales Datenmanagement"
TEILER_APP6_DESCRIPTION_EN: "Local Data Management"
TEILER_APP6_DESCRIPTION_DE: "Lokales Datenmanagement"
TEILER_APP6_SOURCEURL: "${CENTRAXX_URL}"
TEILER_APP6_ROLES: "TEILER_PUBLIC"
TEILER_APP6_ISACTIVATED: "${IS_DKTK_SITE}"
TEILER_APP6_ICONCLASS: "bi bi-server"
TEILER_APP6_ORDER: "7"
TEILER_APP6_ISEXTERNALLINK: "true"
TEILER_APP6_ISLOCAL: "true"
TEILER_APP7_NAME: "id-manager"
TEILER_APP7_TITLE: "ID-Manager"
TEILER_APP7_DESCRIPTION: "ID Manager"
TEILER_APP7_SOURCEURL: "https://${HOST}/id-manager/index.html"
TEILER_APP7_ROLES: "TEILER_PUBLIC"
TEILER_APP7_ISACTIVATED: "true"
TEILER_APP7_ICONCLASS: "bi bi-person-bounding-box"
TEILER_APP7_ORDER: "8"
TEILER_APP7_ISEXTERNALLINK: "true"
TEILER_APP7_ISLOCAL: "true"
TEILER_APP8_NAME: "patient-list"
TEILER_APP8_TITLE_EN: "Patient List"
TEILER_APP8_TITLE_DE: "Patientenliste"
TEILER_APP8_DESCRIPTION_EN: "Patient List"
TEILER_APP8_DESCRIPTION_DE: "Patientenliste"
TEILER_APP8_SOURCEURL: "https://${HOST}/patientlist"
TEILER_APP8_ROLES: "TEILER_PUBLIC"
TEILER_APP8_ISACTIVATED: "true"
TEILER_APP8_ICONCLASS: "bi bi-person-rolodex"
TEILER_APP8_ORDER: "9"
TEILER_APP8_ISEXTERNALLINK: "true"
TEILER_APP8_ISLOCAL: "true"
TEILER_APP9_NAME: "project-pseudonymisation"
TEILER_APP9_TITLE_EN: "Project Pseudonymisation"
TEILER_APP9_TITLE_DE: "Projectpseudonymisierung"
TEILER_APP9_DESCRIPTION_EN: "Project Pseudonymisation"
TEILER_APP9_DESCRIPTION_DE: "Projectpseudonymisierung"
TEILER_APP9_SOURCEURL: "https://${HOST}/id-manager/html/projectSelection.html"
TEILER_APP9_ROLES: "TEILER_PUBLIC"
TEILER_APP9_ISACTIVATED: "true"
TEILER_APP9_ICONCLASS: "bi bi-person-lines-fill"
TEILER_APP9_ORDER: "10"
TEILER_APP9_ISEXTERNALLINK: "true"
TEILER_APP9_ISLOCAL: "true"
TEILER_APP10_NAME: "federated-search"
TEILER_APP10_TITLE: "Lens"
TEILER_APP10_DESCRIPTION_EN: "Federated Search"
TEILER_APP10_DESCRIPTION_DE: "Föderierte Suche"
TEILER_APP10_SOURCEURL: "https://demo.lens.samply.de/"
TEILER_APP10_ROLES: "TEILER_PUBLIC"
TEILER_APP10_ISACTIVATED: "true"
TEILER_APP10_ICONCLASS: "bi bi-search"
TEILER_APP10_ORDER: "13"
TEILER_APP10_ISEXTERNALLINK: "true"
TEILER_APP10_ISLOCAL: "false"
TEILER_APP11_NAME: "central-patient-list"
TEILER_APP11_TITLE_EN: "Central Patient List"
TEILER_APP11_TITLE_DE: "Zentrale Patientenliste"
TEILER_APP11_DESCRIPTION_EN: "Central Patient List"
TEILER_APP11_DESCRIPTION_DE: "Zentrale Patientenliste"
TEILER_APP11_SOURCEURL: "https://patientlist.ccp-it.dktk.dkfz.de/"
TEILER_APP11_ROLES: "TEILER_PUBLIC"
TEILER_APP11_ISACTIVATED: "true"
TEILER_APP11_ICONCLASS: "bi bi-person-rolodex"
TEILER_APP11_ORDER: "14"
TEILER_APP11_ISEXTERNALLINK: "true"
TEILER_APP11_ISLOCAL: "false"
TEILER_APP12_NAME: "central id-manager"
TEILER_APP12_TITLE_EN: "Central ID-Manager"
TEILER_APP12_TITLE_DE: "Zentraler ID-Manager"
TEILER_APP12_DESCRIPTION_EN: "Central ID Manager"
TEILER_APP12_DESCRIPTION_DE: "Zentraler ID-Manager"
TEILER_APP12_SOURCEURL: "https://dktk-kne.kgu.de/"
TEILER_APP12_ROLES: "TEILER_PUBLIC"
TEILER_APP12_ISACTIVATED: "true"
TEILER_APP12_ICONCLASS: "bi bi-person-bounding-box"
TEILER_APP12_ORDER: "15"
TEILER_APP12_ISEXTERNALLINK: "true"
TEILER_APP12_ISLOCAL: "false"
# TODO: Icinga to be replaced by Zabbix
TEILER_APP13_NAME: "monitoring"
TEILER_APP13_TITLE: "Icinga"
TEILER_APP13_DESCRIPTION: "Icinga Monitoring"
TEILER_APP13_SOURCEURL: "https://monitor.vmitro.de/icingaweb2/dashboard"
TEILER_APP13_ROLES: "TEILER_ADMIN"
TEILER_APP13_ISACTIVATED: "true"
TEILER_APP13_ICONSOURCEURL: "https://images.ctfassets.net/o7xu9whrs0u9/QmL67mCGdRQ8PBcuKHGnF/858c0aee95762f59d67b25073f9483c2/icinga-logo.png"
TEILER_APP13_ORDER: "16"
TEILER_APP13_ISEXTERNALLINK: "true"
TEILER_APP13_ISLOCAL: "false"
# TEILER_APP14_NAME: "function-tests"
# TEILER_APP15_NAME: "event-log"
TEILER_APP16_NAME: "active-inquiries"
TEILER_APP16_BACKENDURL: "https://${HOST}/ccp-exporter"
TEILER_APP17_NAME: "archived-inquiries"
TEILER_APP17_BACKENDURL: "https://${HOST}/ccp-exporter"
TEILER_APP18_NAME: "failed-inquiries"
TEILER_APP18_BACKENDURL: "https://${HOST}/ccp-exporter"
TEILER_APP19_NAME: "inquiry"
TEILER_APP19_INMENU: "false"
# TEILER_APP20_NAME: "cbioportal"
# TEILER_APP20_TITLE: "cBioportal"
# TEILER_APP20_DESCRIPTION: "Interactive exploration of multidimensional cancer genomics data sets"
# TEILER_APP20_SOURCEURL: "http://localhost:8082"
# TEILER_APP20_ROLES: "TEILER_USER"
# TEILER_APP20_ISACTIVATED: "true"
# TEILER_APP20_ICONSOURCEURL: "https://docs.cbioportal.org/images/cbio-logo.png"
# TEILER_APP20_ORDER: "17"
# TEILER_APP20_ISEXTERNALLINK: "true"
# TEILER_APP20_ISLOCAL: "true"
# TEILER_APP21_NAME: "mtba-bp"
# TEILER_APP21_TITLE: "MTBA-BP"
# TEILER_APP21_DESCRIPTION: "MTBA Camunda Business Process"
# TEILER_APP21_SOURCEURL: "http://localhost:8480"
# TEILER_APP21_ROLES: "TEILER_ADMIN"
# TEILER_APP21_ISACTIVATED: "true"
# TEILER_APP21_ICONSOURCEURL: "https://camunda.com/wp-content/uploads/2020/05/logo-camunda-black.svg"
# TEILER_APP21_ORDER: "18"
# TEILER_APP21_ISEXTERNALLINK: "true"
# TEILER_APP21_ISLOCAL: "true"
TEILER_APP22_NAME: "dialog-quali"
TEILER_APP22_INMENU: "false"
TEILER_APP23_NAME: "dialog-uploads"
TEILER_APP23_INMENU: "false"
TEILER_APP24_NAME: "inquiry-dialog"
TEILER_APP24_INMENU: "false"
TEILER_APP25_NAME: "dialog-tests"
TEILER_APP25_INMENU: "false"
TEILER_APP26_NAME: "opal"
TEILER_APP26_TITLE: "Opal"
TEILER_APP26_DESCRIPTION: "Opal is OBiBas core database application for biobanks."
TEILER_APP26_SOURCEURL: "https://${HOST}/opal"
TEILER_APP26_ROLES: "TEILER_USER"
TEILER_APP26_ISACTIVATED: "true"
TEILER_APP26_ICONSOURCEURL: "https://www.obiba.org/assets/themes/bootstrap/img/obiba-logo-small.png"
TEILER_APP26_ORDER: "19"
TEILER_APP26_ISEXTERNALLINK: "true"
TEILER_APP26_ISLOCAL: "true"
TEILER_APP27_NAME: "rstudio"
TEILER_APP27_TITLE: "R Studio"
TEILER_APP27_DESCRIPTION: "RStudio is an integrated development environment (IDE) for R and Python."
TEILER_APP27_SOURCEURL: "https://${HOST}/rstudio"
TEILER_APP27_ROLES: "TEILER_USER"
TEILER_APP27_ISACTIVATED: "true"
TEILER_APP27_ICONSOURCEURL: "https://rstudio.com/wp-content/uploads/2018/10/RStudio-Logo-Flat.png"
TEILER_APP27_ORDER: "20"
TEILER_APP27_ISEXTERNALLINK: "true"
TEILER_APP27_ISLOCAL: "true"
volumes:
login-db:
name: "login-db"

View File

@ -0,0 +1,7 @@
#!/bin/bash
if [ "$ENABLE_TEILER" == true ];then
log INFO "Teiler-UI setup detected -- will start Teiler-UI services."
OVERRIDE+=" -f ./$PROJECT/modules/teiler-ui-compose.yml"
fi
KEYCLOAK_DB_PASSWORD="$(echo \"This is a salt string to generate one consistent password. It is not required to be secret.\" | openssl rsautl -sign -inkey /etc/bridgehead/pki/${SITE_ID}.priv.pem | base64 | head -c 30)"

0
ccp/modules/teiler-ui.md Normal file
View File

View File

@ -1,24 +0,0 @@
version: "3.7"
volumes:
nngm-rest:
services:
connector:
container_name: bridgehead-connector
image: docker.verbis.dkfz.de/ccp/nngm-rest:main
environment:
CTS_MAGICPL_API_KEY: ${NNGM_MAGICPL_APIKEY}
CTS_API_KEY: ${NNGM_CTS_APIKEY}
CRYPT_KEY: ${NNGM_CRYPTKEY}
#CTS_MAGICPL_SITE: ${SITE_ID}TODO
restart: always
labels:
- "traefik.enable=true"
- "traefik.http.routers.connector.rule=PathPrefix(`/nngm-connector`)"
- "traefik.http.middlewares.connector_strip.stripprefix.prefixes=/nngm-connector"
- "traefik.http.services.connector.loadbalancer.server.port=8080"
- "traefik.http.routers.connector.tls=true"
- "traefik.http.routers.connector.middlewares=connector_strip,auth"
volumes:
- nngm-rest:/var/log

View File

@ -1,24 +0,0 @@
#!/bin/bash
##nNGM vars:
#NNGM_MAGICPL_APIKEY
#NNGM_CTS_APIKEY
#NNGM_CRYPTKEY
function nngmSetup() {
if [ -n "$NNGM_CTS_APIKEY" ]; then
log INFO "nNGM setup detected -- will start nNGM Connector."
OVERRIDE+=" -f ./$PROJECT/nngm-compose.yml"
fi
}
function mtbaSetup() {
# TODO: Check if ID-Management Module is activated!
if [ -n "$ENABLE_MTBA" ];then
log INFO "MTBA setup detected -- will start MTBA Service and CBioPortal."
if [ ! -n "$IDMANAGER_UPLOAD_APIKEY" ]; then
log ERROR "Detected MTBA Module configuration but ID-Management Module seems not to be configured!"
exit 1;
fi
OVERRIDE+=" -f ./$PROJECT/mtba-compose.yml"
fi
}

View File

@ -8,12 +8,8 @@ REPORTHUB_BEAM_SECRET_LONG="ApiKey report-hub.${PROXY_ID} ${REPORTHUB_BEAM_SECRE
SUPPORT_EMAIL=support-ccp@dkfz-heidelberg.de
PRIVATEKEYFILENAME=/etc/bridgehead/pki/${SITE_ID}.priv.pem
# This will load id-management setup. Effective only if id-management configuration is defined.
source $PROJECT/modules/id-management-setup.sh
idManagementSetup
# This will load nngm setup. Effective only if nngm configuration is defined.
source $PROJECT/nngm-setup.sh
nngmSetup
source $PROJECT/exliquid-setup.sh
exliquidSetup
mtbaSetup
for module in $PROJECT/modules/*.sh
do
log INFO "sourcing $module"
source $module
done

View File

@ -11,7 +11,7 @@ detectCompose() {
getLdmPassword() {
if [ -n "$LDM_PASSWORD" ]; then
docker run --rm docker.verbis.dkfz.de/cache/httpd:alpine htpasswd -nb $PROJECT $LDM_PASSWORD | tr -d '\n' | tr -d '\r'
docker run --rm httpd:alpine htpasswd -nb $PROJECT $LDM_PASSWORD | tr -d '\n' | tr -d '\r'
else
echo -n ""
fi
@ -34,7 +34,7 @@ checkOwner(){
}
printUsage() {
echo "Usage: bridgehead start|stop|is-running|update|install|uninstall|enroll PROJECTNAME"
echo "Usage: bridgehead start|stop|update|install|uninstall|enroll PROJECTNAME"
echo "PROJECTNAME should be one of ccp|bbmri"
}
@ -169,17 +169,6 @@ function retry {
return 0
}
function bk_is_running {
detectCompose
RUNNING="$($COMPOSE -p $PROJECT -f ./$PROJECT/docker-compose.yml $OVERRIDE ps -q)"
NUMBEROFRUNNING=$(echo "$RUNNING" | wc -l)
if [ $NUMBEROFRUNNING -ge 2 ]; then
return 0
else
return 1
fi
}
##Setting Network properties
# currently not needed
#export HOSTIP=$(MSYS_NO_PATHCONV=1 docker run --rm --add-host=host.docker.internal:host-gateway ubuntu cat /etc/hosts | grep 'host.docker.internal' | awk '{print $1}');

View File

@ -1,21 +1,10 @@
#!/bin/bash -e
DEV_MODE="${1:-NODEV}"
source lib/log.sh
source lib/functions.sh
log "INFO" "Preparing your system for bridgehead installation ..."
# Check, if running in WSL
if [[ $(grep -i Microsoft /proc/version) ]]; then
# Check, if systemd is available
if [ "$(systemctl is-system-running)" = "offline" ]; then
log "ERROR" "It seems you have no active systemd environment in your WSL environment. Please follow the guide in https://devblogs.microsoft.com/commandline/systemd-support-is-now-available-in-wsl/"
exit 1
fi
fi
# Create the bridgehead user
if id bridgehead &>/dev/null; then
log "INFO" "Existing user with id $(id -u bridgehead) will be used by the bridgehead system units."
@ -25,12 +14,7 @@ else
fi
# Clone the OpenSource repository of bridgehead
set +e
bridgehead_repository_url=$(git remote get-url origin)
if [ $? -ne 0 ]; then
bridgehead_repository_url="https://github.com/samply/bridgehead.git"
fi
set -e
if [ -d "/srv/docker/bridgehead" ]; then
current_owner=$(stat -c '%U' /srv/docker/bridgehead)
if [ "$(su -c 'git -C /srv/docker/bridgehead remote get-url origin' $current_owner)" == "$bridgehead_repository_url" ]; then
@ -42,7 +26,7 @@ if [ -d "/srv/docker/bridgehead" ]; then
else
log "INFO" "Cloning $bridgehead_repository_url to /srv/docker/bridgehead"
mkdir -p /srv/docker/
git clone $bridgehead_repository_url /srv/docker/bridgehead
git clone bridgehead_repository_url /srv/docker/bridgehead
fi
case "$PROJECT" in
@ -66,7 +50,7 @@ if [ -d /etc/bridgehead ]; then
else
log "WARN" "Your site configuration repository in /etc/bridgehead seems to have another origin than git.verbis.dkfz.de. Please check if the repository is correctly cloned!"
fi
elif [[ "$DEV_MODE" == "NODEV" ]]; then
else
log "INFO" "Now cloning your site configuration repository for you."
read -p "Please enter your site: " site
read -s -p "Please enter the bridgehead's access token for your site configuration repository (will not be echoed): " access_token
@ -75,13 +59,9 @@ elif [[ "$DEV_MODE" == "NODEV" ]]; then
if [ $? -gt 0 ]; then
log "ERROR" "Unable to clone your configuration repository. Please obtain correct access data and try again."
fi
elif [[ "$DEV_MODE" == "DEV" ]]; then
log "INFO" "Now cloning your developer configuration repository for you."
read -p "Please enter your config repository URL: " url
git clone "$url" /etc/bridgehead
fi
chown -R bridgehead /etc/bridgehead /srv/docker/bridgehead
log INFO "System preparation is completed and configuration is present."
log INFO "System preparation is completed and private key is present."

View File

@ -4,15 +4,10 @@ source lib/functions.sh
AUTO_HOUSEKEEPING=${AUTO_HOUSEKEEPING:-true}
if [ "$AUTO_HOUSEKEEPING" == "true" ]; then
A="Performing automatic maintenance: "
if bk_is_running; then
A="$A Cleaning docker images."
docker system prune -a -f
else
A="$A Not cleaning docker images since BK is not running."
fi
A="Performing automatic maintenance: Cleaning docker images."
hc_send log "$A"
log INFO "$A"
docker system prune -a -f
else
log WARN "Automatic housekeeping disabled (variable AUTO_HOUSEKEEPING != \"true\")"
fi
@ -80,10 +75,6 @@ for DIR in /etc/bridgehead $(pwd); do
log "INFO" "You can review all changes on the repository with $git_repository_url/compare?from=$old_git_hash&to=$new_git_hash"
fi
git_updated="true"
git -C "$DIR" checkout main
REPORT_BRANCH_NAME=$(git -C "$DIR" branch --show-current)
REPORT_STATUS_CHECK=$(git -C "$DIR" status --porcelain)
report_error 7 "MAINTENANCE: Switched Branch to main, you are now on branch $REPORT_BRANCH_NAME \n see status \n $REPORT_STATUS_CHECK"
fi
done