Publishing Apache Cassandra Releases
TODO: Remove all the TODO:'s. Note TODO's are formatted in italic and contain the name of the person who added them at the end so that you know who to ask if you are unsure of what is in the TODO. The name does not imply that the person is doing the TODO
(Stephen)
Target audience
TODO: update this section now that it is not just about deploy to maven central but about making releases in general (Stephen) This guide is targeted at Cassandra Developers (and stephenc at apache) who are the only people with permissions to deploy Cassandra artifacts to the Maven Central Repository.
Prerequisites
You need to have a GPG private key set-up and listed in the list of offical keys: http://www.apache.org/dist/cassandra/KEYS
You have a Subversion 1.5+ client installed and on your shell's path. See http://subversion.apache.org/. (Note: Ideally you would use a Subversion 1.6+ client but the minimum is 1.5+)
- You have JDK 6 installed and on your shell's path.
If you receive an OutOfMemoryError during the build, make sure to have set the environment variable ANT_OPTS=-Xmx512m
Follow the environment configuration steps outlined at: Publishing Maven Artifacts. If you are lazy, the short version is that you need to have a minimal ~/.m2/settings.xml file which at least defines the following
<settings> <servers> <!-- once you have got things working you can encrypt the passwords for the servers --> <server> <id>apache.snapshots.https</id> <username><!-- your apache ldap username --></username> <password><!-- your apache ldap password --></password> </server> <server> <id>apache.releases.https</id> <username><!-- your apache ldap username --></username> <password><!-- your apache ldap password --></password> </server> </servers> <profiles> <profile> <id>apache-release</id> <properties> <gpg.keyname><!-- enough of the key id to id it --></gpg.keyname> <!-- pick one of the following --> <!-- either you feel comfortable with the passphrase on disk --> <gpg.passphrase><!-- your passphrase for your gpg key goes here--></gpg.passphrase> <!-- or you use an agent--> <gpg.useagent>true</gpg.useagent> </properties> </profile> </profiles> </settings>
You must have either <gpg.passphrase> or <gpg.useagent> but not both.
The GPG keyname is the sec hex code for the key, e.g. if you had
$ gpg --list-secret-keys /Users/stephenc/.gnupg/secring.gpg ---------------------------------- sec 1024D/B620D787 2009-10-22 uid Stephen Connolly <stephenc@apache.org> ssb 4096g/A2590985 2009-10-22 $
You would use <gpg.keyname>B620D787</gpg.keyname>
Once you have things working with your ldap password in plaintext, it is highly recommended that you use Maven's encryption support to encrypt the password.
Using repository.apache.org
Please read the Common Procedures for details of how to close, drop and release stanging repositories.
Making a release
Note: this process assumes that you are working on a stream where CASSANDRA-1851 has been applied.
To make a release:
- Make a full build from a real clean base, i.e. use the following sequence of commands:
ant realclean ant publish -Drelease=true
That will build all the required artifacts and sign them with your GPG signature and publish them to a staging repository on repository.apache.org
Login to repository.apache.org with your Apache LDAP username and password. Select Staging Repositories and find the open repository that you just deployed to and close it. Make note of the URL of the staging repository (it will look something like https://repository.apache.org/content/repositories/''staging repository id''/
Goto The ViewVC for Apache's SVN server and get the URLS for CHANGES.txt and NEWS.txt for the version you want to release. Shorten these URLs using Apache's URL shortening service. TODO: Decide which url shortening service to use for these links. Eric wants one that allows access to the stats. (Stephen)
Goto The Versions tab in JIRA. Select the Version being released, and Copy the Release Notes URL. It will look something like https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12310865&version=#########. Shorten that url using Apache's URL shortening service.
Call a release vote on the dev@cassandra.apache.org mailing list. e.g.
Subject: [VOTE] Release Apache Cassandra X.Y.Z I propose the following artifacts for release as X.Y.Z. SVN: https://svn.apache.org/repos/asf/cassandra/''path to branch''@''peg revision'' Artifacts: https://repository.apache.org/content/repositories/''staging repository id''/org/apache/cassandra/apache-cassandra/X.Y.Z/ Staging repository: https://repository.apache.org/content/repositories/''staging repository id''/ The will remain open for 72 hours, (longer if need be). [1]: ''http://s.apache.org/link'' (CHANGES.txt) [2]: ''http://s.apache.org/link'' (NEWS.txt) [3]: ''http://s.apache.org/link'' (Release notes from JIRA)
If the vote is a success, login to people.apache.org and put the release artifacts into /www/www.apache.org/dist/cassandra, e.g.
cd /www/www.apache.org/dist/cassandra mkdir X.Y.Z cd X.Y.Z for type in bin src; do \ for part in gz gz.md5 gz.sha1 gz.asc gz.asc.md5 gz.asc.sha1; do \ curl -O https://repository.apache.org/content/repositories/''staging repository id''/org/apache/cassandra/apache-cassandra/X.Y.Z/apache-cassandra-X.Y.Z-$type.tar.$part; \ done \ done cd .. find X.Y.Z -type d -exec chmod a+rx,g+w {} \; find X.Y.Z -type f -exec chmod 664 {} \;
After doing this, login to repository.apache.org and release the staging repository.
If the vote failed then login to repository.apache.org and drop the staging repository and start over again with Take N+1
TODO: Some stuff to do with updating the project site that I don't know (Stephen)
Marke the version as released in JIRA on the Manage Versions screen. TODO: Can somebody who has access please verify the link - I've inferred it (Stephen)
- Wait for the sync
Publish the announce email to user@cassandra.apache.org
Subject: [ANN] Apache Cassandra X.Y.Z released The Cassandra team is pleased to announce the release of Apache Cassandra version X.Y.Z. Cassandra is a highly scalable second-generation distributed database, bringing together Dynamo's fully distributed design and Bigtable's ColumnFamily-based data model. You can read more here: http://cassandra.apache.org/ Downloads of source and binary distributions are listed in our download section: http://cassandra.apache.org/download/ ''Some blurb about this specific release's goals and highlights... sorry we can't template everything for you ;-)'' Release Notes - Cassandra - Version X.Y.Z ''Paste in from the *Edit/Copy Release Notes* box at the bottom of https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12310865&version=#########&styleName=Text you might have to delete some of the blank lines'' Enjoy, The Cassandra team.
- Add the release to the PMC's next board report
Remove Old Versions from ASF Distribution Directory. Login to people.apache.org and remove any superceded releases from /www/www.apache.org/dist/cassandra (after confirming that they exist in /www/archive.apache.org/dist/cassandra).