From 7306d7e65f8bd2ae6fd5a86da7442641def23179 Mon Sep 17 00:00:00 2001 From: GeorgianaElena Date: Wed, 2 Nov 2022 11:06:39 +0200 Subject: [PATCH 1/5] Move pip pkgs into requirements.txt and update oauthenticatior and kubespawner --- helm-charts/images/hub/Dockerfile | 7 ++----- helm-charts/images/hub/requirements.txt | 3 +++ 2 files changed, 5 insertions(+), 5 deletions(-) create mode 100644 helm-charts/images/hub/requirements.txt diff --git a/helm-charts/images/hub/Dockerfile b/helm-charts/images/hub/Dockerfile index eb8bd4ac6f..0cf6947b8e 100644 --- a/helm-charts/images/hub/Dockerfile +++ b/helm-charts/images/hub/Dockerfile @@ -13,12 +13,9 @@ # FROM jupyterhub/k8s-hub:2.0.1-0.dev.git.5840.h71ad2287 -ENV CONFIGURATOR_VERSION ed7e3a0df1e3d625d10903ef7d7fd9c2fbb548db +COPY requirements.txt /tmp/ -RUN pip install --no-cache git+https://github.com/yuvipanda/jupyterhub-configurator@${CONFIGURATOR_VERSION} - -# Latest version comes with some breaking changes https://oauthenticator.readthedocs.io/en/latest/migrations.html#migrating-cilogonoauthenticator-to-version-15-0 -RUN pip install --no-cache --upgrade git+https://github.com/jupyterhub/oauthenticator@6cf6599d99b47f99db3826ceaaedf467af14a05d +RUN pip install -r /tmp/requirements.txt USER root RUN mkdir -p /usr/local/etc/jupyterhub-configurator diff --git a/helm-charts/images/hub/requirements.txt b/helm-charts/images/hub/requirements.txt new file mode 100644 index 0000000000..4f7ee0ec1b --- /dev/null +++ b/helm-charts/images/hub/requirements.txt @@ -0,0 +1,3 @@ +oauthenticator==15.1.0 +git+https://github.com/yuvipanda/jupyterhub-configurator@$ed7e3a0df1e3d625d10903ef7d7fd9c2fbb548db +git+https://github.com/jupyterhub/kubespawner@fa19acdbb056c8d105baab13bbaa2b8b59dfa962 From 61585e7fdad5e6205284c8131584076168cfff5d Mon Sep 17 00:00:00 2001 From: GeorgianaElena Date: Wed, 2 Nov 2022 11:11:21 +0200 Subject: [PATCH 2/5] Add some comments --- helm-charts/images/hub/Dockerfile | 7 ++++--- helm-charts/images/hub/requirements.txt | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/helm-charts/images/hub/Dockerfile b/helm-charts/images/hub/Dockerfile index 0cf6947b8e..e9c8c98cdb 100644 --- a/helm-charts/images/hub/Dockerfile +++ b/helm-charts/images/hub/Dockerfile @@ -2,9 +2,10 @@ # declared in basehub/Chart.yaml. # # If you make an update to this tag and the JupyterHub Helm chart's version, -# then commit those changes and then perform `chartpress --push` with your -# quay.io container registry credentials configured to have access to -# https://quay.io/repository/2i2c/pilot-hub. +# then first commit those changes. +# Then, from the `helm-charts` directory where the `chartpress.yaml` is located, +# perform `chartpress --push` with your quay.io container registry credentials +# configured to have access to https://quay.io/repository/2i2c/pilot-hub. # # Note: if on macOs with M1, you need to run chartpress with docker buildx under the hood and specify # the architecture to use. diff --git a/helm-charts/images/hub/requirements.txt b/helm-charts/images/hub/requirements.txt index 4f7ee0ec1b..f2e1eb6da8 100644 --- a/helm-charts/images/hub/requirements.txt +++ b/helm-charts/images/hub/requirements.txt @@ -1,3 +1,4 @@ oauthenticator==15.1.0 git+https://github.com/yuvipanda/jupyterhub-configurator@$ed7e3a0df1e3d625d10903ef7d7fd9c2fbb548db +# Reference https://github.com/2i2c-org/infrastructure/issues/1825 git+https://github.com/jupyterhub/kubespawner@fa19acdbb056c8d105baab13bbaa2b8b59dfa962 From a8608773cd05518257425647a1f2eb7abef19709 Mon Sep 17 00:00:00 2001 From: GeorgianaElena Date: Wed, 2 Nov 2022 11:24:29 +0200 Subject: [PATCH 3/5] Update commit sha --- helm-charts/images/hub/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helm-charts/images/hub/requirements.txt b/helm-charts/images/hub/requirements.txt index f2e1eb6da8..2607afd099 100644 --- a/helm-charts/images/hub/requirements.txt +++ b/helm-charts/images/hub/requirements.txt @@ -1,4 +1,4 @@ oauthenticator==15.1.0 -git+https://github.com/yuvipanda/jupyterhub-configurator@$ed7e3a0df1e3d625d10903ef7d7fd9c2fbb548db +git+https://github.com/yuvipanda/jupyterhub-configurator@ed7e3a0df1e3d625d10903ef7d7fd9c2fbb548db # Reference https://github.com/2i2c-org/infrastructure/issues/1825 git+https://github.com/jupyterhub/kubespawner@fa19acdbb056c8d105baab13bbaa2b8b59dfa962 From 6cbcb4827ff105dd11d48406b77aa6cb99a82cb3 Mon Sep 17 00:00:00 2001 From: GeorgianaElena Date: Wed, 2 Nov 2022 11:52:13 +0200 Subject: [PATCH 4/5] Update the hub image to use latest pushed tag --- helm-charts/basehub/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helm-charts/basehub/values.yaml b/helm-charts/basehub/values.yaml index 218cf6981e..d9c029b4e6 100644 --- a/helm-charts/basehub/values.yaml +++ b/helm-charts/basehub/values.yaml @@ -379,7 +379,7 @@ jupyterhub: admin: true image: name: quay.io/2i2c/pilot-hub - tag: "0.0.1-0.dev.git.3965.h1842c071" + tag: "0.0.1-n4340.ha8608773" nodeSelector: hub.jupyter.org/node-purpose: core networkPolicy: From 174212a73f10194124a6ea5335e62e3d3db488b0 Mon Sep 17 00:00:00 2001 From: GeorgianaElena Date: Wed, 2 Nov 2022 11:56:57 +0200 Subject: [PATCH 5/5] Update docs with location from where to run the chartpress cmd --- docs/topic/hub-image.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/topic/hub-image.md b/docs/topic/hub-image.md index 0b75e3559a..7df723b992 100644 --- a/docs/topic/hub-image.md +++ b/docs/topic/hub-image.md @@ -41,6 +41,12 @@ When this hub image needs to be updated, the steps to take are: This package is also listed under `dev-requirements.txt`, so it should be present if you've installed the dev dependencies. + - Make sure you are in the `helm-charts` directory, where the `chartpress.yaml` is located: + + ```bash + cd ./helm-charts + ``` + - Run chartpress to build the image, push it to the registry and update the basehub helm chart to use the updated image tag ```bash