From d195d38f534de01cf359ab92be18d7a4d0392ac6 Mon Sep 17 00:00:00 2001 From: Claudiu Belu Date: Wed, 11 Dec 2024 15:07:52 +0000 Subject: [PATCH] github actions: Updates controller to the juju 3.6 controller We have recently upgraded to juju 3.6.1, and a new controller was bootstrapped for it. The models have beem migrated to the new controller. --- .github/workflows/renew_certificate.yaml | 10 +++++----- .github/workflows/scheduled.yaml | 10 +++++----- .github/workflows/switch_env.yaml | 10 +++++----- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/renew_certificate.yaml b/.github/workflows/renew_certificate.yaml index 04f294ca..6cd77951 100644 --- a/.github/workflows/renew_certificate.yaml +++ b/.github/workflows/renew_certificate.yaml @@ -13,7 +13,7 @@ jobs: steps: - name: Install Juju run: | - sudo snap install juju --channel=3.1/stable --classic + sudo snap install juju --channel=3.6/stable --classic # We need the kubeconfig and the controllers.yaml file into our environment # in order to login and refresh the charms. @@ -25,7 +25,7 @@ jobs: echo "${KUBECONFIG_B64}" | base64 -d > ~/.kube/config echo "${CONTROLLERS_B64}" | base64 -d > ~/.local/share/juju/controllers.yaml - echo "${CONTROLLER_PASSWORD}" | juju login -c finos-legend-v3 -u admin + echo "${CONTROLLER_PASSWORD}" | juju login -c finos-legend-v36 -u admin env: KUBECONFIG_B64: "${{ secrets.KUBECONFIG_B64 }}" @@ -55,9 +55,9 @@ jobs: juju status --relations } - # Controller name is "finos-legend-v3", model name is "finos-legend" - renew_certificate "finos-legend-v3:finos-legend" - renew_certificate "finos-legend-v3:finos-legend-twin" + # Controller name is "finos-legend-v36", model name is "finos-legend" + renew_certificate "finos-legend-v36:finos-legend" + renew_certificate "finos-legend-v36:finos-legend-twin" - name: Send email on failure if: failure() && github.event_name == 'schedule' diff --git a/.github/workflows/scheduled.yaml b/.github/workflows/scheduled.yaml index 9d96c87e..95909921 100644 --- a/.github/workflows/scheduled.yaml +++ b/.github/workflows/scheduled.yaml @@ -13,7 +13,7 @@ jobs: steps: - name: Installing Dependencies run: | - sudo snap install juju --channel=3.1/stable --classic + sudo snap install juju --channel=3.6/stable --classic - name: Install Docker uses: docker-practice/actions-setup-docker@master @@ -28,7 +28,7 @@ jobs: echo "${KUBECONFIG_B64}" | base64 -d > ~/.kube/config echo "${CONTROLLERS_B64}" | base64 -d > ~/.local/share/juju/controllers.yaml - echo "${CONTROLLER_PASSWORD}" | juju login -c finos-legend-v3 -u admin + echo "${CONTROLLER_PASSWORD}" | juju login -c finos-legend-v36 -u admin env: KUBECONFIG_B64: "${{ secrets.KUBECONFIG_B64 }}" @@ -41,10 +41,10 @@ jobs: # We only refresh the staging environment. We need to check which model # is the staging one. We can find it by the configured external-hostname. - # Controller name is "finos-legend-v3", model name is "finos-legend" - model="finos-legend-v3:finos-legend" + # Controller name is "finos-legend-v36", model name is "finos-legend" + model="finos-legend-v36:finos-legend" if [ "$(juju config -m $model legend-studio external-hostname)" != "staging.legend.finos.org" ]; then - model="finos-legend-v3:finos-legend-twin" + model="finos-legend-v36:finos-legend-twin" fi juju switch "${model}" diff --git a/.github/workflows/switch_env.yaml b/.github/workflows/switch_env.yaml index c9d34382..dcac49b5 100644 --- a/.github/workflows/switch_env.yaml +++ b/.github/workflows/switch_env.yaml @@ -10,7 +10,7 @@ jobs: steps: - name: Installing Dependencies run: | - sudo snap install juju --channel=3.1/stable --classic + sudo snap install juju --channel=3.6/stable --classic # We need the kubeconfig and the controllers.yaml file into our environment # in order to login and switch the environments. @@ -22,7 +22,7 @@ jobs: echo "${KUBECONFIG_B64}" | base64 -d > ~/.kube/config echo "${CONTROLLERS_B64}" | base64 -d > ~/.local/share/juju/controllers.yaml - echo "${CONTROLLER_PASSWORD}" | juju login -c finos-legend-v3 -u admin + echo "${CONTROLLER_PASSWORD}" | juju login -c finos-legend-v36 -u admin env: KUBECONFIG_B64: "${{ secrets.KUBECONFIG_B64 }}" @@ -31,8 +31,8 @@ jobs: - name: Switch environments run: | - # Controller name is "finos-legend-v3", model name is "finos-legend" - juju switch finos-legend-v3:finos-legend + # Controller name is "finos-legend-v36", model name is "finos-legend" + juju switch finos-legend-v36:finos-legend # Running juju status will show us the current revisions of the charms. echo "finos-legend model status:" @@ -68,7 +68,7 @@ jobs: juju config legend-engine external-hostname="${DNS_NAME_A}" juju config legend-ingress tls-secret-name="${TLS_SECRET_A}" - juju switch finos-legend-v3:finos-legend + juju switch finos-legend-v36:finos-legend juju config certbot-k8s service-hostname="${DNS_NAME_B}" juju config legend-studio external-hostname="${DNS_NAME_B}" juju config legend-sdlc external-hostname="${DNS_NAME_B}"