Grow Your Own Cloud Servers With Ubuntu

Have you been wanting to fly to the cloud, to experiment with cloud computing? Now is your chance. With this article, we will step through the process of setting up a private cloud system using Ubuntu Enterprise Cloud (UEC), which is powered by the Eucalyptus platform.

Looking to experiment with cloud computing? With Ubuntu Enterprise Cloud, it’s easy to turn ordinary servers into cloud servers and build a private cloud.

The system is made up of one cloud controller (also called a front-end server) and one or more node controllers. The cloud controller manages the cloud environment. You can install the default Ubuntu OS images or create your own to be virtualized. The node controllers are where you can run the virtual machine (VM) instances of the images.

System Requirements

At least two computers must be dedicated to this cloud for it to work:

  • One for the front-end server (cloud or cluster controller) with a minimum 1GHz CPU, 512MB of memory, CD-ROM, 40GB of disk space, and an Ethernet network adapter
  • One or more for the node controller(s) with a CPU that supports Virtualization Technology (VT) extensions, 1GB of memory, CD-ROM, 40GB of disk space and an Ethernet network adapter

You might want to reference a list of Intel processors that include VT extensions. Optionally, you can run a utility, called SecurAble, in Windows. You can also check in Linux if a computer supports VT by seeing if “vmx” or “svm” is listed in the /proc/cpuinfo file. Run the command: egrep ‘(vmx|svm)’ /proc/cpuinfo. Bear in mind, however, this tells you only if it’s supported; the BIOS could still be set to disable it.

Preparing for the Installation

First, download the CD image for the Ubuntu Server remix — we’re using version 9.10 — on any PC with a CD or DVD burner. Then burn the ISO image to a CD or DVD. If you want to use a DVD, make sure the computers that will be in the cloud read DVDs. If you’re using Windows 7, you can open the ISO file and use the native burning utility. If you’re using Windows Vista or later, you can download a third-party application like DoISO.

Before starting the installation, make sure the computers involved are setup with the peripherals they need (i.e., monitor, keyboard and mouse). Plus, make sure they’re plugged into the network so they’ll automatically configure their network connections.

Installing the Front-End Server

The installation of the front-end server is straightforward. To begin, simply insert the install CD, and on the boot menu select “Install Ubuntu Enterprise Cloud”, and hit Enter. Configure the language and keyboard settings as needed. When prompted, configure the network settings.

When prompted for the Cloud Installation Mode, hit Enter to choose the default option, “Cluster”. Then you’ll have to configure the Time Zone and Partition settings. After partitioning, the installation will finally start. At the end, you’ll be prompted to create a user account.

Next, you’ll configure settings for proxy, automatic updates and email. Plus, you’ll define a Eucalyptus Cluster name. You’ll also set the IP addressing information, so users will receive dynamically assigned addresses.

Installing and Registering the Node Controller(s)

The Node installation is even easier. Again, insert the install disc, select “Install Ubuntu Enterprise Cloud” from the boot menu, and hit Enter. Configure the general settings as needed.

When prompted for the Cloud Installation Mode, the installer should automatically detect the existing cluster and preselect “Node.” Just hit Enter to continue. The partitioning settings should be the last configuration needed.

Registering the Node Controller(s)

Before you can proceed, you must know the IP address of the node(s). To check from the command line:

Then, you must install the front-end server’s public ssh key onto the node controller:

  1. On the node controller, set a temporary password for the eucalyptus user using the command:
  2. On the front-end server, enter the following command to copy the SSH key:
  3. Then you can remove the eucalyptus account password from the node with the command:
  4. After the nodes are up and the key copied, run this command from the front-end server to discover and add the nodes:

Getting and Installing User Credentials

Enter these commands on the front-end server to create a new folder, export the zipped user credentials to it, and then to unpack the files:

The user credentials are also available via the web-based configuration utility; however, it would take more work to download the credentials there and move them to the server.

Setting Up the EC2 API and AMI Tools

Now you must setup the EC2 API and AMI tools on your front-end server. First, source the eucarc file to set up your Eucalyptus environment by entering:

For this to be done automatically when you login, enter the following command to add that command to your ~/.bashrc file:

Now to install the cloud user tools, enter:

To make sure it’s all working, enter the following to display the cluster availability details:

Accessing the Web-Based Control Panel

Now you can access the web-based configuration utility. From any PC on the same network, go to the URL, https://:8443. The IP address of the cloud controller is displayed just after logging onto the front-end server. Note that that is a secure connection using HTTPS instead of just HTTP. You’ll probably receive a security warning from the web browser since the server uses a self-signed certificate instead of one handled out by a known Certificate Authority (CA). Ignore the alert by adding an exception. The connection will still be secure.

The default login credentials are “admin” for both the Username and Password. The first time logging in you’ll be prompted to setup a new password and email.

Installing images

Now that you have the basic cloud set up, you can install images. Bring up the web-based control panel, click the Store tab, and click the Install button for the desired image. It will start downloading, and then it will automatically install, which takes a long time to complete.

Running images

Before running an image on a node for the first time, run these commands to create a keypair for SSH:

You also need to open port 22 up on the node, using the following commands:

Finally, you can run your registered image. The command to run it is available via the web interface. Login to the web interface, click the Store tab, and select the How to Run link for the desired image. It will display a popup with the exact command.

The first time you run an instance, it will likely take a while for the image to be cached. You can get the status of your instance by running the command:

Once it moves from “pending” to “running”, reference the assigned IP address and connect to it:

To terminate the SSH connection for the instance:

Maintaining the cloud

Now you should have a working cloud on your network. If you run into problems, you might have to reference the official documentation or hit the message boards. Before I leave, here are a few final tips:

  • To restart the front-end server run: sudo service eucalyptus [start|stop|restart]
  • To fresh a node run: sudo service eucalyptus-nc [start|stop|restart]
  • Here are some key file locations:
    • Log files
    • Configuration files
    • Database
    • Keys

Eric Geier is the Founder and CEO of NoWiresSecurity, which helps businesses easily protect their Wi-Fi with enterprise-level encryption by offering an outsourced RADIUS/802.1X authentication service. He is also the author of many networking and computing books for brands like For Dummies and Cisco Press.

Manikandan is Founder and author of codenread. Tech Blogger by Passion | Computer Science Engineer by Qualification