|
1 | | -# Release Checklist |
| 1 | +# Releasing a new Deis version |
2 | 2 |
|
3 | | -TODO (krancour): rewrite for v2 |
| 3 | +This document describes how to release a new Deis version. It's targetted toward the Deis core |
| 4 | +maintainers. |
| 5 | + |
| 6 | +The below sections present a step by step guide to releasing a new Deis Workflow. Throughout all |
| 7 | +examples, we'll be assuming that the below two environment variables are present in wherever |
| 8 | +you're working. Make sure to set them (e.g. by `export`ing them) before you get started. |
| 9 | + |
| 10 | +- `$DEIS_RELEASE` - the full name of this version. For example, `v2.0.0-beta2` |
| 11 | +- `$DEIS_RELEASE_SHORT` - The short name of this version. For example, `beta2` |
| 12 | + |
| 13 | +# What's a release? |
| 14 | + |
| 15 | +A release consists of the following artifacts: |
| 16 | + |
| 17 | +1. Docker images with `$DEIS_RELEASE` tags for each Deis Workflow component: |
| 18 | + - [builder](https://github.com/deis/builder) |
| 19 | + - [controller](https://github.com/deis/controller) |
| 20 | + - [dockerbuilder](https://github.com/deis/dockerbuilder) |
| 21 | + - [fluentd](https://github.com/deis/fluentd) |
| 22 | + - [logger](https://github.com/deis/logger) |
| 23 | + - [minio](https://github.com/deis/minio) |
| 24 | + - [postgres](https://github.com/deis/postgres) |
| 25 | + - [registry](https://github.com/deis/registry) |
| 26 | + - [router](https://github.com/deis/router) |
| 27 | + - [slugbuilder](https://github.com/deis/slugbuilder) |
| 28 | + - [slugrunner](https://github.com/deis/slugrunner) |
| 29 | + - [workflow](https://github.com/deis/worflow) |
| 30 | + - [workflow-e2e](https://github.com/deis/workflow-e2e) |
| 31 | + - [workflow-manager](https://github.com/deis/workflow-manager) |
| 32 | + - [workflow-cli](https://github.com/deis/workflow-cli) |
| 33 | +2. A new [Helm chart for Deis](https://github.com/deis/charts) that references all of the new |
| 34 | +images referenced above. For example, if `$DEIS_RELEASE` is `2.0.0-beta2`, the new chart would |
| 35 | +be in a new directory called `workflow-beta2`. |
| 36 | + |
| 37 | +# Step 1: Get the status of all components |
| 38 | + |
| 39 | +First, we'll need to get the statuses of all repositories that house the components we're |
| 40 | +interested in upgrading. We'll use |
| 41 | +[sgoings/deis-workflow-group](https://github.com/sgoings/deis-workflow-group) to do that in one |
| 42 | +place. That repository is a group of git submodules with all of the applicable repositories in it, |
| 43 | +so that we can manage everything from one place. |
| 44 | + |
| 45 | +Clone that repository to any location on your local machine, update all submodules and list |
| 46 | +the latest commit for each submodule: |
| 47 | + |
| 48 | +```console |
| 49 | +git clone https://github.com/sgoings/deis-workflow-group |
| 50 | +cd deis-workflow-group |
| 51 | +make git-update |
| 52 | +git submodule status |
| 53 | +``` |
| 54 | + |
| 55 | +Keep the list of commit SHAs handy - you'll need it for later. |
| 56 | + |
| 57 | +# Step 2: Create a new Helm chart |
| 58 | + |
| 59 | +Next, we'll create a new [Helm](https://github.com/helm/helm) chart so that we can "stage" a |
| 60 | +version of our release for testing. The process is fairly simple: |
| 61 | + |
| 62 | +1. Create a new branch: `git checkout -b release-$DEIS_RELEASE` |
| 63 | +2. Copy an existing chart: `cp -r workflow-beta2 workflow-$DEIS_RELEASE_SHORT` |
| 64 | +3. Modify the `workflow-$DEIS_RELEASE_SHORT/tpl/generate_params.toml` file to ensure that all |
| 65 | +`dockerTag` values look like `git-$COMPONENT_SHA_SHORT`, where `$COMPONENT_SHA_SHORT` is the first |
| 66 | +7 characters of the applicable SHA that you got in the previous step. |
| 67 | +4. Commit your changes: `git commit -a -m "chore(workflow-$DEIS_RELEASE_SHORT): releasing workflow-$DEIS_RELEASE_SHORT"` |
| 68 | +5. Push your changes to your fork: `git push -u $YOUR_FORK_REMOTE release-$DEIS_RELEASE`. Note that |
| 69 | +`$YOUR_FORK_REMOTE` is the git URI to the remote of your `deis/charts` fork. Mine is `git@github.com:arschles/deis-charts.git`, for example. |
| 70 | +6. Do steps 2-5 with the `workflow-beta2-e2e` directory |
| 71 | +7. Open a pull request from your branch to merge into `master` on https://github.com/deis/charts |
| 72 | + |
| 73 | +# Step 3: Manual Testing |
| 74 | + |
| 75 | +After the chart is created with the immutable Docker image tags that represent the final images |
| 76 | +(i.e. the ones that will be re-tagged to the immutable release tag, such as `2.0.0-beta2`), it |
| 77 | +should be manually tested by as many people as possible. Special attention should be paid to the |
| 78 | +user experience, both from an operator and developer perspective. |
| 79 | + |
| 80 | +Our goal is to test with as many object storage and Kubernetes installation configurations as |
| 81 | +possible, to ensure there are no gaps in configuration or functionality. See below for a sample testing |
| 82 | +matrix. |
| 83 | + |
| 84 | +Object Storage / Kubernetes Install | Kube-Solo | Google Container Engine | AWS | Micro-Kube | Vagrant | |
| 85 | +----------------------------------- | --------- | ----------------------- | --- | ---------- | ------- | |
| 86 | +Default (Minio) | |
| 87 | +Google Cloud Storage | |
| 88 | +Amazon S3 | |
| 89 | + |
| 90 | +_Note_: If bugs are found and fixes are made, do the following: |
| 91 | + |
| 92 | +- Update the appropriate docker tag(s) in the `generate_params.toml` file |
| 93 | +- Run `make git-update` in the aforementioned `deis-workflow-group` repository |
| 94 | + |
| 95 | +# Step 4: Tag and push Docker images |
| 96 | + |
| 97 | +After everyone has tested and determined that there are no showstopping problems for this release, |
| 98 | +it's time to tag each individual Docker image with `$DEIS_RELEASE`. |
| 99 | + |
| 100 | +To do so, simply go back to the directory where you checked out the `deis-workflow-group` repo |
| 101 | +and run the following two commands to tag and push updated docker images: |
| 102 | + |
| 103 | +```console |
| 104 | +TAG=$DEIS_RELEASE make docker-tag docker-push |
| 105 | +``` |
| 106 | + |
| 107 | +# Step 5: Update Helm chart |
| 108 | + |
| 109 | +Now that new Docker images are on public Docker repositories, it's time to update the Helm chart |
| 110 | +to reference the official images. To do so, simply modify all `dockerTag` entries in the |
| 111 | +`generate_params.toml` files in the `workflow-$DEIS_RELEASE_SHORT` and |
| 112 | +`workflow-$DEIS_RELEASE_SHORT-e2e` to be `$DEIS_RELEASE` (instead of the ones based on git tags). |
| 113 | + |
| 114 | +Also, ensure that the `README.md` and `Chart.yaml` files in the new helm chart have updated references to the chart. For example, references to `helm install workflow-betaX` should become `helm install workflow-$DEIS_RELEASE_SHORT` |
| 115 | + |
| 116 | +If you find any references that should be bumped, open a pull-request against the documentation. |
| 117 | + |
| 118 | +When you're done, commit and push your changes. You should get your pull request reviewed and merged before continuing. |
| 119 | + |
| 120 | +# Step 6: Update Changelogs |
| 121 | + |
| 122 | +At this point, part of the first part and all of the second part of the release is complete. |
| 123 | +That is, the Helm chart for the new Deis version is done, and new Docker versions for all |
| 124 | +components are done. |
| 125 | + |
| 126 | +The remaining work is simply generating changelogs and tagging each component's GitHub repository. |
| 127 | + |
| 128 | +First, create a branch for the new changelog: |
| 129 | + |
| 130 | +```console |
| 131 | +git checkout -b release-$DEIS_RELEASE_SHORT |
| 132 | +``` |
| 133 | + |
| 134 | +To generate changelogs, run the below command in each repository. Ensure that `$PREVIOUS_TAG` is |
| 135 | +the previous tag that was generated in the repository. |
| 136 | + |
| 137 | +```console |
| 138 | +_scripts/generate_changelog.sh $PREVIOUS_TAG |
| 139 | +``` |
| 140 | + |
| 141 | +This command will output the new changelog entry to STDOUT. Copy it and prepend it to the |
| 142 | +existing `CHANGELOG.md` file, and make sure to change `HEAD` in the header of the entry |
| 143 | +to `$DEIS_RELEASE`. |
| 144 | + |
| 145 | +Also copy the component changelog to a global release changelog, organized by component. |
| 146 | +This will only live on your local machine while doing the release. Once changelogs for all |
| 147 | +the components have been collected, publish the combined release notes as a gist so folks |
| 148 | +in Step 9 can start preparing supporting content for the release. |
| 149 | + |
| 150 | +Finally, commit, push and submit a Pull Request for your changes: |
| 151 | + |
| 152 | +```console |
| 153 | +git commit CHANGELOG.md -m "doc(CHANGELOG.md): add entry for $DEIS_RELEASE_SHORT" |
| 154 | +git push -u $YOUR_FORK_REMOTE $DEIS_RELEASE_SHORT |
| 155 | +``` |
| 156 | + |
| 157 | +Before you continue, ensure pull requests in all applicable repositories are reviewed, and merge |
| 158 | +them. |
| 159 | + |
| 160 | +# Step 7: Tag and push git repos |
| 161 | + |
| 162 | +The final step of the release process is to tag each git repository, and push the tag to each |
| 163 | +GitHub project. To do so, simply run the below command in the `deis-workflow-group` repository: |
| 164 | + |
| 165 | +```console |
| 166 | +TAG=$DEIS_RELEASE TAG_MESSAGE="releasing workflow $DEIS_RELEASE" make git-tag git-tag-push |
| 167 | +``` |
| 168 | + |
| 169 | +# Step 8: Let everyone know |
| 170 | + |
| 171 | +Jump in #company on slack and let folks know that the release has been cut! This will let |
| 172 | +folks in supporting functions know that they should start the release support process including |
| 173 | +summary blog posts, tweets, notes for the monthly newsletter updates, etc. Providing a |
| 174 | +gist to the aggregated release notes would be super-fly. |
| 175 | + |
| 176 | +You are now done with the release. |
0 commit comments