To get OpenStack installed on Ubuntu, I recommend you use the install script. If you want to do it manually, these are the steps from the documentation. I will add in what I had to do in order to get Flat networking working correctly, which was my problem in the whole setup. You can then use something like Puppet or Chef to automate the install (I did it using Chef the first time) but if you don’t understand how it works, having it automated just leaves you scratching your head. :-)

Here we go.

Please see docs.openstack.org for more information not covered here. Some of this is verbatim from there.

Install the supplemental tools such as euca2ools and unzip.
sudo apt-get install -y euca2ools unzip

Set up the DB according to this page:
MySQL DB Setup for Cloud Controller

Populate the initial DB Schema by making sure:

--sql_connection=mysql://nova:[email protected]/nova

is in /etc/nova/nova.conf

Then run:
nova-manage db sync

Set up the /etc/network/interfaces file:

# The loopback network interface
auto lo
iface lo inet loopback

# Networking for OpenStack Compute
auto br100

iface br100 inet dhcp
bridge_ports        eth0
bridge_stp           off
bridge_maxwait   0
bridge_fd            0


For Flat networking to work with 1 interface:
Say you’re using 172.16.1.X/24 is your real local network. With nodes on it already, and a router at 172.16.1.1.
Inside of /etc/nova/nova.conf you’ll need:

--fixed-range=172.16.1.0/24
--num-networks=1
--flat-injected=true


And run this command:
nova-manage network create 172.16.1.0/24 1 256
Then after that’s done, go into mysql..

mysql> select * from fixed_ips;
+---------------------+---------------------+------------+---------+-----+--------------+------------+-------------+-----------+--------+----------+
| created_at          | updated_at          | deleted_at | deleted | id  | address      | network_id | instance_id | allocated | leased | reserved |
+---------------------+---------------------+------------+---------+-----+--------------+------------+-------------+-----------+--------+----------+
| 2011-07-28 17:28:23 | NULL                | NULL       |       0 | 385 | 172.16.1.0   |          3 |        NULL |         0 |      0 |        1 |
| 2011-07-28 17:28:23 | NULL                | NULL       |       0 | 386 | 172.16.1.1   |          3 |        NULL |         0 |      0 |        1 |
...
| 2011-07-28 17:28:24 | NULL                | NULL       |       0 | 638 | 172.16.1.253 |          3 |        NULL |         0 |      0 |        0 |
| 2011-07-28 17:28:24 | NULL                | NULL       |       0 | 639 | 172.16.1.254 |          3 |        NULL |         0 |      0 |        0 |
| 2011-07-28 17:28:24 | NULL                | NULL       |       0 | 640 | 172.16.1.255 |          3 |        NULL |         0 |      0 |        0 |
+---------------------+---------------------+------------+---------+-----+--------------+------------+-------------+-----------+--------+----------+
256 rows in set (0.00 sec)

For any IPs you don’t want allocated, you should set reserved=1 so that OpenStack will not try to use it.