Swimming the Matrix

I can haz (free) cloud?

One of the projects I’ve wanted to try for a while was to build a cloud like Amazon’s. Naturally I don’t have hundreds of computers lying around like they do, but it is possible to set one up on a single computer, if you know how.

Before we look at our options, we need to answer why you would want a cloud. There are many reasons it might be beneficial to run a cloud. One is that you can turn one computer into 2 or more. This allows you to take a computer that might not be constantly in use, and split the work it does between two or more computers. This has advantages in software development, or if you wanted to have one virtual server doing one task and another one doing another. Since you can also “save” instances, you can scale up and down your projects as needed, so if you suddenly need 3 more servers to test with, you can do that with the push of a button, no additional hardware required.

Before embarking on making your own cloud, I recommend playing around with Virtualbox, and see if you find yourself using another operating system or even another “computer” enough to justify the time. I’ve been using Virtualbox for a very long time, and I’m always spinning up various Linux versions with it to play around with new things in the Linux world.

If you wanted to do it the hard way, you might look at Eucalyptus, which is the original free private cloud software. However, having tried it, it’s very difficult to set up, even with their guides. Ubuntu Enterprise Cloud is free and built on top of Eucalyptus to try to make it a little easier. Of course then you are tied to Ubuntu, which isn’t a problem for me so much since I use Ubuntu regularly for all kinds of functions. But it’s still problematic because…

Ubuntu just announced they were moving to support OpenStack, an initiative from dozens of companies to build a comprehensive set of open-source cloud software. With it you can build the major components of Amazon, mainly their EC2 virtual machine farm. That’s what I did and what I’ll be focusing on right now.

OpenStack, I will admit, is still a little raw. It has some confusing documentation, and the community is still small (case in point, they got a forum this week finally…). However, they do have plenty of documentation, and since Ubuntu has contributed their UEC software, you can look at a lot of Ubuntu’s documentation and apply it almost directly to OpenStack.

Now, if the idea of installing Ubuntu and then beating your head against the wall as you install packages and configure it all sounds like a bad job, then one company is going to save you a lot of time and frustration. They are called StackOps, and they are a cloud consulting company. However their biggest achievement which relates to his post is the StackOps Distro. This installs Ubuntu with all the packages needed to run OpenStack Nova (the EC2 clone), configured and ready to go free of charge.

Best of all when you get it all installed it will tell you go to a web address on your server. This will take you to their StackOps Smart Installer, and walk you through configuring your cloud. It explains in perfect detail everything you might need to change, but advises you to keep most of it as it is. After going through their wizard, it sends the configuration commands to your server, and you are ready to go. Then all you need to do is log in, create a user and project, and start registering custom server images to use in your cloud (There could be a whole post on that, look it up if you’re interested since it’s pretty complex).

It’s not entirely sunshine and rainbows with StackOps, but it’s close. For one thing, I had to install it like 4 times since I kept messing up the configuration. So here are some tips to save you some time:

  • Don’t install your server with LVM. StackOps/OpenStack doesn’t seem to support it, so don’t bother.
  • For the public range of IP addresses it asks you to enter, be sure that’s the IP addresses your router deals with, so for mine it’s for the router, so I would put in in. Yours might vary
  • If you listened and didn’t install LVM, make sure you set the storage controller to sda5 or an empty hard drive. It has to be an empty partition or non-partitioned┬ádisk. The first page it takes you to lists all the partitions. Unused ones will show a -1 for the used size.
  • Put the disk back in after the install. Don’t ask me why, but it makes you take it out after installing, then requires it to do the automatic configuration. So you’ll skip an error by putting it back in once the server is up.

If you want to use a web GUI, they have the OpenStack Dashboard project. It is VERY raw(not to mention very odd to install), so I would skip it and do the basics manually in the command line, then use something like HybridFox to spin up instances, assign them public IPs, etc. And be sure to get version 1.6 of HybridFox, since 1.7 doesn’t support OpenStack.

Now that you (hopefully) have the cloud up and running, there are a few things to know. I’ll assume you looked here and downloaded and bundled the Ubuntu image it has. You want to do that. You can also use the Eucalyptus images here, but keep in mind you will have to launch those with a keypair (see here) or else you can’t ssh into it.

Hopefully that’s enough for you too to spin up your own cloud. Let me know in the comments if you run into problems with it. I’ve probably had them myself since it took me a week to figure out how to get it all up and running!


Published by meatshield, on May 17th, 2011 at 6:20 pm. Filled under: Uncategorized3 Comments

3 Responses to “I can haz (free) cloud?”

  1. […] lets you install all the stuff you need to run a cloud in one CD and a web configuration form (see this post). It emulates Amazon’s EC2 offering and that’s about it, but that’s really the […]

    Pingback by Jordan's Site: » An Introduction to Virtualization on June 17, 2011 at 11:57 am

  2. Hi did you install Stackops with dual node or multi node? We have had some difficulty with this type of installation, I believe due to a misconfiguration of our networking. Specifically when inputing the public and service ip addresses.

    Comment by bracy214@yahoo.com on December 19, 2011 at 4:04 pm

  3. I did mine as a single-box method. For the IP range the public IP you set during the install. The range you do a set so something like Those are the only sticking parts I found that messed me up with regards to the IP addresses. From what I’ve read adding the compute boxes should be automatic if you attach it to your zone in the Smart Installer.

    Comment by Anonymous on January 9, 2012 at 9:05 pm

Leave a Reply