Jump to: navigation, search

Difference between revisions of "Packaging/Ubuntu"

(Default location of flagfile needs to be added to code)
(added link to archive of /debian directory for swift)
Line 2: Line 2:
 
Ubuntu is the reference platform for [[OpenStack]]. We follow the Ubuntu release cycle very closely, and do most of our QA on Ubuntu.
 
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
+
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.
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 expected in final release
+
| Frequent snapshots.<<BR>>Cactus expected in final release  
| [[#Release_PPA|Release PPA]]  
+
| [[#Release_PPA|Release PPA]]  
 
|}
 
|}
  
 
= Trunk 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.
 
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 [https://launchpad.net/~nova-core/+archive/trunk Launchpad] for Nova, and similarly for [https://launchpad.net/~swift-core/+archive/trunk Swift] and [https://launchpad.net/~glance-core/+archive/trunk Glance].
 
Information and instructions for use can be found on [https://launchpad.net/~nova-core/+archive/trunk Launchpad] for Nova, and similarly for [https://launchpad.net/~swift-core/+archive/trunk Swift] and [https://launchpad.net/~glance-core/+archive/trunk Glance].
  
The packages are built by grabbing the latest tarball from http://nova.openstack.org/tarballs/ and adding [https://code.launchpad.net/~openstack-ubuntu-packagers/ubuntu/natty/nova/ubuntu lp:~openstack-ubuntu-packagers/ubuntu/natty/nova/ubuntu] on top of it, and adding a changelog entry.
+
The packages are built by grabbing the latest tarball from http://nova.openstack.org/tarballs/ -- add 'debian' directory from [https://code.launchpad.net/~openstack-ubuntu-packagers/ubuntu/natty/nova/ubuntu lp:~openstack-ubuntu-packagers/ubuntu/natty/nova/ubuntu] (nova) or [https://code.launchpad.net/~openstack-ubuntu-packagers/ubuntu/natty/swift/ubuntu 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 =
 
= 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]..
 
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]..
  
Line 38: Line 34:
  
 
= Generating packages manually =
 
= Generating packages manually =
 
 
== 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/ppa nova-core PPA], so add it as a repository:
  
You'll need to install some packages on the build machine. Some of them are in the [https://launchpad.net/~nova-core/+archive/ppa nova-core PPA], so add it as a repository:
 
  
 
<pre><nowiki>
 
<pre><nowiki>
Line 47: Line 42:
 
sudo apt-get update
 
sudo apt-get update
 
</nowiki></pre>
 
</nowiki></pre>
 
  
 
During the build process, you will be informed about which packages are missing from your system, but there are some additional packages that are required for building the documentation:
 
During the build process, you will be informed about which packages are missing from your system, but there are some additional packages that are required for building the documentation:
Line 55: Line 49:
 
sudo apt-get install python-greenlet python-rrdtool
 
sudo apt-get install python-greenlet python-rrdtool
 
</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 63: Line 56:
 
python -c "import sphinx; print sphinx.__version__"
 
python -c "import sphinx; print sphinx.__version__"
 
</nowiki></pre>
 
</nowiki></pre>
 
  
 
== Generating the packages ==
 
== Generating the packages ==
 
 
Combine the main nova code with the packaging scripts:
 
Combine the main nova code with the packaging scripts:
  
Line 75: Line 66:
 
mv nova-packaging/debian nova
 
mv nova-packaging/debian nova
 
</nowiki></pre>
 
</nowiki></pre>
 
  
 
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"
 
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"
Line 84: Line 74:
 
dch -v 2011.1-0ubuntu2-local1 -D lucid "Local build for internal testing"
 
dch -v 2011.1-0ubuntu2-local1 -D lucid "Local build for internal testing"
 
</nowiki></pre>
 
</nowiki></pre>
 
  
 
Edit `bin/nova-manage` to specify the default location of the flagfile:
 
Edit `bin/nova-manage` to specify the default location of the flagfile:
Line 93: Line 82:
 
+++ nova-manage-fixed  2011-02-09 12:14:03.000000000 -0500
 
+++ nova-manage-fixed  2011-02-09 12:14:03.000000000 -0500
 
@@ -656,7 +656,7 @@
 
@@ -656,7 +656,7 @@
+
 
 
  def main():
 
  def main():
 
     """Parse options and call the appropriate class/method."""
 
     """Parse options and call the appropriate class/method."""
Line 99: Line 88:
 
+    utils.default_flagfile("/etc/nova/nova.conf")
 
+    utils.default_flagfile("/etc/nova/nova.conf")
 
     argv = FLAGS(sys.argv)
 
     argv = FLAGS(sys.argv)
+
 
 
     script_name = argv.pop(0)
 
     script_name = argv.pop(0)
 
'
 
'
Line 105: Line 94:
 
echo "$PATCH" | patch bin/nova-manage
 
echo "$PATCH" | patch bin/nova-manage
 
</nowiki></pre>
 
</nowiki></pre>
 
  
 
Generate the packages:
 
Generate the packages:
Line 113: Line 101:
 
./builddeb.sh
 
./builddeb.sh
 
</nowiki></pre>
 
</nowiki></pre>
 
  
 
The packages will appear in the parent of the nova directory.
 
The packages will appear in the parent of the nova directory.

Revision as of 09:10, 12 February 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) Frequent snapshots.<
>Cactus 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.

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 PPA, so add it as a repository:


sudo add-apt-repository ppa:nova-core/ppa
sudo apt-get update

During the build process, you will be informed about which packages are missing from your system, but there are some additional packages that are required for building the documentation:


sudo apt-get install python-greenlet python-rrdtool

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__"

Generating the 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"

Edit `bin/nova-manage` to specify the default location of the flagfile:


PATCH='--- nova-manage 2011-02-09 12:08:18.000000000 -0500
+++ nova-manage-fixed   2011-02-09 12:14:03.000000000 -0500
@@ -656,7 +656,7 @@

 def main():
     """Parse options and call the appropriate class/method."""
-    utils.default_flagfile()
+    utils.default_flagfile("/etc/nova/nova.conf")
     argv = FLAGS(sys.argv)

     script_name = argv.pop(0)
'

echo "$PATCH" | patch bin/nova-manage

Generate the packages:


./builddeb.sh

The packages will appear in the parent of the nova directory.