Skip to content

Teiler and Exporter in BBMRI#312

Merged
Threated merged 4 commits into
developfrom
feature/bbmri-teiler-and-exporter
Jun 5, 2025
Merged

Teiler and Exporter in BBMRI#312
Threated merged 4 commits into
developfrom
feature/bbmri-teiler-and-exporter

Conversation

@djuarezgf
Copy link
Copy Markdown
Member

This PR supersedes #310. It integrates the Teiler and Exporter functionalities into the BBMRI project.

@djuarezgf djuarezgf requested a review from a team as a code owner May 30, 2025 14:05
@djuarezgf djuarezgf force-pushed the feature/bbmri-teiler-and-exporter branch 3 times, most recently from 863d622 to 8ff1e41 Compare May 30, 2025 14:36
Comment thread bbmri/modules/exporter-compose.yml
Comment thread bbmri/modules/exporter-compose.yml
Comment thread bbmri/modules/exporter-setup.sh Outdated
if [ -z "$EXPORTER_USER" ]; then
log "INFO" "Now generating basic auth for the exporter and reporter (see adduser in bridgehead for more information). "
generated_passwd="$(cat /proc/sys/kernel/random/uuid | sed 's/[-]//g' | head -c 32)"
add_basic_auth_user $PROJECT $generated_passwd "EXPORTER_USER" $PROJECT
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We usually generate the basic auth users for traefik in lib/install_bridgehead.sh this has the disadvantage of requiring the admin to run bridgehead install again but doing it that way the EXPORTER_USER is already exported on the next start. I think with this logic you would need to restart the bridgehead one more time as the the env var is not set. Although I guess you could just set it manually here as you know the pw.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We should extend the add user function in the bridgehead script to not require a new install command, but generate Exporter Users. Currently the function only allows LDM_User and NNGM_User

Comment thread bbmri/modules/teiler-setup.sh Outdated
OVERRIDE+=" -f ./$PROJECT/modules/teiler-compose.yml"
TEILER_DEFAULT_LANGUAGE=EN
TEILER_DEFAULT_LANGUAGE_LOWER_CASE=${TEILER_DEFAULT_LANGUAGE,,}
# add_public_oidc_redirect_url "/ccp-teiler/*"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
# add_public_oidc_redirect_url "/ccp-teiler/*"

Comment thread lib/functions.sh Outdated
Comment on lines +304 to +331

if [ "$PROJECT" == "bbmri" ]; then
# If the project is BBMRI, use the BBMRI-ERIC broker and not the GBN broker
proxy_id=$ERIC_PROXY_ID
broker_url=$ERIC_BROKER_URL
broker_id=$ERIC_BROKER_ID
root_crt_file="/srv/docker/bridgehead/bbmri/modules/${ERIC_ROOT_CERT}.root.crt.pem"
else
proxy_id=$PROXY_ID
broker_url=$BROKER_URL
broker_id=$BROKER_ID
root_crt_file="/srv/docker/bridgehead/$PROJECT/root.crt.pem"
fi

mkdir -p /var/cache/bridgehead/secrets/ || fail_and_report 1 "Failed to create '/var/cache/bridgehead/secrets/'. Please run sudo './bridgehead install $PROJECT' again."
touch /var/cache/bridgehead/secrets/oidc
echo $PRIVATEKEYFILENAME
docker run --rm \
-v /var/cache/bridgehead/secrets/oidc:/usr/local/cache \
-v $PRIVATEKEYFILENAME:/run/secrets/privkey.pem:ro \
-v /srv/docker/bridgehead/$PROJECT/root.crt.pem:/run/secrets/root.crt.pem:ro \
-v $root_crt_file:/run/secrets/root.crt.pem:ro \
-v /etc/bridgehead/trusted-ca-certs:/conf/trusted-ca-certs:ro \
-e TLS_CA_CERTIFICATES_DIR=/conf/trusted-ca-certs \
-e NO_PROXY=localhost,127.0.0.1 \
-e ALL_PROXY=$HTTPS_PROXY_FULL_URL \
-e PROXY_ID=$PROXY_ID \
-e BROKER_URL=$BROKER_URL \
-e OIDC_PROVIDER=secret-sync-central.central-secret-sync.$BROKER_ID \
-e PROXY_ID=$proxy_id \
-e BROKER_URL=$broker_url \
-e OIDC_PROVIDER=secret-sync-central.central-secret-sync.$broker_id \
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think I would throw out the special casing for now as its unclear that bbmri will ever automatic oidc enrollment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

That should be part of a different PR, right?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yeah if this even ever happens in bbmri

@djuarezgf djuarezgf force-pushed the feature/bbmri-teiler-and-exporter branch 2 times, most recently from 1863be8 to c1c0723 Compare June 5, 2025 11:46
Comment thread bbmri/vars Outdated
Comment on lines +15 to +16

POSTGRES_TAG=15.6-alpine
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This should not be needed since #313 is merged. If this is rebased on the latest develop you should just be able to remove it

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

#313 specifies Postgres 15.3. It should be fine but please confirm.

@djuarezgf djuarezgf force-pushed the feature/bbmri-teiler-and-exporter branch from da15fbe to 5107c0a Compare June 5, 2025 14:44
Comment thread bbmri/modules/exporter-compose.yml Outdated
Comment thread bbmri/vars Outdated
Comment thread bbmri/modules/exporter-compose.yml Outdated
@Threated Threated merged commit d482324 into develop Jun 5, 2025
@Threated Threated deleted the feature/bbmri-teiler-and-exporter branch June 5, 2025 14:55
mmwaikar pushed a commit that referenced this pull request Jan 28, 2026
Co-authored-by: Jan <59206115+Threated@users.noreply.github.com>
mmwaikar pushed a commit that referenced this pull request Jan 28, 2026
Co-authored-by: Jan <59206115+Threated@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants