From dbdc18230fd810d53a6be3b9d4022bb2f0d0e057 Mon Sep 17 00:00:00 2001 From: Silva Alejandro Ismael Date: Wed, 14 Feb 2024 00:56:35 -0300 Subject: [PATCH 1/2] catalyst latam: Standarize profileList --- .../catalystproject-latam/cicada.values.yaml | 32 ---- .../catalystproject-latam/common.values.yaml | 180 ++++++------------ 2 files changed, 63 insertions(+), 149 deletions(-) diff --git a/config/clusters/catalystproject-latam/cicada.values.yaml b/config/clusters/catalystproject-latam/cicada.values.yaml index 1d9e18a963..31dce27c18 100644 --- a/config/clusters/catalystproject-latam/cicada.values.yaml +++ b/config/clusters/catalystproject-latam/cicada.values.yaml @@ -37,35 +37,3 @@ jupyterhub: admin_users: - mfariello - luciauy - singleuser: - profileList: - - display_name: Jupyter - slug: jupyter-scipy - description: "Python environment" - default: true - kubespawner_override: - image: jupyter/scipy-notebook:2023-06-27 - default_url: /lab - profile_options: &profile_options - resource_allocation: - display_name: Resource Allocation - choices: - mem_8: - default: true - display_name: ~8 GB RAM, ~1.0 CPU - kubespawner_override: - mem_guarantee: 6.684G - cpu_guarantee: 0.75 - mem_limit: null - cpu_limit: null - node_selector: - node.kubernetes.io/instance-type: n2-highmem-4 - - display_name: RStudio - description: R environment - kubespawner_override: - image: rocker/binder:4.3 - default_url: /rstudio - # Ensures container working dir is homedir - # https://github.com/2i2c-org/infrastructure/issues/2559 - working_dir: /home/rstudio - profile_options: *profile_options diff --git a/config/clusters/catalystproject-latam/common.values.yaml b/config/clusters/catalystproject-latam/common.values.yaml index 5174a4ffe2..6d1bb24bbd 100644 --- a/config/clusters/catalystproject-latam/common.values.yaml +++ b/config/clusters/catalystproject-latam/common.values.yaml @@ -12,134 +12,80 @@ jupyterhub: hub: allowNamedServers: true singleuser: - image: - # This image specification is likely overridden via the configurator. - # - # jupyter/scipy-notebook is maintained at: https://github.com/jupyter/docker-stacks - # tags can be viewed at: https://hub.docker.com/r/jupyter/scipy-notebook/tags - name: jupyter/scipy-notebook - tag: "2023-07-06" profileList: - # NOTE: About node sharing - # - # CPU/Memory requests/limits are actively considered still. This - # profile list is setup to involve node sharing as considered in - # https://github.com/2i2c-org/infrastructure/issues/2121. - # - # - Memory requests are different from the description, based on: - # what's found to remain allocate in k8s, subtracting 1GiB - # overhead for misc system pods, and transitioning from GB in - # description to GiB in mem_guarantee - # https://cloud.google.com/kubernetes-engine/docs/concepts/plan-node-sizes. - # - # - CPU requests are lower than the description, with a factor - # that depends on the node's total CPU like: (node_cpu - 1)/node_cpu - # - # The purpose of this is to ensure that we manage to schedule pods - # even if system pods have requested up to 1 CPU. - # - # 4 CPU node: 0.75 - # 16 CPU node: 0.9375 - # 64 CPU node: 0.984375 - # - - display_name: "Small: up to 4 CPU / 32 GB RAM" - description: &profile_list_description "Start a container with at least a chosen share of capacity on a node of this type" - slug: small + - display_name: Jupyter SciPy Notebook + description: Python environment + slug: jupyter default: true - profile_options: - requests: - # NOTE: Node share choices are in active development, see comment - # next to profileList: above. - display_name: Node share - choices: - mem_1: - default: true - display_name: ~1 GB, ~0.125 CPU - kubespawner_override: - mem_guarantee: 0.836G - cpu_guarantee: 0.094 - mem_2: - display_name: ~2 GB, ~0.25 CPU - kubespawner_override: - mem_guarantee: 1.671G - cpu_guarantee: 0.188 - mem_4: - display_name: ~4 GB, ~0.5 CPU - kubespawner_override: - mem_guarantee: 3.342G - cpu_guarantee: 0.375 - mem_8: - display_name: ~8 GB, ~1.0 CPU - kubespawner_override: - mem_guarantee: 6.684G - cpu_guarantee: 0.75 - mem_16: - display_name: ~16 GB, ~2.0 CPU - kubespawner_override: - mem_guarantee: 13.369G - cpu_guarantee: 1.5 - mem_32: - display_name: ~32 GB, ~4.0 CPU - kubespawner_override: - mem_guarantee: 26.738G - cpu_guarantee: 3.0 kubespawner_override: - cpu_limit: null - mem_limit: null + image: jupyter/scipy-notebook:2023-06-27 + default_url: /lab node_selector: node.kubernetes.io/instance-type: n2-highmem-4 - - display_name: "Medium: up to 16 CPU / 128 GB RAM" - description: *profile_list_description - slug: medium - profile_options: - requests: - # NOTE: Node share choices are in active development, see comment - # next to profileList: above. - display_name: Node share + profile_options: &profile_options + resource_allocation: &resource_allocation + display_name: Resource Allocation choices: - mem_1: - display_name: ~1 GB, ~0.125 CPU - kubespawner_override: - mem_guarantee: 0.903G - cpu_guarantee: 0.117 - mem_2: - display_name: ~2 GB, ~0.25 CPU - kubespawner_override: - mem_guarantee: 1.805G - cpu_guarantee: 0.234 - mem_4: + mem_0_5: default: true - display_name: ~4 GB, ~0.5 CPU + display_name: ~0.5 GB RAM, ~1/16 CPU kubespawner_override: - mem_guarantee: 3.611G - cpu_guarantee: 0.469 - mem_8: - display_name: ~8 GB, ~1.0 CPU + mem_guarantee: 0.5G + mem_limit: 1G + cpu_guarantee: 0.05625 + cpu_limit: 1 + mem_1_0: + display_name: ~1 GB RAM, ~1/8 CPU kubespawner_override: - mem_guarantee: 7.222G - cpu_guarantee: 0.938 - mem_16: - display_name: ~16 GB, ~2.0 CPU + mem_guarantee: 1G + mem_limit: 2G + cpu_guarantee: 0.1125 + cpu_limit: 1 + mem_2_0: + display_name: ~2 GB RAM, ~1/4 CPU kubespawner_override: - mem_guarantee: 14.444G - cpu_guarantee: 1.875 - mem_32: - display_name: ~32 GB, ~4.0 CPU + mem_guarantee: 2G + mem_limit: 4G + cpu_guarantee: 0.225 + cpu_limit: 2 + mem_4_0: + display_name: ~4 GB RAM, ~1/2 CPU kubespawner_override: - mem_guarantee: 28.887G - cpu_guarantee: 3.75 - mem_64: - display_name: ~64 GB, ~8.0 CPU + mem_guarantee: 4G + mem_limit: 8G + cpu_guarantee: 0.45 + cpu_limit: 2 + mem_8_0: + display_name: ~8 GB RAM, ~1.0 CPU kubespawner_override: - mem_guarantee: 57.775G - cpu_guarantee: 7.5 - mem_128: - display_name: ~128 GB, ~16.0 CPU - kubespawner_override: - mem_guarantee: 115.549G - cpu_guarantee: 15.0 + mem_guarantee: 8G + mem_limit: 16G + cpu_guarantee: 0.9 + cpu_limit: 2 + + - display_name: Rocker Geospatial with RStudio + description: R environment + slug: rocker kubespawner_override: - cpu_limit: null - mem_limit: null + image: rocker/binder:4.3 + default_url: /rstudio + working_dir: /home/rstudio # Ensures container working dir is homedir node_selector: - node.kubernetes.io/instance-type: n2-highmem-16 + node.kubernetes.io/instance-type: n2-highmem-4 + profile_options: *profile_options + + - display_name: Bring your own image + description: Specify your own docker image (must have python and jupyterhub installed in it) + slug: custom + profile_options: + image: + display_name: Image + unlisted_choice: + enabled: True + display_name: "Custom image" + validation_regex: "^.+:.+$" + validation_message: "Must be a publicly available docker image, of form :" + kubespawner_override: + image: "{value}" + choices: {} + resource_allocation: *resource_allocation From fd5b4bf338676715c59fd226f6041893c71240d1 Mon Sep 17 00:00:00 2001 From: Silva Alejandro Ismael Date: Wed, 21 Feb 2024 18:01:16 -0300 Subject: [PATCH 2/2] catalyst latam: Improved mem and cpu guarantees --- .../catalystproject-latam/common.values.yaml | 58 ++++++++++--------- 1 file changed, 30 insertions(+), 28 deletions(-) diff --git a/config/clusters/catalystproject-latam/common.values.yaml b/config/clusters/catalystproject-latam/common.values.yaml index 6d1bb24bbd..a13781d172 100644 --- a/config/clusters/catalystproject-latam/common.values.yaml +++ b/config/clusters/catalystproject-latam/common.values.yaml @@ -20,49 +20,53 @@ jupyterhub: kubespawner_override: image: jupyter/scipy-notebook:2023-06-27 default_url: /lab - node_selector: - node.kubernetes.io/instance-type: n2-highmem-4 profile_options: &profile_options resource_allocation: &resource_allocation display_name: Resource Allocation choices: - mem_0_5: + mem_0_3: default: true - display_name: ~0.5 GB RAM, ~1/16 CPU + display_name: 375 MB RAM, ~1/20 CPU kubespawner_override: - mem_guarantee: 0.5G + mem_guarantee: 366210K mem_limit: 1G - cpu_guarantee: 0.05625 + cpu_guarantee: 0.046 cpu_limit: 1 - mem_1_0: - display_name: ~1 GB RAM, ~1/8 CPU + mem_0_7: + display_name: 750 MB RAM, ~1/10 CPU kubespawner_override: - mem_guarantee: 1G + mem_guarantee: 732421K mem_limit: 2G - cpu_guarantee: 0.1125 + cpu_guarantee: 0.093 cpu_limit: 1 - mem_2_0: - display_name: ~2 GB RAM, ~1/4 CPU + mem_1_5: + display_name: 1.5 GB RAM, ~1/5 CPU kubespawner_override: - mem_guarantee: 2G - mem_limit: 4G - cpu_guarantee: 0.225 + mem_guarantee: 1464843.75K + mem_limit: 3G + cpu_guarantee: 0.187 cpu_limit: 2 - mem_4_0: - display_name: ~4 GB RAM, ~1/2 CPU + mem_3_0: + display_name: 3 GB RAM, ~1/2 CPU kubespawner_override: - mem_guarantee: 4G - mem_limit: 8G - cpu_guarantee: 0.45 + mem_guarantee: 2929687.5K + mem_limit: 6G + cpu_guarantee: 0.375 cpu_limit: 2 - mem_8_0: - display_name: ~8 GB RAM, ~1.0 CPU + mem_6_0: + display_name: 6 GB RAM, 3/4 CPU kubespawner_override: - mem_guarantee: 8G - mem_limit: 16G - cpu_guarantee: 0.9 + mem_guarantee: 5859375K + mem_limit: 12G + cpu_guarantee: 0.750 cpu_limit: 2 - + mem_12_0: + display_name: 12 GB RAM, 1.5 CPU + kubespawner_override: + mem_guarantee: 11718750K + mem_limit: 24G + cpu_guarantee: 1.5 + cpu_limit: 3 - display_name: Rocker Geospatial with RStudio description: R environment slug: rocker @@ -70,8 +74,6 @@ jupyterhub: image: rocker/binder:4.3 default_url: /rstudio working_dir: /home/rstudio # Ensures container working dir is homedir - node_selector: - node.kubernetes.io/instance-type: n2-highmem-4 profile_options: *profile_options - display_name: Bring your own image