Skip to content

Commit c9539d0

Browse files
author
Vaughn Dice
committed
docs(src/roadmap/releases.md): update to use k/helm
1 parent 9c9f012 commit c9539d0

1 file changed

Lines changed: 42 additions & 96 deletions

File tree

src/roadmap/releases.md

Lines changed: 42 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -121,38 +121,31 @@ fix whatever issue arose in the pipeline. For example, the
121121
may have failed to promote the `:git-abc1d23` candidate image and needs to be restarted with
122122
that component and commit.
123123

124+
If the component has a correlating [Kubernetes Helm][] chart,
125+
this chart will also be packaged, signed and uploaded to its production chart repo. Please
126+
verify it can be fetched (and verified):
127+
128+
```
129+
$ helm repo add controller https://charts.deis.com/controller
130+
"controller" has been added to your repositories
131+
$ helm fetch --verify controller/controller --version v2.9.0 && echo
132+
Verification: &{0xc42028d3b0 sha256:17b94dd854e090c6627728bdcb5e2ea588f3cb4fecc1082a5a03c909c0ed0ecd controller-v2.9.0.tgz}
133+
```
134+
124135
## How to Release Workflow
125136

126-
Deis Workflow integrates multiple component releases together with a [Helm Classic][] chart
137+
Deis Workflow integrates multiple component releases together with a [Kubernetes Helm][] chart
127138
deliverable. This section leads a maintainer through creating a Workflow release.
128139

129-
### Step 1: Update Code and Set Environment Variables
130-
131-
In the [deis/charts][] repository, update from the GitHub remote. Major or minor releases start
132-
from the master branch. Patch releases should check out the previous release tag and cherry-pick
133-
specific commits from master.
140+
### Step 1: Set Environment Variables
134141

135142
Export two environment variables that will be used in later steps:
136143

137144
```bash
138145
export WORKFLOW_RELEASE=v2.9.0 WORKFLOW_PREV_RELEASE=v2.8.0 # for example
139146
```
140147

141-
### Step 2: Update Jenkins Jobs
142-
143-
Update the Workflow chart release value in the
144-
[common.groovy](https://github.com/deis/jenkins-jobs/blob/master/common.groovy) file so the
145-
[workflow-test-release](https://ci.deis.io/job/workflow-test-release/) job will kick off
146-
automatically when the `release-${WORKFLOW_RELEASE}` branch is pushed:
147-
148-
```bash
149-
git clone git@github.com:deis/jenkins-jobs.git
150-
perl -i -0pe "s/${WORKFLOW_PREV_RELEASE}/${WORKFLOW_RELEASE}/" common.groovy
151-
git commit -a -m "chore(workflow-$WORKFLOW_RELEASE): update workflow chart release value"
152-
git push upstream HEAD:master
153-
```
154-
155-
### Step 3: Tag Supporting Repositories
148+
### Step 2: Tag Supporting Repositories
156149

157150
Some Workflow components not in the Helm chart must also be tagged in sync with the release.
158151
Follow the [component release process](#how-to-release-a-component) above and ensure that
@@ -162,65 +155,16 @@ these components are tagged:
162155
- [deis/workflow-cli][]
163156
- [deis/workflow-e2e][]
164157

165-
### Step 4: Create Helm Charts
158+
### Step 3: Create Helm Chart
166159

167-
For a patch release, check out the previous tag and cherry-pick commits onto it:
160+
To create and stage a release candidate chart for Workflow, we will build the [workflow-chart-publish](https://ci.deis.io/job/workflow-chart-publish) job with the following parameters:
168161

169-
```bash
170-
git checkout -b release-$WORKFLOW_RELEASE $WORKFLOW_PREV_RELEASE
171-
git cherry-pick 143ac41 # and so on...
172-
```
162+
`CHART_REPO_TYPE=staging` and `RELEASE_TAG=$WORKFLOW_RELEASE`
173163

174-
For a major or minor release, copy and modify the current development charts:
164+
This job will gather all of the latest component release tags and use these to specify the versions of all component charts.
165+
It will then package the Workflow chart, upload it to the staging chart repo and kick off an e2e run against said chart.
175166

176-
```bash
177-
git checkout -b release-$WORKFLOW_RELEASE master
178-
_scripts/new_workflow_charts.sh
179-
```
180-
181-
Use the `deisrel` tool to determine the latest component releases:
182-
```bash
183-
export GH_TOKEN=<my_github_api_token> # set token to avoid rate-limiting errors
184-
# Create a JSON file with the components for the new release
185-
cat > components.json <<EOF
186-
{
187-
"builder": ["builder"],
188-
"controller": ["controller"],
189-
"dockerbuilder": ["dockerbuilder"],
190-
"fluentd": ["fluentd"],
191-
"monitor": ["influxdb", "grafana", "telegraf"],
192-
"logger": ["logger"],
193-
"minio": ["minio"],
194-
"nsq": ["nsqd"],
195-
"postgres": ["database"],
196-
"redis": ["loggerRedis"],
197-
"registry": ["registry"],
198-
"registry-proxy": ["registry_proxy"],
199-
"registry-token-refresher": ["registry_token_refresher"],
200-
"router": ["router"],
201-
"slugbuilder": ["slugbuilder"],
202-
"slugrunner": ["slugrunner"],
203-
"workflow-manager": ["workflowManager"]
204-
}
205-
EOF
206-
deisrel $HOME/.helmc/workspace/charts/workflow-$WORKFLOW_PREV_RELEASE/tpl/generate_params.toml \
207-
components.json
208-
```
209-
210-
Change the `generate_params.toml` file in **each** new chart as follows:
211-
212-
1. Set all `dockerTag` values to latest releases for each component, as determined above
213-
214-
Commit and push your changes:
215-
216-
```bash
217-
git commit -a -m "chore(workflow-$WORKFLOW_RELEASE): releasing workflow-$WORKFLOW_RELEASE(-e2e)"
218-
git push upstream HEAD:release-$WORKFLOW_RELEASE
219-
```
220-
221-
Open a pull request at [deis/charts][] to merge this branch into master.
222-
223-
### Step 5: Manual Testing
167+
### Step 4: Manual Testing
224168

225169
Now it's time to go above and beyond current CI tests. Create a testing matrix spreadsheet (copying
226170
from the previous document is a good start) and sign up testers to cover all permutations.
@@ -234,30 +178,33 @@ When showstopper-level bugs are found, the process is as follows:
234178
1. Create a component PR that fixes the bug.
235179
1. Once the PR passes and is reviewed, merge it and do a new
236180
[component release](#how-to-release-a-component)
237-
1. Update that component's `dockerTag` value in the release chart(s) to the new semver tag
238-
1. Commit and push the chart changes to the release branch and restart testing
181+
1. Trigger the same `workflow-chart-publish` job as mentioned in Step 3 to upload the newly-generated Workflow release candidate chart to staging.
239182

240-
### Step 6: Release the Chart as a Component
183+
### Step 5: Release the Chart
241184

242185
When testing has completed without uncovering any new showstopper bugs and the charts PR has been
243-
reviewed successfully, merge it to master. Then update your local master branch and do a
244-
[component release][] of the chart repository. Note that the [semantic version][] of the chart
245-
release is predetermined as the value of `$WORKFLOW_RELEASE`.
186+
reviewed successfully, kick off the [workflow-chart-release](https://ci.deis.io/job/workflow-chart-release) job with the following parameter:
187+
188+
`RELEASE_TAG=$WORKFLOW_RELEASE`
189+
190+
This job will copy the release candidate chart (now approved by CI and manual testing) from the staging repo to the production repo, signing
191+
it if it has not done so already.
246192

247-
### Step 7: Assemble Master Changelog
193+
### Step 6: Assemble Master Changelog
248194

249195
Each component already updated its release notes on GitHub with CHANGELOG content. We'll now
250196
generate the master changelog for the Workflow chart, consisting of all aforementioned component changes
251197
as well as those non-component repo changes needing to be manually added.
252198

253-
We'll employ the same `generate_params.toml` and `components.json` files as used in Step 4 above, this time
254-
invoking `deisrel changelog global` to get all component changes between the tag existing in the `WORKFLOW_PREV_RELEASE`
255-
chart and the _most recent_ release tag existing in GitHub. (Therefore, if there are any unreleased commits in
256-
a component repo, they will not appear here):
199+
We'll employ the `requirements.lock` file from the `WORKFLOW_PREV_RELEASE` chart, as well as a repo-to-chart-name mapping file
200+
(see [here](https://github.com/deis/deisrel/blob/master/README.md#usage) for an example), this time invoking `deisrel changelog global` to get all component changes between
201+
the chart versions existing in the `WORKFLOW_PREV_RELEASE` chart and the _most recent_ releases existing in GitHub.
202+
(Therefore, if there are any unreleased commits in a component repo, they will not appear here):
257203

258204
```bash
259-
deisrel changelog global $HOME/.helmc/workspace/charts/workflow-$WORKFLOW_PREV_RELEASE/tpl/generate_params.toml \
260-
components.json > $WORKFLOW_RELEASE
205+
helm repo add deis https://charts.deis.com/workflow
206+
helm fetch --untar deis/workflow --version $WORKFLOW_PREV_RELEASE
207+
deisrel changelog global workflow/requirements.lock mapping.json > $WORKFLOW_RELEASE
261208
```
262209

263210
To get non-component repo changelogs (presumably tagged in Step 3 above), one can issue a command like the following
@@ -275,7 +222,7 @@ These can be added to the `$WORKFLOW_RELEASE` file created previously.
275222
This master changelog should then be placed into a single gist. The file will also be added to the documentation
276223
update PR created in the next step.
277224

278-
### Step 8: Update Documentation
225+
### Step 7: Update Documentation
279226

280227
Create a new pull request at [deis/workflow][] that updates version references to the new release.
281228
Use `git grep $WORKFLOW_PREV_RELEASE` to find any references, but be careful not to change
@@ -290,17 +237,17 @@ Make sure to add a header to the page to make it clear that this is for a Workfl
290237
## Workflow v2.8.0 -> v2.9.0
291238
```
292239

293-
### Step 9: Close GitHub Milestones
240+
### Step 8: Close GitHub Milestones
294241

295242
Create a pull request at [seed-repo](https://github.com/deis/seed-repo) to close the release
296243
milestone and create the next one. When changes are merged to seed-repo, milestones on all
297244
relevant projects will be updated. If there are open issues attached to the milestone, move them
298245
to the next upcoming milestone before merging the pull request.
299246

300-
Milestones map to Deis Workflow releases in [deis/charts][]. These milestones do not correspond
247+
Milestones map to Deis Workflow releases in [deis/workflow][]. These milestones do not correspond
301248
to individual component release tags.
302249

303-
### Step 10: Release Workflow CLI Stable
250+
### Step 9: Release Workflow CLI Stable
304251

305252
Now that the `$WORKFLOW_RELEASE` version of Workflow CLI has been vetted, we can push `stable` artifacts based on this version.
306253

@@ -313,7 +260,7 @@ $ ./deis version
313260
# (Should show $WORKFLOW_RELEASE)
314261
```
315262

316-
### Step 11: Let Everyone Know
263+
### Step 10: Let Everyone Know
317264

318265
Let the rest of the team know they can start blogging and tweeting about the new Workflow release.
319266
Post a message to the #company channel on Slack. Include a link to the released chart and to the
@@ -329,10 +276,9 @@ You're done with the release. Nice job!
329276

330277
[component release]: /roadmap/releases/#how-to-release-a-component
331278
[continuous delivery]: https://en.wikipedia.org/wiki/Continuous_delivery
332-
[deis/charts]: https://github.com/deis/charts
333279
[deis/workflow]: https://github.com/deis/workflow
334280
[deis/workflow-cli]: https://github.com/deis/workflow-cli
335281
[deis/workflow-e2e]: https://github.com/deis/workflow-e2e
336282
[deisrel]: https://github.com/deis/deisrel
337-
[Helm classic]: https://github.com/helm/helm-classic
283+
[Kubernetes Helm]: https://github.com/kubernetes/helm
338284
[semantic version]: http://semver.org

0 commit comments

Comments
 (0)