Release Process

Outcomes

By the end of the release process we will have:

If this is a major or minor release (i.e. not a weekly development release), we will also have:

Prerequisites

Software

  • Fedora 20 (rpmbuild, createrepo, yumdownloader) - it may be possible to install these on Ubuntu though.

    You are advised to perform the release from a Flocker development machine , which will have all the requisite software pre-installed.

  • a web browser

  • an up-to-date clone of the Flocker repository

  • an up-to-date clone of the homebrew-tap repository

Access

Preliminary Step: Pre-populating RPM Repository

Warning

This only needs to be done if the dependency packages for Flocker (i.e. geard and Python libraries) change; it should not be done every release. If you do run this you need to do it before running the release process above as it removes the flocker-cli etc. packages from the repository!

These steps must be performed from a machine with the ClusterHQ Copr repository installed. You can either use the Flocker development environment or install the Copr repository locally by running curl https://copr.fedoraproject.org/coprs/tomprince/hybridlogic/repo/fedora-20-x86_64/tomprince-hybridlogic-fedora-20-x86_64.repo >/etc/yum.repos.d/hybridlogic.repo

mkdir repo
yumdownloader --destdir=repo geard python-characteristic python-eliot python-idna python-netifaces python-service-identity python-treq python-twisted
createrepo repo
gsutil cp -a public-read -R repo gs://archive.clusterhq.com/fedora/20/x86_64
mkdir srpm
yumdownloader --destdir=srpm --source geard python-characteristic python-eliot python-idna python-netifaces python-service-identity python-treq python-twisted
createrepo srpm
gsutil cp -a public-read -R srpm gs://archive.clusterhq.com/fedora/20/SRPMS

Preparing for a release

  1. Choose a version number:

    • Release numbers should be of the form x.y.z e.g.:

      export VERSION=0.1.2
      
  2. File a ticket:

    1. Set the title to “Release flocker $VERSION”
    2. Assign it to yourself
  3. Create a clean, local working copy of Flocker with no modifications:

    git clone [email protected]:ClusterHQ/flocker.git "flocker-${VERSION}"
    
  4. Create a branch for the release and push it to GitHub:

    git checkout -b release/flocker-${VERSION} origin/master
    git push origin --set-upstream release/flocker-${VERSION}
    
  5. Update the version numbers in:

  6. Ensure the release notes in NEWS are up-to-date:

    XXX: Process to be decided. See https://github.com/ClusterHQ/flocker/issues/523

    git commit -am "Updated NEWS"
    
  7. Ensure copyright dates in LICENSE are up-to-date:

    XXX: Process to be decided. See https://github.com/ClusterHQ/flocker/issues/525

    git commit -am "Updated copyright"
    
  8. Push the changes:

    git push
    
  9. Ensure all the tests pass on BuildBot:

    Go to the BuildBot web status and force a build on the just-created branch.

  10. Do the acceptance tests:

    XXX: See https://github.com/ClusterHQ/flocker/issues/315

Release

  1. Change your working directory to be the Flocker release branch working directory.

  2. Create (if necessary) and activate the Flocker release virtual environment:

    mkvirtualenv flocker-release-${VERSION}
    pip install --editable .[release]
    

    Note

    The example above uses virtualenvwrapper but you can use virtualenv directly if you prefer.

  3. Tag the version being released:

    git tag --annotate "${VERSION}" "release/flocker-${VERSION}" -m "Tag version ${VERSION}"
    git push origin "${VERSION}"
    
  4. Go to the BuildBot web status and force a build on the tag.

    Note

    We force a build on the tag as well as the branch because the RPMs built before pushing the tag won’t have the right version. Also, the RPM upload script currently expects the RPMs to be built from the tag, rather than the branch.

    You force a build on a tag by putting the tag name into the branch box (without any prefix).

  5. Set up gsutil authentication by following the instructions from the following command:

    $ gsutil config
    
  6. Build python packages and upload them to archive.clusterhq.com

    python setup.py sdist bdist_wheel
    gsutil cp -a public-read \
        "dist/Flocker-${VERSION}.tar.gz" \
        "dist/Flocker-${VERSION}-py2-none-any.whl" \
        gs://archive.clusterhq.com/downloads/flocker/
    
  7. Build RPM packages and upload them to archive.clusterhq.com

    admin/upload-rpms "${VERSION}"
    
  8. Build and upload the tutorial vagrant box.

  9. Build tagged docs at Read the Docs:

    1. Go to the Read the Docs dashboard.

    2. Enable the version being released.

    3. Wait for the documentation to build. The documentation will be visible at http://docs.clusterhq.com/en/${VERSION} when it has been built.

    4. Set the default version to that version.

      Warning

      Skip this step for weekly releases and pre-releases. The features and documentation in weekly releases and pre-releases may not be complete and may not have been tested. We want new users’ first experience with Flocker to be as smooth as possible so we direct them to the tutorial for the last stable release. Other users choose to try the weekly releases, by clicking on the latest weekly version in the ReadTheDocs version panel.

    5. Force Read the Docs to reload the repository, in case the GitHub webhook fails, by running:

      curl -X POST http://readthedocs.org/build/flocker
      
  10. Update the Homebrew recipe

    The aim of this step is to provide a version specific homebrew recipe for each release.

    • Checkout the homebrew-tap repository.

      git clone [email protected]:ClusterHQ/homebrew-tap.git
      
    • Create a release branch

      git checkout -b release/flocker-${VERSION%pre*} origin/master
      git push origin --set-upstream release/flocker-${VERSION%pre*}
      
    • Create a flocker-{VERSION}.rb file

      Copy the last recipe file and rename it for this release.

    • Update recipe file

      • Update the version number

        The version number is included in the class name with all dots and dashes removed. e.g. class Flocker012 < Formula for Flocker-0.1.2

      • Update the sha1 checksum.

        sha1sum "dist/Flocker-${VERSION}.tar.gz"
        ed03a154c2fdcd19eca471c0e22925cf0d3925fb  dist/Flocker-0.1.2.tar.gz
        
      • Commit the changes and push

        git commit -am "Bumped version number and checksum in homebrew recipe"
        git push
        
    • Test the new recipe on OS X with Homebrew installed

      Try installing the new recipe directly from a GitHub link

      brew install https://raw.githubusercontent.com/ClusterHQ/homebrew-tap/release/flocker-${VERSION}/flocker.rb
      
    • Make a pull request

      Make a homebrew-tap pull request for the release branch against master, with a Refs #123 line in the description referring to the release issue that it resolves.

  11. Make a pull request on GitHub for the release branch against master, with a Fixes #123 line in the description referring to the release issue that it resolves.