CSS Corp Open Source Services

UEC installation on Ubuntu 10.04 (Lucid Lynx)

with 2 comments

Installation

The following sections describe how to install and configure a basic UEC setup spanning 3 servers. 2 Servers(Server1 and Server2) will run Lucid 64-bit server version and the third server will run Lucid Desktop 64-bit version(Client1). We have decided on installing the Desktop version on Client1 so that we can use Firefox or other browsers to access the web interface of UEC and also to use RDP/VNC clients during the image creation process.

Client1 above, need not be a dedicated machine. If you need to do the entire setup on one machine, refer to UEC: CC and NC on a single machine. However, on a single machine setup, Managed and Managed-NoVLAN modes will not work.

Server1 – To run Cloud Controller, Cluster Controller, Walrus Storage service and Storage Controller

Hardware       Minimum            Suggested
CPU            1GHz               2 x 2GHz
Memory         1GB                2GB
Disk           5400rpm IDE        7200rpm SATA
Disk Space     40GB               200GB
Networking     100Mbps            1000Mbps

Server2 – To run node-controller for running Virtual Machine (VM) instances

Hardware       Minimum            Suggested
CPU            VT extensions      VT, 64-bit, Multicore
Memory         1GB                4GB
Disk           5400rpm IDE        7200rpm SATA or SCSI
Disk Space     40GB               100GB
Networking     100Mbps            1000Mbps

Client1 – To function as the client for the cloud and also to be used for bundling images etc.

Hardware       Minimum            Suggested
CPU            VT extensions      VT, 64-bit, Multicore
Memory         1GB                4GB
Disk           5400rpm IDE        7200rpm SATA or SCSI
Disk Space     40GB               100GB
Networking     100Mbps            1000Mbps
Note:
UEC installation is very similar to the installation of Ubuntu Server, the only difference is the additional configuration screens for the UEC components. The following instructions only cover the UEC specific options as it is assumed that you are already familiar with the installation of Ubuntu server.

For ease of understanding, the instructions here assume the following sample setup. Please make necessary modifications to suit your setup.

  • Server1 has 2 NICs. eth0 is connected to the enterprise network and eth1 is connected to a dedicated switch to be used for connecting various components of the UEC.
  • Server1 will have the following IP addresses:  eth0 – 192.168.10.121 (To be setup during installation), eth1 – 192.168.20.1 (To be setup after the first reboot after installation)
  • Server1 has the hostname server1.example.com
  • Server2 has a single NIC, eth0, which is connected to the dedicated switch mentioned above.
  • Server2 will have the following IP address: eth0 – 192.168.20.2 (To be setup during installation),
  • Server2 has the hostname server2.example.com
  • The gateway for Server2 is set to the IP of the CC – IP 192.168.20.1 . This will enable the Server2 to connect to the enterprise network through Server1 (CC).
  • Client1 has the hostname client1.example.com
  • Server1 is a 64-bit server and Server2 is a 64-bit VT-enabled server.
  • The enterprise network runs on a class ‘C’ private network – 192.168.10.0/255.255.255.0
  • Name servers of the enterprise – 192.168.10.2 and 192.168.10.3
  • The following IP addresses are allocated for the cloud instances as public IP addresses( from the enterprise nework range used) 192.168.10.200-192.168.10.220
  • The UEC components will use a dedicated class ‘C’ private network for their interconnections – 192.168.20.0/255.255.255.0
  • Cluster Name – “myueccluster”
  • The first user name created on Server1, Server2 and Client1 is “uecadmin” and we perform all the operations while logged in as “uecadmin”

Server1

Installation

  • Boot the server off the Ubuntu Server 10.04 CD. At the graphical boot menu, select “Install Ubuntu Enterprise Cloud” and proceed with the basic installation steps.
  • Installation only lets you set up the IP address details for one interface. Please do that for eth0.
  • You will need to choose certain configuration options for your UEC, during the course of the install:
    1. Cloud Controller Address – Leave this blank as server1 is the Cloud Controller in this setup.
    2. Cloud Installation Mode – Select ‘Cloud controller’, ‘Walrus storage service’, ‘Cluster controller’ and ‘Storage controller’.
    3. Network interface for communication with nodes – eth1
    4. Eucalyptus cluster name – myueccluster
    5. Eucalyptus IP range – 192.168.10.200-192.168.10.220

Post Install Steps & Configuration

  • Set up static IP for the second network interface eth1 by adding the following to /etc/network/interfaces

auto eth1
iface eth1 inet static
address 192.168.20.1
netmask  255.255.255.0
network 192.168.20.0
broadcast 192.168.20.255

  • After making the above changes, run the following command to restart the networking.

uecadmin@server1:~$sudo /etc/init.d/networking restart

  • Make sure that you have the latest version of EUCALYPTUS.

uecadmin@server1:~$sudo apt-get update
uecadmin@server1:~$sudo apt-get upgrade eucalyptus

  • Install the NTP package, this machine is going to act as an NTP server for the nodes. The time on all components of UEC will have to be in sync. Since CLC is connected to Internet, we can run ntp server on it and have other components sync to it.

uecadmin@server1:~$sudo apt-get install ntp

  • Open the file /etc/ntp.conf and add the following two lines to make sure the server serves time even when its connectivity to the Internet is down. The following settings makes sure that the ntp server uses its own clock as the clock source.

server 127.127.1.0
fudge  127.127.1.0 stratum 10

  • Restart ntp service to make the changes effective.
uecadmin@server1:~$sudo /etc/init.d/ntp restart
  • Save the changes and restart CC.
uecadmin@server1:~$sudo start eucalyptus-cc CLEAN=1

Server2

Installation

  • Boot the server off the Ubuntu Server 10.04 CD. At the graphical boot menu, select “Install Ubuntu Enterprise Cloud” and proceed with the basic installation steps.
  • Installation only lets you set up the IP address details for one interface. Please do that for eth0 by setting up the private IP – 192.168.20.2.
  • You will need to choose certain configuration options for your UEC, during the course of the install. You can safely ignore all the settings, except the following:
  1. Cloud Controller Address – 192.168.20.1
  2. Cloud Installation Mode – Select ‘Node Controller’
  3. Gateway – 192.168.20.1 ( IP of CC )

Post Install Steps & Configuration

  • Add your DNS server details to /etc/resolv.conf

nameserver 192.168.10.2
nameserver 192.168.10.3

  • Make sure that you have the latest version of EUCALYPTUS.

uecadmin@server2:~$sudo apt-get update
uecadmin@server2:~$sudo apt-get upgrade eucalyptus

  • Install the NTP package to synchronize with the NTP server
uecadmin@server2:~$sudo apt-get install ntp
  • Open the file /etc/ntp.conf and add the line

server 192.168.20.1

  • Restart ntp service to make the changes effective.

uecadmin@server2:~$sudo /etc/init.d/ntp restart

  • Open the file /etc/eucalyptus/eucalyptus.conf and make the following changes

VNET_PUBINTERFACE="br0"
VNET_PRIVINTERFACE="br0"
VNET_BRIDGE="br0"
VNET_DHCPDAEMON="/usr/sbin/dhcpd3"
VNET_DHCPUSER="dhcpd"
VNET_MODE="MANAGED-NOVLAN"

  • After making the above changes, run the following commands

uecadmin@server2:~$sudo restart eucalyptus-nc-publication
uecadmin@server2:~$sudo restart eucalyptus-nc

Install CC’s ssh public key to NC

Next we need to install the Cluster Controller’s eucalyptus user’s public ssh key into the Node Controller’s eucalyptus user’s authorized_keys file.

  • On the Node Controller, temporarily set a password for the eucalyptus user:
uecadmin@server2:~$sudo passwd eucalyptus
  • On the Cluster Controller:
uecadmin@server2:~$sudo -u eucalyptus ssh-copy-id -i ~eucalyptus/.ssh/id_rsa.pub eucalyptus@192.168.20.2
  • You can now remove the password of the eucalyptus account on the Node:
uecadmin@server2:~$sudo passwd -d eucalyptus

Client1

The purpose of Client1 machine is to interact with the Cloud setup, for bundling and registering new Eucalyptus Machine Images (EMI)

Installation

  • Boot the Desktop off the Ubuntu Desktop 10.04 CD and install. The Desktop would be on the enterprise network and obtaining an IP address through DHCP.
  • Install KVM to help us install images on KVM platform and bundle them.
uecadmin@client1:~$apt-get install qemu-kvm

Post Install Configuration

  • Install euca2ools to be able to manage the cloud from it.
uecadmin@client1:~$sudo apt-get install euca2ools
  • Note that the installation of UEC installs a self signed certificate for the web server. The browser will warn you about the certificate not having been signed by a trusted certifying authority. You can authorize the browser to access the server with the self signed certificate. Instruction on how to install a valid certificate signed by a trusted certifying authority is beyond the scope of this guide.
  • When you login for the first time, the web interface prompts you to change the password and provide the email ID of the admin. After completing this mandatory step, download the credentials archive from https://192.168.10.121:8443/#credentials and save it in the ~/.euca directory.
  • Extract the credentials archive.
cd .euca
unzip mycreds.zip
  • Source eucarc script to make sure that the environmental variables used by euca2ools are set properly. To validate that the euca2ools are able to communicate with the UEC,  try fetching the local cluster availability details.
$ . ~/.euca/eucarc
$ euca-describe-availability-zones verbose

You should see something like the following if it works properly:

$ euca-describe-availability-zones verbose
AVAILABILITYZONE        myueccluster    192.168.10.121
AVAILABILITYZONE        |- vm types     free / max   cpu   ram  disk
AVAILABILITYZONE        |- m1.small     0016 / 0016   1    128     2
AVAILABILITYZONE        |- c1.medium    0014 / 0014   1    256     5
AVAILABILITYZONE        |- m1.large     0007 / 0007   2    512    10
AVAILABILITYZONE        |- m1.xlarge    0003 / 0003   2   1024    20
AVAILABILITYZONE        |- c1.xlarge    0001 / 0001   4   2048    20

If you see the free/max VCPUs as 0 in the above list, it means the node did not get registered automatically. Please use the following on Server1 and approve when prompted to add 192.168.20.2 as the Node Controller.

uecadmin@client1:~$sudo euca_conf --discover-nodes

Please see the following posts on how to bundle Linux and Windows images:

The following sections describe how to install and configure a basic UEC setup spanning 3 servers. 2 Servers(Server1 and Server2) will run Lucid 64-bit server version and server will run Lucid Desktop 64-bit version(Client1). We have decided on installing the Desktop version on Client1 so that we can use Firefox or other browsers to access the web interface of UEC and also to use RDP/VNC clients during the image creation process.
Advertisements

Written by kiranmurari

April 22, 2010 at 10:30 am

2 Responses

Subscribe to comments with RSS.

  1. Nice article. I have worked on the network configuration for several days, but still can’t make it work then I found your article via Google. Before I try to install the eucalyptus platform following your instructions , I want to make sure that is your physical network similar to this one : http://72.47.234.81/wiki/EucalyptusNetworkConfiguration_v2.0#figure2 ? thanks ~

    jafelee

    October 11, 2010 at 10:51 am

    • Hi,

      Our network configuration is also similar to the one above. With the only exception that we have been using only one node and a separate machine to carry out the bundling process.

      Kiran

      kiranmurari

      October 15, 2010 at 11:11 am


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: