refacotr: Restructured passing Patientlist Seeds

This commit is contained in:
Torben Brenner 2023-01-27 11:52:09 +01:00
parent 98afeac701
commit 2445a59785
3 changed files with 5 additions and 26 deletions

View File

@ -31,30 +31,7 @@ services:
- ML_DB_PASS=${PATIENTLIST_POSTGRES_PASSWORD} - ML_DB_PASS=${PATIENTLIST_POSTGRES_PASSWORD}
- ML_API_KEY=${IDMANAGER_LOCAL_PATIENTLIST_APIKEY} - ML_API_KEY=${IDMANAGER_LOCAL_PATIENTLIST_APIKEY}
# Add Variables from /etc/patientlist-id-generators.env # Add Variables from /etc/patientlist-id-generators.env
- ML_BK_IDGENERATOR_RANDOM_1 - PATIENTLIST_SEEDS_TRANSFORMED
- ML_BK_IDGENERATOR_RANDOM_2
- ML_BK_IDGENERATOR_RANDOM_3
- ML_MDS_IDGENERATOR_RANDOM_1
- ML_MDS_IDGENERATOR_RANDOM_2
- ML_MDS_IDGENERATOR_RANDOM_3
- ML_DKTK000001985_IDGENERATOR_RANDOM_1
- ML_DKTK000001985_IDGENERATOR_RANDOM_2
- ML_DKTK000001985_IDGENERATOR_RANDOM_3
- ML_DKTK000001986_IDGENERATOR_RANDOM_1
- ML_DKTK000001986_IDGENERATOR_RANDOM_2
- ML_DKTK000001986_IDGENERATOR_RANDOM_3
- ML_DKTK000001950_IDGENERATOR_RANDOM_1
- ML_DKTK000001950_IDGENERATOR_RANDOM_2
- ML_DKTK000001950_IDGENERATOR_RANDOM_3
- ML_DKTK000001951_IDGENERATOR_RANDOM_1
- ML_DKTK000001951_IDGENERATOR_RANDOM_2
- ML_DKTK000001951_IDGENERATOR_RANDOM_3
- ML_DKTK999999999_IDGENERATOR_RANDOM_1
- ML_DKTK999999999_IDGENERATOR_RANDOM_2
- ML_DKTK999999999_IDGENERATOR_RANDOM_3
- ML_DKTK000002089_IDGENERATOR_RANDOM_1
- ML_DKTK000002089_IDGENERATOR_RANDOM_2
- ML_DKTK000002089_IDGENERATOR_RANDOM_3
labels: labels:
- "traefik.enable=true" - "traefik.enable=true"
- "traefik.http.routers.patientlist.rule=PathPrefix(`/patientlist`)" - "traefik.http.routers.patientlist.rule=PathPrefix(`/patientlist`)"

View File

@ -9,8 +9,8 @@ function idManagementSetup() {
PATIENTLIST_POSTGRES_PASSWORD="$(echo \"id-management-module-db-password-salt\" | openssl rsautl -sign -inkey /etc/bridgehead/pki/${SITE_ID}.priv.pem | base64 | head -c 30)" PATIENTLIST_POSTGRES_PASSWORD="$(echo \"id-management-module-db-password-salt\" | openssl rsautl -sign -inkey /etc/bridgehead/pki/${SITE_ID}.priv.pem | base64 | head -c 30)"
IDMANAGER_LOCAL_PATIENTLIST_APIKEY="$(cat /proc/sys/kernel/random/uuid | sed 's/[-]//g' | head -c 20)" IDMANAGER_LOCAL_PATIENTLIST_APIKEY="$(cat /proc/sys/kernel/random/uuid | sed 's/[-]//g' | head -c 20)"
# Source the ID Generators Configuration # Transform Seeds Configuration to pass it to the Mainzelliste Container
source /etc/bridgehead/patientlist-id-generators.env PATIENTLIST_SEEDS_TRANSFORMED="$(declare -p PATIENTLIST_SEEDS | tr -d '\"' | sed 's/\[/\[\"/g' | sed 's/\]/\"\]/g')"
# Ensure old ids are working !!! # Ensure old ids are working !!!
legacyIdMapping legacyIdMapping

View File

@ -16,10 +16,12 @@ IDMANAGER_SEEDS_BK="<three-numbers>"
IDMANAGER_SEEDS_MDS="<three-numbers>" IDMANAGER_SEEDS_MDS="<three-numbers>"
IDMANAGER_SEEDS_DKTK000001985="<three-numbers>" IDMANAGER_SEEDS_DKTK000001985="<three-numbers>"
``` ```
> NOTE: Additionally, the CCP-IT adds lines declaring the `PATIENTLIST_SEEDS` array in your site configuration. This will contain the seeds for the different id-generators used in all projects.
Once your Bridgehead is updated and restarted, you're all set! Once your Bridgehead is updated and restarted, you're all set!
## Additional information you may want to know ## Additional information you may want to know
### Services ### Services
Upon configuration, the Bridgehead will spawn the following services: Upon configuration, the Bridgehead will spawn the following services: