From 72a34ddc411085a23c7882dc5a496bbc201bcbc1 Mon Sep 17 00:00:00 2001 From: Thomas Arrow Date: Wed, 6 Nov 2024 10:06:54 +0000 Subject: [PATCH] docs: add some content for deploying with argo --- doc/deployments/deploying-updated-code.md | 25 +++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/doc/deployments/deploying-updated-code.md b/doc/deployments/deploying-updated-code.md index 8e4913ef4..85cc9aa3d 100644 --- a/doc/deployments/deploying-updated-code.md +++ b/doc/deployments/deploying-updated-code.md @@ -5,6 +5,10 @@ This is a guide to deploying changes to components. It does not describe how to make opentofu changes or how to make changes to charts beyond bumping the version of the image that they use. +We are migrating to deploy code using argocd from helmfile. You need to identify +how the component you are updating is deployed and read the appropriate section below. The +easiest way to confirm a component is now using argo is to check that is has a values file in the `k8s/argocd/` and that it is `installed: false` in all environments in helmfile.yaml. + ## The big picture To deploy new code after it has been merged in a component we currently make three steps: 1. Build a new version of the image @@ -25,14 +29,27 @@ First make sure that all the code you want to deploy is merged into the main bra ## Creating a new version of that component's chart For creating new charts see [creating-a-new-component-chart-version.md](creating-a-new-component-chart-version.md) *Note:* Only do this section if the change includes configuration of environment changes [see adr0004 for details.](../adr/0004-no-new-chart-for-image-bumps.md) -Otherwise, skip creating a new chart and update the docker image used by altering the values file. +Otherwise, skip creating a new chart and move on to using the new OCI image. + +## Deploying a new chart or image using argo + +### Changes to values files +Make a change to the values file in `k8s/argocd/` for the new image you wish to deploy and open a PR for that change. + +## Deploying the change +Once it is approved by a colleague then you can merge it. + +Argo should now handle changing the release for you and rolling out the change. You don't need to run any commands on your laptop. +You can confirm the change has worked by looking at the argo ui, with kubectl, or looking at the service you've updated and seeing if the change you expected is present. + +## Deploying a new chart or image using helmfile - ## Changes to '.values.yaml' +### Changes to 'k8s/helmfile/env//.values.yaml' - Make sure you are using the latest version of the `main` wbaas-deploy code - Make a change to the component's `values.yaml` file to use the new version of the image in the environment you are deploying - Commit this change to a branch and push it to github and open a pull request -## Deploying the code to staging +### Deploying the code to staging - Assign yourself to the task you are about to deploy, should currently be in "Deploy to Staging" - Let the team know you are planning to deploy by sharing the pull-request about to be deployed (mention it in mattermost) - Make sure you are using the latest version of the `main` wbaas-deploy code @@ -47,7 +64,7 @@ Otherwise, skip creating a new chart and update the docker image used by alterin - Move the ticket out of the deployment column and announce that deployment was completed - Get product/UX to check they are happy with the feature or change. - ## Deploying to Production + ### Deploying to Production - Assign yourself to the task you are about to deploy, should currently be in "Deploy to production" - Let the team know you are planning to deploy by sharing the pull-request about to be deployed (mention it in mattermost) - Make sure you are using the latest version of the `main` wbaas-deploy code