From 342f70990139d0cb1cc75399323d6790aecb19d5 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 16 Feb 2022 09:42:53 +0100 Subject: [PATCH] First draft of dktk-fed and many other improvements --- README.md | 50 ++++----- auth/dktk | 0 dktk-fed/docker-compose.yml | 84 ++++++++++++++ dktk/docker-compose.yml | 2 + landing/index.html | 216 ------------------------------------ lib/generate.sh | 88 +++++++++++++++ lib/prerequisites.sh | 2 +- start-bridgehead.sh | 2 + stop-bridgehead.sh | 2 + 9 files changed, 204 insertions(+), 242 deletions(-) create mode 100644 auth/dktk create mode 100644 dktk-fed/docker-compose.yml create mode 100755 lib/generate.sh diff --git a/README.md b/README.md index 432235d..c455e47 100644 --- a/README.md +++ b/README.md @@ -1,44 +1,44 @@ # 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 -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. - - -### 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. +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. ### 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 +### 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 -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. - -Just run the install-bridgehead and thats it. - diff --git a/auth/dktk b/auth/dktk new file mode 100644 index 0000000..e69de29 diff --git a/dktk-fed/docker-compose.yml b/dktk-fed/docker-compose.yml new file mode 100644 index 0000000..92cc932 --- /dev/null +++ b/dktk-fed/docker-compose.yml @@ -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: \ No newline at end of file diff --git a/dktk/docker-compose.yml b/dktk/docker-compose.yml index b45e434..89cc4e3 100644 --- a/dktk/docker-compose.yml +++ b/dktk/docker-compose.yml @@ -56,6 +56,8 @@ services: environment: STORE_URL: ${STORE_URL} POSTGRES_PASSWORD: ${CONNECTOR_POSTGRES_PASS} + PATIENTLIST_URL: "http://bridgehead_patientlist:8080" + PROJECTPSEUDONYMISATION_URL: "http://bridgehead_dktk_idmanager:8080/ID-Manager/html/projectSelection.html" volumes: - "connector_logs:/usr/local/tomcat/logs" depends_on: diff --git a/landing/index.html b/landing/index.html index bc3fad7..e69de29 100644 --- a/landing/index.html +++ b/landing/index.html @@ -1,216 +0,0 @@ - - - - - - - Bridgehead Overview - - - - - - - - - - -
- There is a componente update for your bridgehead. Please run the updater -
- -
- Your Bridgehead was updated! -
- -