mirror of
https://github.com/samply/bridgehead.git
synced 2025-06-16 20:40:15 +02:00
Compare commits
17 Commits
test/expor
...
metadata_f
Author | SHA1 | Date | |
---|---|---|---|
364cf5f1c9 | |||
e571681fce | |||
4f5f6b17e7 | |||
146235236b | |||
0169435074 | |||
6c71a83e70 | |||
ed95dff63e | |||
3841a98a3b | |||
710092c020 | |||
9977578aa5 | |||
634d4e2a4b | |||
bc24599c54 | |||
502eef0cc8 | |||
c4b7620fd6 | |||
6a21a5b641 | |||
c04ffc5f33 | |||
b1bdf48e55 |
22
README.md
22
README.md
@ -23,6 +23,7 @@ This repository is the starting point for any information and tools you will nee
|
|||||||
- [File structure](#file-structure)
|
- [File structure](#file-structure)
|
||||||
- [BBMRI-ERIC Directory entry needed](#bbmri-eric-directory-entry-needed)
|
- [BBMRI-ERIC Directory entry needed](#bbmri-eric-directory-entry-needed)
|
||||||
- [Loading data](#loading-data)
|
- [Loading data](#loading-data)
|
||||||
|
- [Metadata feedback](#metadata-feedback)
|
||||||
4. [Things you should know](#things-you-should-know)
|
4. [Things you should know](#things-you-should-know)
|
||||||
- [Auto-Updates](#auto-updates)
|
- [Auto-Updates](#auto-updates)
|
||||||
- [Auto-Backups](#auto-backups)
|
- [Auto-Backups](#auto-backups)
|
||||||
@ -155,6 +156,7 @@ Clone the bridgehead repository:
|
|||||||
```shell
|
```shell
|
||||||
sudo mkdir -p /srv/docker/
|
sudo mkdir -p /srv/docker/
|
||||||
sudo git clone https://github.com/samply/bridgehead.git /srv/docker/bridgehead
|
sudo git clone https://github.com/samply/bridgehead.git /srv/docker/bridgehead
|
||||||
|
sudo git checkout metadata_fb # Only needed if you want to use metadata feedback
|
||||||
```
|
```
|
||||||
|
|
||||||
Then, run the installation script:
|
Then, run the installation script:
|
||||||
@ -347,6 +349,26 @@ Normally, you will need to build your own ETL to feed the Bridgehead. However, t
|
|||||||
|
|
||||||
You can find the profiles for generating FHIR in [Simplifier](https://simplifier.net/bbmri.de/~resources?category=Profile).
|
You can find the profiles for generating FHIR in [Simplifier](https://simplifier.net/bbmri.de/~resources?category=Profile).
|
||||||
|
|
||||||
|
### Metadata feedback
|
||||||
|
|
||||||
|
The Bridgehead comes with a tool that allows you to associate metadata with samples. Multiple arbitrary text strings are allowed. A typical use case would be publications based on research using a sample. Here, one could lay down the DOI of the publication in the sample.
|
||||||
|
|
||||||
|
Full details of the system can be found [here](https://github.com/samply/feedback-deployment). To avail yourself of this feature, you need to
|
||||||
|
|
||||||
|
- Use the bbmri project.
|
||||||
|
- work with the ```metadata_fb``` branch of the Bridgehead repository.
|
||||||
|
- Build the feedback-agent Docker container (more details [here](https://github.com/samply/feedback-agent/)).
|
||||||
|
- Build the feedback-agent-ui Docker container (more details [here](https://github.com/samply/feedback-agent-ui/)).
|
||||||
|
|
||||||
|
The following extra environment variables need to be added to your ```/etc/bridgehead/bbmri.conf``` file:
|
||||||
|
|
||||||
|
``` code
|
||||||
|
ENABLE_EXPORTER=true
|
||||||
|
ENABLE_FEEDBACK_AGENT=true
|
||||||
|
FEEDBACK_HUB_URL=<URL for central feedback hub backend API>
|
||||||
|
FOCUS_RETRY_COUNT=256
|
||||||
|
```
|
||||||
|
|
||||||
## Things you should know
|
## Things you should know
|
||||||
|
|
||||||
### Auto-Updates
|
### Auto-Updates
|
||||||
|
@ -22,6 +22,7 @@ services:
|
|||||||
BROKER_URL: ${ERIC_BROKER_URL}
|
BROKER_URL: ${ERIC_BROKER_URL}
|
||||||
PROXY_ID: ${ERIC_PROXY_ID}
|
PROXY_ID: ${ERIC_PROXY_ID}
|
||||||
APP_focus_KEY: ${ERIC_FOCUS_BEAM_SECRET_SHORT}
|
APP_focus_KEY: ${ERIC_FOCUS_BEAM_SECRET_SHORT}
|
||||||
|
APP_feedback-agent_KEY: ${FEEDBACK_AGENT_BEAM_SECRET}
|
||||||
PRIVKEY_FILE: /run/secrets/proxy.pem
|
PRIVKEY_FILE: /run/secrets/proxy.pem
|
||||||
ALL_PROXY: http://forward_proxy:3128
|
ALL_PROXY: http://forward_proxy:3128
|
||||||
TLS_CA_CERTIFICATES_DIR: /conf/trusted-ca-certs
|
TLS_CA_CERTIFICATES_DIR: /conf/trusted-ca-certs
|
||||||
|
67
bbmri/modules/exporter-compose.yml
Normal file
67
bbmri/modules/exporter-compose.yml
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
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}"
|
||||||
|
CROSS_ORIGINS: "https://${HOST}"
|
||||||
|
EXPORTER_DB_USER: "exporter"
|
||||||
|
EXPORTER_DB_PASSWORD: "${EXPORTER_DB_PASSWORD}"
|
||||||
|
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}"
|
||||||
|
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}"
|
||||||
|
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"
|
9
bbmri/modules/exporter-setup.sh
Normal file
9
bbmri/modules/exporter-setup.sh
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
#!/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)"
|
||||||
|
POSTGRES_TAG=15.6-alpine
|
||||||
|
fi
|
15
bbmri/modules/exporter.md
Normal file
15
bbmri/modules/exporter.md
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
# 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.
|
59
bbmri/modules/feedback-agent-compose.yml
Normal file
59
bbmri/modules/feedback-agent-compose.yml
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
version: "3.7"
|
||||||
|
|
||||||
|
services:
|
||||||
|
feedback-agent-ui:
|
||||||
|
image: "samply/feedback-agent-ui"
|
||||||
|
environment:
|
||||||
|
- VUE_APP_EXPORTER_URL=https://localhost/ccp-exporter
|
||||||
|
- VUE_APP_FB_BACKEND_URL=http://localhost:8072
|
||||||
|
labels:
|
||||||
|
- traefik.enable=true
|
||||||
|
# HTTPS
|
||||||
|
- traefik.http.routers.feedback_agent_ui_ccp_https.rule=PathPrefix(`/ccp-feedback-agent-ui`)
|
||||||
|
- traefik.http.services.feedback_agent_ui_ccp_https.loadbalancer.server.port=8096
|
||||||
|
- traefik.http.routers.feedback_agent_ui_ccp_https.entrypoints=websecure
|
||||||
|
- traefik.http.routers.feedback_agent_ui_ccp_https.tls=true
|
||||||
|
feedback-agent:
|
||||||
|
image: "samply/feedback-agent"
|
||||||
|
environment:
|
||||||
|
- SPRING_DATASOURCE_URL=jdbc:postgresql://feedback-agent-db:5432/compose-postgres
|
||||||
|
- SPRING_DATASOURCE_USERNAME=compose-postgres
|
||||||
|
- SPRING_DATASOURCE_PASSWORD=${FEEDBACK_AGENT_DB_PASSWORD}
|
||||||
|
- SPRING_JPA_HIBERNATE_DDL_AUTO=update
|
||||||
|
- BEAM_PROXY_URI=http://beam-proxy-eric:8081
|
||||||
|
- FEEDBACK_HUB_URL=${FEEDBACK_HUB_URL}
|
||||||
|
- BLAZE_BASE_URL=http://blaze:8080/fhir
|
||||||
|
- FEEDBACK_AGENT_SECRET=${FEEDBACK_AGENT_BEAM_SECRET}
|
||||||
|
- FEEDBACK_AGENT_BEAM_ID=feedback-agent.${ERIC_PROXY_ID}
|
||||||
|
- FEEDBACK_HUB_BEAM_ID=feedback-hub.feedback-central.${ERIC_BROKER_ID}
|
||||||
|
- EXPORTER_API_KEY=${EXPORTER_API_KEY}
|
||||||
|
- CORS_ALLOWED_ORIGINS="https://${HOST}
|
||||||
|
networks:
|
||||||
|
# Only needed for local testing.
|
||||||
|
- feedback
|
||||||
|
- default
|
||||||
|
labels:
|
||||||
|
- traefik.enable=true
|
||||||
|
# HTTPS
|
||||||
|
- traefik.http.routers.feedback_agent_ccp_https.rule=PathPrefix(`/ccp-feedback-agent`)
|
||||||
|
- traefik.http.services.feedback_agent_ccp_https.loadbalancer.server.port=8072
|
||||||
|
- traefik.http.routers.feedback_agent_ccp_https.entrypoints=websecure
|
||||||
|
- traefik.http.middlewares.feedback_agent_ccp_https_strip.stripprefix.prefixes=/ccp-feedback-agent
|
||||||
|
- traefik.http.routers.feedback_agent_ccp_https.middlewares=feedback_agent_ccp_https_strip
|
||||||
|
- traefik.http.routers.feedback_agent_ccp_https.tls=true
|
||||||
|
feedback-agent-db:
|
||||||
|
image: 'postgres:13.1-alpine'
|
||||||
|
container_name: feedback-agent-db
|
||||||
|
environment:
|
||||||
|
- POSTGRES_USER=compose-postgres
|
||||||
|
- POSTGRES_PASSWORD=${FEEDBACK_AGENT_DB_PASSWORD}
|
||||||
|
|
||||||
|
# This is needed when you run both agent and hub locally in a test
|
||||||
|
# environment. Not necessary in production, though it probably won't
|
||||||
|
# cause any problems.
|
||||||
|
networks:
|
||||||
|
# Network to connect agent and hub.
|
||||||
|
feedback:
|
||||||
|
name: feedback
|
||||||
|
driver: bridge
|
||||||
|
|
8
bbmri/modules/feedback-agent-setup.sh
Normal file
8
bbmri/modules/feedback-agent-setup.sh
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [ "$ENABLE_FEEDBACK_AGENT" == true ]; then
|
||||||
|
OVERRIDE+=" -f ./$PROJECT/modules/feedback-agent-compose.yml"
|
||||||
|
FEEDBACK_AGENT_BEAM_SECRET="$(cat /proc/sys/kernel/random/uuid | sed 's/[-]//g' | head -c 20)"
|
||||||
|
FEEDBACK_AGENT_DB_PASSWORD="$(cat /proc/sys/kernel/random/uuid | sed 's/[-]//g' | head -c 20)"
|
||||||
|
fi
|
||||||
|
|
6
bbmri/modules/feedback-agent.md
Normal file
6
bbmri/modules/feedback-agent.md
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
# Metadata feedback agent
|
||||||
|
|
||||||
|
This component can be used to choose the sample to be associated
|
||||||
|
with a given piece of metadata (generally the ID of a publication
|
||||||
|
relating to research done with the sample).
|
||||||
|
|
Reference in New Issue
Block a user