Thursday, May 20, 2010

Easily test or demo Ubuntu Enterprise Cloud (UEC) in EC2 instance

Consider the following items:
  • recent efforts by Robert Collins, Dustin Kirkland and others have enabled running all components of UEC on a single system.
  • while performance suffers greatly, Eucalyptus can easily be made to use qemu rather than kvm for virtualization without hardware virtualization extensions
  • Ubuntu server images are quickly launchable on EC2

Now, re-read those, but do so while thinking about wanting to provide people with an easy way to test UEC.

Thats right, if you have $0.40 per hour, and an EC2 account, you can play with UEC. No real hardware required.

This nested virtualization is obviously not going to provide you with the worlds fastest performing cloud, but it will provide a functional system for test or demo purposes.

I've put some copy-and-paste shell code in commands.txt in a bzr branch uec-on-ec2.

  • check out the bzr branch: lp:~smoser/+junk/uec-on-ec2

    bzr branch lp:~smoser/+junk/uec-on-ec2

  • follow 'commands.txt', copy and pasting its content bit by bit in a root shell (run 'sudo -s').
  • Publish and run an instance (do this as 'ubuntu' user):

    $ uec-publish-tarball fastboot-amd64-0.11.tar.gz fastboot-amd64-0.11 amd64
    # the above creates an emi, see its output
    $ ( umask 066 ; euca-add-keypair mykey > mykey.pem )
    $ euca-run-instances --addressing private --key mykey emi-4D6C12BF
    # soon this will enter 'running' state and have an IP address associated with it.
    $ ssh -i mykey ubuntu@${IPADDR}


Your instance should now be functional.

There are a couple things that could be cleaned up on this, patches are very welcome:
* ideally all of the setup could be done from a '#!' user data script, I've just not worked out all the timing yet.
* separate the node out, allowing for multiple nodes
* fix the requirement of private addressing for functional nodes
* fix the issue with the NC being eventually discovered 3 times (with each of its 3 IP addresses)

That said, you should be able to test this and try out UEC on EC2 in a m1.large for less than $0.40 per hour.

1 comment:

  1. Hello Scott,

    This was great post. I really enjoy your step by step guide and I manage to create a UEC on Vmware Player image in only 6 hours. I even manage to have outbound network for my Instances. So this was great howto. I was looking forward to such info for the past 3 years and I am really happy that you create this great article now I can have my own cloud and I can finally can sleep well thanks to you. Wish you all best.

    Hristofor Georgiev

    ReplyDelete