For a how-to for branch-3.5, see the guide here.
For a how-to for branch-3.6+, see the guide here.
Setting up the signing keys
Before you do a release you'll need a signing key that is registered with apache. If you already have one, you can skip this section. Otherwise, here are the steps to do:
- use gpg2 --gen-key to generate a new key. Make sure that the key size is 4096 bits, the key doesn't expire, and use CODE SIGNING KEY for the comment.
- Now you need to register your key at http://pgp.mit.edu/ using the output of gpg --armor --export <keyid>
- Add your key to the KEYS file:
- svn co https://dist.apache.org/repos/dist/release/zookeeper/ zookeeper_dist
- cd zookeeper_dist.
- edit the KEYS file. See the top of the KEYS file for instructions on how to edit this file
- svn ci
- Upload digest to your account on id.apache.org (gpg2 --fingerprint)
Useful Links and Background:
Apache infra page: https://cwiki.apache.org//confluence/display/INFRA/Index
Apache self-service page - now allows for forcing git repo sync: https://selfserve.apache.org/
- when updating JIRA be sure to use the "batch change" operator under the "tools" menu. Disable email notifications when using batch change, subsequent to large JIRA operations (moving issues btw releases, closing JIRAs after a release, etc...) send email to the dev@ list detailing the changes.
Skip this section if this is NOT the first release in a series (i.e. release X.Y.0).
- Notify developers on the mailing list that you are about to branch a release.
Create a branch for the release series:
Checkout master branch.
- Update the default version in build.xml on master to X.Y+1.0-SNAPSHOT.
- Update the version number in src/c/configure.ac and src/c/include/zookeeper_version.h to be X.Y+1.0.
Commit these changes to master.
Updating the release branch
These operations take place in the release branch:
Check out the branch with:
If you are creating a point release (almost always the case) then follow this step. The exception to this is typically only when creating a new release candidate because the previous candidate failed during voting (rc0 failed and you are creating rc1+) – in which case skip this step.
Create a branch for X.Y.Z (the current release candidate)
Update the version number in build.xml, src/c/configure.ac, src/c/CMakeLists.txt, and src/c/include/zookeeper_version.h to the next logical SNAPSHOT version (e.g. X.Y.Z to X.Y.(Z+1)-SNAPSHOT)
Commit this change.
Checkout the active point release branch - this is where you will be creating the release candidate
If not already done, cherry-pick desired commits into branch-X.Y.Z. If cherry-picks are done from other than branch-X.Y ensure that those changes are also committed to branch-X.Y. If there are conflicts, then it is preferable to produce a new patch for this branch, review it separately and commit it via JIRA. Please refer HowToContribute and Committing changes page for pushing changes to the project.
- Do a final pass regeneration of docs by running "ant -Dforrest.home=<path to Forrest> clean docs". If there are any modifications, then they'll show up under the docs folder. If there are any changes, then commit them. However, DO NOT commit changes in docs/releasenotes.html or docs/releasenotes.pdf. (Release notes are handled in a separate step.) Release notes should be regenerated each time a documentation patch is committed. This final pass before the release is intended to catch mistakes in case this step was missed at commit time.
- Update zookeeper-docs/src/main/resources/markdown/releasenotes.md with release notes for this release. You can get the HTML by following the "Release Notes" link for the relevant release on the https://issues.apache.org/jira/browse/ZOOKEEPER?report=com.sourcelabs.jira.plugin.portlet.releases:releases-projecttab#selectedTab=com.atlassian.jira.plugin.system.project%3Aroadmap-panel tab in Jira. Note that you need to exclude the won't fix or invalid tickets.
- Update the version number in build.xml to be ''X.Y.Z'' (i.e. remove SNAPSHOT designator)
- Update the version number in src/c/configure.ac, src/c/CMakeLists.txt, and src/c/include/zookeeper_version.h to be ''X.Y.Z''
- Update the copyright years in NOTICE.txt if it's outdated.
Commit these changes.
Tag the release candidate (R is the release candidate number, and starts from 0):
Build the release & run unit tests.
Don't skip the "test" part and don't just do "ant package tar"! See here for why.
- Untar the generated zookeeper-X.Y.Z.tar.gz and do the following:
Sign the toplevel zookeeper-X.Y.Z.jar
Sign each file in dist-maven
Tar/GZ the release directory as zookeeper-X.Y.Z.tar.gz
Generate the checksums for the release artifact. See this page for latest Apache guidelines.
Sign the release
- Check that release file looks ok - e.g. install it and run examples from tutorial.
- untar the release artifact in a test directory
Copy release files to a public place and ensure they are readable. Note that home.apache.org only supports SFTP, so this may be easier with a graphical SFTP client like Nautilus, Konqueror, etc.
- Stage the release artifacts to the Apache Nexus repository
Create ~/.m2/settings.xml introducing the values that are specific to you:
See http://maven.apache.org/guides/mini/guide-encryption.html for details on encrypting the passwords rather than leaving them in the clear.
Run the following on the branch check out
- Enter Apache Nexus and do the following:
Click on Log In in the upper right corner. Log in using your apache user name and password.
In the left navigation pane, select Staging Repositories.
- Identify the release candidate you just pushed, by your user name (in parentheses as part of the "Repository" name) and the "Created On" date. Click on the check box to the left of your Repository name to select it. (If you accidentally click on the Repository name itself, another tab will pop open. If so, just close it.)
Click the Close button above the Repository names. This makes your release candidate available at the Staging level.
If you have previously staged an older release candidate with the same version number, and it is still showing in the Repository list, you must select and Drop the old one now.
Confirm that your new release candidate is visible at https://repository.apache.org/content/groups/staging/org/apache/zookeeper/zookeeper/ with correct file modification dates.
Call for a release vote on dev (note dev@ and not user@, the user list is for discussion of released software only) at zookeeper.apache.org. Here is a sample email (from 3.4.6 release):
Once three PMC members have voted for a release, it may be published.
Tag the release. Do it from the release branch and push the created tag to the remote repository:
- Check in release files to the distribution server
- After checking in the release, you'll receive an automated email from reporter.apache.org with a link requesting additional details about the release. This form must be completed by a PMC member. If you are a PMC members, follow the link and complete the form. If you are not a PMC member, forward the email to email@example.com and ask for assistance from a PMC member.
The release directory usually contains just two releases, the most recent from two branches, with a link named 'stable' to the most recent recommended version.
- Release the Maven artifacts on Apache Nexus:
- Click on 'Staging repositories'.
- Select the repository corresponding to the release candidate.
- Click on the 'Release' button and follow instructions.
- Wait 24 hours for release to propagate to mirrors.
Prepare to edit the website. ZooKeeper uses Jekyll/Markdown with gitpubsub. See WebSiteSetup for general instructions and tool setup/prerequisites.
Copy the new release documentation into the _released_docs directory
- Update the release news in releases.md
- Update the nav panel in html/header.html and documentation.md to include X.Y.Z
Stage changes to git
Regenerate the site, review it, then commit it. (install Jekyll/pygments if you haven't already - see the README.md in website branch)
Deploy: you are now ready to deploy the changes to the public website using gitpubsub. Using the same repo as the previous step:
If the apache zookeeper website does not update, check if the commit is mirrored into github.com/apache/zookeeper asf-site branch
Send announcements to the user and developer lists once the site changes are visible. Here is a sample email:
- In Jira, ensure that only issues in the "Fixed" state have a "Fix Version" set to release X.Y.Z.
- In Jira, "release" the version. Visit the "Administer Project" page, then the "Manage versions" page. You need to have the "Admin" role in ZooKeeper's Jira for this step and the next.
- In Jira, close issues resolved in the release. Disable mail notifications for this bulk change.
Before the release, run the following smoke tests (at least).
- Run unit tests on different hardwares: mac, windows, linux.