From 958d1cb13f821cb1fba2e7a0d7c71994728abbf4 Mon Sep 17 00:00:00 2001 From: kenafoster Date: Wed, 11 Sep 2024 18:36:40 -0400 Subject: [PATCH 01/11] Update Docker Push for quay.io Changing the docker GH Action to push to Nebari's quay.io repository --- .github/workflows/publish-docker-image.yaml | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/.github/workflows/publish-docker-image.yaml b/.github/workflows/publish-docker-image.yaml index f454825..75386df 100644 --- a/.github/workflows/publish-docker-image.yaml +++ b/.github/workflows/publish-docker-image.yaml @@ -10,7 +10,7 @@ on: - self-registration/** env: - REGISTRY: ghcr.io + REGISTRY: quay.io IMAGE_NAME: ${{ github.repository }} jobs: @@ -20,18 +20,23 @@ jobs: packages: write contents: read steps: - - uses: actions/checkout@v3 - - name: Set lower case image name + - name: "Checkout Repository 🛎️" + uses: actions/checkout@v3 + - name: "Login to Quay Container Registry 🔐" + uses: docker/login-action@v2 + with: + registry: quay.io + username: ${{ secrets.QUAY_USERNAME }} + password: ${{ secrets.QUAY_TOKEN }} + - name: "Set lower case image name" run: echo "IMAGE_LC=${IMAGE_NAME,,}" >>${GITHUB_ENV} - - name: Set the timestamp for version + - name: "Set the timestamp for version" run: echo "VERSION=$(date +'%Y%m%d-%H%M')" >> ${GITHUB_ENV} - - name: Build image + - name: "Build image" run: docker build self-registration --file self-registration/Dockerfile --tag $IMAGE_LC --label "runnumber=${GITHUB_RUN_ID}" - - name: Log in to registry - run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login $REGISTRY -u $ --password-stdin - name: Push image run: | - IMAGE_ID=ghcr.io/$IMAGE_LC + IMAGE_ID=$REGISTRY/$IMAGE_LC IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') [[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//') From b01d03c7ab198190c4f19cdc6e81a61b7a35b4d2 Mon Sep 17 00:00:00 2001 From: kenafoster Date: Wed, 11 Sep 2024 18:40:22 -0400 Subject: [PATCH 02/11] Change Helm chart default to quay.io/nebari-dev --- .../terraform/modules/self-registration/chart/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nebari_plugin_self_registration/terraform/modules/self-registration/chart/values.yaml b/src/nebari_plugin_self_registration/terraform/modules/self-registration/chart/values.yaml index 318c2a6..4d4244a 100644 --- a/src/nebari_plugin_self_registration/terraform/modules/self-registration/chart/values.yaml +++ b/src/nebari_plugin_self_registration/terraform/modules/self-registration/chart/values.yaml @@ -4,7 +4,7 @@ replicaCount: 1 image: - repository: ghcr.io/metrostar/nebari-self-registration + repository: quay.io/nebari-dev/nebari-self-registration pullPolicy: IfNotPresent # Overrides the image tag whose default is the chart appVersion. tag: "20240515-1204" From 8e62ecc407796a661deab805640f30ec2ef3391f Mon Sep 17 00:00:00 2001 From: kenafoster Date: Wed, 11 Sep 2024 18:41:49 -0400 Subject: [PATCH 03/11] trivial change to trigger and test docker action --- self-registration/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/self-registration/Dockerfile b/self-registration/Dockerfile index 0269544..ddf6b4f 100644 --- a/self-registration/Dockerfile +++ b/self-registration/Dockerfile @@ -4,7 +4,7 @@ WORKDIR /app COPY ./requirements.txt /tmp/requirements.txt -# need to pre-install cython < 3 to avoid pyyaml >= 5.4.1 incompatibility https://github.com/yaml/pyyaml/issues/601 +# need to pre-install cython < 3 to avoid pyyaml >= 5.4.1 incompatibility: https://github.com/yaml/pyyaml/issues/601 RUN echo "cython<3" > /tmp/constraint.txt RUN PIP_CONSTRAINT=/tmp/constraint.txt pip install --no-cache-dir --upgrade -r /tmp/requirements.txt @@ -15,4 +15,4 @@ COPY ./app /app RUN useradd -m www USER www -CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"] \ No newline at end of file +CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"] From 7df15578d0979e4d796a9b63329aaf514b34d9ca Mon Sep 17 00:00:00 2001 From: Ken Foster Date: Thu, 26 Sep 2024 14:23:37 -0400 Subject: [PATCH 04/11] Fix quay.io org name --- .../terraform/modules/self-registration/chart/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nebari_plugin_self_registration/terraform/modules/self-registration/chart/values.yaml b/src/nebari_plugin_self_registration/terraform/modules/self-registration/chart/values.yaml index 4d4244a..d6dd6e4 100644 --- a/src/nebari_plugin_self_registration/terraform/modules/self-registration/chart/values.yaml +++ b/src/nebari_plugin_self_registration/terraform/modules/self-registration/chart/values.yaml @@ -4,7 +4,7 @@ replicaCount: 1 image: - repository: quay.io/nebari-dev/nebari-self-registration + repository: quay.io/nebari/nebari-self-registration pullPolicy: IfNotPresent # Overrides the image tag whose default is the chart appVersion. tag: "20240515-1204" From d036d4015332bde7b1aa887549e3408efe067110 Mon Sep 17 00:00:00 2001 From: Ken Foster Date: Thu, 26 Sep 2024 14:41:14 -0400 Subject: [PATCH 05/11] Hardcode image name since GH and Quay are different org names --- .github/workflows/publish-docker-image.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-docker-image.yaml b/.github/workflows/publish-docker-image.yaml index 75386df..a846de3 100644 --- a/.github/workflows/publish-docker-image.yaml +++ b/.github/workflows/publish-docker-image.yaml @@ -11,7 +11,7 @@ on: env: REGISTRY: quay.io - IMAGE_NAME: ${{ github.repository }} + IMAGE_NAME: nebari/nebari-self-registration jobs: push: From abbb1c7f45d2e0f1cc653bab9fdcbe10d9eedb1b Mon Sep 17 00:00:00 2001 From: Ken Foster Date: Thu, 26 Sep 2024 14:58:58 -0400 Subject: [PATCH 06/11] Python Package and default image version bumps --- src/nebari_plugin_self_registration/__about__.py | 2 +- .../terraform/modules/self-registration/chart/Chart.yaml | 2 +- .../terraform/modules/self-registration/chart/values.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/nebari_plugin_self_registration/__about__.py b/src/nebari_plugin_self_registration/__about__.py index 6e2648a..4ae81f3 100644 --- a/src/nebari_plugin_self_registration/__about__.py +++ b/src/nebari_plugin_self_registration/__about__.py @@ -1 +1 @@ -__version__ = "0.0.12" +__version__ = "0.0.13" diff --git a/src/nebari_plugin_self_registration/terraform/modules/self-registration/chart/Chart.yaml b/src/nebari_plugin_self_registration/terraform/modules/self-registration/chart/Chart.yaml index b37ab58..c6c1f58 100644 --- a/src/nebari_plugin_self_registration/terraform/modules/self-registration/chart/Chart.yaml +++ b/src/nebari_plugin_self_registration/terraform/modules/self-registration/chart/Chart.yaml @@ -21,4 +21,4 @@ version: 0.0.16 # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -appVersion: "0.0.12" +appVersion: "0.0.13" diff --git a/src/nebari_plugin_self_registration/terraform/modules/self-registration/chart/values.yaml b/src/nebari_plugin_self_registration/terraform/modules/self-registration/chart/values.yaml index d6dd6e4..06a8e8e 100644 --- a/src/nebari_plugin_self_registration/terraform/modules/self-registration/chart/values.yaml +++ b/src/nebari_plugin_self_registration/terraform/modules/self-registration/chart/values.yaml @@ -7,7 +7,7 @@ image: repository: quay.io/nebari/nebari-self-registration pullPolicy: IfNotPresent # Overrides the image tag whose default is the chart appVersion. - tag: "20240515-1204" + tag: "20240926-1841" imagePullSecrets: [] nameOverride: "" From 1ec8ac6843ced13a223f28255ba10f829681b461 Mon Sep 17 00:00:00 2001 From: Ken Foster Date: Fri, 11 Oct 2024 15:36:54 -0400 Subject: [PATCH 07/11] Pin docker base image. Add setuptools for pkg_resources module --- self-registration/Dockerfile | 3 ++- self-registration/requirements.txt | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/self-registration/Dockerfile b/self-registration/Dockerfile index ddf6b4f..9997791 100644 --- a/self-registration/Dockerfile +++ b/self-registration/Dockerfile @@ -1,4 +1,5 @@ -FROM python:3.12 +# Python 3.12 +FROM python@sha256:05855f5bf06f5a004b0c1a8aaac73a9d9ea54390fc289d3e80ef52c4f90d5585 WORKDIR /app diff --git a/self-registration/requirements.txt b/self-registration/requirements.txt index df194a2..047591f 100644 --- a/self-registration/requirements.txt +++ b/self-registration/requirements.txt @@ -1,6 +1,7 @@ fastapi==0.104.1 uvicorn==0.24.0.post1 jinja2==3.1.2 +setuptools==69.0.3 python-keycloak==3.3.0 pyyaml==5.4.1 python-multipart==0.0.6 From 52cdac90cd078b4c87f887c43ce86f93c802dff8 Mon Sep 17 00:00:00 2001 From: Ken Foster Date: Tue, 15 Oct 2024 17:53:43 -0400 Subject: [PATCH 08/11] Update default app image --- .../terraform/modules/self-registration/chart/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nebari_plugin_self_registration/terraform/modules/self-registration/chart/values.yaml b/src/nebari_plugin_self_registration/terraform/modules/self-registration/chart/values.yaml index 06a8e8e..6d12b6f 100644 --- a/src/nebari_plugin_self_registration/terraform/modules/self-registration/chart/values.yaml +++ b/src/nebari_plugin_self_registration/terraform/modules/self-registration/chart/values.yaml @@ -7,7 +7,7 @@ image: repository: quay.io/nebari/nebari-self-registration pullPolicy: IfNotPresent # Overrides the image tag whose default is the chart appVersion. - tag: "20240926-1841" + tag: "20241011-1937" imagePullSecrets: [] nameOverride: "" From c723b71117f1fc76daed51a6436dad2441e44722 Mon Sep 17 00:00:00 2001 From: Ken Foster Date: Tue, 15 Oct 2024 17:59:04 -0400 Subject: [PATCH 09/11] version bump --- src/nebari_plugin_self_registration/__about__.py | 2 +- .../terraform/modules/self-registration/chart/Chart.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nebari_plugin_self_registration/__about__.py b/src/nebari_plugin_self_registration/__about__.py index 4ae81f3..311f216 100644 --- a/src/nebari_plugin_self_registration/__about__.py +++ b/src/nebari_plugin_self_registration/__about__.py @@ -1 +1 @@ -__version__ = "0.0.13" +__version__ = "0.0.14" diff --git a/src/nebari_plugin_self_registration/terraform/modules/self-registration/chart/Chart.yaml b/src/nebari_plugin_self_registration/terraform/modules/self-registration/chart/Chart.yaml index c6c1f58..fad4ed8 100644 --- a/src/nebari_plugin_self_registration/terraform/modules/self-registration/chart/Chart.yaml +++ b/src/nebari_plugin_self_registration/terraform/modules/self-registration/chart/Chart.yaml @@ -21,4 +21,4 @@ version: 0.0.16 # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -appVersion: "0.0.13" +appVersion: "0.0.14" From 3351e43171e2c1b1f006e096a319566ef1edcc1b Mon Sep 17 00:00:00 2001 From: Ken Foster Date: Wed, 23 Oct 2024 13:53:04 -0400 Subject: [PATCH 10/11] Update Dockerfile tag --- self-registration/Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/self-registration/Dockerfile b/self-registration/Dockerfile index 9997791..637d1df 100644 --- a/self-registration/Dockerfile +++ b/self-registration/Dockerfile @@ -1,5 +1,4 @@ -# Python 3.12 -FROM python@sha256:05855f5bf06f5a004b0c1a8aaac73a9d9ea54390fc289d3e80ef52c4f90d5585 +FROM python:3.12@sha256:05855f5bf06f5a004b0c1a8aaac73a9d9ea54390fc289d3e80ef52c4f90d5585 WORKDIR /app From f8eca4a87cc683f775f5983b2e0a1ae192f89f73 Mon Sep 17 00:00:00 2001 From: Ken Foster Date: Wed, 23 Oct 2024 14:52:34 -0400 Subject: [PATCH 11/11] Update default img tag --- .../terraform/modules/self-registration/chart/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nebari_plugin_self_registration/terraform/modules/self-registration/chart/values.yaml b/src/nebari_plugin_self_registration/terraform/modules/self-registration/chart/values.yaml index 6d12b6f..e9e97ff 100644 --- a/src/nebari_plugin_self_registration/terraform/modules/self-registration/chart/values.yaml +++ b/src/nebari_plugin_self_registration/terraform/modules/self-registration/chart/values.yaml @@ -7,7 +7,7 @@ image: repository: quay.io/nebari/nebari-self-registration pullPolicy: IfNotPresent # Overrides the image tag whose default is the chart appVersion. - tag: "20241011-1937" + tag: "20241023-1753" imagePullSecrets: [] nameOverride: ""