Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Check out the branch with:

    Code Block
    git clone -b branch-X.Y https://git-wip-us.apache.org/repos/asf/zookeeper.git
  2. If not already done, cherry-pick desired commits from master into branch-X.Y. You can find the revision hash using git log in the branch-X.Y and in master. Then cherry-pick each commit from the remote master into the branch-X.Y individually (again in order). 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. 

    Code Block
    # The -x option records the source commit, and reuses the original commit message
    git cherry-pick -x <commit-hash>
  3. 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.
  4. Update docs/releasenotes.html 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.
  5. Update the version number in build.xml to be ''X.Y.Z''
  6. Update the version number in src/c/include/winconfig.hsrc/c/configure.ac, src/c/CMakeLists.txt, and src/c/include/zookeeper_version.h to be ''X.Y.Z''
  7. Update the copyright years in NOTICE.txt if it's outdated.
  8. Commit these changes.

    Code Block
    # check for modified files
    git status
    
    # add modified files one by one
    git add <modified files>
     
    # commit and push the changes to remote repo branch-X.Y
    git commit -m "Preparing for release X.Y.Z"
    git push <remote> branch-X.Y
  9. Tag the release candidate (R is the release candidate number, and starts from 0):

    Code Block
    # create a signed tag
    git tag -s release-X.Y.Z-rcR -m "ZooKeeper X.Y.Z-rcR release."
     
    # push the newly created rc tag to the remote repo.
    git push <remote> release-X.Y.Z-rcR

Building

  1. 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.

    Update the version number in build.xmlsrc/c/configure.acsrc/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.

    Code Block
    # check for modified files
    git status
    
    # add modified files one by one
    git add <modified files>
     
    # commit and push the changes to remote repo branch-X.Y
    git commit -m "Prepare for the next release: update the version to X.Y.Z-SNAPSHOT"
    git push <remote> branch-X.Y

     

    Create a branch for X.Y.Z (the current release candidate)

    Code Block
    git branch branch-X.Y.Z
    git push <remote> branch-X.Y.Z


  2. Checkout the active point release branch - this is where you will be creating the release candidate

    Code Block
    git checkout branch-X.Y.Z


  3. If not already done, cherry-pick desired commits from master into branch-X.Y. You can find the revision hash using git log in the branch-X.Y and in master. Then cherry-pick each commit from the remote master into the branch-X.Y individually (again in order). 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. 

    Code Block
    # The -x option records the source commit, and reuses the original commit message
    git cherry-pick -x <commit-hash>
  4. 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.
  5. Update docs/releasenotes.html 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.
  6. Update the version number in build.xml to be ''X.Y.Z'' (i.e. remove SNAPSHOT designator)
  7. 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''
  8. Update the copyright years in NOTICE.txt if it's outdated.
  9. Commit these changes.

    Code Block
    # check for modified files
    git status
    
    # add modified files one by one
    git add <modified files>
     
    # commit and push the changes to remote repo branch-X.Y
    git commit -m "Preparing for release X.Y.Z"
    git push <remote> branch-X.Y.Z
  10. Tag the release candidate (R is the release candidate number, and starts from 0):

    Code Block
    # create a signed tag
    git tag -s release-X.Y.Z-rcR -m "ZooKeeper X.Y.Z-rcR release."
     
    # push the newly created rc tag to the remote repo.
    git push <remote> release-X.Y.Z-rcR

Building

  1. Build the release & run unit tests.

    Code Block
    ant test package tar
    
  2. Untar the generated
  3. Build the release & run unit tests.

    Code Block
    ant test package tar
    
  4. Untar the generated zookeeper-X.Y.Z.tar.gz and do the following:
    1. Sign the toplevel zookeeper-X.Y.Z.jar

      Code Block
      gpg --armor --output zookeeper-X.Y.Z.jar.asc --detach-sig zookeeper-X.Y.Z.jar
      
    2. Sign each file in dist-maven

      Code Block
      gpg --armor --output file.asc --detach-sig file
      
  5. Tar/GZ the release directory as zookeeper-X.Y.Z.tar.gz

    Code Block
    tar -caf zookeeper-X.Y.Z.tar.gz zookeeper-X.Y.Z
    
  6. Generate the MD5/SHA1 checksums for the release artifact.

    Code Block
    md5sum zookeeper-X.Y.Z.tar.gz > zookeeper-X.Y.Z.tar.gz.md5
    sha1sum zookeeper-X.Y.Z.tar.gz > zookeeper-X.Y.Z.tar.gz.sha1
    
  7. Sign the release

    Code Blockgpg --armor --output zookeeper-X.Y.Z.tar.gz .ascand do the following:
    1. Sign the toplevel zookeeper-X.Y.Z.jar

      Code Block
      gpg --armor --output zookeeper-X.Y.Z.jar.asc --detach-sig zookeeper-X.Y.Z.
    tar.gz
    1. jar
      
  8. Check that release file looks ok - e.g. install it and run examples from tutorial.
    1. untar the release artifact in a test directory
    1. Sign each file in dist-maven

      Code Block
      gpg --armor --output file.asc --detach-sig file
      
  9. Tar/GZ the release directory as zookeeper-X.Y.Z.tar.gz

    Code Block
    tar -caf

    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.

    Code Block
    sftp home.apache.org
    > cd public_html
    > mkdir zookeeper-X.Y.Z-candidate-0
    > cd zookeeper-X.Y.Z-candidate-0
    > put .tar.gz zookeeper-X.Y.Z.tar.gz*
    > bye
  10. Generate the MD5/SHA1 checksums for the release artifact.

    Code Block
    md5sum zookeeper-X.Y.Z.tar.gz > zookeeper-X.Y.Z.tar.gz.md5
    sha1sum zookeeper-X.Y.Z.tar.gz > zookeeper-X.Y.Z.tar.gz.sha1
    
  11. Sign the release

    Code Block
    gpg --armor --output zookeeper-X.Y.Z.tar.gz.asc --detach-sig zookeeper-X.Y.Z.tar.gz
    
  12. Check that release file looks ok - e.g. install it and run examples from tutorial.
    1. untar the release artifact in a test directory
  13. 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.

    Code Block
    sftp home.apache.org
    > cd public_html
    > mkdir zookeeper-X.Y.Z-candidate-0
    > cd zookeeper-X.Y.Z-candidate-0
    > put zookeeper-X.Y.Z.tar.gz*
    > bye
  14. Stage the release artifacts to the Apache Nexus repository
    1. Create ~/.m2/settings.xml introducing the values that are specific to you:

      Code Block
      <settings>
        <servers>
           <server>
             <id>apache.snapshots.https</id>
    Stage the release artifacts to the Apache Nexus repository
    1. Create ~/.m2/settings.xml introducing the values that are specific to you:

      Code Block
      <settings>
        <servers>
           <server>
             <id>apache.snapshots.https</id>
             <username>XXXXXXX</username>
             <password>XXXXXXXX</password>
           </server>
           <server>
             <id>apache.staging.https</id>
             <username>XXXXXXX</username>
             <password>XXXXXXX</password>
           </server>
         </servers>
         <profiles>
           <profile>
             <id>gpg</id>
             <properties>
               <gpg.passphrase>XXXXXXX</gpg.passphrase>
             <<username>XXXXXXX</properties>username>
             <<password>XXXXXXXX</profile>password>
             </profiles>
      </settings>

      See http://maven.apache.org/guides/mini/guide-encryption.html for details on encrypting the passwords rather than leaving them in the clear.

    2. Run the following on the branch check out

      Code Block
      ant mvn-deploy -Dstaging=true
    3. server>
           <server>
             <id>apache.staging.https</id>
             <username>XXXXXXX</username>
             <password>XXXXXXX</password>
           </server>
         </servers>
         <profiles>
           <profile>
             <id>gpg</id>
             <properties>
               <gpg.passphrase>XXXXXXX</gpg.passphrase>
             </properties>
           </profile>
         </profiles>
      </settings>

      See http://maven.apache.org/guides/mini/guide-encryption.html for details on encrypting the passwords rather than leaving them in the clear.

    4. Run the following on the branch check out

      Code Block
      ant mvn-deploy -Dstaging=true
    5. Enter Apache Nexus and do the following:
      1. Click on Log In in the upper right corner. Log in using your apache user name and password.  

      2. In the left navigation pane, select Staging Repositories.  

      3. 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.)  
      4. Click the Close button above the Repository names. This makes your release candidate available at the Staging level.  

      5. 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.  

      6. Confirm that your new release candidate is visible at https:

      Enter Apache Nexus and do the following:
      1. Click on Log In in the upper right corner. Log in using your apache user name and password.  

      2. In the left navigation pane, select Staging Repositories.  

      3. 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.)  
      4. Click the Close button above the Repository names. This makes your release candidate available at the Staging level.  

      5. 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.  

      6. 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.

  15. 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):

     

    Code Block
    languagetext
    Subject: [VOTE] Apache ZooKeeper release 3.4.6 candidate 0
    
    This is a bugfix release candidate for 3.4.6. It fixes 117 issues, including issues that
    affect leader election, Zab, and SASL authentication.
    
    The full release notes is available at:
    
    https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12310801&version=12323310
    
    *** Please download, test and vote by March 9th 2014, 23:59 UTC+0. ***
    
    Source files:
    http://people.apache.org/~fpj/zookeeper-3.4.6-candidate-0/
    
    Maven staging repo:
    https://repository.apache.org/content/groups/staging/org/apache/zookeeper/zookeeper/3.4.6/
    
    The release candidate tag in git to be voted upon: release-X.Y.Z-rcR
    
    ZooKeeper's KEYS file containing PGP keys we use to sign the release:
    http://www.apache.org/dist/zookeeper/KEYS
    
    Should we release this candidate?

Publishing

Once three PMC members have voted for a release, it may be published.

  1. of released software only) at zookeeper.apache.org. Here is a sample email (from 3.4.6 release):

     

    Code Block
    languagetext
    Subject: [VOTE] Apache ZooKeeper release 3.4.6 candidate 0
    
    This is a bugfix release candidate for 3.4.6. It fixes 117 issues, including issues that
    affect leader election, Zab, and SASL authentication.
    
    The full release notes is available at:
    
    https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12310801&version=12323310
    
    *** Please download, test and vote by March 9th 2014, 23:59 UTC+0. ***
    
    Source files:
    http://people.apache.org/~fpj/zookeeper-3.4.6-candidate-0/
    
    Maven staging repo:
    https://repository.apache.org/content/groups/staging/org/apache/zookeeper/zookeeper/3.4.6/
    
    The release candidate tag in git to be voted upon: release-X.Y.Z-rcR
    
    ZooKeeper's KEYS file containing PGP keys we use to sign the release:
    http://www.apache.org/dist/zookeeper/KEYS
    
    Should we release this candidate?

Publishing

Once three PMC members have voted for a release, it may be published.

  1. Tag the release. Do it from the release branch and push the created tag to the remote repository:

    Code Block
    # create a signed tag
    git tag -s release-X.Y.Z -m "ZooKeeper X.Y.Z release."
     
    # push the newly created release tag to the remote repo.
    git push <remote> release-X.Y.Z
  2. Tag the release. Do it from the release branch and push the created tag to the remote repository:

    Code Block
    # create a signed tag
    git tag -s release-X.Y.Z -m "ZooKeeper X.Y.Z release."
     
    # push the newly created release tag to the remote repo.
    git push <remote> release-X.Y.Z
  3. Update the version number in build.xml to the next logical SNAPSHOT version (e.g. X.Y.Z to X.Y.Z+1-SNAPSHOT)
  4. Commit this change.

    Code Block
    # check for modified files
    git status
    
    # add modified files one by one
    git add <modified files>
     
    # commit and push the changes to remote repo branch-X.Y
    git commit -m "Prepare for the next release: update the version to X.Y.Z-SNAPSHOT"
    git push <remote> branch-X.Y
  5. Check in release files to the distribution server
  6. Code Block
    svn co https://dist.apache.org/repos/dist/release/zookeeper/ zookeeper_dist
    cd zookeeper_dist
    mkdir zookeeper-X.Y.Z
    # copy tgz/asc/md5/sha1 files from your public_html to zookeeper-X.Y.Z
    svn add zookeeper-X.Y.Z
    svn ci -m "Add ZooKeeper X.Y.Z release"
    

     

    1. 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 dev@zookeeper.apache.org and ask for assistance from a PMC member.
  7. 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.

    Code Block
    cd zookeeper_dist
    # don't do the following rm for the time being, until we are sure the new rel is actually stable --> ### rm -rf zookeeper-A.B.C
    rm stable; rm current
    ln -s zookeeper-A.B.D stable
    ln -s zookeeper-A.B.D current
    svn ci -m 'Updating links'  
  8. Release the Maven artifacts on Apache Nexus:
    1. Click on 'Staging repositories'.
    2. Select the repository corresponding to the release candidate.
    3. Click on the 'Release' button and follow instructions.
  9. Wait 24 hours for release to propagate to mirrors.
  10. Prepare to edit the website. ZooKeeper uses Jekyll/Markdown with gitpubsub. See WebSiteSetup for general instructions and tool setup/prerequisites.

    Code Block
    git clone -b website https://git-wip-us.apache.org/repos/asf/zookeeper.git
    
  11. Copy the new release documentation into the _released_docs directory

    Code Block
    cd _released_docs
    mkdir rX.Y.Z
    cd rX.Y.Z
    tar xvf zookeeper-X.Y.Z.tar.gz 'zookeeper-X.Y.Z/docs'
    mv zookeeper-X.Y.Z/docs/* .
    rm -r zookeeper-X.Y.Z
    # Update the "current" doc pointer if necessary (next 2 lines)
    rm current
    ln -s rX.Y.Z current
    cd ..
    git add rX.Y.Z current
    
    cd ..
  12. Update the release news in releases.md
  13. Update the nav panel to include X.Y.Z in _includes/sidenav.md, move previous version(s) to documentation.md (next step)
  14. Update documentation.md to include the previous version(s)
  15. Stage changes to git

    Code Block
    git add releases.md documentation.md
  16. Regenerate the site, review it, then commit it. (install Jekyll/pygments if you haven't already - see the README.md in website branch)

    Code Block
    jekyll build
    cp -RP _released_docs _site/doc
    # at this point verify that the site is working properly - open _site/index.html
    # once you are happy move on to the next step...
    git commit -m "Updated website content for release X.Y.Z."
    
    git push origin website
  17. Deploy: you are now ready to deploy the changes to the public website using gitpubsub. Using the same repo as the previous step:

    Code Block
    git checkout asf-site
    rm -fr content
    mv _site content
    git add content
    # verify that the content of "content" looks proper. open content/index.html in a browser and verify, etc...
    # verify git staging looks proper - remember, we added the release docs to content/doc/rX.Y.Z and that will also be added here
    git commit -m "Website update for release X.Y.Z"
    
    git push origin asf-site
  18. Send announcements to the user and developer lists once the site changes are visible. Here is a sample email:

    No Format
    Subject: [ANNOUNCE] Apache ZooKeeper X.Y.Z
    
    The Apache ZooKeeper team is proud to announce Apache ZooKeeper version X.Y.Z
    
    ZooKeeper is a high-performance coordination service for distributed
    applications. It exposes common services - such as naming,
    configuration management, synchronization, and group services - in a
    simple interface so you don't have to write them from scratch. You can
    use it off-the-shelf to implement consensus, group management, leader
    election, and presence protocols. And you can build on it for your
    own, specific needs.
    
    For ZooKeeper release details and downloads, visit:
    http://zookeeper.apache.org/releases.html
    
    ZooKeeper X.Y.Z Release Notes are at:
    http://zookeeper.apache.org/doc/rX.Y.Z/releasenotes.html
    
    We would like to thank the contributors that made the release possible.
    
    Regards,
    
    The ZooKeeper Team
    
  19. In Jira, ensure that only issues in the "Fixed" state have a "Fix Version" set to release X.Y.Z.
  20. 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.
  21. In Jira, close issues resolved in the release. Disable mail notifications for this bulk change.

...