mirror of https://github.com/samply/bridgehead.git
Added readme and improved systemd scripts
This commit is contained in:
parent
4f406a96c8
commit
f9f72cbe9a
20
README.md
20
README.md
|
@ -1 +1,21 @@
|
||||||
# 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.
|
||||||
|
|
||||||
|
There are some prerequisites, which need to be meet befor starting a bridgehead.
|
||||||
|
|
||||||
|
The first step is to copy the site.conf file. 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.
|
||||||
|
|
||||||
|
The next step is creating a configuration for your bridghead. We can provide you a configuration git repository for bridgehead, just ask us. When you have a DKTK or C4 Bridgehead you propably need some configuration from us anyways.
|
||||||
|
|
||||||
|
git submodule add -f https://"$git_username":"$git_access_token"@code.mitro.dkfz.de/scm/bd/"$site_name_lowercase"-config.git ./site-config
|
||||||
|
|
||||||
|
If you want to manage the configuration your self you need to copy a env file from the respective project folder into a site-config folder.
|
||||||
|
|
||||||
|
Step 3 is determind your prefered start method. You can can just start the docker container with start-bridgehead and stop it. Alternatively, we advice to use the install script. This script add a systemd service to your system which starts the bridgehead, it also stops and starts the system in the event of a reboot. Also it contains a service for automatic updating your bridgehead. It will check at 3:00 am if there are any updates and will apply them.
|
||||||
|
|
||||||
|
Step 4 is checking your bridgehead.
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -21,8 +21,8 @@ secrets:
|
||||||
|
|
||||||
services:
|
services:
|
||||||
connector:
|
connector:
|
||||||
container_name: c4_connector
|
container_name: bridgehead_c4_connector
|
||||||
image: samply/share-client:${PROJECT}-develop
|
image: "samply/share-client:c4-7"
|
||||||
environment:
|
environment:
|
||||||
SITE: ${SITE}
|
SITE: ${SITE}
|
||||||
SITEID: ${SITEID}
|
SITEID: ${SITEID}
|
||||||
|
@ -58,6 +58,7 @@ services:
|
||||||
- "${HOST}:${HOSTIP}"
|
- "${HOST}:${HOSTIP}"
|
||||||
|
|
||||||
connector_db:
|
connector_db:
|
||||||
|
container_name: bridgehead_connector_db
|
||||||
image: postgres:10.17
|
image: postgres:10.17
|
||||||
environment:
|
environment:
|
||||||
POSTGRES_DB: ${CONNECTOR_POSTGRES_DB}
|
POSTGRES_DB: ${CONNECTOR_POSTGRES_DB}
|
||||||
|
@ -73,7 +74,7 @@ services:
|
||||||
|
|
||||||
## ID-Management
|
## ID-Management
|
||||||
idmanager:
|
idmanager:
|
||||||
container_name: idmanager
|
container_name: bridehead_idmanager
|
||||||
image: docker.verbis.dkfz.de/pseudonymisierung/magicpl:release-0.2.0
|
image: docker.verbis.dkfz.de/pseudonymisierung/magicpl:release-0.2.0
|
||||||
environment:
|
environment:
|
||||||
TOMCAT_REVERSEPROXY_FQDN: ${HOST}/ID-Manager
|
TOMCAT_REVERSEPROXY_FQDN: ${HOST}/ID-Manager
|
||||||
|
@ -104,47 +105,8 @@ services:
|
||||||
depends_on:
|
depends_on:
|
||||||
- patientlist
|
- patientlist
|
||||||
|
|
||||||
patientlist:
|
|
||||||
container_name: patientlist
|
|
||||||
image: medicalinformatics/mainzelliste:develop
|
|
||||||
environment:
|
|
||||||
TOMCAT_REVERSEPROXY_FQDN: ${HOST}/Patientlist
|
|
||||||
TOMCAT_REVERSEPROXY_SCHEME: ${PROTOCOL}
|
|
||||||
TOMCAT_REVERSEPROXY_PORT: ${PORT}
|
|
||||||
ML_DB_DRIVER: org.postgresql.Driver
|
|
||||||
ML_DB_TYPE: postgresql
|
|
||||||
ML_DB_HOST: patientlist_db
|
|
||||||
ML_DB_PORT: 5432
|
|
||||||
ML_DB_NAME: ${ML_DB_NAME}
|
|
||||||
ML_DB_USER: ${ML_DB_USER}
|
|
||||||
ML_DB_PASS: ${LOCAL_PATIENTLIST_DBPASS}
|
|
||||||
ML_API_KEY: ${LOCAL_IDMANAGER_MAINZELLISTE_APIKEY}
|
|
||||||
ML_LOG_LEVEL: warning
|
|
||||||
ML_SITE: ${SITEID}
|
|
||||||
TZ: Europe/Berlin
|
|
||||||
env_file:
|
|
||||||
- ./site-config/patientlist.env
|
|
||||||
volumes:
|
|
||||||
- "patientlist_logs:/usr/local/tomcat/logs"
|
|
||||||
secrets:
|
|
||||||
- mainzelliste.docker.conf
|
|
||||||
- centralSearchPublicKey
|
|
||||||
depends_on:
|
|
||||||
- patientlist_db
|
|
||||||
|
|
||||||
patientlist_db:
|
|
||||||
container_name: patientlist_db
|
|
||||||
image: postgres:13.1-alpine
|
|
||||||
environment:
|
|
||||||
POSTGRES_DB: ${ML_DB_NAME}
|
|
||||||
POSTGRES_USER: ${ML_DB_USER}
|
|
||||||
POSTGRES_PASSWORD: ${C4_LOCAL_PATIENTLIST_DBPASS}
|
|
||||||
TZ: Europe/Berlin
|
|
||||||
volumes:
|
|
||||||
- "patientlist_db_data:/var/lib/postgresql/data"
|
|
||||||
networks:
|
|
||||||
- idmanagement
|
|
||||||
store:
|
store:
|
||||||
|
container_name: bridgehead_store
|
||||||
image: docker.verbis.dkfz.de/ccp/samply.store:release-5.1.2
|
image: docker.verbis.dkfz.de/ccp/samply.store:release-5.1.2
|
||||||
environment:
|
environment:
|
||||||
MDR_URL: ${CCP_MDR_URL}
|
MDR_URL: ${CCP_MDR_URL}
|
||||||
|
@ -163,6 +125,7 @@ store:
|
||||||
restart: always
|
restart: always
|
||||||
|
|
||||||
store_db:
|
store_db:
|
||||||
|
container_name: bridgehead_store_db
|
||||||
image: postgres:10.17
|
image: postgres:10.17
|
||||||
command: postgres -c datestyle='iso, dmy'
|
command: postgres -c datestyle='iso, dmy'
|
||||||
environment:
|
environment:
|
||||||
|
|
|
@ -19,7 +19,7 @@ secrets:
|
||||||
|
|
||||||
services:
|
services:
|
||||||
connector:
|
connector:
|
||||||
container_name: dktk_connector
|
container_name: bridgehead_dktk_connector
|
||||||
image: samply/share-client:dktk-develop
|
image: samply/share-client:dktk-develop
|
||||||
environment:
|
environment:
|
||||||
SITE: ${SITE}
|
SITE: ${SITE}
|
||||||
|
@ -57,6 +57,7 @@ services:
|
||||||
- "${HOST}:${HOSTIP}"
|
- "${HOST}:${HOSTIP}"
|
||||||
|
|
||||||
connector_db:
|
connector_db:
|
||||||
|
container_name: bridgead_connector_db
|
||||||
image: postgres:10.17
|
image: postgres:10.17
|
||||||
environment:
|
environment:
|
||||||
POSTGRES_DB: ${CONNECTOR_POSTGRES_DB}
|
POSTGRES_DB: ${CONNECTOR_POSTGRES_DB}
|
||||||
|
@ -72,7 +73,7 @@ services:
|
||||||
|
|
||||||
## ID-Management
|
## ID-Management
|
||||||
idmanager:
|
idmanager:
|
||||||
container_name: idmanager
|
container_name: bridgehead_idmanager
|
||||||
image: docker.verbis.dkfz.de/pseudonymisierung/magicpl:release-0.2.0
|
image: docker.verbis.dkfz.de/pseudonymisierung/magicpl:release-0.2.0
|
||||||
environment:
|
environment:
|
||||||
TOMCAT_REVERSEPROXY_FQDN: ${HOST}/ID-Manager
|
TOMCAT_REVERSEPROXY_FQDN: ${HOST}/ID-Manager
|
||||||
|
@ -104,7 +105,7 @@ services:
|
||||||
- patientlist
|
- patientlist
|
||||||
|
|
||||||
patientlist:
|
patientlist:
|
||||||
container_name: patientlist
|
container_name: bridgehead_patientlist
|
||||||
image: medicalinformatics/mainzelliste:develop
|
image: medicalinformatics/mainzelliste:develop
|
||||||
environment:
|
environment:
|
||||||
TOMCAT_REVERSEPROXY_FQDN: ${HOST}/Patientlist
|
TOMCAT_REVERSEPROXY_FQDN: ${HOST}/Patientlist
|
||||||
|
@ -132,7 +133,7 @@ services:
|
||||||
- patientlist_db
|
- patientlist_db
|
||||||
|
|
||||||
patientlist_db:
|
patientlist_db:
|
||||||
container_name: patientlist_db
|
container_name: bridgehead_patientlist_db
|
||||||
image: postgres:13.1-alpine
|
image: postgres:13.1-alpine
|
||||||
environment:
|
environment:
|
||||||
POSTGRES_DB: ${ML_DB_NAME}
|
POSTGRES_DB: ${ML_DB_NAME}
|
||||||
|
|
|
@ -2,7 +2,7 @@ version: '3.4'
|
||||||
services:
|
services:
|
||||||
|
|
||||||
store:
|
store:
|
||||||
container_name: "store"
|
container_name: "bridgehead_blaze_store"
|
||||||
image: "samply/blaze:0.15"
|
image: "samply/blaze:0.15"
|
||||||
environment:
|
environment:
|
||||||
BASE_URL: "http://store:8080"
|
BASE_URL: "http://store:8080"
|
||||||
|
@ -16,7 +16,7 @@ services:
|
||||||
restart: "always"
|
restart: "always"
|
||||||
|
|
||||||
connector:
|
connector:
|
||||||
container_name: "connector"
|
container_name: "bridgehead_connector"
|
||||||
image: "samply/share-client:gbn-7"
|
image: "samply/share-client:gbn-7"
|
||||||
environment:
|
environment:
|
||||||
POSTGRES_HOST: "connector-db"
|
POSTGRES_HOST: "connector-db"
|
||||||
|
@ -36,7 +36,7 @@ services:
|
||||||
restart: "always"
|
restart: "always"
|
||||||
|
|
||||||
connector-db:
|
connector-db:
|
||||||
container_name: "connector-db"
|
container_name: "bridgehead_connector-db"
|
||||||
image: "postgres:10.17"
|
image: "postgres:10.17"
|
||||||
environment:
|
environment:
|
||||||
POSTGRES_USER: "samply"
|
POSTGRES_USER: "samply"
|
||||||
|
|
|
@ -14,14 +14,14 @@ echo "Installing bridgehead\@.update.service in systemd ..."
|
||||||
sudo cp /srv/docker/bridgehead/convenience/bridgehead-update\@.service ./
|
sudo cp /srv/docker/bridgehead/convenience/bridgehead-update\@.service ./
|
||||||
sudo cp /srv/docker/bridgehead/convenience/bridgehead-update\@.timer ./
|
sudo cp /srv/docker/bridgehead/convenience/bridgehead-update\@.timer ./
|
||||||
|
|
||||||
echo "Loading the bridgehead and traefik service definitions in systemd"
|
echo "Loading the bridgehead definitions in systemd"
|
||||||
sudo systemctl daemon-reload
|
sudo systemctl daemon-reload
|
||||||
|
|
||||||
|
|
||||||
echo "Starting Project ${project} "
|
echo "Starting Project ${project} "
|
||||||
if [ ! -f "/etc/systemd/system/bridgehead@${project}.service.d/bridgehead.conf" ]; then
|
if [ ! -f "/etc/systemd/system/bridgehead@${project}.service.d/bridgehead.conf" ]; then
|
||||||
echo "Can't find local configuration file for bridgehead@${project} service. Please ensure that the file /etc/systemd/system/bridgehead@${project}.service.d/bridgehead.conf exists"
|
echo "Can't find local configuration file for bridgehead@${project} service. Please ensure that the file /etc/systemd/system/bridgehead@${project}.service.d/bridgehead.conf exists"
|
||||||
continue
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
sudo systemctl is-active --quiet bridgehead@"${project}"
|
sudo systemctl is-active --quiet bridgehead@"${project}"
|
||||||
|
|
|
@ -4,3 +4,11 @@ source site.conf
|
||||||
|
|
||||||
systemctl stop bridgehead@"${project}".service
|
systemctl stop bridgehead@"${project}".service
|
||||||
systemctl stop bridgehead-update@"${project}".timer
|
systemctl stop bridgehead-update@"${project}".timer
|
||||||
|
systemctl stop bridgehead-update@"${project}".service
|
||||||
|
|
||||||
|
cd /etc/systemd/system/
|
||||||
|
rm bridgehead\@.service
|
||||||
|
rm bridgehead-update\@.timer
|
||||||
|
rm bridgehead-update\@.service
|
||||||
|
|
||||||
|
cd -
|
||||||
|
|
Loading…
Reference in New Issue