From 5b53fbb284317a41d4009f2af29dc80c16bdb908 Mon Sep 17 00:00:00 2001 From: Mubangizi Allan Date: Fri, 24 Apr 2026 06:42:45 +0300 Subject: [PATCH 1/3] change deployment to renu server --- .github/workflows/staging.yaml | 39 ++++++++++++++++++++-------------- 1 file changed, 23 insertions(+), 16 deletions(-) diff --git a/.github/workflows/staging.yaml b/.github/workflows/staging.yaml index 2e8c78d..a049910 100644 --- a/.github/workflows/staging.yaml +++ b/.github/workflows/staging.yaml @@ -5,6 +5,7 @@ on: push: branches: - develop + - ch-change-deployment workflow_dispatch: @@ -83,23 +84,29 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - - name: Login (GCP) - uses: google-github-actions/auth@v2 + # --- GCP DEPLOYEMENT --- + # - name: Login (GCP) + # uses: google-github-actions/auth@v2 + # with: + # credentials_json: ${{ secrets.CREDENTIALS_JSON }} + + # - name: Install (Gcloud) + # uses: google-github-actions/setup-gcloud@v2 + # with: + # project_id: crane-cloud-274413 + # install_components: "gke-gcloud-auth-plugin" + + # - name: Login (Kubernetes Cluster) + # uses: google-github-actions/get-gke-credentials@v2 + # with: + # cluster_name: staging-cluster + # location: us-central1-a + # project_id: crane-cloud-274413 + + # --- RENU DEPLOYEMENT --- + - uses: azure/k8s-set-context@v1 with: - credentials_json: ${{ secrets.CREDENTIALS_JSON }} - - - name: Install (Gcloud) - uses: google-github-actions/setup-gcloud@v2 - with: - project_id: crane-cloud-274413 - install_components: "gke-gcloud-auth-plugin" - - - name: Login (Kubernetes Cluster) - uses: google-github-actions/get-gke-credentials@v2 - with: - cluster_name: staging-cluster - location: us-central1-a - project_id: crane-cloud-274413 + kubeconfig: ${{ secrets.RENU_KUBECONFIG}} - name: Add Repo (cranecloud) run: | From 5b7f2db1378b49137b655760d6f33c4324ec6bd4 Mon Sep 17 00:00:00 2001 From: Mubangizi Allan Date: Thu, 11 Jun 2026 17:59:05 +0300 Subject: [PATCH 2/3] update prod to host on RENU --- .github/workflows/prod.yaml | 75 +++++++++++++++++++------------------ helm/values.prod.yaml | 2 +- 2 files changed, 40 insertions(+), 37 deletions(-) diff --git a/.github/workflows/prod.yaml b/.github/workflows/prod.yaml index f1d7040..e9ecb4b 100644 --- a/.github/workflows/prod.yaml +++ b/.github/workflows/prod.yaml @@ -6,6 +6,9 @@ on: types: - released - prereleased + push: + branches: + - ch-change-deployment jobs: build: @@ -14,29 +17,23 @@ jobs: tag: ${{ steps.export.outputs.tag }} runs-on: ubuntu-latest + env: + image: cranecloud/activity-logger steps: - name: Checkout uses: actions/checkout@v4 - with: - ref: main # Reference branch + # with: + # ref: main # Reference branch - name: Install (Buildx) uses: docker/setup-buildx-action@v3 - - name: Login (GCP) - uses: google-github-actions/auth@v2 + - name: Login to Docker Hub + uses: docker/login-action@v2 with: - credentials_json: ${{ secrets.CREDENTIALS_JSON }} - - - name: Install (Gcloud) - uses: google-github-actions/setup-gcloud@v1 - with: - project_id: crane-cloud-274413 - install_components: "gke-gcloud-auth-plugin" - - - name: Login (GCR) - run: gcloud auth configure-docker + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} - id: meta name: Tag @@ -44,7 +41,7 @@ jobs: with: flavor: | latest=true - images: gcr.io/crane-cloud-274413/activity-logger + images: ${{ env.image }} tags: | type=ref,event=branch type=ref,event=pr @@ -53,19 +50,18 @@ jobs: type=sha - name: Build - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v5 with: cache-from: type=gha cache-to: type=gha,mode=max context: . - file: Dockerfile labels: ${{ steps.meta.outputs.labels }} push: true tags: ${{ steps.meta.outputs.tags }} - id: export name: Export - uses: actions/github-script@v5 + uses: actions/github-script@v7 with: script: | const metadata = JSON.parse(`${{ steps.meta.outputs.json }}`) @@ -88,28 +84,35 @@ jobs: env: namespace: cranecloud-prod + image: cranecloud/activity-logger steps: - - name: Clone - uses: actions/checkout@v2 - - - name: Login (GCP) - uses: google-github-actions/auth@v2 - with: - credentials_json: ${{ secrets.CREDENTIALS_JSON }} - - - name: Install (Gcloud) - uses: google-github-actions/setup-gcloud@v1 - with: - project_id: crane-cloud-274413 - install_components: "gke-gcloud-auth-plugin" + - name: Checkout code + uses: actions/checkout@v4 - - name: Login (Kubernetes Cluster) - uses: google-github-actions/get-gke-credentials@v1 + # --- GCP DEPLOYEMENT --- + # - name: Login (GCP) + # uses: google-github-actions/auth@v2 + # with: + # credentials_json: ${{ secrets.CREDENTIALS_JSON }} + + # - name: Install (Gcloud) + # uses: google-github-actions/setup-gcloud@v2 + # with: + # project_id: crane-cloud-274413 + # install_components: "gke-gcloud-auth-plugin" + + # - name: Login (Kubernetes Cluster) + # uses: google-github-actions/get-gke-credentials@v2 + # with: + # cluster_name: staging-cluster + # location: us-central1-a + # project_id: crane-cloud-274413 + + # --- RENU DEPLOYEMENT --- + - uses: azure/k8s-set-context@v1 with: - cluster_name: staging-cluster - location: us-central1-a - project_id: crane-cloud-274413 + kubeconfig: ${{ secrets.RENU_KUBECONFIG}} - name: Add Repo (cranecloud) run: | diff --git a/helm/values.prod.yaml b/helm/values.prod.yaml index 64978c5..0997d32 100644 --- a/helm/values.prod.yaml +++ b/helm/values.prod.yaml @@ -1,7 +1,7 @@ replicaCount: 1 image: - repository: gcr.io/crane-cloud-274413/activity-logger + repository: cranecloud/activity-logger pullPolicy: Always tag: ${{ DOCKER_IMAGE_TAG }} From acbfc0a0ca4654f8f7daaab8cf22c91e309a6abb Mon Sep 17 00:00:00 2001 From: Mubangizi Allan Date: Thu, 11 Jun 2026 18:05:02 +0300 Subject: [PATCH 3/3] add redis deployment --- .github/workflows/staging.yaml | 1 - helm/values.prod.yaml | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/staging.yaml b/.github/workflows/staging.yaml index a049910..9b81e36 100644 --- a/.github/workflows/staging.yaml +++ b/.github/workflows/staging.yaml @@ -5,7 +5,6 @@ on: push: branches: - develop - - ch-change-deployment workflow_dispatch: diff --git a/helm/values.prod.yaml b/helm/values.prod.yaml index 0997d32..b7d6ef5 100644 --- a/helm/values.prod.yaml +++ b/helm/values.prod.yaml @@ -42,7 +42,7 @@ celery: port: 5001 redis: - create: false + create: true mongo: create: true \ No newline at end of file