From 6f8d2b396397b092372355b4134ceb07a2878c34 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jarom=C3=ADr=20Hradil?= <jaromir.hradil@cesnet.cz>
Date: Tue, 26 Nov 2024 13:27:47 +0100
Subject: [PATCH] Adding latest Hub5 + RTC upgrade into testing + devel

---
 eosc-devel/deployments/fullhub.yaml | 14 +++----
 eosc-testing/deployments/hub.yaml   | 61 +++--------------------------
 2 files changed, 11 insertions(+), 64 deletions(-)

diff --git a/eosc-devel/deployments/fullhub.yaml b/eosc-devel/deployments/fullhub.yaml
index 097cef7..8113e5e 100644
--- a/eosc-devel/deployments/fullhub.yaml
+++ b/eosc-devel/deployments/fullhub.yaml
@@ -67,11 +67,11 @@ singleuser:
       kubespawner_override:
         args:
           - "--CondaKernelSpecManager.env_filter='/opt/conda$'"
+        environment:
+          JUPYTERHUB_ALLOW_TOKEN_IN_URL: "1"
         image: "valtri/single-user:jupyter-4e-collab"
         extra_annotations:
           "egi.eu/flavor": "small-environment-2-vcpu-4-gb-ram"
-        #Removes OIDC token mount in notebooks container
-        mount_secrets_volume: false
     - display_name: Small Environment - 2 vCPU / 4 GB RAM
       description: >
         The notebook environment includes Python, R, Julia and Octave kernels.
@@ -150,12 +150,10 @@ singleuser:
         #
         /usr/local/bin/jupyterhub-wait-remote-home
 
-        # Disables RTC extension. To enable it set this env variable in kubespawner_override
-        # to JUPYTERHUB_ALLOW_TOKEN_IN_URL="1"
-        if [ -z "$JUPYTERHUB_ALLOW_TOKEN_IN_URL" ]; then
-          jupyter-labextension  disable @jupyter/collaboration-extension
-          jupyter-labextension lock @jupyter/collaboration-extension
-        fi
+        # Disables RTC and RTC ui extensions by default.
+        jupyter-labextension disable @jupyter/collaboration-extension
+        jupyter-labextension disable @jupyter/docprovider-extension
+
 
         cd .
         exec jupyterhub-singleuser \
diff --git a/eosc-testing/deployments/hub.yaml b/eosc-testing/deployments/hub.yaml
index a7b5f6e..b349199 100644
--- a/eosc-testing/deployments/hub.yaml
+++ b/eosc-testing/deployments/hub.yaml
@@ -54,50 +54,6 @@ singleuser:
     tag: "sha-7052495"
   profileList:
     - display_name: Small Environment - 2 vCPU / 4 GB RAM
-      description: >
-        The notebook environment includes Python, R, Julia and Octave kernels.
-      default: true
-      kubespawner_override:
-        args:
-          - "--CondaKernelSpecManager.env_filter='/opt/conda$'"
-        extra_annotations:
-          "egi.eu/flavor": "small-environment-2-vcpu-4-gb-ram"
-      vo_claims:
-        - urn:geant:eosc-federation.eu:res:notebooks.open-science-cloud.ec.europa.eu:2-vcpu-4-gb-ram:act:ppa
-    - display_name: Medium Environment - 4 vCPU / 8 GB RAM
-      description: >
-        The notebook environment includes Python, R, Julia and Octave kernels.
-      kubespawner_override:
-        args:
-          - "--CondaKernelSpecManager.env_filter='/opt/conda$'"
-        extra_annotations:
-          "egi.eu/flavor": "medium-environment-4-vcpu-8-gb-ram"
-        cpu_guarantee: 0.4
-        cpu_limit: 4
-        mem_guarantee: 1G
-        mem_limit: 8G
-      vo_claims:
-        - urn:geant:eosc-federation.eu:res:notebooks.open-science-cloud.ec.europa.eu:4-vcpu-8-gb-ram:act:ppa
-    - display_name: Large Environment - 8 vCPU / 16 GB RAM / GPU
-      description: >
-        The notebook environment includes Python, R, Julia and Octave kernels with GPU.
-      kubespawner_override:
-        args:
-          - "--CondaKernelSpecManager.env_filter='/opt/conda$'"
-        cpu_guarantee: 0.8
-        cpu_limit: 8
-        mem_guarantee: 2G
-        mem_limit: 16G
-        extra_annotations:
-          "egi.eu/flavor": "large-environment-8-vcpu-16-gb-ram-gpu"
-        extra_resource_guarantees:
-          nvidia.com/gpu: 1
-        extra_resource_limits:
-          nvidia.com/gpu: 1
-      vo_claims:
-        - urn:geant:eosc-federation.eu:res:notebooks.open-science-cloud.ec.europa.eu:8-vcpu-16-gb-ram-gpu:act:ppa
-    #RTC images
-    - display_name: Small Environment - 2 vCPU / 4 GB RAM  (Real-time Collaboration)
       description: >
         The notebook environment includes Python, R, Julia and Octave kernels.
       default: true
@@ -108,11 +64,9 @@ singleuser:
           JUPYTERHUB_ALLOW_TOKEN_IN_URL: "1"
         extra_annotations:
           "egi.eu/flavor": "small-environment-2-vcpu-4-gb-ram"
-        #Removes OIDC token mount in notebooks container
-        mount_secrets_volume: false
       vo_claims:
         - urn:geant:eosc-federation.eu:res:notebooks.open-science-cloud.ec.europa.eu:2-vcpu-4-gb-ram:act:ppa
-    - display_name: Medium Environment - 4 vCPU / 8 GB RAM  (Real-time Collaboration)
+    - display_name: Medium Environment - 4 vCPU / 8 GB RAM
       description: >
         The notebook environment includes Python, R, Julia and Octave kernels.
       kubespawner_override:
@@ -126,10 +80,9 @@ singleuser:
         cpu_limit: 4
         mem_guarantee: 1G
         mem_limit: 8G
-        mount_secrets_volume: false
       vo_claims:
         - urn:geant:eosc-federation.eu:res:notebooks.open-science-cloud.ec.europa.eu:4-vcpu-8-gb-ram:act:ppa
-    - display_name: Large Environment - 8 vCPU / 16 GB RAM / GPU  (Real-time Collaboration)
+    - display_name: Large Environment - 8 vCPU / 16 GB RAM / GPU
       description: >
         The notebook environment includes Python, R, Julia and Octave kernels with GPU.
       kubespawner_override:
@@ -147,7 +100,6 @@ singleuser:
           nvidia.com/gpu: 1
         extra_resource_limits:
           nvidia.com/gpu: 1
-        mount_secrets_volume: false
       vo_claims:
         - urn:geant:eosc-federation.eu:res:notebooks.open-science-cloud.ec.europa.eu:8-vcpu-16-gb-ram-gpu:act:ppa
   cmd: jupyterhub-singleuser-webdav-wrapper
@@ -185,12 +137,9 @@ singleuser:
         #
         /usr/local/bin/jupyterhub-wait-remote-home
 
-        # Disables RTC extension. To enable it set this env variable in kubespawner_override
-        # to JUPYTERHUB_ALLOW_TOKEN_IN_URL="1"
-        if [ -z "$JUPYTERHUB_ALLOW_TOKEN_IN_URL" ]; then
-          jupyter-labextension  disable @jupyter/collaboration-extension
-          jupyter-labextension lock @jupyter/collaboration-extension
-        fi
+        # Disables RTC and RTC ui extensions by default.
+        jupyter-labextension disable @jupyter/collaboration-extension
+        jupyter-labextension disable @jupyter/docprovider-extension
 
         cd .
         exec jupyterhub-singleuser \
-- 
GitLab