Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

github actions: Updates controller to the juju 3.6 controller #90

Merged
merged 1 commit into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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