Helm Charts

Get started by adding this Helm repo

helm repo add polus https://polusai.github.io/notebooks-hub/_static/charts

JupyterHub

Install the chart: helm install polus/polus-jupyterhub --generate-name

Polus-jupyterhub

Polus JupyterHub

Configuration

The following table lists the configurable parameters of the Polus-jupyterhub chart and their default values.

Parameter

Description

Default

hub.image.name

Docker repo for JupyterHub image

"polusai/jupyterhub"

hub.image.tag

JupyterHub image tag in the repo

"3.0.0"

hub.appVersions.notebook

"2.1.0"

hub.appVersions.vscode

"0.2.0"

hub.appVersions.rstudio

"0.5.0"

hub.appVersions.streamlit

"0.5.0"

hub.appVersions.voila

"0.4.0"

hub.appVersions.rshiny

"0.5.0"

hub.appVersions.pshiny

"0.3.0"

hub.appVersions.dash

"0.3.0"

hub.appVersions.solara

"0.4.0"

hub.nodeAffinity.enabled

false

hub.storage.storageClass

K8s StorageClass for volumes

"aws-efs"

hub.storage.notebooksStorage

Size of the user+shared notebooks PVC

"1Ti"

hub.storage.modulesStorage

Size of the environment modules PVC

"1Ti"

hub.storage.notebooksClaimName

Name prefix of the user+shared notebooks PVC

"notebooks"

hub.storage.modulesClaimName

Name prefix of the environment modules PVC

"modules"

hub.service.type

"LoadBalancer"

hub.ingress.enabled

Using Ingress is optional and requires preconfiguration within the cluster

false

hub.ingress.hostName

Host name for external access

null

hub.ingress.tlsSecrets.enabled

Using TLS certs via secrets at the Ingress level

false

hub.ingress.tlsSecrets.secret

Name of Secret containing TLS private key and cert

null

hub.auth.enabled

false

hub.auth.type

Supported types: (oauth and password)

"oauth"

hub.auth.cryptKey

null

hub.auth.url

Auth service url

null

hub.auth.tenant

Unique tenant configured in LS-Auth

null

hub.auth.clientID

Unique client ID configured in the above tenant

null

hub.auth.clientSecret

null

hub.auth.callbackURL

null

hub.auth.adminUsers

null

hub.envModules

Environment modules to be installed by the post-install Hook

{}

hub.hardwareOptions

{}

hub.compute.enabled

false

hub.compute.storageClaimName

"compute-data"

hub.compute.mountPath

"/opt/shared/data"

hub.polusNotebooksHub.enabled

false

hub.polusNotebooksHub.apiURL

null

hub.monitoring.enabled

false

hub.monitoring.namespace

"monitoring"

hub.monitoring.interval

"5s"

hub.dock8r.enabled

false

hub.dock8r.namespace

"docker-sandbox"

hub.tokenService.enabled

true

hub.tokenService.image

"polusai/jupyterhub-token-service:0.2.0"

hub.culling.timeout

Timeout in hours after which the JupyterLab server is shut down

10

postgresql.enabled

true

postgresql.auth.database

"jupyterhub"

postgresql.auth.username

"jupyter"

postgresql.auth.password

"postgres"

postgresql.primary.persistence.storageClass

Storage class might be different from hub.storage.storageClass to accomodate the issue in EFS CSI driver

"aws-efs"

postgresql.primary.persistence.size

"1Gi"

Notebooks Hub API

Install the chart: helm install polus/notebooks-hub-api --generate-name

Notebooks-hub-api

The Helm Chart for the API Backend for the Notebooks Hub Application

Configuration

The following table lists the configurable parameters of the Notebooks-hub-api chart and their default values.

Parameter

Description

Default

serviceType

"NodePort"

servicePort

8002

servicePortName

"8002"

targetPort

8002

ingressHost

"INGRESS_HOST"

modulesPath

"/opt/modules"

moduleClaimName

"MODULE_CLAIM_NAME"

notebooksPath

"/opt/notebooks"

notebooksClaimName

"NOTEBOOKS_CLAIM_NAME"

jupyterhubTokenPath

"/opt/jupyterhubToken"

jupyterhubClaimName

"JUPYTERHUB_TOKEN_PATH"

tlsSecrets.enabled

Using TLS certs via secrets at the Ingress level

false

tlsSecrets.secret

Name of Secret containing TLS private key and cert

null

nodeAffinity.enabled

false

moduleLocation

"/opt/modules"

notebookLocation

"/opt/notebooks"

jupyterhubTokenFile

"/opt/jupyterhubToken/adminToken"

jupyterhubUrl

"JUPYTERHUB_URL"

authSource

"AUTH_SOURCE"

servicesAuthUrl

"SERVICE_AUTH_URL"

servicesAuthTenant

"SERVICE_AUTH_TENANT"

frontendUrl

"FRONTEND_URL"

sessionSecret

"SESSION_SECRET"

imageName

"IMAGE_NAME"

appVersion

"APP_VERSION"

mongodb.enabled

true

mongodb.persistence.enabled

true

mongodb.auth.enabled

true

mongodb.auth.usernames

["ADMIN_USER", "NOTEBOOKS_USER"]

mongodb.auth.passwords

["ADMIN_PASS", "NOTEBOOKS_PASS"]

mongodb.auth.databases

["ADMIN_DB", "NOTEBOOKS_DB"]

mongodb.service.type

"ClusterIP"

mongodb.service.clusterIP

"None"

mongodb.service.port

27017

mongodb.service.host

null

mongodb.initdbScripts.my_init_script.js

"db = db.getSiblingDB(\"admin\");\ndb.updateUser( \"notebooks\", { roles : [{ role : \"dbAdmin\", db : \"admin\"  },{ role : \"readWrite\", db : \"notebooksHub\"  }]})\n"

Notebooks Hub UI

Install the chart: helm install polus/notebooks-hub-ui --generate-name

Notebooks-hub-ui

The Helm Chart for the UI Frontend for the Notebooks Hub Application

Configuration

The following table lists the configurable parameters of the Notebooks-hub-ui chart and their default values.

Parameter

Description

Default

serviceType

"NodePort"

servicePort

4200

servicePortName

"4200"

targetPort

4200

nodePort

32000

ingressHost

"UI_HOST_URL"

replicas

2

tlsSecrets.enabled

Using TLS certs via secrets at the Ingress level

false

tlsSecrets.secret

Name of Secret containing TLS private key and cert

null

nodeAffinity.enabled

false

config.production

false

config.jupyterhub_url

"JUPYTERHUB_URL"

config.backend_url

"BACKEND_URL"

config.default_hardware_option

"DEFAULT_HARDWARE_OPTION"

config.services.auth.responseType

"RESPONSE_TYPE"

config.services.auth.url

"URL"

config.services.auth.clientId

"CLIENT_ID"

config.services.auth.redirectUrl

"REDIRECT_URL"

config.services.auth.tenant

"TENANT"

imageName

"IMAGE_NAME"

appVersion

"APP_VERSION"

Minimal Test Deployment of JupyterHub

To test the basic functionality of the application (for example in Docker Desktop K8s cluster or a separate namespace in the cloud cluster) you can select the minimal viable configuration without auth, persistent database and any other integrations enabled.

  1. Create local-values.yaml with the following content

    hub:
      storage:
        storageClass: aws-efs
        storagePerUser: 1Gi
        sharedNotebooksStorage: 1Gi
        modulesStorage: 1Gi
    
      service:
        type: NodePort
    
    postgresql:
      enabled: false
    
  2. Install chart dependencies

    helm repo add bitnami https://charts.bitnami.com/bitnami
    helm dependency update
    helm dependency build
    
  3. Deploy the application

    helm upgrade --install --generate-name deploy/Helm/jupyterhub --values local-values.yaml --namespace ${KUBERNETES_NAMESPACE}