Difference between revisions of "Packaging/Ubuntu"
(Added link to Swift's packaging guide) |
|||
Line 4: | Line 4: | ||
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. | 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. | ||
{| border="1" cellpadding="2" cellspacing="0" | {| border="1" cellpadding="2" cellspacing="0" | ||
− | | Ubuntu version | + | | Ubuntu version |
− | | Only what is in Ubuntu | + | | Only what is in Ubuntu |
− | | Only stable releases | + | | Only stable releases |
|- | |- | ||
− | | 10.04 LTS (Lucid) | + | | 10.04 LTS (Lucid) |
− | | N/A | + | | N/A |
− | | [[#Release_PPA|Release PPA]] | + | | [[#Release_PPA|Release PPA]] |
|- | |- | ||
− | | 10.10 (Maverick) | + | | 10.10 (Maverick) |
− | | Pre-Austin snapshot | + | | Pre-Austin snapshot |
− | | [[#Release_PPA|Release PPA]] | + | | [[#Release_PPA|Release PPA]] |
|- | |- | ||
− | | 11.04 (Natty) | + | | 11.04 (Natty) |
− | | Frequent snapshots.<<BR>> | + | | Cactus |
− | | [[#Release_PPA|Release PPA]] | + | | [[#Release_PPA|Release PPA]] |
+ | |- | ||
+ | | 11.10 (Oneiric) | ||
+ | | Frequent snapshots.<<BR>>Diablo expected in final release | ||
+ | | [[#Release_PPA|Release PPA]] | ||
|} | |} | ||
Line 36: | Line 40: | ||
== Prerequisites == | == Prerequisites == | ||
− | You'll need to install some packages on the build machine. Some of them are in the [https://launchpad.net/~nova-core/+archive/ | + | 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> | <pre><nowiki> | ||
− | sudo add-apt-repository ppa:nova-core/ | + | sudo add-apt-repository ppa:nova-core/trunk |
sudo apt-get update | sudo apt-get update | ||
</nowiki></pre> | </nowiki></pre> | ||
− | + | To grab all the build dependencies of nova: | |
<pre><nowiki> | <pre><nowiki> | ||
− | sudo apt-get | + | sudo apt-get build-dep nova |
</nowiki></pre> | </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: | 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: | ||
Line 113: | Line 118: | ||
<pre><nowiki> | <pre><nowiki> | ||
− | GPGKEY=... # Your registered OpenGPG key | + | GPGKEY=... # Your registered OpenGPG key |
LPNAME=... # Your Launchpad username | LPNAME=... # Your Launchpad username | ||
DIST="lucid" # The Ubuntu distribution you are targetting | DIST="lucid" # The Ubuntu distribution you are targetting |
Revision as of 14:07, 5 May 2011
Ubuntu is the reference platform for OpenStack. We follow the Ubuntu release cycle very closely, and do most of our QA on Ubuntu.
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.
Ubuntu version | Only what is in Ubuntu | Only stable releases |
10.04 LTS (Lucid) | N/A | Release PPA |
10.10 (Maverick) | Pre-Austin snapshot | Release PPA |
11.04 (Natty) | Cactus | Release PPA |
11.10 (Oneiric) | Frequent snapshots.< >Diablo expected in final release |
Release PPA |
Trunk PPA
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.
Information and instructions for use can be found on Launchpad for Nova, and similarly for Swift and Glance. Swift has documented the process for building and deploying custom Debian packages at http://swift.openstack.org/debian_package_guide.html.
The packages are built by grabbing the latest tarball from http://nova.openstack.org/tarballs/ -- add 'debian' directory from lp:~openstack-ubuntu-packagers/ubuntu/natty/nova/ubuntu (nova) or lp:~openstack-ubuntu-packagers/ubuntu/natty/swift/ubuntu (swift) on top of it. Now add a changelog entry (dch -i -n). Make packages by running ./builddeb.sh.
Release PPA
Information and instructions for use can be found on Launchpad for Nova, and similarly for Swift and 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 nova-core trunk PPA, so add it as a repository:
sudo add-apt-repository ppa:nova-core/trunk sudo apt-get update
To grab all the build dependencies of nova:
sudo apt-get build-dep nova
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:
python -c "import sphinx; print sphinx.__version__"
Finally, you'll need the following packages on your system to be able to generate the packages:
sudo apt-get install dpkg-dev quilt debhelper
Generating binary packages
Combine the main nova code with the packaging scripts:
bzr export nova lp:nova bzr export nova-packaging lp:~openstack-ubuntu-packagers/ubuntu/natty/nova/ubuntu mv nova-packaging/debian nova
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"
cd nova dch -v 2011.1-0ubuntu2-local1 -D lucid "Local build for internal testing"
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.
QUILT_PATCHES=debian/patches quilt push -a
Generate the packages:
./builddeb.sh
The packages will appear in the parent of the nova directory.
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.
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