Diff for "UEC"


Differences between revisions 14 and 67 (spanning 53 versions)
Revision 14 as of 2009-10-20 16:58:38
Size: 10499
Editor: cpe-66-69-232-158
Comment: link to the glossary
Revision 67 as of 2011-11-15 07:07:50
Size: 2298
Editor: mx
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
## page was copied from UEC
||<tablestyle="float:right; font-size: 0.9em; width:40%; background:#F1F1ED; margin: 0 0 1em 1em;" style="padding:0.5em;"><<BR>><<TableOfContents(3)>>||
Line 6: Line 3:
== Overview == The [[http://www.ubuntu.com/cloud|Ubuntu Enterprise Cloud]] (UEC), powered by [[http://www.eucalyptus.com|Eucalyptus]], is highly configurable and customizable to a variety of environments.
Line 8: Line 5:
The Ubuntu Enterprise Cloud (UEC), powered by Eucalyptus, is highly configurable and customizable to a variety of environments. This tutorial covers UEC installation from the Ubuntu 9.10 Server Edition CD, and assumes a basic network topology, with a single system serving as the "all-in-one controller", and one or more nodes attached. '''Note:''' Starting with 11.10 (oneiric), Ubuntu Enterprise Cloud is replaced by [[UbuntuCloudInfrastructure|Ubuntu Cloud Infrastructure]], which is based on OpenStack.
Line 10: Line 7:
[[UEC/PackageInstall|Another tutorial exists]] describing how to deploy UEC on already installed Ubuntu servers, or if you want to deploy a more complex network topology, with multiple clusters, or running the required cloud services from separate physical machines. You may use the following installation tutorials:
 * [[UEC/CDInstall|Installation from the Installer CD]] <<BR>>
 This tutorial covers UEC installation from the Ubuntu 10.04 Server Edition CD, and assumes a basic network topology, with a single system serving as the "all-in-one controller", and one or more nodes attached. This is the recommended tutorial if you want to familiarize yourself with UEC with a (relatively) simple installation.
 * [[UEC/PackageInstall|Normal installation using the packages]] <<BR>>
 This tutorial describes how to deploy UEC on already-installed Ubuntu servers in a setup similar to the default install.
 * [[UEC/PackageInstallSeparate|Advanced installation using the packages on separate servers]] <<BR>>
 Use this tutorial if you want to deploy a more complex network topology (e.g., multiple clusters, or running the required cloud services from separate physical machines).
Line 12: Line 15:
== Terminology ==

You should be familiar with the [[UEC/GLossary]]. These terms are used throughout the documentation.

== 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 or several node(s) for running Virtual Machine (VM)
instances. You will also use examples to help get you
started using your own private compute cloud.

  1. Prerequisites
  1. Install the Cloud/Cluster controller
  1. Install the Node controller(s)
  1. Credentials setup
  1. Bundle a UEC Image
  1. Running an image

== Tutorial ==
=== STEP 1: Prerequisites ===

To deploy a minimal cloud infrastructure, you’ll need at least two dedicated systems. One will hold the cloud controller (clc), the cluster controller (cc), walrus (the S3-like storage service) and the storage controller (sc). This one needs fast disks and a reasonably fast processor. The other system(s) are node controllers (nc) that will actually run the instances. These ones need CPUs with VT extensions, lots of CPU cores, lots of RAM, and fast disks. For both, 64-bit support is highly recommended.

=== STEP 2: Install the Cloud/Cluster controller ===

 1. Download the 9.10 Server ISO.
 1. When you boot, select “Install Ubuntu Enterprise Cloud”. <<BR>> {{attachment:private1-cr.png}}
 1. When asked whether you want a “Cluster” or a “Node” install, select “Cluster”. <<BR>> {{attachment:cluster-node-cr.png}}
 1. It will ask two other cloud-specific questions during the course of the install:
   1. Name of your cluster: pick any name you want :)
   1. Public IP addresses on the LAN that the cloud can allocate to instances: enter a range of unused IP addresses on your LAN.

=== STEP 3: Install the Node controller(s) ===

The node controller install is even simpler. Just make sure that you are connected to the network on which the cloud/cluster controller is already running.

 1. Boot from the same ISO
 1. Select “Install Ubuntu Enterprise Cloud”.
 1. It should detect the Cluster and preselect “Node” install for you.
 1. After all nodes are installed, you need to return to the cloud/controller and run the following command to make it “discover” your newly-installed nodes.
 {{{
$ sudo euca_conf --no-rsync --discover-nodes
}}}
 1. Confirm all the nodes it finds, and you are done.

=== STEP 4: Credentials setup ===

The first time the cloud controller boots, you are required to go through some configuration steps that set up the administrative environment for the cloud.

 1. From your web browser (either remotely or on your Ubuntu server) access the following URL:
 {{{
https://<cloud-controller-ip-address>:8443/
}}}
 ||<style="background-color: #91f49f;"> '''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.||
 1. Use username 'admin' and password 'admin' for the first time login (you will be prompted to change your password).
 1. Then follow the on-screen instructions to update the admin password and email address.
 1. Once the first time configuration process is completed, click the 'credentials' tab located in the top-left portion of the screen. <<BR>>{{attachment:UECcredentials-2.png}}
 1. Click the 'Download Credentials' button to get your certificates.

Now you will need to setup EC2 API and AMI tools on your server using X.509 certificates.
 1. Unzip the downloaded zipfile into a safe location (~/.euca),
 1. Source the included "eucarc" file to set up your Eucalyptus environment.
 {{{
$ . ~/.euca/eucarc
}}}
 You may additionally wish to add this command to your ~/.bashrc file so that your Eucalyptus environment is set up automatically when you log in. Eucalyptus treats this set of credentials as 'administrator' credentials that allow the holder global privileges across the cloud. As such, they should be protected in the same way that other elevated-priority access is protected (e.g. should not be made visible to the general user population).
 1. Install the required cloud user tools:
 {{{
$ sudo apt-get install euca2ools
}}}
 1. 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 128 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 5: Bundle a UEC Image ===

There is more than one way to obtain a virtual image:
 * Download an image from the network, bundle and upload it
 * Create a custom image using VMBuilder
 * Use the Image store to download and install and image
  
Here we will describe the process of downloading one of the [[http://uec-images.ubuntu.com/releases/karmic/|Official Ubuntu UEC Images]] that we publish and maintain on a regular basis.
||<style="background-color: #91f49f;"> '''Note:''' the shell variables that are set in the below code snippets are very useful for scripts or to reuse them when typing commands. ||

 1. Download the UEC image for the architecture you want. You can do it from your browser or from the command line:
 {{{
$ ARCH=amd64 # possible values are amd64 or i386
$ wget http://uec-images.ubuntu.com/releases/karmic/<release>/ubuntu-uec-karmic-$ARCH.tar.gz
}}}
 1. Next, you will need to bundle, upload and register a kernel, ramdisk and finally your image:
  1. Unpack the UEC image tarball
  {{{
$ tar -S -xzf ubuntu-uec-karmic-$ARCH.tar.gz
}}}
  1. Bundle the kernel
  {{{
$ [ $ARCH = "amd64" ] && IARCH=x86_64 || IARCH=i386
$ KERNEL=karmic-uec-$ARCH-vmlinuz-virtual
$ euca-bundle-image -i $KERNEL -r $IARCH --kernel true
$ euca-upload-bundle -b kernel -m /tmp/$KERNEL.manifest.xml
$ EKI=$(euca-register kernel/$KERNEL.manifest.xml | grep "^IMA" | awk '{print $2}') && echo $EKI
}}}
  1. Bundle the initrd
  {{{
$ INITRD=karmic-uec-$ARCH-initrd-virtual
$ euca-bundle-image -i $INITRD -r $IARCH --ramdisk true
$ euca-upload-bundle -b initrd -m /tmp/$INITRD.manifest.xml
$ ERI=$(euca-register initrd/$INITRD.manifest.xml | grep "^IMA" | awk '{print $2}') && echo $ERI
}}}
  1. Bundle the image itself (this can take some time)
  {{{
$ UECIMG=karmic-uec-$ARCH.img
$ euca-bundle-image -i $UECIMG -r $IARCH --kernel $EKI --ramdisk $ERI
$ euca-upload-bundle -b image -m /tmp/$UECIMG.manifest.xml
$ EMI=$(euca-register image/$UECIMG.manifest.xml | grep "^IMA" | awk '{print $2}') && echo $EMI
}}}
 1. Now, your kernel, ramdisk and image will have been uploaded into Eucalyptus and should be ready to run. To confirm, run the following command:
 {{{
$ euca-describe-images
}}}
 You should see a registered kernel, ramdisk and image and they should be marked as 'available'.

=== STEP 6: Running an Image ===

There are multiple way to instantiate (start) an image:
 * Use the command line
 * Use one of the UEC compatible management tools such as Landscape
 * Use the [[UEC/ElasticFox|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:
 {{{
$ euca-add-keypair mykey > ~/.euca/mykey.priv
$ chmod 0600 ~/.euca/mykey.priv
}}}
 ||<style="background-color: #91f49f;">'''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. ||
 1. You must also allow access to port 22 in your instances:
 {{{
$ euca-authorize default -P tcp -p 22 -s 0.0.0.0/0
}}}
 1. Next, you can create instances of your registered image:
 {{{
$ euca-run-instances $EMI -k mykey -t c1.medium
}}}
 1. 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:
 {{{
$ 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'.
 1. 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:
 {{{
$ ssh -i ~/.euca/mykey.priv ubuntu@<ip_of_instance>
}}}


== More Information ==

  * '''Log files:''' /var/log/eucalyptus
  * '''Configuration files:''' /etc/eucalyptus
  * '''Database:''' /var/lib/eucalyptus/db
  * Environment note: Don't forget to source your ~/.euca/eucarc before running the client tools.
== More details ==
Once installation is complete, you may use the following as reference:
 * [[UEC/StorageController|Using the Storage Controller]] describes how to create and use virtual volumes
 * [[UEC/BundlingImages|Bundling Images]] describes how to bundle and upload an image manually
 * [[UEC/CreateYourImage| Creating your own image]] describes a few ways to create images from scratch
 * [[UEC/Landscape| Connecting to Landscape]] describes how to connect your UEC installation to Canonical's Landscape service
 * [[UEC/PowerManagement | Power Management]] how to enable the integrated power management feature
 * A useful collection of [[UEC/Tips|Tips for UEC]]
 * [[https://cssoss.wordpress.com/2010/11/26/eucabook-v1-1/|Eucalyptus Beginner's Guide - UEC Edition(10.04.1-Lucid)]]
 * [[https://cssoss.wordpress.com/2010/12/23/eucalyptus-beginners-guide-uec-edition-v2-0-maverick/|Eucalyptus Beginner's Guide - UEC Edition(10.10-Maverick)]]

Getting Started with Ubuntu Enterprise Cloud

The Ubuntu Enterprise Cloud (UEC), powered by Eucalyptus, is highly configurable and customizable to a variety of environments.

Note: Starting with 11.10 (oneiric), Ubuntu Enterprise Cloud is replaced by Ubuntu Cloud Infrastructure, which is based on OpenStack.

You may use the following installation tutorials:

  • Installation from the Installer CD
    This tutorial covers UEC installation from the Ubuntu 10.04 Server Edition CD, and assumes a basic network topology, with a single system serving as the "all-in-one controller", and one or more nodes attached. This is the recommended tutorial if you want to familiarize yourself with UEC with a (relatively) simple installation.

  • Normal installation using the packages
    This tutorial describes how to deploy UEC on already-installed Ubuntu servers in a setup similar to the default install.

  • Advanced installation using the packages on separate servers
    Use this tutorial if you want to deploy a more complex network topology (e.g., multiple clusters, or running the required cloud services from separate physical machines).

More details

Once installation is complete, you may use the following as reference:

UEC (last edited 2011-11-15 07:07:50 by mx)