Skip to content

Commit

Permalink
add lifecycleHooks
Browse files Browse the repository at this point in the history
  • Loading branch information
garciagenrique committed Jun 14, 2024
1 parent 0e6eb53 commit 190daea
Showing 1 changed file with 23 additions and 23 deletions.
46 changes: 23 additions & 23 deletions infrastructure/cluster/flux/jhub-dev/jhub-dev-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -127,27 +127,27 @@ spec:
defaultUrl: "/lab"
# The liefcycle hooks are used to create the Rucio configuration file,
# and the token file by copying the REFRESH_TOKEN from the environment variable to the token file.
# lifecycleHooks:
# postStart:
# exec:
# command:
# - "sh"
# - "-c"
# - >
# mkdir -p /certs /tmp;
# echo -n $RUCIO_ACCESS_TOKEN > /tmp/rucio_oauth.token;
# echo -n "oauth2:${EOS_ACCESS_TOKEN}:iam-escape.cloud.cnaf.infn.it/userinfo" > /tmp/eos_oauth.token;
# chmod 0600 /tmp/eos_oauth.token;
# mkdir -p /opt/rucio/etc;
# echo "[client]" >> /opt/rucio/etc/rucio.cfg;
# echo "rucio_host = https://vre-rucio.cern.ch" >> /opt/rucio/etc/rucio.cfg;
# echo "auth_host = https://vre-rucio-auth.cern.ch" >> /opt/rucio/etc/rucio.cfg;
# echo "ca_cert = /certs/rucio_ca.pem" >> /opt/rucio/etc/rucio.cfg;
# echo "account = $JUPYTERHUB_USER" >> /opt/rucio/etc/rucio.cfg;
# echo "auth_type = oidc" >> /opt/rucio/etc/rucio.cfg;
# echo "oidc_audience = rucio" >> /opt/rucio/etc/rucio.cfg;
# echo "oidc_polling = true" >> /opt/rucio/etc/rucio.cfg;
# echo "auth_token_file_path = /tmp/rucio_oauth.token" >> /opt/rucio/etc/rucio.cfg;
lifecycleHooks:
postStart:
exec:
command:
- "sh"
- "-c"
- >
mkdir -p /certs /tmp;
echo -n $RUCIO_ACCESS_TOKEN > /tmp/rucio_oauth.token;
echo -n "oauth2:${EOS_ACCESS_TOKEN}:iam-escape.cloud.cnaf.infn.it/userinfo" > /tmp/eos_oauth.token;
chmod 0600 /tmp/eos_oauth.token;
mkdir -p /opt/rucio/etc;
echo "[client]" >> /opt/rucio/etc/rucio.cfg;
echo "rucio_host = https://vre-rucio.cern.ch" >> /opt/rucio/etc/rucio.cfg;
echo "auth_host = https://vre-rucio-auth.cern.ch" >> /opt/rucio/etc/rucio.cfg;
echo "ca_cert = /certs/rucio_ca.pem" >> /opt/rucio/etc/rucio.cfg;
echo "account = $JUPYTERHUB_USER" >> /opt/rucio/etc/rucio.cfg;
echo "auth_type = oidc" >> /opt/rucio/etc/rucio.cfg;
echo "oidc_audience = rucio" >> /opt/rucio/etc/rucio.cfg;
echo "oidc_polling = true" >> /opt/rucio/etc/rucio.cfg;
echo "auth_token_file_path = /tmp/rucio_oauth.token" >> /opt/rucio/etc/rucio.cfg;
networkPolicy:
enabled: false
Expand Down Expand Up @@ -221,8 +221,8 @@ spec:
RUCIO_DESTINATION_RSE: "CERN-EOS"
# RUCIO_RSE_MOUNT_PATH: "/eos/cern-eos-rse"
# RUCIO_PATH_BEGINS_AT: "2"
# RUCIO_CA_CERT: "/certs/rucio_ca.pem"
# OAUTH2_TOKEN: "FILE:/tmp/eos_oauth.token"
RUCIO_CA_CERT: "/certs/rucio_ca.pem"
OAUTH2_TOKEN: "FILE:/tmp/eos_oauth.token"

ingress:
enabled: true
Expand Down

0 comments on commit 190daea

Please sign in to comment.