Jump to: navigation, search

Difference between revisions of "Packaging/Ubuntu"

(Rewrite for currency)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
Ubuntu is the reference platform for OpenStack. We follow the Ubuntu release cycle very closely, and do most of our QA on Ubuntu.
+
= Ubuntu packaging =
  
If you want to run OpenStack on Ubuntu, there are a few options, depending on your stability requirements and which version of Ubuntu you're running.
+
OpenStack packages for Ubuntu are published in Ubuntu ''main'' repository and maintained by Ubuntu core developers.
{| border="1" cellpadding="2" cellspacing="0"
 
|  Ubuntu version   
 
|  Only what is in Ubuntu                                  
 
|  Only stable releases       
 
|-
 
|  10.04 LTS (Lucid)
 
|  N/A                                                     
 
|  [[#Release_PPA|Release PPA]]
 
|-
 
|  10.10 (Maverick) 
 
|  Pre-Austin snapshot                                     
 
|  [[#Release_PPA|Release PPA]]
 
|-
 
|  11.04 (Natty)   
 
|  Cactus                                                   
 
|  [[#Release_PPA|Release PPA]]
 
|-
 
|  11.10 (Oneiric) 
 
|  Frequent snapshots.<<BR>>Diablo expected in final release
 
|  [[#Release_PPA|Release PPA]]
 
|-
 
|  12.04 (Precise) 
 
|  Freuqent snapshots.<<BR>>Essex expected in final release
 
 
|}
 
  
= Trunk PPA =
+
== Package pages ==
A PPA<<[[FootNote]](Personal Package Archive: an extra apt repository you can add to your sources.list to get access to software not in Ubuntu.)>> where we will upload a new version for every single commit on trunk.
+
* https://launchpad.net/ubuntu/+source/nova
 +
* https://launchpad.net/ubuntu/+source/python-novaclient
 +
* https://launchpad.net/ubuntu/+source/swift
 +
* https://launchpad.net/ubuntu/+source/python-swiftclient
 +
* https://launchpad.net/ubuntu/+source/glance
 +
* https://launchpad.net/ubuntu/+source/python-glanceclient
 +
* https://launchpad.net/ubuntu/+source/keystone
 +
* https://launchpad.net/ubuntu/+source/python-keystoneclient
 +
* https://launchpad.net/ubuntu/+source/horizon
 +
* https://launchpad.net/ubuntu/+source/quantum
 +
* https://launchpad.net/ubuntu/+source/python-quantumclient
 +
* https://launchpad.net/ubuntu/+source/cinder
 +
* https://launchpad.net/ubuntu/+source/python-cinderclient
  
Information and instructions for use can be found on [https://launchpad.net/~openstack-release/+archive/2011.3 Launchpad] for Nova, and similarly for [https://launchpad.net/~swift-core/+archive/trunk Swift] and [https://launchpad.net/~glance-core/+archive/trunk Glance]. Swift has documented the process for building and deploying custom Debian packages at http://swift.openstack.org/debian_package_guide.html.
+
== Packaging branches ==
  
== How does it actually work? ==
+
Packaging branches are maintained in bzr under Launchpad. Click on "Code" on the above pages.
  
It's accomplished by a series of Jenkins jobs:
+
== Packaging bugs ==
  
=== nova-tarmac ===
+
Packaging bugs are tracked using Launchpad. Click on "Bugs" on the above pages.
When a branch is approved for merging, tarmac  merges it (and runs the tests and whatnot) and pushes the changes to trunk.
 
  
=== nova ===
+
== PPAs ==
  
The 'nova' job polls the trunk for changes. When it sees changes, it does some stuff (that isn't relevant here) and eventually triggers the nova-tarball job.
+
Various PPAs with bleeding edge packages are maintained by the [https://launchpad.net/~openstack-ubuntu-testing OpenStack Ubuntu Testers] team.
 
 
=== nova-tarball ===
 
 
 
Using "python setup.py sdist", a tarball is built. It gets renamed to:
 
 
 
nova-X~bzrY.tar.gz
 
 
 
..where X is the version from setup.py and Y is the bzr revision number the tarball is based on.
 
 
 
There are a couple of reasons why we use tarballs as the basis for packaging:
 
 
 
* It ensures that everything one needs for running Nova in the tarball. If it gets lost between version control and the tarball (because something is missing in the MANIFEST or whatnot), we'll notice when we're testing from packages. We would never notice if everyone ran directly from a source checkout.
 
* The best way to ensure a smooth release is to have tried it a million times before and have automated everything. Packages for final releases are always based on the release tarballs, so it's best to do the same for development snapshots as well.
 
 
 
=== nova-ppa ===
 
 
 
This is a matrix job, run for the 4 relevant ubuntu series: Lucid, Maverick, Natty, and Oneiric.
 
 
 
For each of these series, it
 
 
 
# grabs the most recently built tarball from the nova-tarball job,
 
# unpacks it,
 
# derives the "upstream" version of the package based on the filename of the tarball,
 
# grabs the packaging trunk code at ''lp:~openstack-ubuntu-packagers/nova/ubuntu'',
 
# applies it on top of the unpacked source,
 
# generates the package version based on the "upstream" version + the target ubuntu series,
 
# generates a changelog entry with this version in it (including the revision number of the packaging branch in the body of the changelog entry),
 
# runs "dpkg-buildpackage -rfakeroot -S" to build the source package,
 
# signs it,
 
# uploads it to Launchpad.
 
 
 
= Release PPA =
 
Information and instructions for use can be found on [https://launchpad.net/~nova-core/+archive/release Launchpad] for Nova, and similarly for [https://launchpad.net/~swift-core/+archive/release Swift] and [https://launchpad.net/~glance-core/+archive/release Glance]..
 
 
 
A PPA<<[[FootNote]](Personal Package Archive: an extra apt repository you can add to your sources.list to get access to software not in Ubuntu.)>> where we will upload only final releases.
 
 
 
= Generating packages manually =
 
 
 
== Prerequisites ==
 
You'll need to install some packages on the build machine. Some of them are in the [https://launchpad.net/~nova-core/+archive/trunk nova-core trunk PPA], so add it as a repository:
 
 
 
 
 
<pre><nowiki>
 
sudo add-apt-repository ppa:nova-core/trunk
 
sudo apt-get update
 
</nowiki></pre>
 
 
 
 
 
To grab all the build dependencies of nova:
 
 
 
 
 
<pre><nowiki>
 
sudo apt-get build-dep nova
 
</nowiki></pre>
 
 
 
 
 
You'll need Sphinx 1.0 or greater for doing the build or the documentation generation will fail and the build will abort. You can check what version of Sphinx is being used by your version of Python by doing:
 
 
 
 
 
<pre><nowiki>
 
python -c "import sphinx; print sphinx.__version__"
 
</nowiki></pre>
 
 
 
 
 
Finally, you'll need the following packages on your system to be able to generate the packages:
 
 
 
<pre><nowiki>
 
sudo apt-get install dpkg-dev quilt debhelper
 
</nowiki></pre>
 
 
 
 
 
== Generating binary packages ==
 
Combine the main nova code with the packaging scripts:
 
 
 
 
 
<pre><nowiki>
 
bzr export nova lp:nova
 
bzr export nova-packaging lp:~openstack-ubuntu-packagers/nova/ubuntu
 
mv nova-packaging/debian nova
 
</nowiki></pre>
 
 
 
''the first line here doesn't work for me: bzr: ERROR: Not a branch: "bzr+ssh://bazaar.launchpad.net/+branch/nova/". Someone please fix this.''
 
 
 
As an alternative, you can simply download the nova source package files from [https://launchpad.net/ubuntu/precise/+source/nova/2012.1+stable~20120612-3ee026e-0ubuntu1.2 here (2012.1)] or similar places for other versions. Unpack the source package, and unpack the .debian.tar.gz file inside the source directory.
 
 
 
If you wish to build a debian package from a particular source revision, you can check out the proper source revision from [http://github.com/openstack/nova github] and unpack the debian/ directory there from a source package as described above.
 
 
 
Edit the changelog entry. The following commands will specify a Lucid package with version "2011.1-0ubuntu2-local1" and a changelog entry "Local build for internal testing"
 
 
 
 
 
<pre><nowiki>
 
cd nova
 
dch -v 2011.1-0ubuntu2-local1 -D lucid "Local build for internal testing"
 
</nowiki></pre>
 
 
 
 
 
If you're building for Lucid, you need to issue the following command to apply the debian/patches/nova-manage_flagfile_location.patch patch file before building the packages.
 
 
 
 
 
<pre><nowiki>
 
QUILT_PATCHES=debian/patches quilt push -a
 
</nowiki></pre>
 
 
 
 
 
Generate the packages:
 
 
 
 
 
<pre><nowiki>
 
dpkg-buildpackage
 
</nowiki></pre>
 
 
 
The packages will appear in the parent of the nova directory.
 
 
 
If you wish to skip running tests or docs (e.g. if you're just debugging the process of getting a package to build at all), use this:
 
 
 
<pre><nowiki>
 
DEB_BUILD_OPTIONS="nocheck,nodocs" dpkg-buildpackage
 
</nowiki></pre>
 
 
 
 
 
== Uploading custom packages to PPA ==
 
 
 
Create a PPA with the following PPA dependencies:
 
* nova-core/build-depends
 
* nova-core/release
 
 
 
Then issue the following commands from the root of your nova directory.
 
 
 
 
 
<pre><nowiki>
 
GPGKEY=... # Your registered OpenGPG key
 
LPNAME=... # Your Launchpad username
 
DIST="lucid" # The Ubuntu distribution you are targetting
 
VERSTRING="2011.3-my-custom-build-0ubuntu1" # Custom version string here
 
dch  -v "$VERSTRING" -D $DIST "Your changelog comment here"
 
 
 
# If building for Lucid, apply the patch manually, otherwise skip this step
 
QUILT_PATCHES=debian/patches quilt push -a
 
 
 
dpkg-buildpackage -S -sa -rfakeroot -tc -D -k$GPGKEY
 
cd ..
 
# Upload the packages
 
dput ppa:${LPNAME}/ppa nova_${VERSTRING}_source.changes
 
</nowiki></pre>
 

Revision as of 12:26, 25 July 2012

Ubuntu packaging

OpenStack packages for Ubuntu are published in Ubuntu main repository and maintained by Ubuntu core developers.

Package pages

Packaging branches

Packaging branches are maintained in bzr under Launchpad. Click on "Code" on the above pages.

Packaging bugs

Packaging bugs are tracked using Launchpad. Click on "Bugs" on the above pages.

PPAs

Various PPAs with bleeding edge packages are maintained by the OpenStack Ubuntu Testers team.