Openstack on Ubuntu 12.04 LTS

Home » Computer Articles » Linux » Openstack on Ubuntu 12.04 LTS
April 3, 2013 Linux No Comments

I've been wanting to try out Openstack for a while and I finally made the time to do a test setup. Now there is a Devstack setup which was really easy to setup but I wanted to do a full production setup. So here are the steps I took. Of course I haven't added all the information here. I do have a reference section where you can get a lot more information.


Download the current Ubuntu 12.04 LTS, Click here to download.


Setting up your server.


Make sure system is up to date.

# apt-get update && apt-get upgrade


Install Openssh and lvm2

# apt-get install openssh-client openssh-server lvm2


Install time service.

# apt-get install ntp

Edit the /etc/ntp.conf and information below.

driftfile /var/lib/ntp/ntp.drift

server iburst
fudge stratum 10


Install some utilities for Iscsi needed for nova-volume.

# apt-get install tgt open-iscsi open-iscsi-utils


Need to add hard drive for Nova volume.

# fdisk /dev/sdb

# pvcreate -ff /dev/sdb1

# vgcreate nova-volumes /dev/sdb1

Eanble ip_forward

# vi /etc/sysctl.conf

 uncomment net.ipv4.ip_forward=1

# sysctl -p (This will load the sysctl.conf file)

Network setup. Edit the /etc/network/interfaces

auto eth0
iface eth0 inet static

auto eth1
iface eth1 inet static


Make sure you have the bridge Utils package installed.

# apt-get install bridge-utils


Restart your network.

# /etc/init.d/networking restart


More software that is needed.

# apt-get install rabbitmq-server memcached python-memcache kvm libvirt-bin mysql-server python-mysqldb

When installing libvirt it creates a default nat interface which I wanted removed.

# virsh net-destroy default
# virsh net-undefine default


When installing MySQL it asked for a password, which I setup. You will need this later.


Edit the MySQL vi /etc/mysql/my.cnf file and make this change.

bind-address =

bind-address =

Restart MySQL

# service mysql restart


You will need to setup some databases and users.

mysql -u root -p (Enter password)
GRANT ALL PRIVILEGES ON nova.* TO 'novadbadmin'@'%' IDENTIFIED BY 'password';

GRANT ALL PRIVILEGES ON glance.* TO 'glancedbadmin'@'%' IDENTIFIED BY 'password';

GRANT ALL PRIVILEGES ON keystone.* TO 'keystonedbadmin'@'%' IDENTIFIED BY 'password';



 Installing and configuring Keystone.

# apt-get install keystone python-keystone python-mysqldb python-keystoneclient


Edit /etc/keystone/keystone.conf and change sql connection type to

connection = mysql://keystonedbadmin:[email protected]/keystone


 Restart the keystone service.

# service keystone restart


Lets create some tables for keystone.

# keystone-manage db_sync


Now we need some data in the database.

# wget

# wget

# mv keystone_data.sh__0.txt

# mv endpoints.sh__0.txt


Lets make these scripts executable.

# chmod +


Edit the and change the entry below. This will be the password you set early.



Now lets run the script.

# ./ (If everything is OK, the script will end without errors.)


Now you need to configure some endpoints.

# ./ -m -u keystonedbadmin -D keystone -p password -K -R RegionOne -E "http://localhost:35357/v2.0" -S -T ADMIN


Installing and configuring Glance

# apt-get install glance glance-api glance-client glance-common glance-registry python-glance


Edit /etc/glance/glance-api-paste.ini and change below.

admin_tenant_name = service
admin_user = glance
admin_password = password


Edit /etc/glance/glance-registry-paste.ini and change below.

admin_tenant_name = service
admin_user = glance
admin_password = password

Next lets edit /etc/glance/glance-registry.conf

Look for sql_connection entry and replace with below.

sql_connection = mysql://glancedbadmin:[email protected]/glance  


At the end of this file add

flavor = keystone

At the end of this file /etc/glance/glance-api.conf add

flavor = keystone


Afterwards, you need to initially synchronize the Glance database by running these commands:
# glance-manage version_control 0
# glance-manage db_sync

Restart Glance:
# service glance-api restart && service glance-registry restart

We'll be using a Ubuntu UEC image for this. Download one:

# wget


Then add this image to Glance:
# glance add name="Ubuntu 12.04 cloudimg amd64" is_public=true container_format=ovf
 disk_format=qcow2 < ubuntu-12.04-server-cloudimg-amd64-disk1.img
After this, if you do
# glance index
Installing and configuring Nova.
# apt-get install nova-api nova-cert nova-common nova-compute nova-compute-kvm nova-doc nova-network nova-objectstore nova-scheduler nova-volume nova-consoleauth novnc python-nova python-novaclient
Edit /etc/nova/nova.conf and replace everything with the information below.

# network specific settings
--root_helper=sudo nova-rootwrap

Edit /etc/nova/api-paste.ini

admin_tenant_name = service
admin_user = nova
admin_password = password

Stop and start Nova service.
# for a in libvirt-bin nova-network nova-compute nova-cert nova-api nova-objectstore
 nova-scheduler nova-volume novnc nova-consoleauth; do service "$a" stop; done
# for a in libvirt-bin nova-network nova-compute nova-cert nova-api nova-objectstore
 nova-scheduler nova-volume novnc nova-consoleauth; do service "$a" start; done
List currently running VM's
# nova list
List of current VM images.
# nova image-list
You should see the image we uploaded before.
Install the Openstack Dashboard.
# apt-get install apache2 libapache2-mod-wsgi openstack-dashboard
You should now be able to connect with a web browser to your Openstack Dashboard.
I have some work to do here as not everything is working.
Installing Openstack on Ubuntu in 10 minutes,
Share This:

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.