diff --git a/.github/linters/ct.yaml b/.github/linters/ct.yaml index 3b925ef..69e2ad4 100644 --- a/.github/linters/ct.yaml +++ b/.github/linters/ct.yaml @@ -7,3 +7,4 @@ helm-extra-args: --timeout 1000s chart-repos: - opensearch=https://opensearch-project.github.io/helm-charts - ollama=https://otwld.github.io/ollama-helm + - jupyterhub=https://hub.jupyter.org/helm-chart \ No newline at end of file diff --git a/.github/workflows/kubernetes-charts-build.yaml b/.github/workflows/kubernetes-charts-build.yaml index 5519c12..fe0a8b9 100644 --- a/.github/workflows/kubernetes-charts-build.yaml +++ b/.github/workflows/kubernetes-charts-build.yaml @@ -134,6 +134,7 @@ jobs: helm package ./cogstack-ce-helm --version ${{ steps.version.outputs.chart_version }} --dependency-update helm package ./cogstack-cohorter-helm --version ${{ steps.version.outputs.chart_version }} --dependency-update helm package ./cogstack-observability-helm --version ${{ steps.version.outputs.chart_version }} --dependency-update + helm package ./cogstack-jupyterhub-helm --version ${{ steps.version.outputs.chart_version }} --dependency-update - name: Helm OCI login to Docker Hub run: helm registry login registry-1.docker.io -u ${{ secrets.DOCKERHUB_USERNAME }} -p ${{ secrets.DOCKERHUB_TOKEN }} @@ -145,6 +146,7 @@ jobs: helm push ./cogstack-ce-helm-${{ steps.version.outputs.chart_version }}.tgz oci://registry-1.docker.io/cogstacksystems helm push ./cogstack-cohorter-helm-${{ steps.version.outputs.chart_version }}.tgz oci://registry-1.docker.io/cogstacksystems helm push ./cogstack-observability-helm-${{ steps.version.outputs.chart_version }}.tgz oci://registry-1.docker.io/cogstacksystems + helm push ./cogstack-jupyterhub-helm-${{ steps.version.outputs.chart_version }}.tgz oci://registry-1.docker.io/cogstacksystems - name: Release uses: softprops/action-gh-release@v2 diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index 2307e99..8b9891a 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -67,10 +67,12 @@ nav: - Troubleshooting: platform/deployment/helm/troubleshooting.md - Charts: - Charts Overview: platform/deployment/helm/charts/_index.md + - Cogstack CE Helm: platform/deployment/helm/charts/cogstack-ce-helm.md - MedCAT Service Helm: platform/deployment/helm/charts/medcat-service-helm.md - MedCAT Trainer Helm: platform/deployment/helm/charts/medcat-trainer-helm.md - - Cogstack CE Helm: platform/deployment/helm/charts/cogstack-ce-helm.md + - Cogstack Cohorter Helm: platform/deployment/helm/charts/cogstack-cohorter-helm.md - Cogstack Observability Helm: platform/deployment/helm/charts/cogstack-observability-helm.md + - Cogstack JupyterHub Helm: platform/deployment/helm/charts/cogstack-jupyterhub-helm.md - Examples: - Examples: platform/deployment/examples/_index.md - AWS Kubernetes EKS: platform/deployment/examples/aws-kubernetes-eks.md diff --git a/docs/scripts/copy_files_from_repo.py b/docs/scripts/copy_files_from_repo.py index c6b4d04..bb513c3 100644 --- a/docs/scripts/copy_files_from_repo.py +++ b/docs/scripts/copy_files_from_repo.py @@ -22,11 +22,11 @@ # Add more entries here to copy additional static files into documentation. COPY_SPECS = [ { - "sourceFilePath": "helm-charts/cogstack-ce-helm/charts/jupyterhub/examples/medcat-service-tutorial.ipynb", + "sourceFilePath": "helm-charts/cogstack-jupyterhub-helm/examples/medcat-service-tutorial.ipynb", "outputFilePath": "platform/cogstack-ai/medcat-service-tutorial.ipynb", }, { - "sourceFilePath": "helm-charts/cogstack-ce-helm/charts/jupyterhub/examples/medcat-opensearch-e2e.ipynb", + "sourceFilePath": "helm-charts/cogstack-jupyterhub-helm/examples/medcat-opensearch-e2e.ipynb", "outputFilePath": "cogstack-ce/tutorial/medcat-opensearch-e2e.ipynb", }, ] diff --git a/helm-charts/cogstack-ce-helm/Chart.lock b/helm-charts/cogstack-ce-helm/Chart.lock index eaa59bf..ec28a64 100644 --- a/helm-charts/cogstack-ce-helm/Chart.lock +++ b/helm-charts/cogstack-ce-helm/Chart.lock @@ -14,8 +14,8 @@ dependencies: - name: opensearch-dashboards repository: https://opensearch-project.github.io/helm-charts/ version: 3.5.0 -- name: cogstack-jupyterhub - repository: file://charts/jupyterhub - version: 0.1.0 -digest: sha256:d9fb8600b71642cbbdcfc0e9c4b512f3efedadf99544b3e81f97f0deb5a8469a -generated: "2026-03-03T17:30:34.27108704Z" +- name: cogstack-jupyterhub-helm + repository: file://../cogstack-jupyterhub-helm + version: 0.0.1 +digest: sha256:91586641cf31493b780341598900d7bd33d64be72cc34ac808811c4f7ff508cd +generated: "2026-04-20T16:37:45.151724713+01:00" diff --git a/helm-charts/cogstack-ce-helm/Chart.yaml b/helm-charts/cogstack-ce-helm/Chart.yaml index 3af6f32..e694457 100644 --- a/helm-charts/cogstack-ce-helm/Chart.yaml +++ b/helm-charts/cogstack-ce-helm/Chart.yaml @@ -50,7 +50,8 @@ dependencies: condition: opensearch-dashboards.enabled version: "3.5.0" repository: "https://opensearch-project.github.io/helm-charts/" - - name: cogstack-jupyterhub + - name: cogstack-jupyterhub-helm + alias: cogstack-jupyterhub condition: cogstack-jupyterhub.enabled - version: "0.1.0" - repository: "file://charts/jupyterhub" + version: "0.0.1" + repository: "file://../cogstack-jupyterhub-helm" diff --git a/helm-charts/cogstack-ce-helm/README.md b/helm-charts/cogstack-ce-helm/README.md index 02d7777..5774b69 100644 --- a/helm-charts/cogstack-ce-helm/README.md +++ b/helm-charts/cogstack-ce-helm/README.md @@ -63,6 +63,7 @@ The chart uses local subcharts via relative paths: - `medcat-service-helm` (as `medcat-service` and `anoncat-service`) - `medcat-trainer-helm` +- `cogstack-jupyterhub-helm` (as `cogstack-jupyterhub`) ## Uninstall @@ -83,7 +84,7 @@ kubectl delete namespace cogstack | file://../medcat-service-helm | medcat-service(medcat-service-helm) | 0.0.1 | | file://../medcat-service-helm | anoncat-service(medcat-service-helm) | 0.0.1 | | file://../medcat-trainer-helm | medcat-trainer(medcat-trainer-helm) | 0.0.1 | -| file://charts/jupyterhub | cogstack-jupyterhub | 0.1.0 | +| file://../cogstack-jupyterhub-helm | cogstack-jupyterhub(cogstack-jupyterhub-helm) | 0.1.0 | | https://opensearch-project.github.io/helm-charts/ | opensearch | 3.5.0 | | https://opensearch-project.github.io/helm-charts/ | opensearch-dashboards | 3.5.0 | diff --git a/helm-charts/cogstack-ce-helm/README.md.gotmpl b/helm-charts/cogstack-ce-helm/README.md.gotmpl index 317866b..77704cc 100644 --- a/helm-charts/cogstack-ce-helm/README.md.gotmpl +++ b/helm-charts/cogstack-ce-helm/README.md.gotmpl @@ -64,6 +64,7 @@ The chart uses local subcharts via relative paths: - `medcat-service-helm` (as `medcat-service` and `anoncat-service`) - `medcat-trainer-helm` +- `cogstack-jupyterhub-helm` (as `cogstack-jupyterhub`) ## Uninstall diff --git a/helm-charts/cogstack-ce-helm/charts/jupyterhub/README.md.gotmpl b/helm-charts/cogstack-ce-helm/charts/jupyterhub/README.md.gotmpl deleted file mode 100644 index 89e2dc3..0000000 --- a/helm-charts/cogstack-ce-helm/charts/jupyterhub/README.md.gotmpl +++ /dev/null @@ -1,18 +0,0 @@ -{{ template "chart.header" . }} -{{ template "chart.deprecationWarning" . }} - -{{ template "chart.badgesSection" . }} - -{{ template "chart.description" . }} - -{{ template "chart.homepageLine" . }} - -{{ template "chart.maintainersSection" . }} - -{{ template "chart.sourcesSection" . }} - -{{ template "chart.requirementsSection" . }} - -{{ template "chart.valuesSection" . }} - -{{ template "helm-docs.versionFooter" . }} diff --git a/helm-charts/cogstack-ce-helm/charts/jupyterhub/Chart.lock b/helm-charts/cogstack-jupyterhub-helm/Chart.lock similarity index 100% rename from helm-charts/cogstack-ce-helm/charts/jupyterhub/Chart.lock rename to helm-charts/cogstack-jupyterhub-helm/Chart.lock diff --git a/helm-charts/cogstack-ce-helm/charts/jupyterhub/Chart.yaml b/helm-charts/cogstack-jupyterhub-helm/Chart.yaml similarity index 50% rename from helm-charts/cogstack-ce-helm/charts/jupyterhub/Chart.yaml rename to helm-charts/cogstack-jupyterhub-helm/Chart.yaml index 66562d3..3782d31 100644 --- a/helm-charts/cogstack-ce-helm/charts/jupyterhub/Chart.yaml +++ b/helm-charts/cogstack-jupyterhub-helm/Chart.yaml @@ -1,10 +1,18 @@ apiVersion: v2 -name: cogstack-jupyterhub +name: cogstack-jupyterhub-helm description: A Helm chart for CogStack Jupyter Hub using official JupyterHub chart type: application -version: 0.1.0 +version: 0.0.1 appVersion: "latest" +maintainers: + - name: alhendrickson + email: alistair@cogstack.org + - name: jocelyneholdbrook + email: jocelyne@cogstack.org + +icon: "https://avatars.githubusercontent.com/u/28688163" + dependencies: - name: jupyterhub version: 4.3.2 diff --git a/helm-charts/cogstack-ce-helm/charts/jupyterhub/README.md b/helm-charts/cogstack-jupyterhub-helm/README.md similarity index 66% rename from helm-charts/cogstack-ce-helm/charts/jupyterhub/README.md rename to helm-charts/cogstack-jupyterhub-helm/README.md index 4fd3cc8..7e8e493 100644 --- a/helm-charts/cogstack-ce-helm/charts/jupyterhub/README.md +++ b/helm-charts/cogstack-jupyterhub-helm/README.md @@ -1,8 +1,83 @@ -# cogstack-jupyterhub +# CogStack JupyterHub Helm Chart -![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: latest](https://img.shields.io/badge/AppVersion-latest-informational?style=flat-square) +## Overview -A Helm chart for CogStack Jupyter Hub using official JupyterHub chart +This chart deploys the upstream [`jupyterhub`](https://hub.jupyter.org/helm-chart/) Helm chart with CogStack defaults (hub/singleuser images) and optional example notebooks bundled as a ConfigMap. + +## Prerequisites + +- Kubernetes cluster +- Helm 3+ + +## Installation + +Install from a local checkout: + +```bash +helm install jupyterhub oci://registry-1.docker.io/cogstacksystems/cogstack-jupyterhub-helm +``` + +## Configuration + +### Change the Docker image version + +The most common change is bumping the hub and single-user image tags: + +```yaml +jupyterhub: + hub: + image: + tag: "2.2.2" + singleuser: + image: + tag: "2.2.2" +``` + +### JupyterHub Configuration + +All configuration is passed through under the `jupyterhub.*` key (see `values.yaml` for the full default set). Commonly customized values include: + +- `jupyterhub.hub.config.*` (authenticator and hub config) +- `jupyterhub.singleuser.image.*` (user image) +- `jupyterhub.proxy.service.type` + +See the upstream JupyterHub documentation which lists every option [z2jh.jupyter.org](https://z2jh.jupyter.org/en/stable/resources/reference.html) + +### User culling + +Enable culling of idle user pods. This will delete pods that are unused and free up resources + +```yaml +jupyterhub: + cull: + enabled: true + every: 600 +``` + +### Authentication + +The default configuration uses the JupyterHub `DummyAuthenticator` (not for production). + +One option for you may be to setup the FirstUseAuthenticator. This will let any new user login and set their own passwords. + +```yaml +jupyterhub: + hub: + config: + JupyterHub: + authenticator_class: firstuseauthenticator.FirstUseAuthenticator + Authenticator: + admin_users: + - admin +``` + +Refer to the JupyterHub docs for other authentication settings on [z2jh](https://z2jh.jupyter.org/en/stable/administrator/authentication.html#general-configuration) + +### OAuth / OIDC + +JupyterHub can be setup with OAuth2 based authentication. + +See [Enabling OIDC Authentication](https://github.com/CogStack/cogstack-jupyter-hub/blob/main/README.md#enabling-oidc-authentication). ## Requirements diff --git a/helm-charts/cogstack-jupyterhub-helm/README.md.gotmpl b/helm-charts/cogstack-jupyterhub-helm/README.md.gotmpl new file mode 100644 index 0000000..3b79054 --- /dev/null +++ b/helm-charts/cogstack-jupyterhub-helm/README.md.gotmpl @@ -0,0 +1,86 @@ +# CogStack JupyterHub Helm Chart + +## Overview + +This chart deploys the upstream [`jupyterhub`](https://hub.jupyter.org/helm-chart/) Helm chart with CogStack defaults (hub/singleuser images) and optional example notebooks bundled as a ConfigMap. + +## Prerequisites + +- Kubernetes cluster +- Helm 3+ + +## Installation + +Install from a local checkout: + +```bash +helm install jupyterhub oci://registry-1.docker.io/cogstacksystems/cogstack-jupyterhub-helm +``` + +## Configuration + +### Change the Docker image version + +The most common change is bumping the hub and single-user image tags: + +```yaml +jupyterhub: + hub: + image: + tag: "2.2.2" + singleuser: + image: + tag: "2.2.2" +``` + +### JupyterHub Configuration + +All configuration is passed through under the `jupyterhub.*` key (see `values.yaml` for the full default set). Commonly customized values include: + +- `jupyterhub.hub.config.*` (authenticator and hub config) +- `jupyterhub.singleuser.image.*` (user image) +- `jupyterhub.proxy.service.type` + +See the upstream JupyterHub documentation which lists every option [z2jh.jupyter.org](https://z2jh.jupyter.org/en/stable/resources/reference.html) + +### User culling + +Enable culling of idle user pods. This will delete pods that are unused and free up resources + +```yaml +jupyterhub: + cull: + enabled: true + every: 600 +``` + +### Authentication + +The default configuration uses the JupyterHub `DummyAuthenticator` (not for production). + +One option for you may be to setup the FirstUseAuthenticator. This will let any new user login and set their own passwords. + +```yaml +jupyterhub: + hub: + config: + JupyterHub: + authenticator_class: firstuseauthenticator.FirstUseAuthenticator + Authenticator: + admin_users: + - admin +``` + +Refer to the JupyterHub docs for other authentication settings on [z2jh](https://z2jh.jupyter.org/en/stable/administrator/authentication.html#general-configuration) + +### OAuth / OIDC + +JupyterHub can be setup with OAuth2 based authentication. + +See [Enabling OIDC Authentication](https://github.com/CogStack/cogstack-jupyter-hub/blob/main/README.md#enabling-oidc-authentication). + +{{ template "chart.requirementsSection" . }} + +{{ template "chart.valuesSection" . }} + +{{ template "helm-docs.versionFooter" . }} \ No newline at end of file diff --git a/helm-charts/cogstack-ce-helm/charts/jupyterhub/examples/medcat-opensearch-e2e.ipynb b/helm-charts/cogstack-jupyterhub-helm/examples/medcat-opensearch-e2e.ipynb similarity index 100% rename from helm-charts/cogstack-ce-helm/charts/jupyterhub/examples/medcat-opensearch-e2e.ipynb rename to helm-charts/cogstack-jupyterhub-helm/examples/medcat-opensearch-e2e.ipynb diff --git a/helm-charts/cogstack-ce-helm/charts/jupyterhub/examples/medcat-service-tutorial.ipynb b/helm-charts/cogstack-jupyterhub-helm/examples/medcat-service-tutorial.ipynb similarity index 100% rename from helm-charts/cogstack-ce-helm/charts/jupyterhub/examples/medcat-service-tutorial.ipynb rename to helm-charts/cogstack-jupyterhub-helm/examples/medcat-service-tutorial.ipynb diff --git a/helm-charts/cogstack-ce-helm/charts/jupyterhub/templates/examples-configmap.yaml b/helm-charts/cogstack-jupyterhub-helm/templates/examples-configmap.yaml similarity index 100% rename from helm-charts/cogstack-ce-helm/charts/jupyterhub/templates/examples-configmap.yaml rename to helm-charts/cogstack-jupyterhub-helm/templates/examples-configmap.yaml diff --git a/helm-charts/cogstack-ce-helm/charts/jupyterhub/values.yaml b/helm-charts/cogstack-jupyterhub-helm/values.yaml similarity index 95% rename from helm-charts/cogstack-ce-helm/charts/jupyterhub/values.yaml rename to helm-charts/cogstack-jupyterhub-helm/values.yaml index 53ae410..4d8d11a 100644 --- a/helm-charts/cogstack-ce-helm/charts/jupyterhub/values.yaml +++ b/helm-charts/cogstack-jupyterhub-helm/values.yaml @@ -8,9 +8,7 @@ jupyterhub: tag: "2.2.2" # -- Pull policy for the JupyterHub hub. pullPolicy: IfNotPresent - extraConfig: - 00-log-level: | - c.Application.log_level = 'DEBUG' + config: JupyterHub: authenticator_class: dummy @@ -33,6 +31,8 @@ jupyterhub: # -- Extra hub configuration for custom spawner settings extraConfig: + 00-log-level: | + c.Application.log_level = 'DEBUG' 00-custom-spawner: | # Custom environment variables for user pods c.KubeSpawner.environment = { @@ -69,8 +69,8 @@ jupyterhub: echo "Notebooks already initialized - skipping"; fi networkPolicy: - enabled: false - startTimeout: 600 # Give 10 minutes to start the container, which includes pulling the image. + enabled: false + startTimeout: 600 # Give 10 minutes to start the container, which includes pulling the image. # User pod configuration uid: 0 fsGid: 0 @@ -109,4 +109,4 @@ jupyterhub: hook: enabled: false continuous: - enabled: false \ No newline at end of file + enabled: false