Auto generate mappings

This commit is contained in:
janskiba 2023-09-15 09:45:28 +00:00 committed by juarez
parent 62db3c3685
commit 895cd1f67b
2 changed files with 25 additions and 0 deletions

View File

@ -0,0 +1,17 @@
{
"sites": [
{
"id": "$SITE_ID",
"name": "$SITE_ID",
"virtualhost": "opal-$SITE_ID",
"beamconnect": "datashield-connect.$SITE_ID.broker.ccp-it.dktk.dkfz.de"
},
{
"id": "$SITE_ID",
"name": "$SITE_ID",
"virtualhost": "opal-$SITE_ID",
"beamconnect": "datashield-connect.$SITE_ID.broker.ccp-it.dktk.dkfz.de"
}
]
}

View File

@ -12,4 +12,12 @@ if [ "$ENABLE_DATASHIELD" == true ]; then
chown -R bridgehead:docker /tmp/bridgehead/ chown -R bridgehead:docker /tmp/bridgehead/
chmod g+r /tmp/bridgehead/opal-key.pem chmod g+r /tmp/bridgehead/opal-key.pem
fi fi
mkdir -p /tmp/bridgehead/opal-map
jq -n --argfile input ./$PROJECT/modules/datashield-mappings.json '
{
"external": "opal-'"$SITE_ID"'",
"internal": "opal:8080",
"allowed": [$input.sites[].id | "datashield-connect.\(.).broker.ccp-it.dktk.dkfz.de"]
}' > /tmp/bridgehead/opal-map/local.json
cp ./$PROJECT/modules/datashield-mappings.json /tmp/bridgehead/opal-map/central.json
fi fi