First draft of dktk-fed and many other improvements

This commit is contained in:
root 2022-02-16 09:42:53 +01:00
parent 3244c3db29
commit 342f709901
9 changed files with 204 additions and 242 deletions

View File

@ -1,44 +1,44 @@
# bridgehead # bridgehead
This repository contains all information and tools to deploy a bridgehead. If you have any questions about deploying a bridgehead, please contact us. This repository contains all tools to deploy a bridgehead with docker. If you have any questions about deploying a bridgehead, please contact us.
There are some prerequisites, which need to be meet befor starting a bridgehead. If you runnig a Windows or Mac OS maschine you should read starting a bridgehead. If you running a Linux maschine you can start or install a bridgehead. There are some prerequisites, which need to be meet before starting a bridgehead. If you running a Windows or Mac OS machine you should read starting a bridgehead. If you running a Linux machine you can start or install a bridgehead.
## Setup ## Setup
Clone this repository to /srv/docker Clone this repository to /srv/docker/
The first step is to copy the site.conf . It contains some configuration and secrets for your bridgehead. The first step is to copy the site.conf. It contains some configuration and secrets for your bridgehead.
With cp site.dev.conf site.conf you can clone the template. You need to set the project accoriding to the which bridgehead you want to start. It's either a GBN/BBMRI-ERIC, DKTK or C4 Bridgehead. With cp site.dev.conf site.conf you can clone the template. You need to set the project accoriding to the which bridgehead you want to start. It's either a GBN/BBMRI-ERIC, DKTK, DKTK-FED or C4 Bridgehead.
Each Project needs it own .env file where all the settings are located. Each Project has a template for it in there respective folder. We offer you to setup the file with and also to manage it. Each Project needs a .env file where all the settings are located. Each Project has a template for it in their respective folder. We offer you to setup the file with and also to manage it.
### DKTK
For DKTK set in the site.conf the project to "dkkt". Also you need to set many settings in the env file. For the API keys for the psuenomisation you need to contact the Mainzelliste Team.
### GBA/BBMRI-ERIC
For an GBN/BBMRI-ERIC deployment set the project to gbn. When you already deployed a bridgehead you can reuse the env file for it.
### C4
For C4 project it is similar to DKTK. Set the ldm_base_url in the configuration table to null.
### Git repository ### Git repository
If you already have a git config repositpory you can clone it with If you already have a git config repository you can clone it with
git submodule add -f https://"$git_username":"$git_access_token"@code.mitro.dkfz.de/scm/bd/"$site_name_lowercase"-config.git ./site-config git submodule add -f https://"$git_username":"$git_access_token"@code.mitro.dkfz.de/scm/bd/"$site_name_lowercase"-config.git ./site-config
### DKTK
For DKTK set in the site.conf the project to "dkkt". Also, you need to set many settings in the env file. For the API keys you need to contact the Mainzelliste Team.
### DKTK-FED
For the DKTK Federate Search put dkkt-fed in the site.conf.
### GBA/BBMRI-ERIC
Coming soon
### C4
Coming soon
## Starting your bridgehead ## Starting your bridgehead
There two methods to start the bridgehead. For Windows, Linux and Mac OS you can use the start-bridgehead.sh to deploy it wit docker-compose. If will also check some other setting of your system. There two methods to start the bridgehead. For Windows, Linux and Mac OS you can use the start-bridgehead.sh to start it with docker-compose.
The second methods is using the systemd management tool you start, stop and update your bridgehead. The second methods is using the systemd management tool you start, stop and update your bridgehead.
Just run the install-bridgehead and thats it.

0
auth/dktk Normal file
View File

View File

@ -0,0 +1,84 @@
version: "3.7"
services:
traefik:
container_name: bridgehead_traefik
image: traefik:2.4
command:
- --api.insecure=true
- --entrypoints.web.address=:80
- --entrypoints.web-secure.address=:443
- --providers.docker=true
ports:
- 80:80
- 443:443
- 8080:8080
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- ../auth/:/auth
extra_hosts:
- "host.docker.internal:host-gateway"
landing:
container_name: bridgehead_landingpage
image: nginx:stable
volumes:
- ../landing/:/usr/share/nginx/html
labels:
- "traefik.enable=true"
- "traefik.http.routers.landing.rule=PathPrefix(`/`)"
- "traefik.http.services.landing.loadbalancer.server.port=80"
blaze:
image: "samply/blaze:0.15"
container_name: bridgehead_dktk_blaze
environment:
BASE_URL: "http://blaze:8080"
JAVA_TOOL_OPTIONS: "-Xmx4g"
LOG_LEVEL: "debug"
ENFORCE_REFERENTIAL_INTEGRITY: "false"
volumes:
- "blaze-data:/app/data"
labels:
- "traefik.enable=true"
- "traefik.http.middlewares.test-auth.basicauth.usersfile=/auth/dktk"
- "traefik.http.routers.blaze_dktk.rule=PathPrefix(`/dktk-localdatamanagement`)"
- "traefik.http.middlewares.dktk_b_strip.stripprefix.prefixes=/dktk-localdatamanagement"
- "traefik.http.services.blaze_dktk.loadbalancer.server.port=8080"
- "traefik.http.routers.blaze_dktk.middlewares=dktk_b_strip,test-auth"
# dktk-fed-search-share:
# image: "ghcr.io/samply/dktk-fed-search-share:pr-1"
# container_name: bridgehead_dktk_share
# environment:
# APP_BASE_URL: "http://dktk-fed-search-share:8080"
# APP_STORE_URL: "http://blaze:8080/fhir"
# APP_BROKER_BASEURL: "http://e260-serv-11.inet.dkfz-heidelberg.de:8080/broker/rest/searchbroker"
# APP_BROKER_MAIL: "foo@bar.de"
# APP_STORE_BASEURL: "http://bridgehead_dktk_blaze:8080/fhir"
# SPRING_DATASOURCE_URL: "jdbc:postgresql://dktk-fed-search-share-db:5432/dktk-fed-search-share"
# JAVA_TOOL_OPTIONS: "-Xmx1g"
# http_proxy: "http://www-int2.inet.dkfz-heidelberg.de:3128"
# https_proxy: "http://www-int2.inet.dkfz-heidelberg.de:3128"
# HTTP_PROXY: "http://www-int2.inet.dkfz-heidelberg.de:3128"
# HTTPS_PROXY: "http://www-int2.inet.dkfz-heidelberg.de:3128"
# depends_on:
# - dktk-fed-search-share-db
# - blaze
# labels:
# - "traefik.enable=true"
# - "traefik.http.routers.dktk-fed-search.rule=PathPrefix(`/dktk-connector`)"
# - "traefik.http.services.dktk-fed-search.loadbalancer.server.port=8080"
# dktk-fed-search-share-db:
# image: "postgres:14"
# environment:
# POSTGRES_USER: "dktk-fed-search-share"
# POSTGRES_PASSWORD: "dktk-fed-search-share"
# POSTGRES_DB: "dktk-fed-search-share"
# volumes:
# - "dktk-fed-search-share-db-data:/var/lib/postgresql/data"
volumes:
blaze-data:
# dktk-fed-search-share-db-data:

View File

@ -56,6 +56,8 @@ services:
environment: environment:
STORE_URL: ${STORE_URL} STORE_URL: ${STORE_URL}
POSTGRES_PASSWORD: ${CONNECTOR_POSTGRES_PASS} POSTGRES_PASSWORD: ${CONNECTOR_POSTGRES_PASS}
PATIENTLIST_URL: "http://bridgehead_patientlist:8080"
PROJECTPSEUDONYMISATION_URL: "http://bridgehead_dktk_idmanager:8080/ID-Manager/html/projectSelection.html"
volumes: volumes:
- "connector_logs:/usr/local/tomcat/logs" - "connector_logs:/usr/local/tomcat/logs"
depends_on: depends_on:

View File

@ -1,216 +0,0 @@
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<title>Bridgehead Overview</title>
<!-- Bootstrap core CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"
integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p"
crossorigin="anonymous"></script>
</head>
<body>
<div class="alert alert-danger" role="alert">
For updating the Bridgehead your action is requiered. This message is shown when the update of one of your
componentes need action to complete. This is a breaking change.
</div>
<div class="alert alert-warning">
There is a componente update for your bridgehead. Please run the updater
</div>
<div class="alert alert-success">
Your Bridgehead was updated!
</div>
<div class="container px-4 py-5" id="featured-3">
<h2 class="pb-2 border-bottom">Bridgehead</h2>
<div class="accordion" id="accordionExample">
<div class="accordion-item">
<h2 class="accordion-header" id="headingOne">
<button class="accordion-button" type="button" data-bs-toggle="collapse" data-bs-target="#collapseOne"
aria-expanded="true" aria-controls="collapseOne">
Projects
</button>
</h2>
<div id="collapseOne" class="accordion-collapse collapse show" aria-labelledby="headingOne"
data-bs-parent="#accordionExample">
<div class="accordion-body">
<div class="row g-4 py-5 row-cols-1 row-cols-lg-3">
<div class="feature col">
<div class="feature-icon">
<img src="GBN_CMYK_schwarz.svg" class="img-fluid img-thumbnail">
</div>
<h4>GBA/GBN</h4>
<p>GBN bringt Biobanken und Forscher*innen zusammen, damit Erkenntnisse über die Erkrankung gewonnen und
Therapien entwickelt werden können.</p>
</div>
<div class="feature col">
<div class="feature-icon">
<img src="Logo_DKTK_neu_.jpg" class="img-fluid img-thumbnail">
</div>
<h4>CCP-IT</h4>
<p>Das Deutsche Konsortium für Translationale Krebsforschung ist eine Initiative der Bundesregierung zur
Förderung der medizinische Krebsforschung.</p>
</div>
<div class="feature col">
<div class="feature-icon">
<img
src="https://www.nngm.de/wp-content/themes/nNGM/assets/images/new_icons/logo-nngm-nationales-netzwerk-genomische-medizin-lungenkrebs.svg"
class="img-fluid img-thumbnail">
</div>
<h4>Nationales Netzwerk Genomische Medizin (nNGM)</h4>
<p>Über ein bundesweites Netzwerk sollen in Deutschland künftig alle Patienten mit fortgeschrittenem
Lungenkrebs Zugang zu molekularer Diagnostik und innovativen Therapien erhalten. Dafür schließen sich
20 Netzwerkzentren im „nationalen Netzwerk Genomische Medizin (nNGM) Lungenkrebs“ zusammen darunter
alle 13 onkologischen Spitzenzentren, die aktuell von der Deutschen Krebshilfe gefördert werden. </p>
</div>
</div>
</div>
</div>
</div>
</div>
<div>
<h2>Components</h2>
<h3>Central</h3>
<table class="table">
<thead>
<tr>
<th>Group</th>
<th>Service</th>
<th>Status</th>
</tr>
</thead>
<tbody>
<tr>
<td>CCP-IT</td>
<td><a href="patientlist.ccp-it.dktk.dkfz.de">Zentrale Patientenliste</td>
<td>&check;</td>
</tr>
<tr>
<td>CCP-IT</td>
<td><a href="decentralsearch.ccp-it.dktk.dkfz.de">Dezentrale Suche</td>
<td>&check;</td>
</tr>
<tr>
<td>CCP-IT</td>
<td><a href="centralsearch.ccp-it.dktk.dkfz.de">Zentrale Suche</td>
<td>&check;</td>
</tr>
<tr>
<td>CCP-IT</td>
<td><a href="deployment.ccp-it.dktk.dkfz.de">Deployment-Server</td>
<td>&check;</td>
</tr>
<tr>
<td>CCP-IT</td>
<td><a href="dktk-kne.kgu.de">Zentraler Kontrollnummernerzeuger</td>
<td>&check;</td>
</tr>
<tr>
<td>GBA</td>
<td><a href="https://samplelocator.bbmri.de/icd10">GBA-ICD10</td>
<td>&check;</td>
</tr>
<tr>
<td>GBA</td>
<td><a href="auth.dev.germanbiobanknode.de">GBA-Auth</td>
<td>&check;</td>
</tr>
<tr>
<td>GBA</td>
<td><a href="mdr.germanbiobanknode.de">GBA-MDR</td>
<td>&check;</td>
</tr>
<tr>
<td>GBA</td>
<td><a href="samplelocator.bbmri.de">GBA-Suchbroker</td>
<td>&check;</td>
</tr>
</tbody>
</table>
</div>
<div>
<h3>Local</h3>
<table class="table">
<thead>
<tr>
<th>Project</th>
<th>Services</th>
<th>Status</th>
</tr>
</thead>
<tbody>
<tr>
<td>Monitoring Proxy</td>
<td><a href="http://e260-serv-05:8080/">Traefik</a></td>
<td>&check;</td>
</tr>
<tr>
<td>Monitoring Resources</td>
<td><a href="http://e260-serv-05:8080/grafana">Granfana</a></td>
<td>&check;</td>
</tr>
<tr>
<td>GBA</td>
<td><a href="http://e260-serv-05/gbn-connector/">Connector</a></td>
<td>&check;</td>
</tr>
<tr>
<td>GBA</td>
<td><a href="http://e260-serv-05/gbn-localdatamanagement/fhir">LDM: Blaze</a></td>
<td>&check;</td>
</tr>
<tr>
<td>DKTK</td>
<td><a href="http://e260-serv-05/dktk-connector/">Connector</a></td>
<td>&check;</td>
</tr>
<tr>
<td>DKTK</td>
<td><a href="">CentraXX</a></td>
<td>&check;</td>
</tr>
<tr>
<td>Idmanagement</td>
<td><a href="http://e260-serv-05/ID-Manager/">ID-Manager</a></td>
<td>&check;</td>
</tr>
<tr>
<td>Idmanagement</td>
<td><a href="http://e260-serv-05/Patientenlist/">Patientenliste</a></td>
<td>&check;</td>
</tr>
<tr>
<td>C4</td>
<td><a href="http://e260-serv-05/c4-connector/">Connector</a></td>
<td>&check;</td>
</tr>
<tr>
<td>C4</td>
<td><a href="http://e260-serv-05/c4-localdatamanagement/">LDM: Samply Store</a></td>
<td>&check;</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>

88
lib/generate.sh Executable file
View File

@ -0,0 +1,88 @@
#!/bin/bash
cat > ../landing/index.html <<EOL
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<title>Bridgehead Overview</title>
<!-- Bootstrap core CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"
integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p"
crossorigin="anonymous"></script>
</head>
<body>
<nav class="navbar navbar-light" style="background-color: #aad7f6;">
<h2 class="pb-2 border-bottom">Bridgehead ${site_name}</h2>
</nav>
<div class="container px-4 py-5" id="featured-3">
<div>
<h2>Components</h2>
<h3>Central</h3>
<table class="table">
<thead class="thead-dark">
<tr>
<th style="width: 50%">Group</th>
<th style="width: 50%">Service</th>
</tr>
</thead>
<tbody>
<tr>
<td>CCP-IT</td>
<td><a href="https://patientlist.ccp-it.dktk.dkfz.de">Zentrale Patientenliste</td>
</tr>
<tr>
<td>CCP-IT</td>
<td><a href="https://decentralsearch.ccp-it.dktk.dkfz.de">Dezentrale Suche</td>
</tr>
<tr>
<td>CCP-IT</td>
<td><a href="https://centralsearch.ccp-it.dktk.dkfz.de">Zentrale Suche</td>
</tr>
<tr>
<td>CCP-IT</td>
<td><a href="https://deployment.ccp-it.dktk.dkfz.de">Deployment-Server</td>
</tr>
<tr>
<td>CCP-IT</td>
<td><a href="https://dktk-kne.kgu.de">Zentraler Kontrollnummernerzeuger</td>
</tr>
</tbody>
</table>
</div>
<div>
<h3>Local</h3>
<table class="table">
<thead class="thead-dark">
<tr>
<th style="width: 50%">Project</th>
<th style="width: 50%">Services</th>
</tr>
</thead>
<tbody>
<tr>
<td>Bridgehead</td>
<td>Reverse Proxy <a href="http://e260-serv-05:8080/">Traefik</a></td>
</tr>
<tr>
<td>DKTK</td>
<td><a href="http://e260-serv-05/dktk-localdatamanagement/fhir/">Blaze</a></td>
</tr>
</tbody>
</table>
</div>
<footer class="footer mt-auto py-3 ">
<a href="https://dktk.dkfz.de/"><img src="https://www.oncoray.de/fileadmin/files/bilder_gruppen/DKTK/Logo_DKTK_neu_2016.jpg" height="10%" width="30%"></a> DKTK 2022
</footer>
</body>
</html>
EOL

View File

@ -4,7 +4,7 @@
## Check if user is a su ## Check if user is a su
echo "Welcome to the starting a bridgehead. We will get your instance up and running in no time" echo "Welcome to the starting a bridgehead. We will get your instance up and running in no time"
echo "First we will check if all prerequisites are met ..." echo "First we will check if all prerequisites are met ..."
prerequisites="git docker docker-compose" prerequisites="git docker docker-compose cat"
for prerequisite in $prerequisites; do for prerequisite in $prerequisites; do
$prerequisite --version 2>&1 $prerequisite --version 2>&1
is_available=$? is_available=$?

View File

@ -9,6 +9,8 @@ if ! lib/prerequisites.sh; then
fi fi
source site.conf source site.conf
./lib/generate.sh
log "Starting bridgehead" log "Starting bridgehead"
docker-compose -f ${project}/docker-compose.yml --env-file site-config/${project}.env up -d docker-compose -f ${project}/docker-compose.yml --env-file site-config/${project}.env up -d

View File

@ -6,3 +6,5 @@ source site.conf
log "Stopping bridgehead" log "Stopping bridgehead"
docker-compose -f ${project}/docker-compose.yml --env-file site-config/${project}.env down docker-compose -f ${project}/docker-compose.yml --env-file site-config/${project}.env down
rm landing/index.html