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

docs: add some content for deploying with argo #1833

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
25 changes: 21 additions & 4 deletions doc/deployments/deploying-updated-code.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/<environment>` 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
Expand All @@ -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/<environment>` 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 '<component-name>.values.yaml'
### Changes to 'k8s/helmfile/env/<environment>/<component-name>.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
Expand All @@ -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
Expand Down