JupyterHub Settings

How to configure JupyterHub Lab settings for new users in Wallaroo.

Targeted Role
Dev Ops

Organizations can manage their JupyterHub Lab settings.

Configuration procedure depends on whether the user installed Wallaroo via kots or helm. Select the appropriate procedure based on the organizations installation settings.

Configure JupyterHub via Kots

Prerequisites for Kots Configuration

  • A Wallaroo instance installed via kots. See Wallaroo Installation Guides for more details.
  • Administrative access to the Kubernetes cluster through the kubectl command with the kots plugin.

Access JupyterHub Settings via Kots

To access the JupyterHub Settings:

  1. Through kubectl, launch the Kots Administrative Dashboard with the following:

    kubectl kots admin-console --namespace {Wallaroo Installed Namespace}
    

    Replace {Wallaroo Installed Namespace} with the Kubernetes namespace the Wallaroo instance is installed in. By default, this is wallaroo. For example:

    kubectl kots admin-console --namespace wallaroo
    

    By default this launches the Kots Administrative Dashboard at http://localhost:8080

    • Press Ctrl+C to exit
    • Go to http://localhost:8800 to access the Admin Console
    

    Launch a browser and access the Kots Administrative Dashboard at the URL shown.

Disable JupyterHub Access via Kots

This process disables all JupyterHub services for all users. Note that existing labs must be deleted to recover storage space. For details on deleting existing labs, see Manage JupyterHub.

  1. From the top navigation panel, select Config and scroll to Data Science Workspaces. Set Choose Environment to None.

    Set Data Science to None
  2. Scroll to the bottom of the Config page and select Save Config.

  3. Once the configuration is saved, select Go to updated version. The new configuration is at the top; select Deploy.

Set JupyterHub Configuration via Kots

To update the settings for new JupyterHub Labs:

  1. From the top navigation panel, select Config and scroll to Data Science Workspaces. Set the following options:

    JupyterHub Lab Options
    1. Each Lab - Memory Limit in GB (Default: 4): The total maximum ram limit for each lab in GB.
    2. Each Lab - Memory guarantee in GB (Default: 2): The total ram guaranteed for each lab, and will not go below this limit.
    3. Each Lab - fractional CPU Limit (Default: 2.0): The maximum compute limit each lab can access.
    4. Each Lab - fractional CPU guarantee (Default: 1.0): The total compute guaranteed for each lab, and will not go below this limit.
    5. Each Lab - Disk Storage Capacity in GB (Default: 50): The total file and artifact storage space granted to each lab in GB.
  2. Scroll to the bottom of the Config page and select Save Config.

  3. Once the configuration is saved, select Go to updated version. The new configuration is at the top; select Deploy.

Once the deployment is complete, new JupyterHub Labs are created with these settings.

Configure JupyterHub via Helm

The following instructions are for installations of Wallaroo in a Helm based installation. See the Wallaroo Install Guides.

The following shows how to update new JupyterHub Labs for an existing Wallaroo installation via Helm.

JupyterHub Settings via Helm

The following JupyterHub Lab settings are determined via helm:

ParameterDescriptionDefault
jupyter.enabledIf true, users are provided access to JupyterHub and assigned individual labs. If false, JupyterHub services are disabled.true
jupyter.memory.limitThe maximum amount of RAM each lab is guaranteed in GB."4"
jupyter.memory.guaranteeThe minimum amount of RAM each lab is guaranteed in GB."2"
jupyter.cpu.limitThe maximum number of fractional CPUs (0.5, 1.0, etc) each lab is guaranteed."2.0"
jupyter.cpu.guaranteeThe minimum number of fractional CPUs (0.5, 1.0, etc) each lab is guaranteed."1.0"
jupyter.storage.capacityDisk storage capacity in GB for each lab."50"

Update a helm yaml file to indicate the modified settings.

The following is a minimum local-values.yaml file with the Wallaroo Domain set to wallaroo.example.com and the optional JupyterLab settings.

wallarooDomain: "wallaroo.example.com" # change to match the domain name

custTlsSecretName: cust-cert-secret

apilb:
  serviceType: LoadBalancer
  external_inference_endpoints_enabled: true
  ingress_mode: internal # internal (Default), external,or none

dashboard:
  clientName: "Wallaroo Helm Example" # Insert the name displayed in the Wallaroo Dashboard

kubernetes_distribution: ""   # Required. One of: aks, eks, gke, oke, or kurl.

# jupyter:
#   memory:
#     limit: "4"                  # Each Lab - memory limit in GB
#     guarantee: "2"              # Each Lab - lemory guarantee in GB
#   cpu:
#     limit: "2.0"                # Each Lab - fractional CPU limit
#     guarantee: "1.0"            # Each Lab - fractional CPU guarantee
#   storage:
#     capacity: "50"              # Each Lab - disk storage capacity in GB
  1. Update the helm based installation with the helm upgrade command in the following format:

    helm upgrade $RELEASE $REGISTRYURL --version $VERSION --values $LOCALVALUES.yaml --timeout 10m
    

    Where:

    1. $RELEASE: The name of the Helm release. By default, wallaroo.
    2. $REGISTRYURL: The URl for the Wallaroo container registry service.
    3. $VERSION: The version of Wallaroo to install. For this example, 2024.4.0-5879.
    4. $LOCALVALUES: The .yaml file containing the local values overrides. For this example, local-values.yaml.

    For example, for the release wallaroo the command would be:

    helm upgrade wallaroo oci://registry.replicated.com/wallaroo/2024-4/wallaroo --version 2024.4.0-5879 --values local-values.yaml --timeout 10m