Installing OpenStack via Vagrant on Fedora 17 using https://github.com/lorin/openstack-ansible

The great thing about this repo is that it "just works" from Fedora 17 and quite possibly other platforms.

You'll be creating VMs within VMs, but don't worry about that. At the end of make all you'll have the following systems:

Install dependencies

(You'll need to install Vagrant and its dependencies, of course.)

yum install ansible
yum install python-nova

(Fedora 17 ships with python-nova-2012.1.3)

vagrant up via make all

git clone https://github.com/lorin/openstack-ansible.git
cd openstack-ansible
make all

Verify that a "cirros" VM was created

source openrc
nova list

You should see output similar to this:

+--------------------------------------+--------+--------+-----------------------+
|                  ID                  |  Name  | Status |        Networks       |
+--------------------------------------+--------+--------+-----------------------+
| 8b10ed50-70a4-46a5-b69e-989cfe5b91a8 | cirros | ACTIVE | private=192.168.100.2 |
+--------------------------------------+--------+--------+-----------------------+

Take a look at the two Openstack hosts that were created ("controller" and "compute1")

cd vms
vagrant status

You should see output like this:

Current VM states:

controller               running
compute1                 running

To ssh to compute1 (from the "vms" directory)

vagrant ssh compute1

Once you're ssh'd in, you can run a virsh list:

vagrant@compute1:~$ virsh list
 Id Name                 State
----------------------------------
  1 instance-00000001    running

Here's are the ethernet interfaces on the two Ubuntu hosts:

controller:

vagrant@controller:~$ ifconfig | grep 'inet addr' -B1
br100     Link encap:Ethernet  HWaddr 08:00:27:3f:9f:60  
          inet addr:192.168.100.1  Bcast:192.168.100.255  Mask:255.255.255.0
--
eth0      Link encap:Ethernet  HWaddr 08:00:27:88:0c:a6  
          inet addr:10.0.2.15  Bcast:10.0.2.255  Mask:255.255.255.0
--
eth1      Link encap:Ethernet  HWaddr 08:00:27:20:6a:3f  
          inet addr:192.168.206.130  Bcast:192.168.206.255  Mask:255.255.255.0
--
lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0

compute1:

vagrant@compute1:~$ ifconfig | grep 'inet addr' -B1
br100     Link encap:Ethernet  HWaddr 08:00:27:d2:d2:9e  
          inet addr:192.168.100.131  Bcast:192.168.100.255  Mask:255.255.255.0
--
eth0      Link encap:Ethernet  HWaddr 08:00:27:88:0c:a6  
          inet addr:10.0.2.15  Bcast:10.0.2.255  Mask:255.255.255.0
--
eth1      Link encap:Ethernet  HWaddr 08:00:27:d7:7d:cb  
          inet addr:192.168.206.131  Bcast:192.168.206.255  Mask:255.255.255.0
--
lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
--
virbr0    Link encap:Ethernet  HWaddr de:d5:4a:6b:e0:48  
          inet addr:192.168.122.1  Bcast:192.168.122.255  Mask:255.255.255.0

I tried using a CentOS base box but the network config didn't work... the VMs didn't get the IP addresses from the Vagrantfile. Here is the error:

[controller] Configuring and enabling network interfaces...
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

/sbin/ifup eth1 2> /dev/null

Other users of CentOS base boxes report similar problems here: https://github.com/mitchellh/vagrant/issues/997

For some discussion of my situation: http://irclog.perlgeek.de/crimsonfu/2012-10-31#i_6116485


Home | About | Sitemap | Recent changes | © Philip Durbin | @philipdurbin | philipdurbin@gmail.com