Skip to content

Commit

Permalink
Merge pull request #90 from claudiubelu/updates-to-v3.6-controller
Browse files Browse the repository at this point in the history
github actions: Updates controller to the juju 3.6 controller
  • Loading branch information
TheJuanAndOnly99 authored Dec 11, 2024
2 parents d84b0ec + d195d38 commit 25f1228
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/renew_certificate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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 }}"
Expand Down Expand Up @@ -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'
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/scheduled.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }}"
Expand All @@ -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}"
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/switch_env.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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 }}"
Expand All @@ -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:"
Expand Down Expand Up @@ -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}"
Expand Down

0 comments on commit 25f1228

Please sign in to comment.