From 3c6aa42f88bbd238f730ad0f29f41581db4c550f Mon Sep 17 00:00:00 2001
From: Domenic Gosein <87760323+goseind@users.noreply.github.com>
Date: Mon, 18 Sep 2023 15:05:43 +0200
Subject: [PATCH] add `rucio_jupyterlab` extension default env variables and
 update readme swan-cern/swan-charts#157

---
 swan-cern/README.md   |  2 ++
 swan-cern/values.yaml | 17 ++++++++++++++++-
 2 files changed, 18 insertions(+), 1 deletion(-)

diff --git a/swan-cern/README.md b/swan-cern/README.md
index dc937f27..8e879fa5 100644
--- a/swan-cern/README.md
+++ b/swan-cern/README.md
@@ -124,6 +124,8 @@ $ ssh swan-spare003.cern.ch
 $ /srv/swan-k8s/source/utils/deploy_k8s.sh --env <qa|prod>
 ```
 
+To connect to a Rucio instance for data management, configure `jupyterhub.singleuser.extraEnv` according to the [documentation](https://github.com/rucio/jupyterlab-extension/blob/master/CONFIGURATION.md). The default is to connect to the Rucio [VRE instance](https://github.com/vre-hub) at CERN in *download* mode.
+
 ### Monitoring
 
 Cluster Monitoring
diff --git a/swan-cern/values.yaml b/swan-cern/values.yaml
index 16950853..c66bf7d1 100644
--- a/swan-cern/values.yaml
+++ b/swan-cern/values.yaml
@@ -73,7 +73,22 @@ swan:
         guarantee: 1
       extraEnv:
         # Enable HTCondor service configuration for CERN in the user image
-        CERN_HTCONDOR: "true"   
+        CERN_HTCONDOR: "true"
+        # Rucio configuration
+        RUCIO_MODE: "download"
+        RUCIO_WILDCARD_ENABLED: "1"
+        RUCIO_BASE_URL: "https://vre-rucio.cern.ch"
+        RUCIO_AUTH_URL: "https://vre-rucio-auth.cern.ch"
+        RUCIO_WEBUI_URL: "https://vre-rucio-ui.cern.ch"
+        RUCIO_DISPLAY_NAME: "CERN VRE"
+        RUCIO_NAME: "vre"
+        RUCIO_SITE_NAME: "CERN"
+        RUCIO_VOMS_ENABLED: "1"
+        RUCIO_VOMS_VOMSES_PATH: "/etc/vomses"
+        RUCIO_VOMS_CERTDIR_PATH: "/etc/grid-security/certificates"
+        RUCIO_VOMS_VOMSDIR_PATH: "/etc/grid-security/vomsdir"
+        RUCIO_CA_CERT: "/opt/rucio/rucio_ca.pem"
+        RUCIO_DEFAULT_INSTANCE: "vre"
     scheduling:
       userPods:
         nodeAffinity: