From 8d978ab910f881889a6f257f55fe65d865137056 Mon Sep 17 00:00:00 2001 From: Georgiana Dolocan Date: Wed, 19 Nov 2025 15:28:49 +0200 Subject: [PATCH 1/4] Default to an image and resource option per https://2i2c.freshdesk.com/a/tickets/4358 --- config/clusters/bnext-bio/prod.values.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/config/clusters/bnext-bio/prod.values.yaml b/config/clusters/bnext-bio/prod.values.yaml index a8acf6c2e7..a5acb86176 100644 --- a/config/clusters/bnext-bio/prod.values.yaml +++ b/config/clusters/bnext-bio/prod.values.yaml @@ -19,7 +19,18 @@ jupyterhub: GitHubOAuthenticator: oauth_callback_url: https://bnext-bio.2i2c.cloud/hub/oauth_callback singleuser: + image: + name: quay.io/nucleus/nucleus-hub + tag: 2i2c + pullPolicy: Always + memory: + guarantee: 3902839759 + limit: 3902839759 + cpu: + guarantee: 0.4563125 + limit: 3.6505 nodeSelector: + node.kubernetes.io/instance-type: r5.xlarge 2i2c/hub-name: prod extraEnv: SCRATCH_BUCKET: s3://bnext-bio-scratch/$(JUPYTERHUB_USER) From 3260d71c43058581228e475bf6bc6ce6b6fd9bc6 Mon Sep 17 00:00:00 2001 From: Georgiana Dolocan Date: Wed, 19 Nov 2025 15:34:46 +0200 Subject: [PATCH 2/4] Setup image_pull_policy to Always and rm common config as it's not common anymore --- config/clusters/bnext-bio/common.values.yaml | 139 +------------------ 1 file changed, 2 insertions(+), 137 deletions(-) diff --git a/config/clusters/bnext-bio/common.values.yaml b/config/clusters/bnext-bio/common.values.yaml index 7bc2f931eb..879c2e8b5a 100644 --- a/config/clusters/bnext-bio/common.values.yaml +++ b/config/clusters/bnext-bio/common.values.yaml @@ -40,6 +40,8 @@ jupyterhub: - read:users:name - list:users config: + KubeSpawner: + image_pull_policy: Always JupyterHub: authenticator_class: github GitHubOAuthenticator: @@ -62,143 +64,6 @@ jupyterhub: enabled: true singleuser: defaultUrl: /lab - profileList: - - display_name: Choose your environment and resources - slug: only-choice - profile_options: - image: - display_name: Image - # Enables dynamic image building for this profile - dynamic_image_building: - enabled: true - unlisted_choice: - enabled: true - display_name: Custom image - validation_regex: ^.+:.+$ - validation_message: Must be a publicly available docker image, of form : - display_name_in_choices: Specify an existing docker image - description_in_choices: Use a pre-existing docker image from a public docker registry (dockerhub, quay, etc) - kubespawner_override: - image: '{value}' - choices: - bnext-nucleus: - default: true - display_name: B.next Nucleus - slug: bnext-nucleus - kubespawner_override: - image: quay.io/2i2c/bnext-nucleus-image:1002ebd7f334 - jupyter-scipy: - display_name: Jupyter SciPy - slug: jupyter-scipy - kubespawner_override: - image: quay.io/jupyter/scipy-notebook:2025-10-21 - rocker-geospatial: - display_name: Rocker Geospatial - slug: rocker-geospatial - kubespawner_override: - image: rocker/binder:4.4 - image_pull_policy: Always - # Launch into RStudio after the user logs in - default_url: /rstudio - # Ensures container working dir is homedir - # https://github.com/2i2c-org/infrastructure/issues/2559 - working_dir: /home/rstudio - pangeo: - display_name: Pangeo Notebook Image - slug: pangeo - description: Python image with scientific, dask and geospatial tools - kubespawner_override: - image: quay.io/pangeo/pangeo-notebook:2025.07.09 - resource_allocation: - display_name: Resource Allocation - choices: - mem_4_gb: - display_name: ~4 GB RAM, ~0.5 CPUs - description: Up to ~4 CPUs when available - kubespawner_override: - mem_guarantee: 3902839759 - mem_limit: 3902839759 - cpu_guarantee: 0.4563125 - cpu_limit: 3.6505 - node_selector: - node.kubernetes.io/instance-type: r5.xlarge - mem_7_gb: - display_name: ~7 GB RAM, ~0.9 CPUs - description: Up to ~4 CPUs when available - kubespawner_override: - mem_guarantee: 7805679519 - mem_limit: 7805679519 - cpu_guarantee: 0.912625 - cpu_limit: 3.6505 - node_selector: - node.kubernetes.io/instance-type: r5.xlarge - mem_15_gb: - display_name: ~15 GB RAM, ~1.8 CPUs - description: Up to ~4 CPUs when available - kubespawner_override: - mem_guarantee: 15611359038 - mem_limit: 15611359038 - cpu_guarantee: 1.82525 - cpu_limit: 3.6505 - node_selector: - node.kubernetes.io/instance-type: r5.xlarge - mem_29_gb: - display_name: ~29 GB RAM, ~4 CPUs - description: ~4 CPUs always available - kubespawner_override: - mem_guarantee: 31222718077 - mem_limit: 31222718077 - cpu_guarantee: 3.6505 - cpu_limit: 3.6505 - node_selector: - node.kubernetes.io/instance-type: r5.xlarge - - display_name: NVIDIA Tesla T4, ~16 GB, ~4 CPUs - description: Start a container on a dedicated node with a GPU - slug: gpu - allowed_groups: - - 2i2c-org:hub-access-for-2i2c-staff - profile_options: - image: - display_name: Image - dynamic_image_building: - enabled: true - unlisted_choice: - enabled: true - display_name: Custom image - validation_regex: ^.+:.+$ - validation_message: Must be a publicly available docker image of form : - display_name_in_choices: Specify an existing docker image - description_in_choices: Use a pre-existing docker image from a public docker registry (dockerhub, quay, etc) - kubespawner_override: - image: '{value}' - choices: - pytorch: - display_name: Pangeo PyTorch ML Notebook - default: false - slug: pytorch - kubespawner_override: - image: quay.io/pangeo/pytorch-notebook:2024.11.11 - tensorflow2: - display_name: Pangeo Tensorflow2 ML Notebook - slug: tensorflow2 - kubespawner_override: - image: quay.io/pangeo/ml-notebook:2024.11.11 - bnext-nucleus: - display_name: B.next Nucleus - default: true - slug: bnext-nucleus - kubespawner_override: - image: quay.io/2i2c/bnext-nucleus-image:1002ebd7f334 - - kubespawner_override: - environment: - NVIDIA_DRIVER_CAPABILITIES: compute,utility - mem_limit: - mem_guarantee: 14G - node_selector: - node.kubernetes.io/instance-type: g4dn.xlarge - extra_resource_limits: - nvidia.com/gpu: '1' binderhub-service: enabled: true # Explicitly specify what nodes we want for our builds From 99a8125d1d9b744339db5a56e378c2823fab6c1c Mon Sep 17 00:00:00 2001 From: Georgiana Dolocan Date: Wed, 19 Nov 2025 15:40:50 +0200 Subject: [PATCH 3/4] Update the domain of the staging hub and keep a trimmed profile list --- config/clusters/bnext-bio/staging.values.yaml | 77 +++++++++++++++++-- 1 file changed, 71 insertions(+), 6 deletions(-) diff --git a/config/clusters/bnext-bio/staging.values.yaml b/config/clusters/bnext-bio/staging.values.yaml index e1c954fcb3..7ee570d12a 100644 --- a/config/clusters/bnext-bio/staging.values.yaml +++ b/config/clusters/bnext-bio/staging.values.yaml @@ -8,19 +8,85 @@ userServiceAccount: jupyterhub: ingress: - hosts: [staging.bnext-bio.2i2c.cloud] + hosts: [staging.beta-hub.nucleus.engineering] tls: - - hosts: [staging.bnext-bio.2i2c.cloud] + - hosts: [staging.beta-hub.nucleus.engineering] secretName: https-auto-tls hub: config: JupyterHub: authenticator_class: github GitHubOAuthenticator: - oauth_callback_url: https://staging.bnext-bio.2i2c.cloud/hub/oauth_callback + oauth_callback_url: https://staging.beta-hub.nucleus.engineering/hub/oauth_callback singleuser: - nodeSelector: - 2i2c/hub-name: staging + profileList: + - display_name: Choose your environment and resources + slug: only-choice + profile_options: + image: + display_name: Image + # Enables dynamic image building for this profile + dynamic_image_building: + enabled: true + unlisted_choice: + enabled: true + display_name: Custom image + validation_regex: ^.+:.+$ + validation_message: Must be a publicly available docker image, of form : + display_name_in_choices: Specify an existing docker image + description_in_choices: Use a pre-existing docker image from a public docker registry (dockerhub, quay, etc) + kubespawner_override: + image: '{value}' + choices: + bnext-nucleus: + default: true + display_name: B.next Nucleus + slug: bnext-nucleus + kubespawner_override: + image: quay.io/nucleus/nucleus-hub:2i2c + resource_allocation: + display_name: Resource Allocation + choices: + mem_4_gb: + display_name: ~4 GB RAM, ~0.5 CPUs + description: Up to ~4 CPUs when available + kubespawner_override: + mem_guarantee: 3902839759 + mem_limit: 3902839759 + cpu_guarantee: 0.4563125 + cpu_limit: 3.6505 + node_selector: + node.kubernetes.io/instance-type: r5.xlarge + mem_7_gb: + display_name: ~7 GB RAM, ~0.9 CPUs + description: Up to ~4 CPUs when available + kubespawner_override: + mem_guarantee: 7805679519 + mem_limit: 7805679519 + cpu_guarantee: 0.912625 + cpu_limit: 3.6505 + node_selector: + node.kubernetes.io/instance-type: r5.xlarge + mem_15_gb: + display_name: ~15 GB RAM, ~1.8 CPUs + description: Up to ~4 CPUs when available + kubespawner_override: + mem_guarantee: 15611359038 + mem_limit: 15611359038 + cpu_guarantee: 1.82525 + cpu_limit: 3.6505 + node_selector: + node.kubernetes.io/instance-type: r5.xlarge + mem_29_gb: + display_name: ~29 GB RAM, ~4 CPUs + description: ~4 CPUs always available + kubespawner_override: + mem_guarantee: 31222718077 + mem_limit: 31222718077 + cpu_guarantee: 3.6505 + cpu_limit: 3.6505 + node_selector: + node.kubernetes.io/instance-type: r5.xlarge extraEnv: SCRATCH_BUCKET: s3://bnext-bio-scratch-staging/$(JUPYTERHUB_USER) PERSISTENT_BUCKET: s3://bnext-bio-persistent-staging/$(JUPYTERHUB_USER) @@ -31,7 +97,6 @@ jupyterhub-home-nfs: eks: volumeId: vol-09363d84917d28027 - binderhub-service: config: BinderHub: From 42c2c447051efdf462ad7b86cb4dc2de3b8bc11e Mon Sep 17 00:00:00 2001 From: Georgiana Dolocan Date: Wed, 19 Nov 2025 16:03:05 +0200 Subject: [PATCH 4/4] Setup domain for prod and redirects --- config/clusters/bnext-bio/cluster.yaml | 4 ++-- config/clusters/bnext-bio/prod.values.yaml | 6 +++--- config/clusters/bnext-bio/support.values.yaml | 7 +++++++ 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/config/clusters/bnext-bio/cluster.yaml b/config/clusters/bnext-bio/cluster.yaml index e2d6943098..38fc37430c 100644 --- a/config/clusters/bnext-bio/cluster.yaml +++ b/config/clusters/bnext-bio/cluster.yaml @@ -16,7 +16,7 @@ support: hubs: - name: staging display_name: bnext-bio - staging - domain: staging.bnext-bio.2i2c.cloud + domain: staging.beta-hub.nucleus.engineering helm_chart: basehub helm_chart_values_files: - common.values.yaml @@ -24,7 +24,7 @@ hubs: - enc-staging.secret.values.yaml - name: prod display_name: bnext-bio - prod - domain: bnext-bio.2i2c.cloud + domain: beta-hub.nucleus.engineering helm_chart: basehub helm_chart_values_files: - common.values.yaml diff --git a/config/clusters/bnext-bio/prod.values.yaml b/config/clusters/bnext-bio/prod.values.yaml index a5acb86176..ea08db4040 100644 --- a/config/clusters/bnext-bio/prod.values.yaml +++ b/config/clusters/bnext-bio/prod.values.yaml @@ -8,16 +8,16 @@ userServiceAccount: jupyterhub: ingress: - hosts: [bnext-bio.2i2c.cloud] + hosts: [beta-hub.nucleus.engineering] tls: - - hosts: [bnext-bio.2i2c.cloud] + - hosts: [beta-hub.nucleus.engineering] secretName: https-auto-tls hub: config: JupyterHub: authenticator_class: github GitHubOAuthenticator: - oauth_callback_url: https://bnext-bio.2i2c.cloud/hub/oauth_callback + oauth_callback_url: https://beta-hub.nucleus.engineering/hub/oauth_callback singleuser: image: name: quay.io/nucleus/nucleus-hub diff --git a/config/clusters/bnext-bio/support.values.yaml b/config/clusters/bnext-bio/support.values.yaml index c5b047ff1c..8dcf9b5b87 100644 --- a/config/clusters/bnext-bio/support.values.yaml +++ b/config/clusters/bnext-bio/support.values.yaml @@ -44,3 +44,10 @@ calico: nvidiaDevicePlugin: aws: enabled: true + +redirects: + rules: + - from: staging.bnext-bio.2i2c.cloud + to: staging.beta-hub.nucleus.engineering + - from: bnext-bio.2i2c.cloud + to: beta-hub.nucleus.engineering