Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: use project overarching vars #239

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bbmri/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version: "3.7"

services:
blaze:
image: docker.verbis.dkfz.de/cache/samply/blaze:0.28
image: docker.verbis.dkfz.de/cache/samply/blaze:${BLAZE_TAG}
container_name: bridgehead-bbmri-blaze
environment:
BASE_URL: "http://bridgehead-bbmri-blaze:8080"
Expand Down
1 change: 1 addition & 0 deletions bbmri/vars
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
FOCUS_RETRY_COUNT=${FOCUS_RETRY_COUNT:-64}
PRIVATEKEYFILENAME=/etc/bridgehead/pki/${SITE_ID}.priv.pem

source vars
for module in $PROJECT/modules/*.sh
do
log DEBUG "sourcing $module"
Expand Down
2 changes: 1 addition & 1 deletion bridgehead
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ loadVars() {
fetchVarsFromVaultByFile /etc/bridgehead/$PROJECT.conf || fail_and_report 1 "Unable to fetchVarsFromVaultByFile"
setHostname
optimizeBlazeMemoryUsage
[ -e ./$PROJECT/vars ] && source ./$PROJECT/vars
[ -e ./$PROJECT/vars ] && source ./$PROJECT/vars ./vars
TKussel marked this conversation as resolved.
Show resolved Hide resolved
Copy link
Member

@Threated Threated Oct 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the source of ./vars should happen before the more specific project vars so that they can override the default and get set regardless of project vars existing or not

set +a

OVERRIDE=${OVERRIDE:=""}
Expand Down
2 changes: 1 addition & 1 deletion cce/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: "3.7"

services:
blaze:
image: docker.verbis.dkfz.de/cache/samply/blaze:0.28
image: docker.verbis.dkfz.de/cache/samply/blaze:${BLAZE_TAG}
container_name: bridgehead-cce-blaze
environment:
BASE_URL: "http://bridgehead-cce-blaze:8080"
Expand Down
1 change: 1 addition & 0 deletions cce/vars
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ [email protected]
PRIVATEKEYFILENAME=/etc/bridgehead/pki/${SITE_ID}.priv.pem
BROKER_URL_FOR_PREREQ=$BROKER_URL

source vars
for module in $PROJECT/modules/*.sh
do
log DEBUG "sourcing $module"
Expand Down
2 changes: 1 addition & 1 deletion ccp/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: "3.7"

services:
blaze:
image: docker.verbis.dkfz.de/cache/samply/blaze:0.28
image: docker.verbis.dkfz.de/cache/samply/blaze:${BLAZE_TAG}
container_name: bridgehead-ccp-blaze
environment:
BASE_URL: "http://bridgehead-ccp-blaze:8080"
Expand Down
5 changes: 3 additions & 2 deletions ccp/modules/blaze-secondary-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@ version: "3.7"

services:
blaze-secondary:
image: docker.verbis.dkfz.de/cache/samply/blaze:0.28
image: docker.verbis.dkfz.de/cache/samply/blaze:${BLAZE_TAG}
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
DB_BLOCK_CACHE_SIZE: ${BLAZE_MEMORY_CAP}
CQL_EXPR_CACHE_SIZE: ${BLAZE_CQL_CACHE_CAP:-32}
ENFORCE_REFERENTIAL_INTEGRITY: "false"
volumes:
- "blaze-secondary-data:/app/data"
Expand Down
3 changes: 1 addition & 2 deletions ccp/vars
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ OIDC_URL="https://login.verbis.dkfz.de"
OIDC_ISSUER_URL="${OIDC_URL}/realms/${OIDC_REALM}"
OIDC_GROUP_CLAIM="groups"

POSTGRES_TAG=15.6-alpine

source vars
for module in $PROJECT/modules/*.sh
do
log DEBUG "sourcing $module"
Expand Down
4 changes: 2 additions & 2 deletions dhki/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: "3.7"

services:
blaze:
image: docker.verbis.dkfz.de/cache/samply/blaze:0.28
image: docker.verbis.dkfz.de/cache/samply/blaze:${BLAZE_TAG}
container_name: bridgehead-dhki-blaze
environment:
BASE_URL: "http://bridgehead-dhki-blaze:8080"
Expand Down Expand Up @@ -39,7 +39,7 @@ services:
- "blaze"

beam-proxy:
image: docker.verbis.dkfz.de/cache/samply/beam-proxy:develop
image: docker.verbis.dkfz.de/cache/samply/beam-proxy:${BEAM_TAG}
container_name: bridgehead-beam-proxy
environment:
BROKER_URL: ${BROKER_URL}
Expand Down
3 changes: 1 addition & 2 deletions dhki/vars
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ PRIVATEKEYFILENAME=/etc/bridgehead/pki/${SITE_ID}.priv.pem

BROKER_URL_FOR_PREREQ=$BROKER_URL

POSTGRES_TAG=15.6-alpine

source vars
for module in ccp/modules/*.sh
do
log DEBUG "sourcing $module"
Expand Down
2 changes: 1 addition & 1 deletion itcc/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: "3.7"

services:
blaze:
image: docker.verbis.dkfz.de/cache/samply/blaze:0.28
image: docker.verbis.dkfz.de/cache/samply/blaze:${BLAZE_TAG}
container_name: bridgehead-itcc-blaze
environment:
BASE_URL: "http://bridgehead-itcc-blaze:8080"
Expand Down
1 change: 1 addition & 0 deletions itcc/vars
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ [email protected]
PRIVATEKEYFILENAME=/etc/bridgehead/pki/${SITE_ID}.priv.pem
BROKER_URL_FOR_PREREQ=$BROKER_URL

source vars
for module in $PROJECT/modules/*.sh
do
log DEBUG "sourcing $module"
Expand Down
4 changes: 2 additions & 2 deletions kr/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ services:
replicas: 0 #deactivate landing page

blaze:
image: docker.verbis.dkfz.de/cache/samply/blaze:0.28
image: docker.verbis.dkfz.de/cache/samply/blaze:${BLAZE_TAG}
container_name: bridgehead-kr-blaze
environment:
BASE_URL: "http://bridgehead-kr-blaze:8080"
Expand Down Expand Up @@ -40,7 +40,7 @@ services:
- "blaze"

beam-proxy:
image: docker.verbis.dkfz.de/cache/samply/beam-proxy:develop
image: docker.verbis.dkfz.de/cache/samply/beam-proxy:${BEAM_TAG}
container_name: bridgehead-beam-proxy
environment:
BROKER_URL: ${BROKER_URL}
Expand Down
15 changes: 0 additions & 15 deletions kr/modules/exporter.md

This file was deleted.

19 changes: 0 additions & 19 deletions kr/modules/teiler.md

This file was deleted.

1 change: 1 addition & 0 deletions kr/vars
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ [email protected]
PRIVATEKEYFILENAME=/etc/bridgehead/pki/${SITE_ID}.priv.pem
BROKER_URL_FOR_PREREQ=$BROKER_URL

source vars
for module in $PROJECT/modules/*.sh
do
log DEBUG "sourcing $module"
Expand Down
6 changes: 3 additions & 3 deletions lib/functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -170,11 +170,11 @@ optimizeBlazeMemoryUsage() {
available_system_memory_chunks=$((BLAZE_MEMORY_CAP / 1000))
if [ $available_system_memory_chunks -eq 0 ]; then
log WARN "Only ${BLAZE_MEMORY_CAP} system memory available for Blaze. If your Blaze stores more than 128000 fhir ressources it will run significally slower."
export BLAZE_RESOURCE_CACHE_CAP=128000;
export BLAZE_CQL_CACHE_CAP=32;
export BLAZE_RESOURCE_CACHE_CAP=128000
export BLAZE_CQL_CACHE_CAP=32
else
export BLAZE_RESOURCE_CACHE_CAP=$((available_system_memory_chunks * 312500))
export BLAZE_CQL_CACHE_CAP=$((($system_memory_in_mb/4)/16));
export BLAZE_CQL_CACHE_CAP=$((($system_memory_in_mb/4)/16))
fi
fi
}
Expand Down
6 changes: 3 additions & 3 deletions lib/prepare-system.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ case "$PROJECT" in
;;
itcc)
site_configuration_repository_middle="git.verbis.dkfz.de/itcc-sites/"
;;
dhki)
site_configuration_repository_middle="git.verbis.dkfz.de/dhki/"
;;
dhki)
site_configuration_repository_middle="git.verbis.dkfz.de/dhki/"
;;
kr)
site_configuration_repository_middle="git.verbis.dkfz.de/krebsregister-sites/"
Expand Down
2 changes: 1 addition & 1 deletion lib/prerequisites.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ fi
log INFO "Checking network access ($BROKER_URL_FOR_PREREQ) ..."

source "${CONFIG_DIR}${PROJECT}".conf
source ${PROJECT}/vars
source ${PROJECT}/vars vars

if [ "${PROJECT}" != "minimal" ]; then
set +e
Expand Down
2 changes: 2 additions & 0 deletions minimal/vars
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@

source vars
for module in $PROJECT/modules/*.sh
do
log DEBUG "sourcing $module"
Expand Down
2 changes: 2 additions & 0 deletions vars
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BEAM_TAG is missing?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not too happy about having different places where the tags are set, but we can tackle that in the future as it touches the Environment topic.

Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
BLAZE_TAG=0.28
POSTGRES_TAG=15.6-alpine