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.
Package installation
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 [1]:
$ sudo apt-get install nova-api nova-objectstore nova-compute nova-scheduler nova-network euca2ools unzip
Congratulations, you just created a cloud.
Configuration
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 [2]: 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:
$ euca-describe-instances
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
Enjoy !
Notes
- 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)
Hi, i was trying this procedure, and i seems that it’s failing on something like
sudo nova-manage project zipfile myproject ttx
it complains about this
IOError: [Errno 2] No such file or directory: ‘/usr/local/lib/python2.6/dist-packages/nova-2011.1-py2.6.egg/nova/auth/novarc.template’
have you encounter this error ?
thanks for your write up!
No I haven’t. Did you try the tutorial on Ubuntu 10.10 ? If yes, you might want to file a question on Launchpad: https://answers.launchpad.net/nova
I’ve tried it on 10.04. should i upgrade to 10.10 necessarily ?
No, it’s supposed to also work on 10.04.
Not working..i filled a question on launchpad, dunno if i’m doing or not doing something.
Thanks!.
this is the link
https://answers.launchpad.net/nova/+question/136966
also there is a bug related
https://bugs.launchpad.net/nova/+bug/677537
Hi ,
Tried installing with the step, every thing went fine.While i Tried to run the instance the state come to running. but not able to ping or access the instance.
when i tried to run the instance with type m1.small i am getting the instance state as pending.
euca-run-instances $emi -k mykey -t m1.small
what could be the issue pls help….
I see no obvious reason why it would fail in those cases, this needs more debugging. Blog comments are not the best place to interact for debugging. I suggest that you file a question on Launchpad at https://answers.launchpad.net/nova with details of your configuration.
Hi,
Did you resolve this issue? I am experiencing this too.
Thierry thanks for your comments..I’m passing all my doubts to Launchpad and IRC.
How do I create a custom image for openstack? How do I build these tar.gz? help me please!!!
The easiest road is to use pre-built cloud images, like the ones Ubuntu releases. If you need your own, you can use a raw disk image, or a combination of kernel, ramdisk and image. The tar.gz format is just the package that Ubuntu uses and that is recognized by uec-publish-tarball. You can also see http://wiki.openstack.org/RunningNova/ManualImageRegistration for manual steps to registration.
thanks for the answers but I discovered how to build my own custom images and wrote a tutorial: https://answers.launchpad.net/nova/+question/146594
Hi, after running this command : uec-publish-tarball $image mybucket, I got this result:
Unable to run euca-describe-images. Is euca2ools environment set up?
does it matter ?
Best Regards
This is when the the env variables in novarc weren’t sourced, so uec-publish-tarball can’t connect to the API server. Make sure you run “. novarc” before running uec-publish-tarball.
I’ve done that and still get the same error. Any other suggestions?
Comments are a poor way to do support 🙂 What does “euca-describe-instances” return ? If you still have the issue, maybe you should open a bug in Launchpad against Nova.
I walked through the step-by-step with Natty (11.04) beta 1, without a single problem. Thanks for the details … this was a huge help so thanks for publishing! I will run through this again as I see there are some updates for beta 2.
Works on Natty 11.04 final for bzr1034, except that https://bugs.launchpad.net/nova/+bug/773308 bit me. Applied the patch suggested in the bug report and restarted nova-compute and that did the trick.
Thanks a lot for a great guide.
I was facing some issues when I followed the steps from http://wiki.openstack.org/RunningNova (code-doc out of sync, I guess) on Natty 11.04.(nova packages version 2011.2-0ubuntu1). Then your guide saved me.
Thanks for the guide.
Hi,
I followed all the steps as it is,
“ssh -i mykey.priv 10.0.0.3@ubuntu” after this command it is asking for password.
The private key is injected to the instances, so i hope it should not ask for password.
Should i configure anything in SSH. Please do help me.
It was a typo mistake..
Its not “ssh -i mykey.priv 10.0.0.3@ubuntu”
Its “ssh -i mykey.priv ubuntu@10.0.0.3”
can u please tell me how do design and deploy apps into openstack cloud…..i read u r cloud installation step of openstack it says that it can only create instances …..not more than that