Release Engineering/Runbook/Fresnel
This is the runbook for making Fresnel releases and deploying changes to the Fresnel Jenkins jobs.
Meta
- Source code (Gerrit): performance/fresnel.git
- Package (npm): fresnel
- Issue tracker (Phabricator): Fresnel
Release
- Draft a commit for fresnel.git and follow release instructions (update
package.json
, shrink wrap, and change log).- Submit the commit to Gerrit, and approve it.
- Once Jenkins has merged it, run
git pull
locally and make sure are on "origin/master". This catches issues like if maybe the commit was changed in Gerrit during review, or merged over other commits since you started the process, etc.- Create the tag in Git, with
git tag -s x.y.z
. Message can be something simple like "Tag x.y.z". - Push the tag to Gerrit, with
git push --tags
.
- Create the tag in Git, with
- Ensure
git status
shows no modifications or untracked files, then publish the release to npm withnpm publish
.
Deploy
First time setup:
- Clone integration/config.git from Gerrit.
- Clone docker-pkg.git from Gerrit.
- Install docker-pkg locally (follow install instructions).
Update Dockerfile
Draft a commit for integration/config.git:
- In integration/config.git: /dockerfiles/quibble-fresnel
- Edit Dockerfile: Change "npm install" command as needed.
- Edit changelog: Add new section with increased build version (the suffix after a dash).
- Use docker-pkg to rebuild the Docker image locally:
integration/config$ docker-pkg --select '*fresnel*' -c dockerfiles/config.yaml dockerfiles
- If docker-pkg shows that the new version of the Docker image was built and there are no errors, test or verify the release locally by starting the container:
integration/config/dockerfiles$ ./debug-image quibble-fresnel nobody@instance$ fresnel version Fresnel 0.2.0
Commit your changes and submit to Gerrit for review. (example)
Deploying this change requires shell access to the Docker registry on contint1001.wikimedia.org (shell group: contint-docker). Ask a member of the Release Engineering team to help (for later, consider joining this group, example). Follow deploy instructions.
Update Jenkins job
Draft another commit for integration/config.git:
- In integration/config.git: /jjb, edit
mediawiki.yaml
and update the docker image reference for allmediawiki-fresnel-*
jobs. - Submit the commit to Gerrit for review. (example)
Deploy Jenkins job
This requires administrator access to Jenkins at https://integration.wikimedia.org/ci/ (LDAP group: ci-admins). Ask a member (see list). For later, consider joining!
First time only: Install and authenticate JJB locally.
- Checkout the integration/config.git commit that will update the Jenkins job (from the previous step).
- Deploy it by running
jenkins-jobs --conf etc/jenkins_jobs.ini update config/ 'mediawiki-fresnel-*'
- After finishing the JJB deploy, merge the commit in Gerrit.
- Verify the new version by commenting "check perf" on any unmerged Gerrit patch for mediawiki/core:master, and reviewing the Jenkins build output.
Once everything is working, also do a bit of regular cleanup. We want to keep the latest and before-latest (so we can easily revert anytime). But feel free to remove images that are 2 or more versions old:
- Find the not-latest tag via
docker image ls | grep fresnel
, e.g. 8ca03484a2c3 - Prune it from contint1001:
docker rmi 8ca03484a2c3
- Log it in #wikimedia-releng:
!log Pruning old image from contint1001: releng/quibble-fresnel:0.0.31-3 8ca03484a2c3