Jump to content

Release Engineering/Runbook/Fresnel

From Wikitech

This is the runbook for making Fresnel releases and deploying changes to the Fresnel Jenkins jobs.

Meta

Release

  1. 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.
  2. 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.
  3. Ensure git status shows no modifications or untracked files, then publish the release to npm with npm publish.

Deploy

First time setup:

Update Dockerfile

Draft a commit for integration/config.git:

  1. 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).
  2. Use docker-pkg to rebuild the Docker image locally: integration/config$ docker-pkg --select '*fresnel*' -c dockerfiles/config.yaml dockerfiles
  3. 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:

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.

  1. Checkout the integration/config.git commit that will update the Jenkins job (from the previous step).
  2. Deploy it by running jenkins-jobs --conf etc/jenkins_jobs.ini update config/ 'mediawiki-fresnel-*'
  3. After finishing the JJB deploy, merge the commit in Gerrit.
  4. 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:

  1. Find the not-latest tag via docker image ls | grep fresnel, e.g. 8ca03484a2c3
  2. Prune it from contint1001: docker rmi 8ca03484a2c3
  3. Log it in #wikimedia-releng: !log Pruning old image from contint1001: releng/quibble-fresnel:0.0.31-3 8ca03484a2c3

See also