Skip to content


How to install Openstack Nova (2011.3-nova-milestone) in all-in-one setup

ARTICLE: Openstack Cloud Software – Ubuntu Openstack – Ubuntu Cloud

In this article I will talk about how to install Openstack (2011.3-nova-milestone) on All-in-One setup. This kind of installation is useful for proof of concept (POC), development environments or if you want to have a basic cloud environment on your local computer.

Overview
=======
OpenStack [1] is an IaaS cloud computing project by Rackspace Cloud and NASA. Currently more than 110 companies have joined the project among which are Citrix Systems, Dell, AMD, Intel, Canonical, HP, and Cisco. It is free open source software released under the terms of the Apache License [2].

OpenStack Compute (Nova) is a cloud computing fabric controller (the main part of an IaaS system). It is written in Python, using the Eventlet and Twisted frameworks, and relies on the standard AMQP messaging protocol, and SQLAlchemy for data store access.

Configure Prerequisites
==============

Make sure the host in question supports VT ( Virtualisation Technology ) since we will be using KVM as the virtualization technology. This article was tested on Ubuntu 11.04 with the latest updates.

1. Configure bridging mode
sudo apt-get install bridge-utils

2. Install NTP Server
sudo apt-get install ntp

3. Install MySQL Server
Configure mysql’s root password
sudo apt-get install mysql-server

4. Create a database and mysql user for Openstack
sudo mysql -uroot -p<password> -e “CREATE DATABASE nova;”
sudo mysql -uroot -p<password> -e ‘GRANT ALL ON nova.* TO novauser@localhost IDENTIFIED BY “novapassword” ‘;

5. Install RabbitMQ – Advanced Message Queuing Protocol (AMQP)
sudo apt-get install rabbitmq-server

Install Openstack
==========

6. Configure Official PPA repositories
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:nova-core/milestone
sudo apt-get update

PS: Note that trunk is changing rapidly so installing ppa:/nova-core/trunk may or may not work any given day. An alternative package installation is ppa:nova-core/milestone .

7. Install Openstack components
sudo apt-get install nova-api nova-network nova-volume nova-objectstore nova-scheduler nova-compute euca2ools unzip
sudo apt-get install glance

8. Restart libvirt-bin just to make sure libvirtd is aware of ebtables.
sudo service libvirt-bin restart

9. Edit /etc/nova/nova.conf and add the following
–sql_connection=mysql://novauser:novapassword@localhost/nova
–flat_injected=true
–network_manager=nova.network.manager.FlatDHCPManager
–fixed_range=10.0.0.0/24

10. restart Openstack services
for i in nova-api nova-network nova-objectstore nova-scheduler nova-volume nova-compute; do sudo stop $i; sleep 2; done
for i in nova-api nova-network nova-objectstore nova-scheduler nova-volume nova-compute; do sudo start $i; sleep 2; done

11. Migrate nova database from sqlite db to MySQL db.
sudo nova-manage db sync
PS: It may take a while.

12. Define a specific private network where all your Instances will run. This will be used in the network of fixed Ips set inside nova.conf.
sudo nova-manage network create –fixed_range_v4 10.0.0.0/24 –label private –bridge_interface br100

12.1 Define a specific public network and allocate 32 Floating Public IP addresses for use with the instances starting from 192.168.2.32.
sudo nova-manage floating create –ip_range=192.168.2.32/27

13. Create a user, a project, download credentials and source them:
cd
mkdir nova
cd nova
sudo nova-manage user admin lborda
sudo nova-manage project create project1 lborda
sudo nova-manage project zipfile project1 lborda
unzip nova.zip
source novarc

Register an Ubuntu cloud image
===================

14. Publish an image

distro=”lucid”
wget http://uec-images.ubuntu.com/$distro/current/$distro-server-cloudimg-amd64.tar.gz

uec-publish-tarball lucid-server-cloudimg-amd64.tar.gz lucid_amd64

Running an instance
============

15. Create a key par
euca-add-keypair lborda > lborda.priv
chmod 0600 lborda.priv

16. Allow icmp (ping) and ssh access to instances
euca-authorize default -P tcp -p 22 -s 0.0.0.0/0
euca-authorize -P icmp -t -1:-1 default

17. Then start the instance

emi=`euca-describe-images | awk ‘{print $2}’ |grep -m1 ami`
euca-run-instances $emi -k lborda -t m1.tiny
euca-describe-instances

17.1 Assign public address to the instance
euca-allocate-address
euca-assocate-address  -i <instance_id> <public_ip_address>

18. SSH to the instance
ssh -i lborda.priv ubuntu@<ipaddress>

19. Terminate instances
euca-terminate-instances <instance_id>

20. That is it! Just start using the instance!

Nice commands to know [3]
====================

nova-manage instance_type list
nova-manage flavor list
nova-manage instance_type create m1.xxlarge 32768 16 320 0 0 0
nova-manage instance_type delete m1.xxlarge

References
=======

[1] – http://www.openstack.org
[2] – http://en.wikipedia.org/wiki/OpenStack
[3] – http://ken.pepple.info/openstack/2011/03/03/Configurable-Instance-Types-For-OpenStack-Nova/

Other links
=========
[4] – http://fnords.wordpress.com/2010/12/02/bleeding-edge-openstack-nova-on-maverick/
[5] – http://wiki.openstack.org/NovaInstall/DevPkgInstall

Posted in Knowledge Base.

Tagged with , , .


0 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.



Some HTML is OK

or, reply to this post via trackback.