OpenStack Essex Installation Walkthrough from Scratch (Part2)

OpenStack Essex Installation Walkthrough from Scratch (Part2)

Update: My latest installation document for Folsom can be found here. It’s too tough to try and keep up with debugging installers myself so I am just using DevStack in that tutorial. Thanks!

Populate Glance Host VM OS Images

/*Upload Images
/* 11.10 image
/* 12.04 image

$/etc/init.d/glance-api restart
$/etc/init.d/glance-registry restart

/*List Images
$glance index (Should be empty)

Add Images

/*If you copy and paste below retype the (“) parentheses since the formatting isn’t plaint text.

/* Add images to Glance
$glance add name=”Ubuntu 11.10″ is_public=true container_format=ovf disk_format=qcow2 < ubuntu-11.10-server-cloudimg-amd64-disk1.img
/*Uploading image ‘Ubuntu 11.10’
============================================[100%] 167.139407M/s, ETA 0h 0m 0s
Added new image with ID: 3a2404f6-0a4f-44db-b1cd-a81401dd6015

$glance add name=”Ubuntu 12.04″ is_public=true container_format=ovf disk_format=qcow2 < precise-server-cloudimg-amd64-disk1.img
Uploading image ‘Ubuntu 12.04’
=============================================[100%] 143.583705M/s, ETA 0h 0m 0s
Added new image with ID: 92ca562e-bb18-425a-94ac-eb292fbcabec*/

/* If the image over  ~220Mb you have the wrong image and not Ostack compatible one.
$glance index

Nova Installation

apt-get install nova-api nova-cert nova-common nova-compute nova-compute-kvm nova-doc nova-network nova-objectstore nova-scheduler nova-vncproxy nova-volume python-nova python-novaclient

Manually adding the bridge is typically only necessary if you are trying to use only one NIC. I added it as a reference if anyone ever needed it. Probably not necessary as nova will build your bridge dynamically with an interface config starting that looks like this.
auto lo

$chmod +x <script>

/*Add this to /etc/network/interfaces
#Bridged Interfaces
auto br100
iface br100 inet static
bridge_ports eth1
bridge_stp off
bridge_maxwait 0
bridge_fd 0

/*Add Bridge br100
$brctl addbr br100

/*bring br100 up
$ifconfig br100 up

/* Edit /etc/nova/api-paste.ini and add
admin_tenant_name = admin
admin_user = admin
admin_password = openstack

/* Fix Permissions
$chown -R nova:nova /etc/nova

/* Edit /etc/nano.conf Example-File.
#sync with mysql
$nova-manage db sync

/*Restart Script

/*Add your vNIC “Flat Network” as defined in nova.conf. **Below each argument is passed with to dashes “- -“. The formatting mangles it. e.g. – – fixed_reange_v4=prefix
$nova-manage network create private –fixed_range_v4= –num_networks=1 –bridge=br100 –bridge_interface=eth0 –network_size=500

/*(Optional) Create a floating pool. Can be any address you want to assign. Essentially NAT.
$nova-manage floating create –ip_range=

/*Check Services
/*Should see something along these lines:

$ ps -ea | grep nov
11176 ? 00:00:03 nova-cert
14282 ? 00:00:00 nova-network
14293 ? 00:00:00 nova-compute
14303 ? 00:00:01 nova-api
14313 ? 00:00:00 nova-objectstor
14323 ? 00:00:00 nova-scheduler
14353 ? 00:00:00 nova-xvpvncprox

$nova-manage service list
Binary Host Zone Status State Updated_At
nova-scheduler openstack-dev nova enabled :-) 2012-05-10 06:39:29
nova-compute openstack-dev nova enabled :-) 2012-05-10 06:39:09
nova-network openstack-dev nova enabled :-) 2012-05-10 06:39:29

/*Bad most of the time. Compute can come in and out of that state and recover.
/*I have never seen network recover, it is normally bad or overburdened and time
to start scouring the logs.
$nova-manage service list
Binary Host Zone Status State Updated_At
nova-scheduler openstack-dev nova enabled :-) 2012-05-10 07:26:29
nova-compute openstack-dev nova enabled XXX 2012-05-10 07:19:20
nova-network openstack-dev nova enabled XXX 2012-05-10 07:21:06

/*Virtual Machines from CLI. Skip if only interested in dashboard.
/*Make sure your nova db has been synced if you skip:

/*If not synced or sure if synced, sync.
$nova-manage db sync

/*Create rules for the project
nova secgroup-add-rule default icmp -1 -1

nova secgroup-add-rule default tcp 22 22

/*Windows image
nova secgroup-add-rule default tcp 3389

/*Create security keys
$ nova keypair-add ssh_key > ssh_key.pem

/*Set Permissions
$chmod 0600 ssh_key.pem

/*One more restart for good measure

/*List your images
$glance index

/*List or edit your flavors
$nova flavor-list

/*Boot a VM from CLI or skip to the Dashboard frontend.
/*Ubuntu 11.10
$nova boot –flavor 1 –image 3a2404f6-0a4f-44db-b1cd-a81401dd6015 –key_name ssh_key demo
/* Ubuntu 12.04
$nova boot –flavor 1 –image 92ca562e-bb18-425a-94ac-eb292fbcabec –key_name ssh_key demo1

/*Watch your machine boot or error ☺
$nova show demo1

/*View all VMs in your Project (Project you have creds in ENV for only)
$nova list

SSH to your new host. If you get public key errors you didn’t set your permissions on the key a few steps back.
$ssh -i ssh_key.pem ubuntu@
>$ssh -i ssh_key.pem ubuntu@<your IP>

The final part 3 is here.

  1. NesrineNesrine07-10-2012

    in default ubuntu where is his

  2. DavePDaveP08-01-2012

    Hi Brent,

    Like you I have had numerous problems getting OpenStack installed and stable, and I was really glad to find this walk through. One problem is, I believe, in my nova.conf. I copied yours and edited for my local network, but left all the 172.31.x.x addresses as they were. When I try to boot an instance, the compute log shows that there is a password error.

    Now, in your nova.conf you have the sql connection referring to a user novadbadmin, password openstack. I can’t see where (if anywhere) you created that user/database in the script. I see nova/nova being created. Any guidance would be much appreciated.



  3. premium themespremium themes05-22-2013

    it seems like ages that i heve been searching for a completesite like this one? i am glad i found it,some great information here, i am new and just starting out, anyway thanks for some great tips..