From 7c8d0969341e0ea76a473515d749ad3c8f0dbb6c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jarom=C3=ADr=20Hradil?= <jaromir.hradil@cesnet.cz>
Date: Wed, 23 Oct 2024 09:52:42 +0200
Subject: [PATCH] Enable RTC mode

---
 common/deployments/hub-production.yaml | 49 ++++++++++++++++++++++++++
 common/deployments/hub-staging.yaml    | 49 ++++++++++++++++++++++++++
 testing/deployments/hub.yaml           | 49 ++++++++++++++++++++++++++
 3 files changed, 147 insertions(+)

diff --git a/common/deployments/hub-production.yaml b/common/deployments/hub-production.yaml
index 8a6c8e8..17f0a38 100644
--- a/common/deployments/hub-production.yaml
+++ b/common/deployments/hub-production.yaml
@@ -97,6 +97,55 @@ singleuser:
           nvidia.com/gpu: 1
       vo_claims:
         - urn:geant:open-science-cloud.ec.europa.eu:res:notebooks.open-science-cloud.ec.europa.eu:8-vcpu-16-gb-ram-gpu:act:ppa
+    - 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
+      kubespawner_override:
+        args:
+          - "--CondaKernelSpecManager.env_filter='/opt/conda$'"
+        environment:
+          JUPYTERHUB_ALLOW_TOKEN_IN_URL: "1"
+        extra_annotations:
+          "egi.eu/flavor": "small-environment-2-vcpu-4-gb-ram"
+      vo_claims:
+        - urn:geant:open-science-cloud.ec.europa.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)
+      description: >
+        The notebook environment includes Python, R, Julia and Octave kernels.
+      kubespawner_override:
+        args:
+          - "--CondaKernelSpecManager.env_filter='/opt/conda$'"
+        environment:
+          JUPYTERHUB_ALLOW_TOKEN_IN_URL: "1"
+        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:open-science-cloud.ec.europa.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)
+      description: >
+        The notebook environment includes Python, R, Julia and Octave kernels with GPU.
+      kubespawner_override:
+        args:
+          - "--CondaKernelSpecManager.env_filter='/opt/conda$'"
+        environment:
+          JUPYTERHUB_ALLOW_TOKEN_IN_URL: "1"
+        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:open-science-cloud.ec.europa.eu:res:notebooks.open-science-cloud.ec.europa.eu:8-vcpu-16-gb-ram-gpu:act:ppa
   cmd: jupyterhub-singleuser-webdav-wrapper
   extraFiles:
     wait-remote-home.sh:
diff --git a/common/deployments/hub-staging.yaml b/common/deployments/hub-staging.yaml
index e8ba7fb..8ee5854 100644
--- a/common/deployments/hub-staging.yaml
+++ b/common/deployments/hub-staging.yaml
@@ -97,6 +97,55 @@ singleuser:
           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
+    - 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
+      kubespawner_override:
+        args:
+          - "--CondaKernelSpecManager.env_filter='/opt/conda$'"
+        environment:
+          JUPYTERHUB_ALLOW_TOKEN_IN_URL: "1"
+        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  (Real-time Collaboration)
+      description: >
+        The notebook environment includes Python, R, Julia and Octave kernels.
+      kubespawner_override:
+        args:
+          - "--CondaKernelSpecManager.env_filter='/opt/conda$'"
+        environment:
+          JUPYTERHUB_ALLOW_TOKEN_IN_URL: "1"
+        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  (Real-time Collaboration)
+      description: >
+        The notebook environment includes Python, R, Julia and Octave kernels with GPU.
+      kubespawner_override:
+        args:
+          - "--CondaKernelSpecManager.env_filter='/opt/conda$'"
+        environment:
+          JUPYTERHUB_ALLOW_TOKEN_IN_URL: "1"
+        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
   cmd: jupyterhub-singleuser-webdav-wrapper
   extraFiles:
     wait-remote-home.sh:
diff --git a/testing/deployments/hub.yaml b/testing/deployments/hub.yaml
index 467a234..1fc5881 100644
--- a/testing/deployments/hub.yaml
+++ b/testing/deployments/hub.yaml
@@ -98,6 +98,55 @@ singleuser:
           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
+    - 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
+      kubespawner_override:
+        args:
+          - "--CondaKernelSpecManager.env_filter='/opt/conda$'"
+        extra_annotations:
+          "egi.eu/flavor": "small-environment-2-vcpu-4-gb-ram"
+        environment:
+          JUPYTERHUB_ALLOW_TOKEN_IN_URL: "1"
+      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)
+      description: >
+        The notebook environment includes Python, R, Julia and Octave kernels.
+      kubespawner_override:
+        args:
+          - "--CondaKernelSpecManager.env_filter='/opt/conda$'"
+        environment:
+          JUPYTERHUB_ALLOW_TOKEN_IN_URL: "1"
+        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 (Real-time Collaboration)
+      description: >
+        The notebook environment includes Python, R, Julia and Octave kernels with GPU.
+      kubespawner_override:
+        args:
+          - "--CondaKernelSpecManager.env_filter='/opt/conda$'"
+        environment:
+          JUPYTERHUB_ALLOW_TOKEN_IN_URL: "1"
+        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
   cmd: jupyterhub-singleuser-webdav-wrapper
   extraFiles:
     wait-remote-home.sh:
-- 
GitLab