From 6b4480c54bae41ebcf92b5584c58f263c6377c9e Mon Sep 17 00:00:00 2001
From: "p.delpy@dkfz-heidelberg.de"
Date: Wed, 17 Jul 2024 09:53:08 +0200
Subject: [PATCH 1/2] workaround: add second blaze
---
ccp/modules/blaze-secondary-compose.yml | 27 +++++++++++++++++++++++++
ccp/modules/blaze-secondary-setup.sh | 11 ++++++++++
ccp/vars | 1 +
3 files changed, 39 insertions(+)
create mode 100644 ccp/modules/blaze-secondary-compose.yml
create mode 100644 ccp/modules/blaze-secondary-setup.sh
diff --git a/ccp/modules/blaze-secondary-compose.yml b/ccp/modules/blaze-secondary-compose.yml
new file mode 100644
index 0000000..f3f4752
--- /dev/null
+++ b/ccp/modules/blaze-secondary-compose.yml
@@ -0,0 +1,27 @@
+version: "3.7"
+
+services:
+ blaze-secondary:
+ image: docker.verbis.dkfz.de/cache/samply/blaze:0.28
+ container_name: bridgehead-ccp-blaze-secondary
+ environment:
+ BASE_URL: "http://bridgehead-ccp-blaze-secondary:8080"
+ JAVA_TOOL_OPTIONS: "-Xmx${BLAZE_MEMORY_CAP:-4096}m"
+ DB_RESOURCE_CACHE_SIZE: ${BLAZE_RESOURCE_CACHE_CAP:-2500000}
+ DB_BLOCK_CACHE_SIZE: $BLAZE_MEMORY_CAP
+ ENFORCE_REFERENTIAL_INTEGRITY: "false"
+ volumes:
+ - "blaze-secondary-data:/app/data"
+ labels:
+ - "traefik.enable=true"
+ - "traefik.http.routers.blaze-secondary_ccp.rule=PathPrefix(`/ccp-localdatamanagement-secondary`)"
+ - "traefik.http.middlewares.ccp_b-secondary_strip.stripprefix.prefixes=/ccp-localdatamanagement-secondary"
+ - "traefik.http.services.blaze-secondary_ccp.loadbalancer.server.port=8080"
+ - "traefik.http.routers.blaze-secondary_ccp.middlewares=ccp_b-secondary_strip,auth"
+ - "traefik.http.routers.blaze-secondary_ccp.tls=true"
+ obds2fhir-rest:
+ environment:
+ STORE_PATH: ${STORE_PATH:-http://blaze:8080/fhir}
+
+volumes:
+ blaze-secondary-data:
\ No newline at end of file
diff --git a/ccp/modules/blaze-secondary-setup.sh b/ccp/modules/blaze-secondary-setup.sh
new file mode 100644
index 0000000..307da01
--- /dev/null
+++ b/ccp/modules/blaze-secondary-setup.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+function blazeSecondarySetup() {
+ if [ -n "$ENABLE_SECONDARY_BLAZE" ]; then
+ log INFO "Secondary Blaze setup detected -- will start second blaze."
+ OVERRIDE+=" -f ./$PROJECT/modules/blaze-secondary-compose.yml"
+ #make oBDS2FHIR ignore ID-Management and replace target Blaze
+ PATIENTLIST_URL=" "
+ STORE_PATH="http://blaze-secondary:8080/fhir"
+ fi
+}
diff --git a/ccp/vars b/ccp/vars
index 080b134..0900914 100644
--- a/ccp/vars
+++ b/ccp/vars
@@ -29,3 +29,4 @@ done
idManagementSetup
mtbaSetup
obds2fhirRestSetup
+blazeSecondarySetup
\ No newline at end of file
From 293810f2541bf104b6ba7ef26ea6d1aaf9949162 Mon Sep 17 00:00:00 2001
From: djuarezgf
Date: Thu, 18 Jul 2024 09:54:16 +0200
Subject: [PATCH 2/2] Added: exporter with blaze-secondary
---
ccp/modules/blaze-secondary-compose.yml | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/ccp/modules/blaze-secondary-compose.yml b/ccp/modules/blaze-secondary-compose.yml
index f3f4752..b57bfbe 100644
--- a/ccp/modules/blaze-secondary-compose.yml
+++ b/ccp/modules/blaze-secondary-compose.yml
@@ -19,9 +19,14 @@ services:
- "traefik.http.services.blaze-secondary_ccp.loadbalancer.server.port=8080"
- "traefik.http.routers.blaze-secondary_ccp.middlewares=ccp_b-secondary_strip,auth"
- "traefik.http.routers.blaze-secondary_ccp.tls=true"
+
obds2fhir-rest:
environment:
STORE_PATH: ${STORE_PATH:-http://blaze:8080/fhir}
+ exporter:
+ environment:
+ BLAZE_HOST: "blaze-secondary"
+
volumes:
- blaze-secondary-data:
\ No newline at end of file
+ blaze-secondary-data: