mirror of
https://github.com/samply/bridgehead.git
synced 2025-06-16 15:00:15 +02:00
Compare commits
24 Commits
test/obds2
...
prototype/
Author | SHA1 | Date | |
---|---|---|---|
1f9c29647a | |||
7cd430ffd2 | |||
78e572d0db | |||
b0507a7946 | |||
791be147e2 | |||
bc0835ff4d | |||
96d99b2510 | |||
663ae628f3 | |||
91b9eeb316 | |||
3146a64fb7 | |||
7064bc6bf9 | |||
eb52554892 | |||
08c695e960 | |||
1513fe1c6c | |||
af08a9fb08 | |||
b95f0efbe7 | |||
99567e2b40 | |||
96ff6043a1 | |||
844ce3386e | |||
9782bf66b6 | |||
87f0e8ad7f | |||
7365be3e7b | |||
c5d08c50a4 | |||
72ecaadba8 |
94
README.md
94
README.md
@ -22,11 +22,13 @@ This repository is the starting point for any information and tools you will nee
|
||||
- [TLS terminating proxies](#tls-terminating-proxies)
|
||||
- [File structure](#file-structure)
|
||||
- [BBMRI-ERIC Directory entry needed](#bbmri-eric-directory-entry-needed)
|
||||
- [Directory sync tool](#directory-sync-tool)
|
||||
- [Loading data](#loading-data)
|
||||
4. [Things you should know](#things-you-should-know)
|
||||
- [Auto-Updates](#auto-updates)
|
||||
- [Auto-Backups](#auto-backups)
|
||||
- [Non-Linux OS](#non-linux-os)
|
||||
- [FAQ](#faq)
|
||||
5. [Troubleshooting](#troubleshooting)
|
||||
- [Docker Daemon Proxy Configuration](#docker-daemon-proxy-configuration)
|
||||
- [Monitoring](#monitoring)
|
||||
@ -301,26 +303,38 @@ Once you have added your biobank to the Directory you got persistent identifier
|
||||
|
||||
### Directory sync tool
|
||||
|
||||
The Bridgehead's **Directory Sync** is an optional feature that keeps the Directory up to date with your local data, e.g. number of samples. Conversely, 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.
|
||||
The Bridgehead's **Directory Sync** is an optional feature that keeps the BBMRI-ERIC Directory up to date with your local data, e.g. number of samples. Conversely, it can also update the local FHIR store with the latest contact details etc. from the BBMRI-ERIC Directory.
|
||||
|
||||
You should talk with your local data protection group regarding the information that is published by Directory sync.
|
||||
|
||||
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:
|
||||
To enable it, you will need to explicitly set the username and password variables for BBMRI-ERIC Directory login in the configuration file of your GitLab repository (e.g. ```bbmri.conf```). Here is an example minimal config:
|
||||
|
||||
```
|
||||
DS_DIRECTORY_USER_NAME=your_directory_username
|
||||
DS_DIRECTORY_USER_PASS=your_directory_password
|
||||
```
|
||||
Please contact your National Node to obtain this information.
|
||||
Please contact your National Node or Directory support (directory-dev@helpdesk.bbmri-eric.eu) to obtain these credentials.
|
||||
|
||||
Optionally, you **may** change when you want Directory sync to run by specifying a [cron](https://crontab.guru) expression, e.g. `DS_TIMER_CRON="0 22 * * *"` for 10 pm every evening.
|
||||
The following environment variables can be used from within your config file to control the behavior of Directory sync:
|
||||
|
||||
Once you edited the gitlab config, the bridgehead will autoupdate the config with the values and will sync the data.
|
||||
| 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_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_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 |
|
||||
|
||||
Once you have finished editing the config, the Bridgehead will autoupdate the config with the values and will sync data at regular intervals, using the time specified in DS_TIMER_CRON.
|
||||
|
||||
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.
|
||||
|
||||
More details of Directory sync can be found in [directory_sync_service](https://github.com/samply/directory_sync_service).
|
||||
|
||||
### Loading data
|
||||
|
||||
The data accessed by the federated search is held in the Bridgehead in a FHIR store (we use Blaze).
|
||||
@ -340,6 +354,24 @@ The storage space on your hard drive will depend on the number of FHIR resources
|
||||
|
||||
For more information on Blaze performance, please refer to [import performance](https://github.com/samply/blaze/blob/master/docs/performance/import.md).
|
||||
|
||||
### Clearing data
|
||||
|
||||
The Bridgehead's FHIR store, Blaze, saves its data in a Docker volume. This means that the data will persist even if you stop the Bridgehead. You can clear existing data from the FHIR store by deleting the relevant Docker volume.
|
||||
|
||||
First, stop the Bridgehead:
|
||||
```shell
|
||||
sudo systemctl stop bridgehead@<PROJECT>.service
|
||||
```
|
||||
Now remove the volume:
|
||||
```shell
|
||||
docker volume rm <PROJECT>_blaze-data
|
||||
```
|
||||
Finally, restart the Bridgehead:
|
||||
```shell
|
||||
sudo systemctl start bridgehead@<PROJECT>.service
|
||||
```
|
||||
You will need to do this for example if you are using a VM as a test environment and you subsequently want to use the same VM for production.
|
||||
|
||||
#### ETL for BBMRI and GBA
|
||||
|
||||
Normally, you will need to build your own ETL to feed the Bridgehead. However, there is one case where a short cut might be available:
|
||||
@ -386,6 +418,54 @@ 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.
|
||||
|
||||
### FAQ
|
||||
|
||||
**Q: How is the security of GitHub pulls, volumes/containers, and image signing ensured?**
|
||||
|
||||
A: Changes to Git branches that could be delivered to sites (main and develop) must be accepted via a pull request with at least two positive reviews.
|
||||
Containers/images are not built manually, but rather automatically through a CI/CD pipeline, so that an image can be rolled back to a defined code version at any time without changes.
|
||||
**Note:** If firewall access for (outgoing) connections to GitHub and/or Docker Hub is problematic at the site, mirrors for both services are available, operated by the DKFZ.
|
||||
|
||||
**Q: How is authentication between users and components regulated?**
|
||||
|
||||
A: When setting up a Bridgehead, a private key and a so-called Certificate Sign Request (CSR) are generated locally. This CSR is manually signed by the broker operator, which allows the Bridgehead access to the network infrastructure.
|
||||
All communication runs via Samply.Beam and is therefore end-to-end encrypted, but also signed. This allows the integrity and authenticity of the sender to be technically verified (which happens automatically both in the broker and at the recipients).
|
||||
The connection to the broker is additionally secured using traditional TLS (transport encryption over https).
|
||||
|
||||
**Q: Are there any statistics on incoming traffic from the Bridgehead (what goes in and what goes out)?**
|
||||
|
||||
A: Incoming and outgoing traffic can only enter/leave the Bridgehead via a forward or reverse proxy, respectively. These components log all connections.
|
||||
Statistical analysis is not currently being conducted, but is on the roadmap for some projects. We are also working on a dashboard for all tasks/responses delivered via Samply.Beam.
|
||||
|
||||
**Q: How is container access controlled, and what permission level is used?**
|
||||
|
||||
A: Currently, it is not possible to run the Bridgehead "out-of-the-box" as a rootless Docker Compose stack. The main reason is the operation of the reverse proxy (Traefik), which binds to the privileged ports 80 (HTTP) and 443 (HTTPS).
|
||||
Otherwise, there are no known technical obstacles, although we don't have concrete experience implementing this.
|
||||
At the file system level, a "bridgehead" user is created during installation, which manages the configuration and Bridgehead folders.
|
||||
|
||||
**Q: Is a cloud installation (not a company-owned one, but an external service provider) possible?**
|
||||
|
||||
A: Technically, yes. This is primarily a data protection issue between the participant and their cloud provider.
|
||||
The Bridgehead contains a data storage system that, during use, contains sensitive patient and sample data.
|
||||
There are cloud providers with whom appropriately worded contracts can be concluded to make this possible.
|
||||
Of course, the details must be discussed with the responsible data protection officer.
|
||||
|
||||
**Q: What needs to be considered regarding the Docker distribution/registry, and how is it used here?**
|
||||
|
||||
A: The Bridgehead images are located both in Docker Hub and mirrored in a registry operated by the DKFZ.
|
||||
The latter is used by default, avoiding potential issues with Docker Hub URL activation or rate limits.
|
||||
When using automatic updates (highly recommended), an daily check is performed for:
|
||||
- site configuration updates
|
||||
- Bridgehead software updates
|
||||
- container image updates
|
||||
|
||||
If updates are found, they are downloaded and applied.
|
||||
See the first question for the control mechanism.
|
||||
|
||||
**Q: Is data only transferred one-way (Bridgehead/FHIR Store → Central/Locator), or is two-way access necessary?**
|
||||
|
||||
A: By using Samply.Beam, only one outgoing connection to the broker is required at the network level (i.e., Bridgehead → Broker).
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Docker Daemon Proxy Configuration
|
||||
|
@ -12,5 +12,7 @@ services:
|
||||
DS_DIRECTORY_MOCK: ${DS_DIRECTORY_MOCK}
|
||||
DS_DIRECTORY_DEFAULT_COLLECTION_ID: ${DS_DIRECTORY_DEFAULT_COLLECTION_ID}
|
||||
DS_DIRECTORY_COUNTRY: ${DS_DIRECTORY_COUNTRY}
|
||||
DS_IMPORT_BIOBANKS: ${DS_IMPORT_BIOBANKS:-true}
|
||||
DS_IMPORT_COLLECTIONS: ${DS_IMPORT_COLLECTIONS:-true}
|
||||
depends_on:
|
||||
- "blaze"
|
||||
|
@ -10,6 +10,10 @@ if [ "${ENABLE_ERIC}" == "true" ]; then
|
||||
export ERIC_BROKER_ID=broker.bbmri.samply.de
|
||||
export ERIC_ROOT_CERT=eric
|
||||
;;
|
||||
"acceptance")
|
||||
export ERIC_BROKER_ID=broker-acc.bbmri-acc.samply.de
|
||||
export ERIC_ROOT_CERT=eric.acc
|
||||
;;
|
||||
"test")
|
||||
export ERIC_BROKER_ID=broker-test.bbmri-test.samply.de
|
||||
export ERIC_ROOT_CERT=eric.test
|
||||
|
20
bbmri/modules/eric.acc.root.crt.pem
Normal file
20
bbmri/modules/eric.acc.root.crt.pem
Normal file
@ -0,0 +1,20 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIDNTCCAh2gAwIBAgIUE/wu6FmI+KSMOalI65b+lI3HI4cwDQYJKoZIhvcNAQEL
|
||||
BQAwFjEUMBIGA1UEAxMLQnJva2VyLVJvb3QwHhcNMjQwOTE2MTUyMzU0WhcNMzQw
|
||||
OTE0MTUyNDI0WjAWMRQwEgYDVQQDEwtCcm9rZXItUm9vdDCCASIwDQYJKoZIhvcN
|
||||
AQEBBQADggEPADCCAQoCggEBAOt1I1FQt2bI4Nnjtg8JBYid29cBIkDT4MMb45Jr
|
||||
ays24y4R3WO7VJK9UjNduSq/A1jlA0W0A/szDf8Ojq6bBtg+uL92PTDjYH1QXwX0
|
||||
c7eMo2tvvyyrs/cb2/ovDBQ1lpibcxVmVAv042ASmil3SdqKKXpv3ATnF9I7V4cv
|
||||
fwB56FChaGIov5EK+9JOMjTx6oMlBEgUFR6qq/lSqM9my0HYwUFbX2W+nT9EKEIP
|
||||
9UP1eyfRZR3E/+oticnm/cS20BGCbjoYrNgLthXKyaASuhGoElKs8EZ3h9MiI+u0
|
||||
DpR0KpePhAkMLugBrgYWqkMwwD1684LfC4YVQrsLwzo5OW8CAwEAAaN7MHkwDgYD
|
||||
VR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFPbXs3g3lMjH
|
||||
1JMe0a5aVbN7lB92MB8GA1UdIwQYMBaAFPbXs3g3lMjH1JMe0a5aVbN7lB92MBYG
|
||||
A1UdEQQPMA2CC0Jyb2tlci1Sb290MA0GCSqGSIb3DQEBCwUAA4IBAQBM5RsXb2HN
|
||||
FpC1mYfocXAn20Zu4d603qmc/IqkiOWbp36pWo+jk1AxejyRS9hEpQalgSnvcRPQ
|
||||
1hPEhGU+wvI0WWVi/01iNjVbXmJNPQEouXQWAT17dyp9vqQkPw8LNzpSV/qdPgbT
|
||||
Z9o3sZrjUsSLsK7A7Q5ky4ePkiJBaMsHeAD+wqGwpiJ4D2Xhp8e1v36TWM0qt2EA
|
||||
gySx9isx/jeGGPBmDqYB9BCal5lrihPN56jd+5pCkyXeZqKWiiXFJKXwcwxctYZc
|
||||
ADHIiTLLPXE8LHTUJAO51it1NAZ1S24aMzax4eWDXcWO7/ybbx5pkYkMd6EqlKHd
|
||||
8riQJIhY4huX
|
||||
-----END CERTIFICATE-----
|
12
bridgehead
12
bridgehead
@ -69,7 +69,7 @@ loadVars() {
|
||||
if [ "$(git rev-parse --abbrev-ref HEAD)" == "main" ]; then
|
||||
ENVIRONMENT="production"
|
||||
else
|
||||
ENVIRONMENT="test"
|
||||
ENVIRONMENT="test" # we have acceptance environment in BBMRI ERIC and it would be more appropriate to default to that one in case the data they have in BH is real, but I'm gonna leave it as is for backward compatibility
|
||||
fi
|
||||
fi
|
||||
# Source the versions of the images components
|
||||
@ -80,6 +80,9 @@ loadVars() {
|
||||
"test")
|
||||
source ./versions/test
|
||||
;;
|
||||
"acceptance")
|
||||
source ./versions/acceptance
|
||||
;;
|
||||
*)
|
||||
report_error 7 "Environment \"$ENVIRONMENT\" is unknown. Assuming production. FIX THIS!"
|
||||
source ./versions/prod
|
||||
@ -173,6 +176,13 @@ case "$ACTION" in
|
||||
;;
|
||||
postRun | postUpdate)
|
||||
;;
|
||||
send-file)
|
||||
loadVars
|
||||
log "WARNING" "Your are about to send a file to another bridgehead in your network!"
|
||||
read -p "Please name the bridgehead you want to send the file to (proxy-id): " RECEIVER_PROXY_ID
|
||||
read -p "Continue? (Y/N): " confirm && [[ $confirm == [yY] || $confirm == [yY][eE][sS] ]] || exit 1
|
||||
exec $COMPOSE -p $PROJECT -f ./modules/beam-file-compose.yml --profile beam-file-sender run beam-file-sender send --to beamfile.$RECEIVER_PROXY_ID /data/outfile
|
||||
;;
|
||||
*)
|
||||
printUsage
|
||||
exit 1
|
||||
|
@ -3,7 +3,7 @@ version: "3.7"
|
||||
services:
|
||||
obds2fhir-rest:
|
||||
container_name: bridgehead-obds2fhir-rest
|
||||
image: docker.verbis.dkfz.de/ccp/obds2fhir-rest:fixSampleImport
|
||||
image: docker.verbis.dkfz.de/samply/obds2fhir-rest:main
|
||||
environment:
|
||||
IDTYPE: BK_${IDMANAGEMENT_FRIENDLY_ID}_L-ID
|
||||
MAINZELLISTE_APIKEY: ${IDMANAGER_LOCAL_PATIENTLIST_APIKEY}
|
||||
|
@ -31,6 +31,7 @@ services:
|
||||
environment:
|
||||
DEFAULT_LANGUAGE: "${TEILER_DEFAULT_LANGUAGE}"
|
||||
TEILER_BACKEND_URL: "https://${HOST}/ccp-teiler-backend"
|
||||
TEILER_DASHBOARD_URL: "https://${HOST}/ccp-teiler-dashboard"
|
||||
OIDC_URL: "${OIDC_URL}"
|
||||
OIDC_REALM: "${OIDC_REALM}"
|
||||
OIDC_CLIENT_ID: "${OIDC_PUBLIC_CLIENT_ID}"
|
||||
@ -41,7 +42,6 @@ services:
|
||||
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}"
|
||||
@ -69,10 +69,10 @@ services:
|
||||
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}"
|
||||
IDMANAGER_UPLOAD_APIKEY: "${IDMANAGER_UPLOAD_APIKEY}" # Only used to check if the ID Manager is active
|
||||
secrets:
|
||||
- ccp.conf
|
||||
|
||||
|
@ -45,6 +45,7 @@ services:
|
||||
BROKER_URL: ${BROKER_URL}
|
||||
PROXY_ID: ${PROXY_ID}
|
||||
APP_focus_KEY: ${FOCUS_BEAM_SECRET_SHORT}
|
||||
APP_beamfilesend_KEY: ${BEAM_FILE_SEND_SECRET}
|
||||
PRIVKEY_FILE: /run/secrets/proxy.pem
|
||||
ALL_PROXY: http://forward_proxy:3128
|
||||
TLS_CA_CERTIFICATES_DIR: /conf/trusted-ca-certs
|
||||
|
@ -5,6 +5,7 @@ FOCUS_BEAM_SECRET_SHORT="$(cat /proc/sys/kernel/random/uuid | sed 's/[-]//g' | h
|
||||
FOCUS_RETRY_COUNT=${FOCUS_RETRY_COUNT:-64}
|
||||
SUPPORT_EMAIL=support-ccp@dkfz-heidelberg.de
|
||||
PRIVATEKEYFILENAME=/etc/bridgehead/pki/${SITE_ID}.priv.pem
|
||||
BEAM_FILE_SEND_SECRET="$(echo \"beam-file-send-salt\" | openssl pkeyutl -sign -inkey /etc/bridgehead/pki/${SITE_ID}.priv.pem | base64 | head -c 30)"
|
||||
|
||||
BROKER_URL_FOR_PREREQ=$BROKER_URL
|
||||
|
||||
@ -25,4 +26,5 @@ do
|
||||
source $module
|
||||
done
|
||||
|
||||
transfairSetup
|
||||
transfairSetup
|
||||
beamFileSetup
|
||||
|
@ -31,6 +31,7 @@ services:
|
||||
environment:
|
||||
DEFAULT_LANGUAGE: "${TEILER_DEFAULT_LANGUAGE}"
|
||||
TEILER_BACKEND_URL: "https://${HOST}/ccp-teiler-backend"
|
||||
TEILER_DASHBOARD_URL: "https://${HOST}/ccp-teiler-dashboard"
|
||||
OIDC_URL: "${OIDC_URL}"
|
||||
OIDC_REALM: "${OIDC_REALM}"
|
||||
OIDC_CLIENT_ID: "${OIDC_PUBLIC_CLIENT_ID}"
|
||||
@ -41,7 +42,6 @@ services:
|
||||
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}"
|
||||
@ -69,7 +69,6 @@ services:
|
||||
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}"
|
||||
|
@ -347,18 +347,21 @@ function secret_sync_gitlab_token() {
|
||||
root_crt_file="/srv/docker/bridgehead/$PROJECT/root.crt.pem"
|
||||
fi
|
||||
|
||||
# Use Secret Sync to validate the GitLab token in /var/cache/bridgehead/secrets/gitlab_token.
|
||||
# Create a temporary directory for Secret Sync that is valid per boot
|
||||
secret_sync_tempdir="/tmp/bridgehead/secret-sync.boot-$(cat /proc/sys/kernel/random/boot_id)"
|
||||
mkdir -p $secret_sync_tempdir
|
||||
|
||||
# Use Secret Sync to validate the GitLab token in $secret_sync_tempdir/cache.
|
||||
# If it is missing or expired, Secret Sync will create a new token and write it to the file.
|
||||
# The git credential helper reads the token from the file during git pull.
|
||||
mkdir -p /var/cache/bridgehead/secrets
|
||||
touch /var/cache/bridgehead/secrets/gitlab_token # the file has to exist to be mounted correctly in the Docker container
|
||||
log "INFO" "Running Secret Sync for the GitLab token (gitlab=$gitlab)"
|
||||
docker pull docker.verbis.dkfz.de/cache/samply/secret-sync-local:latest # make sure we have the latest image
|
||||
docker run --rm \
|
||||
-v /var/cache/bridgehead/secrets/gitlab_token:/usr/local/cache \
|
||||
-v $PRIVATEKEYFILENAME:/run/secrets/privkey.pem:ro \
|
||||
-v $root_crt_file:/run/secrets/root.crt.pem:ro \
|
||||
-v /etc/bridgehead/trusted-ca-certs:/conf/trusted-ca-certs:ro \
|
||||
-v $secret_sync_tempdir:/secret-sync/ \
|
||||
-e CACHE_PATH=/secret-sync/gitlab-token \
|
||||
-e TLS_CA_CERTIFICATES_DIR=/conf/trusted-ca-certs \
|
||||
-e NO_PROXY=localhost,127.0.0.1 \
|
||||
-e ALL_PROXY=$HTTPS_PROXY_FULL_URL \
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
[ "$1" = "get" ] || exit
|
||||
|
||||
source /var/cache/bridgehead/secrets/gitlab_token
|
||||
source "/tmp/bridgehead/secret-sync.boot-$(cat /proc/sys/kernel/random/boot_id)/gitlab-token"
|
||||
|
||||
# Any non-empty username works, only the token matters
|
||||
cat << EOF
|
||||
|
35
modules/beam-file-compose.yml
Normal file
35
modules/beam-file-compose.yml
Normal file
@ -0,0 +1,35 @@
|
||||
# NOTE: Current implementation is restricted to a bridgehead only being able to either upload or download data
|
||||
services:
|
||||
beam-file-sender:
|
||||
image: samply/beam-file:${BEAM_FILE_TAG}
|
||||
container_name: bridgehead-beam-file-sender
|
||||
environment:
|
||||
- BEAM_ID=beamfilesend.${PROXY_ID}
|
||||
- BEAM_SECRET=${BEAM_FILE_SEND_SECRET}
|
||||
- BEAM_URL=http://beam-proxy:8081
|
||||
- BIND_ADDR=0.0.0.0:8085
|
||||
- API_KEY=${BEAM_FILE_API_KEY}
|
||||
# Only uncomment if your are sure what to do
|
||||
# ports:
|
||||
# - 8085:8085
|
||||
volumes:
|
||||
- /var/cache/bridgehead/beam-file-out/:/data
|
||||
profiles: ["beam-file-sender"]
|
||||
|
||||
beam-file-receiver:
|
||||
image: samply/beam-file:${BEAM_FILE_TAG}
|
||||
container_name: bridgehead-beam-file-receiver
|
||||
environment:
|
||||
- BEAM_ID=beamfile.${PROXY_ID}
|
||||
- BEAM_SECRET=${BEAM_FILE_SECRET}
|
||||
- BEAM_URL=http://beam-proxy:8081
|
||||
- API_KEY=${BEAM_FILE_API_KEY}
|
||||
command: ["receive", "save", "--outdir", "/data"]
|
||||
volumes:
|
||||
- /var/cache/bridgehead/beam-file/:/data
|
||||
profiles: ["beam-file-receiver"]
|
||||
|
||||
beam-proxy:
|
||||
environment:
|
||||
APP_beamfile_KEY: ${BEAM_FILE_SECRET}
|
||||
profiles: ["beam-file-receiver"]
|
11
modules/beam-file-setup.sh
Normal file
11
modules/beam-file-setup.sh
Normal file
@ -0,0 +1,11 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
function beamFileSetup() {
|
||||
if [ -n "$ENABLE_BEAM_FILE_RECEIVER" ]; then
|
||||
echo "Starting beam file in receiver mode"
|
||||
OVERRIDE+=" -f ./modules/beam-file-compose.yml --profile beam-file-receiver"
|
||||
BEAM_FILE_SECRET="$(cat /proc/sys/kernel/random/uuid | sed 's/[-]//g' | head -c 20)"
|
||||
BEAM_FILE_API_KEY="$(cat /proc/sys/kernel/random/uuid | sed 's/[-]//g' | head -c 20)"
|
||||
log INFO "Beam File in Receiver Mode available uses ApiKey ${BEAM_FILE_API_KEY}"
|
||||
fi
|
||||
}
|
@ -2,5 +2,5 @@
|
||||
|
||||
if [ -n "$ENABLE_SSH_TUNNEL" ]; then
|
||||
log INFO "SSH Tunnel setup detected -- will start SSH Tunnel."
|
||||
OVERRIDE+=" -f ./$PROJECT/modules/ssh-tunnel-compose.yml"
|
||||
OVERRIDE+=" -f ./modules/ssh-tunnel-compose.yml"
|
||||
fi
|
||||
|
@ -8,7 +8,8 @@ services:
|
||||
- TTP_URL
|
||||
- TTP_ML_API_KEY
|
||||
- TTP_GW_SOURCE
|
||||
- TTP_GW_DOMAIN
|
||||
- TTP_GW_EPIX_DOMAIN
|
||||
- TTP_GW_GPAS_DOMAIN
|
||||
- TTP_TYPE
|
||||
- TTP_AUTH
|
||||
- PROJECT_ID_SYSTEM
|
||||
@ -22,6 +23,9 @@ services:
|
||||
- DATABASE_URL=sqlite://transfair/data_requests.sql?mode=rwc
|
||||
- RUST_LOG=${RUST_LOG:-info}
|
||||
- TLS_CA_CERTIFICATES_DIR=/conf/trusted-ca-certs
|
||||
- TLS_DISABLE=${TRANSFAIR_TLS_DISABLE:-false}
|
||||
- NO_PROXY=${TRANSFAIR_NO_PROXIES}
|
||||
- ALL_PROXY=http://forward_proxy:3128
|
||||
volumes:
|
||||
- /var/cache/bridgehead/${PROJECT}/transfair:/transfair
|
||||
- /etc/bridgehead/trusted-ca-certs:/conf/trusted-ca-certs:ro
|
||||
@ -59,9 +63,9 @@ services:
|
||||
|
||||
transfair-request-blaze:
|
||||
image: docker.verbis.dkfz.de/cache/samply/blaze:${BLAZE_TAG}
|
||||
container_name: bridgehead-transfair-requests-blaze
|
||||
container_name: bridgehead-transfair-request-blaze
|
||||
environment:
|
||||
BASE_URL: "http://bridgehead-transfair-requests-blaze:8080"
|
||||
BASE_URL: "http://bridgehead-transfair-request-blaze:8080"
|
||||
JAVA_TOOL_OPTIONS: "-Xmx1024m"
|
||||
DB_BLOCK_CACHE_SIZE: 1024
|
||||
CQL_EXPR_CACHE_SIZE: 8
|
||||
|
@ -15,7 +15,7 @@ function transfairSetup() {
|
||||
log INFO "TransFAIR request fhir store set to external $FHIR_REQUEST_URL"
|
||||
else
|
||||
log INFO "TransFAIR request fhir store not set writing to internal blaze"
|
||||
FHIR_REQUEST_URL="http://transfair-requests-blaze:8080"
|
||||
FHIR_REQUEST_URL="http://transfair-request-blaze:8080"
|
||||
OVERRIDE+=" --profile transfair-request-blaze"
|
||||
fi
|
||||
if [ -n "$TTP_GW_SOURCE" ]; then
|
||||
@ -27,5 +27,9 @@ function transfairSetup() {
|
||||
else
|
||||
log INFO "TransFAIR configured without ttp"
|
||||
fi
|
||||
TRANSFAIR_NO_PROXIES="transfair-input-blaze,blaze,transfair-requests-blaze"
|
||||
if [ -n "${TRANSFAIR_NO_PROXY}" ]; then
|
||||
TRANSFAIR_NO_PROXIES+=",${TRANSFAIR_NO_PROXY}"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
3
versions/acceptance
Normal file
3
versions/acceptance
Normal file
@ -0,0 +1,3 @@
|
||||
FOCUS_TAG=develop
|
||||
BEAM_TAG=develop
|
||||
BLAZE_TAG=main
|
@ -1,3 +1,4 @@
|
||||
FOCUS_TAG=develop
|
||||
BEAM_TAG=develop
|
||||
BLAZE_TAG=main
|
||||
BLAZE_TAG=main
|
||||
BEAM_FILE_TAG=task-based-files
|
||||
|
Reference in New Issue
Block a user