Bleeding edge OpenStack Nova on Maverick (updated x2)
Want to test the latest cloud goodness ? Thanks to the new Nova trunk PPA, it’s really easy to run the freshest code from OpenStack Compute (Nova) on Ubuntu 10.10. Here is how.
We will install everything on the same machine, one that has VT extensions enabled and therefore can run KVM. My test laptop with 2Gb of RAM has been a bit struggling, but it worked. You should have Ubuntu 10.10 installed on that box.
Dec 9, 2010 UPDATE: rabbitmq-server should be installed before the nova packages, and we should use images with ramdisks at this point.
Feb 25, 2011 UPDATE: Ubuntu cloud images are supported, switch tutorial to using those.
First you should enable the PPA:
$ sudo apt-get install python-software-properties $ sudo add-apt-repository ppa:nova-core/trunk $ sudo apt-get update
Install RabbitMQ first:
$ sudo apt-get install rabbitmq-server
Then install Nova and dependencies :
$ sudo apt-get install nova-api nova-objectstore nova-compute nova-scheduler nova-network euca2ools unzip
Congratulations, you just created a cloud.
You should restart libvirt, especially if you had it installed before, to make sure it realizes that ebtables is now installed:
$ sudo service libvirt-bin restart
Create a specific network for your VMs, here I used my unused 10.0.0.0/8:
$ sudo nova-manage network create 10.0.0.0/8 1 64
Create a user, a project, download credentials and source them:
$ sudo nova-manage user admin ttx $ sudo nova-manage project create myproject ttx $ sudo nova-manage project zipfile myproject ttx $ unzip nova.zip $ . novarc
Register an Ubuntu cloud image
Download an Ubuntu cloud image, then use uec-publish-tarball to register it:
$ r="maverick" $ wget http://uec-images.ubuntu.com/$r/current/$r-server-uec-amd64.tar.gz $ uec-publish-tarball $image mybucket
It should output 3 references : emi, eri and eki. You need to use the emi value in the next section (I got “ami-lvdliy0″).
Running an instance
First, create a keypair if you haven’t already one:
$ euca-add-keypair mykey > mykey.priv $ chmod 0600 mykey.priv
Allow the connection to port 22 of the instance (SSH), using the following command:
$ euca-authorize default -P tcp -p 22 -s 0.0.0.0/0
Then start the instance (replace $emi with the value from uec-publish-tarball above):
$ euca-run-instances $emi -k mykey -t m1.tiny
This will return an instance ID (I got “i-1objiev”), an IP address (I got “10.0.0.3″), and the instance will be scheduled and launched. You should check the status with:
The instance should quickly go from “launching” to “running”, and you should be able to connect to the ubuntu user through SSH (replace $ipaddress with the one you got from euca-describe-instances):
$ ssh -i mykey.priv ubuntu@$ipaddress
When you are done playing, you can tear the instance down using the following command (replace $instanceid with the instance ID from above):
$ euca-terminate-instances $instanceid
- For this simple tutorial I left nova-volume out, since it requires more configuration setup (like setting up LVM volume groups) before it can be used.
- All references are “ami-”: it should be ami, ari and aki. This is a bug that will be fixed (bug 658234)