Tag/tag.png

Unsupported Version
This article applies to an unsupported version of Ubuntu. More info...

Overview

This tutorial covers UEC installation by adding the Eucalyptus packages to previously installed Ubuntu 9.10 servers.

Objective

From this tutorial, you will learn how to install, configure, register and perform several operations on a basic UEC setup that results in a cloud with a one controller "front-end" and one node for running Virtual Machine (VM) instances.

Tutorial

STEP 1: Prerequisites

To deploy a minimal cloud infrastructure, you’ll need at least two dedicated systems:

  • a Front End

  • one or more Node(s)

The following are recommendations, rather than fixed requirements. However, our experience in developing this documentation indicated the following suggestions.

Front End

Use the following table for a system that will run one or more of:

  • the cloud controller (clc)
  • the cluster controller (cc)
  • walrus (the S3-like storage service)
  • the storage controller (sc)

Hardware

Minimum

Suggested

Notes

CPU

1GHz

2 x 2GHz

for an all-in-one front end, it helps to have at least a dual core processor

Memory

2GB

4GB

the Java web front end benefits from lots of available memory

Disk

5400rpm IDE

7200rpm SATA

slower disks will work, but will yield much longer instance startup times

Disk Space

40GB

200GB

40GB is only enough space for only a single image, cache, etc., Eucalyptus does not like to run out of disk space

Networking

100Mbps

1000Mbps

machine images are hundreds of MB, and need to be copied over the network to nodes

Node(s)

The other system(s) are nodes, which will run:

  • the node controller (nc)

These systems will actually run the instances. You will need one or more systems with:

Hardware

Minimum

Suggested

Notes

CPU

VT extensions

VT, 64-bit, Multicore

64-bit can run both i386, and amd64 instances; by default, Eucalyptus will only run 1 VM per CPU core on a Node

Memory

1GB

4GB

additional memory means more, and larger guests

Disk

5400rpm IDE

7200rpm SATA or SCSI

Eucalyptus nodes are disk-intensive; I/O wait will likely be the performance bottleneck

Disk Space

40GB

100GB

images will be cached locally, Eucalyptus does not like to run out of disk space

Networking

100Mbps

1000Mbps

machine images are hundreds of MB, and need to be copied over the network to nodes

STEP 2: Install the Cloud/Cluster/Storage/Walrus Front End Server(s)

  1. Install Ubuntu 9.10 Server

  2. Update to the most current state in the Ubuntu archive:
    sudo apt-get update
    sudo apt-get dist-upgrade
  3. Install the eucalyptus-cloud and eucalyptus-cc packages on the Front End:

    sudo apt-get install eucalyptus-cloud eucalyptus-cc eucalyptus-walrus eucalyptus-sc
    Answer debconf's questions as follow:
    • Configure postfix for internet delivery

    • Name your cluster
      • e.g. cluster1
    • Add a list of available IP addresses on your network
      • e.g. 192.168.1.200-192.168.1.249

    Note: Depending on the number of systems you will be setting up, you may not want to install all the above packages on the same system. For best results, have a look at some recommended topologies.

STEP 3: Install and Configure the Node Controller(s)

STEP 4: Register the Cluster, Storage, and Walrus Servers

Cluster Registration

The Cluster Controller service is provided by the eucalyptus-cc package.

If this service is running on the same system as the eucalyptus-cloud service, then registration is automatic.

Otherwise, you need to manually register the cluster with the eucalyptus-cloud service by defining the cluster's name, and the one or more IP addresses of the cluster controllers.

On the Cloud Controller:

  • Define the shell variable CC_NAME in /etc/eucalyptus/eucalyptus-cc.conf

  • Define the shell variable CC_IP_ADDR in /etc/eucalyptus/eucalyptus-ipaddr.conf, as a space separated list of one or more IP addresses.

Then, on the Cloud Controller, run:

sudo start eucalyptus-cc-registration

Storage Registration

Tag/tag.png

Unsupported Version
This article applies to an unsupported version of Ubuntu. More info...

Tag/tag.png

Needs Updating
This article needs updating to include the latest versions of Ubuntu. More info...

The Storage Controller service is provided by the eucalyptus-sc package.

If this service is running on the same system as the eucalyptus-cloud service, then registration occurs automatically.

Otherwise, you need to manually register the storage with the eucalyptus-cloud service by defining the cluster's name, and the one or more IP addresses of the storage controllers.

On the Cloud Controller:

  • Define the cluster name in the shell variable CC_NAME in /etc/eucalyptus/eucalyptus-cc.conf

  • Define the shell variable SC_IP_ADDR in /etc/eucalyptus/eucalyptus-ipaddr.conf, as a space separated list of one or more IP addresses.

Then, on the Cloud Controller, run:

sudo start eucalyptus-sc-registration

Walrus Registration

The Walrus service is provided by the eucalyptus-walrus package.

If this service is running on the same system as the eucalyptus-cloud service, then registration occurs automatically.

Otherwise, you need to manually register walrus with the eucalyptus-cloud service by defining the walrus IP address, and starting the registration job.

On the Cloud Controller:

  • Define the shell variable WALRUS_IP_ADDR in /etc/eucalyptus/eucalyptus-ipaddr.conf, as a single IP address.

Then, on the Cloud Controller, run:

sudo start eucalyptus-walrus-registration

Verify the Registration

You may verify the registration in the logs:

tail -n1 /var/log/eucalyptus/*registration.log
==> /var/log/eucalyptus/cc-registration.log <==
SUCCESS: new cluster 'canyonedge' on host '192.168.1.122' successfully registered.

==> /var/log/eucalyptus/sc-registration.log <==
SUCCESS: new SC for cluster 'canyonedge' on host '192.168.1.122' successfully registered.

==> /var/log/eucalyptus/walrus-registration.log <==
SUCCESS: new walrus on host '192.168.1.122' successfully registered.

STEP 5: Register the Node(s)

Nodes are the physical systems within UEC that actually run the virtual machine instances of the cloud.

Once one or more Ubuntu Server node(s) are installed and running the eucalyptus-nc service, log onto the Cloud Controller and run:

  • sudo euca_conf --no-rsync --discover-nodes

This will discover the systems on the network running the eucalyptus-nc service, and the administrator can confirm the registration of each node by its IP address.

  • Note: If you get prompted for passwords, or receive errors from scp, you may need to revisit the key synchronization instructions at UEC/NodeInstallation.

STEP 6: Obtain Credentials

After installing and booting the Cloud Controller, users of the cloud will need to retrieve their credentials. This can be done either through a web browser, or at the command line.

From a Web Browser

  1. From your web browser (either remotely or on your Ubuntu server) access the following URL:
    https://<cloud-controller-ip-address>:8443/

    Important! You must use a secure connection, so make sure you use "https" not "http" in your URL. You will get a security certificate warning. You will have to add an exception to view the page. If you do not accept it you will not be able to view the Eucalyptus configuration page.

  2. Use username 'admin' and password 'admin' for the first time login (you will be prompted to change your password).
  3. Then follow the on-screen instructions to update the admin password and email address.
  4. Once the first time configuration process is completed, click the 'credentials' tab located in the top-left portion of the screen.

  5. Click the 'Download Credentials' button to get your certificates
  6. Save them to ~/.euca

  7. Unzip the downloaded zipfile into a safe location (~/.euca)
    unzip -d ~/.euca mycreds.zip

From a Command Line

  1. Alternatively, if you are on the command line of the Cloud Controller, you can run:
    mkdir -p ~/.euca
    chmod 700 ~/.euca
    cd ~/.euca
    sudo euca_conf --get-credentials mycreds.zip
    unzip mycreds.zip
    ln -s ~/.euca/eucarc ~/.eucarc
    cd -

Extracting and Using Your Credentials

Now you will need to setup EC2 API and AMI tools on your server using X.509 certificates.

  1. Install the required cloud user tools:
    sudo apt-get install euca2ools
  2. To validate that everything is working correctly, get the local cluster availability details:
    . ~/.euca/eucarc
    euca-describe-availability-zones verbose
    AVAILABILITYZONE   myowncloud                 192.168.1.1
    AVAILABILITYZONE   |- vm types                free / max   cpu   ram  disk
    AVAILABILITYZONE   |- m1.small                0004 / 0004   1    192     2
    AVAILABILITYZONE   |- c1.medium               0004 / 0004   1    256     5
    AVAILABILITYZONE   |- m1.large                0002 / 0002   2    512    10
    AVAILABILITYZONE   |- m1.xlarge               0002 / 0002   2   1024    20
    AVAILABILITYZONE   |- c1.xlarge               0001 / 0001   4   2048    20

STEP 7: Install an image from the store

The following is by far the simplest way to install an image. However, advanced users may be interested in learning how to Bundle their own image.

The simplest way to add an image to UEC is to install it from the Image Store on the UEC web interface.

  1. Access the web interface at the following URL (Make sure you specify https):
    https://<cloud-controller-ip-address>:8443/
  2. Enter your login and password (if requested, as you may still be logged in from earlier)
  3. Click on the Store tab

    Private-store-cr.png

  4. Browse available images
  5. Click on install for the image you want

Once the image has been downloaded and installed, you can click on "How to run?" that will be displayed below the image button to view the command to execute to instantiate (start) this image. The image will also appear on the list given on the Image tab.

  • private-images-cr.png

STEP 8: Run an Image

There are multiple ways to instantiate an image in UEC:

  • Use the command line
  • Use one of the UEC compatible management tools such as Landscape
  • Use the ElasticFox extension to Firefox

Here we will describe the process from the command line:

  1. Before running an instance of your image, you should first create a keypair (ssh key) that you can use to log into your instance as root, once it boots. The key is stored, so you will only have to do this once. Run the following command:
    if [ ! -e ~/.euca/mykey.priv ]; then
        mkdir -p -m 700 ~/.euca
        touch ~/.euca/mykey.priv
        chmod 0600 ~/.euca/mykey.priv
        euca-add-keypair mykey > ~/.euca/mykey.priv
    fi

    Note: You can call your key whatever you like (in this example, the key is called 'mykey'), but remember what it is called. If you forget, you can always run euca-describe-keypairs to get a list of created keys stored in the system.

  2. You must make sure to source ~/.euca/eucarc before you run any of the eucatools. It is probably best to add this to the bottom of your .bashrc script.
  3. You must also allow access to port 22 in your instances:
    euca-authorize default -P tcp -p 22 -s 0.0.0.0/0
  4. Next, you can create instances of your registered image:
    euca-run-instances $EMI -k mykey -t m1.small

    Note: If you receive an error regarding image_id, you may find it by viewing Images page or click "How to Run" on the Store page to see the sample command.

  5. The first time you run an instance, the system will be setting up caches for the image from which it will be created. This can often take some time the first time an instance is run given that VM images are usually quite large. To monitor the state of your instance, run:
    watch -n5 euca-describe-instances
    In the output, you should see information about the instance, including its state. While first-time caching is being performed, the instance's state will be 'pending'.
  6. When the instance is fully started, the above state will become 'running'. Look at the IP address assigned to your instance in the output, then connect to it:
    IPADDR=$(euca-describe-instances | grep $EMI | grep running | tail -n1 | awk '{print $4}')
    ssh -i ~/.euca/mykey.priv ubuntu@$IPADDR
  7. And when you are done with this instance, exit your SSH connection, then terminate your instance:
    INSTANCEID=$(euca-describe-instances | grep $EMI | grep running | tail -n1 | awk '{print $2}')
    euca-terminate-instances $INSTANCEID

Your UEC cloud should now look similar to the following logical diagram:

http://pompone.cs.ucsb.edu/~nurmi/images/euca-topo-withinst.png

More Information

How to use the Storage Controller

Controlling eucalyptus services:

  • sudo service eucalyptus [start|stop|restart] (on the CLC/CC/SC/Walrus side)
  • sudo service eucalyptus-nc [start|stop|restart] (on the Node side)

Locations of some important files:

  • Log files:

    • /var/log/eucalyptus

  • Configuration files:

    • /etc/eucalyptus

  • Database:

    • /var/lib/eucalyptus/db

  • Keys

    • /var/lib/eucalyptus

    • /var/lib/eucalyptus/.ssh

Notes:

  • Don't forget to source your ~/.euca/eucarc before running the client tools.

Links:

Glossary

The Ubuntu Enterprise Cloud documentation uses terminology that might be unfamiliar to some readers. This page is intended to provide a glossary of such terms and acronyms.

  • Cloud - A federated set of physical machines that offer computing resources through virtual machines, provisioned and recollected dynamically.

  • Cloud Controller (CLC) - Eucalyptus component that provides the web UI (an https server on port 8443), and implements the Amazon EC2 API. There should be only one Cloud Controller in an installation of UEC. This service is provided by the Ubuntu eucalyptus-cloud package.

  • Cluster - A collection of nodes, associated with a Cluster Controller. There can be more than one Cluster in an installation of UEC. Clusters are sometimes physically separate sets of nodes. (e.g. floor1, floor2, floor2).

  • Cluster Controller (CC) - Eucalyptus component that manages collections of node resources. This service is provided by the Ubuntu eucalyptus-cc package.

  • EBS - Elastic Block Storage. http://aws.amazon.com/ebs/

  • EC2 - Elastic Compute Cloud. Amazon's pay-by-the-hour, pay-by-the-gigabyte public cloud computing offering.

  • EKI - Eucalyptus Kernel Image.

  • EMI - Eucalyptus Machine Image.

  • ERI - Eucalyptus Ramdisk Image.

  • Eucalyptus - Elastic Utility Computing Architecture for Linking Your Programs To Useful Systems. An open source project originally from the University of California at Santa Barbara, now supported by Eucalyptus Systems, a Canonical Partner.

  • Front-end - Physical machine hosting one (or more) of the high level Eucalyptus components (cloud, walrus, storage controller, cluster controller).

  • Node - A node is a physical machine that's capable of running virtual machines, running a node controller. Within Ubuntu, this generally means that the CPU has VT extensions, and can run the KVM hypervisor.

  • Node Controller (NC) - Eucalyptus component that runs on nodes which host the virtual machines that comprise the cloud. This service is provided by the Ubuntu package eucalyptus-nc.

  • S3 - Simple Storage Service. Amazon's pay-by-the-gigabyte persistent storage solution for EC2. http://aws.amazon.com/s3/

  • Storage Controller (SC) - Eucalyptus component that manages dynamic block storage services (EBS). Each 'cluster' in a Eucalyptus installation can have its own Storage Controller. This component is provided by the 'eucalyptus-sc' package.

  • UEC - Ubuntu Enterprise Cloud. Ubuntu's cloud computing solution, based on Eucalyptus.

  • VM - Virtual Machine.

  • VT - Virtualization Technology. An optional feature of some modern CPUs, allowing for accelerated virtual machine hosting.

  • Walrus - Eucalyptus component that implements the Amazon S3 API, used for storing VM images and user storage using S3 bucket put/get abstractions.

UEC/PackageInstall9.10 (last edited 2013-05-02 23:14:59 by moergaes)