Eucalyptus installation

For installation three two PC (Server1 and Server2) is needed for the cloud purpose and one PC is for client which will also be serving for creating KVM images. Server2 and the client machine should have VT enabled as we will be running all our VMs on Server2 and client PC will be using to create the necessary KVM images.

Required configuration

Required Setup

Required Setup

Server1 setup

  • Boot the Ubuntu 11.04 64 bit Server CD/pen drive and from the graphical menu, select Ubuntu Enterprise Cloud and follow the installation menu.
  • If you are using DHCP for the public network, then just select eth0 and let the network to be setup automatically. Otherwise set your ethernet as mentioned above.
  • When the installation will be asking for the Cloud Controller address just put it blank.
  • For Server1 it’ll install the ‘Cluster Controller’, ‘Walrus Storage Service’, ‘Cluster Controller’ and ‘Storage Controller’.
  • Select eth1 for communication with nodes
  • Eucalyptus cluster name – Cluster1 (on anything)
  • Select an IP range to be used for the nodes, i.e. 192.168.1.10-192.168.1.99

Post installation setup

Set up static IP for eth1, edit /etc/network/interfaces and add the following to it,

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

Run the following command to restart the networking,

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

Update and upgrade the Eucalyptus to get the latest version of it,

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

Install NTP package. Server1 is going to act as an NTP server for the nodes.

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

Open and edit /etc/ntp.conf to make sure that the server serves time even when it’s connectivity to the internet is down. Add the following line to the file so that NTP server uses it’s own clock source.

server 127.127.1.0
fudge 127.127.1.0 stratum 10

Restart NTP server to make the changes active

localadmin@server1:~$ sudo /etc/init.d/ntp restart

Restart the Cluster Controller

localadmin@server1:~$ sudo restart eucalyptus-cc CLEAN=1

[NTP stands for Network Time Protocol, and it is an Internet protocol used to synchronize the clocks of computers to some time reference]

Server2 setup

  • Boot Ubuntu 11.04 64 bit Server and select ‘Install Ubuntu Enterprise Cloud’ and continue the basic installation process.
  • For network setup select eth0 and configure it manually. Set the private IP to 192.168.20.2 and the gateway as 192.168.20.1.
  • For UEC setup it’ll ask certain configuration option. If it doesn’t select the Cluster Controller by itself, put the the Cluster Controller address 192.168.20.1
  • In cloud installation mode select ‘Node Controller’

Post installation setup

Set up static IP for eth1 by adding the few lines to /etc/network/interfaces so that it looks like following

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet manual

auto br0
iface br0 inet static
    address 192.168.20.2
    netmask 255.255.255.0
    network 192.168.20.0
    broadcast 192.168.20.255
    # gateway 192.168.20.1
    # dns-* options are implemented by the resolvconf package, if installed
    dns-nameservers 192.168.1.1
    bridge_ports eth0
    bridge_fd 9
    bridge_hello 2
    bridge_maxage 12
    bridge_stp off

auto eth1
iface eth1 inet static
address 192.168.1.103
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1

Run the following command to restart the networking,

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

Update and upgrade the Eucalyptus to get the latest version of it,

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

Install NTP package.

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

Open the file /etc/ntp.conf and add the following line

server 192.168.20.1

Restart NTP server to make the changes active

localadmin@server1:~$ 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”

Now run the following command to restart the Node Controller to make all the changes active,

localadmin@server2:~$ sudo restart eucalyptus-nc

Setup CC’s SSH public key to NC

On the Node Controller, temporarily set a password for the “eucalyptus” user,

localadmin@server2:~$ sudo passwd eucalyptus

On the Cluster Controller:

localadmin@server1:~$ sudo -u eucalyptus ssh-copy-id -i ~eucalyptus/.ssh/id_rsa.pub eucalyptus@192.168.20.2

Remove the password of the “eucalyptus” account from the Node,

localadmin@server1:~$ sudo passwd -d eucalyptus

Client setup

  • Boot the 11.04 32/64 bit Desktop and install it.

Install KVM on the client machine.

shaon@client:~$ sudo apt-get install qemu-kvm

Post installation setup

To administrate the cloud we need to install euca2ools

shaon@client:~$ sudo apt-get install euca2ools

Monitoring

  • Login to the web interface from https://192.168.10.121:8443, default username is ‘admin’ and password is ‘admin’.
  • Download the user credentials from credential tab and save it to ~/.euca directory (if .euca is not there just create and save the credentials there)
  • Extract the credentials and source the eucarc script so that euca2ools can used this as environmental variables.
$ cd .euca
$ unzip xxxxxxxxx.zip
$ source eucarc

Verify that euca2ools can communicate with the UEC properly and all the services are running correctly run the following command,

$ euca-describe-availability-zones verbose

It’ll give output something like this,

AVAILABILITYZONE	cluster1	192.168.1.102
AVAILABILITYZONE	|- vm types	free / max   cpu   ram  disk
AVAILABILITYZONE	|- m1.small	0001 / 0002   1    192     2
AVAILABILITYZONE	|- c1.medium	0001 / 0002   1    256     5
AVAILABILITYZONE	|- m1.large	0000 / 0001   2    512    10
AVAILABILITYZONE	|- m1.xlarge	0000 / 0001   2   1024    20
AVAILABILITYZONE	|- c1.xlarge	0000 / 0000   4   2048    20

If VCPUs are found 0000, then use the following command on the Server1 to make sure that it finds the Node Controller and approve when prompts 192.168.20.2

localadmin@server1:~$ sudo euca_conf --discover-nodes

tadaa!!!

About these ads

5 responses to “Eucalyptus installation

  1. Great work!!!
    Keep more coming :D

  2. harshanatarajan

    Hello
    I am trying to install the GridFTP server on the CentOS instance running on the Dell server …

    I think I am running out of space….ICani get some help here pls… am receiving the following error….

    -bash-3.2# ./configure
    ./configure: line 88: echo: write error: No space left on device
    ./configure: line 89: echo: write error: No space left on device
    ./configure: line 201: echo: write error: No space left on device
    ./configure: line 928: cannot create temp file for here document: No space left on device
    ./configure: line 939: cannot create temp file for here document: No space left on device
    ./configure: line 968: echo: write error: No space left on device
    ./configure: line 968: echo: write error: No space left on device
    ./configure: line 968: echo: write error: No space left on device
    ./configure: line 968: echo: write error: No space left on device
    ./configure: line 968: echo: write error: No space left on device
    ./configure: line 968: echo: write error: No space left on device
    ./configure: line 973: cannot create temp file for here document: No space left on device
    ./configure: line 1121: echo: write error: No space left on device
    ./configure: line 1125: cannot create temp file for here document: No space left on device
    ./configure: line 1130: cannot create temp file for here document: No space left on device
    ./configure: line 1135: cannot create temp file for here document: No space left on device
    ./configure: line 1140: cannot create temp file for here document: No space left on device
    ./configure: line 1145: cannot create temp file for here document: No space left on device
    ./configure: line 1302: echo: write error: No space left on device
    checking build system type… ./configure: line 1320: echo: write error: No space left on device
    x86_64-unknown-linux-gnu
    ./configure: line 1534: cannot create temp file for here document: No space left on device
    sed: couldn’t flush stdout: No space left on device
    ./configure: line 1615: cannot create temp file for here document: No space left on device
    ./configure: line 1660: echo: write error: No space left on device
    configure: creating ./config.status
    ./configure: line 1662: cannot create temp file for here document: No space left on device
    ./configure: line 1675: cannot create temp file for here document: No space left on device
    ./configure: line 1943: echo: write error: No space left on device
    ./configure: line 1958: cannot create temp file for here document: No space left on device
    ./configure: line 1980: cannot create temp file for here document: No space left on device
    ./configure: line 1992: cannot create temp file for here document: No space left on device
    ./configure: line 2018: cannot create temp file for here document: No space left on device
    ./configure: line 2067: cannot create temp file for here document: No space left on device
    ./configure: line 2079: cannot create temp file for here document: No space left on device
    ./configure: line 2126: cannot create temp file for here document: No space left on device
    ./configure: line 2193: cannot create temp file for here document: No space left on device
    ./configure: line 2233: cannot create temp file for here document: No space left on device
    ./configure: line 2395: cannot create temp file for here document: No space left on device
    ./configure: line 2399: cannot create temp file for here document: No space left on device
    ./configure: line 2423: cannot create temp file for here document: No space left on device
    ./configure: line 2456: echo: write error: No space left on device
    ./configure: line 2458: cannot create temp file for here document: No space left on device
    ./configure: line 2463: echo: write error: No space left on device
    sed: couldn’t flush stdout: No space left on device
    ./configure: line 2479: echo: write error: No space left on device
    ./configure: line 2481: cannot create temp file for here document: No space left on device
    ./configure: line 2486: echo: write error: No space left on device
    sort: fflush failed: standard output: No space left on device
    sort: write error
    ./configure: line 2492: echo: write error: No space left on device
    ./configure: line 2521: echo: write error: No space left on device
    -bash-3.2#

  3. Hello Harsha.
    There are two ways to avoid this error.
    1. You can simply increase the root size of your image, then try to install it.
    2. Attach a volume and install GridFTP there.
    In the 1st way, you loose your data and the installation as well when the instance gets terminated. So, the standard procedure is the second one, which also allows you to have persistent data storage and in addition to that you will be able to increase volume size anytime you want.

  4. HARSHA NATARAJAN

    Hello Shaon

    Thanks for your reply…Your suggestions are helping me big time.

    I have another question, Please pardon my very basic knowledge on eucalyptus since I have just started working on it.

    Is it possible to install the GridFTP application first on Ubuntu or CentOS image and then bundle the image in the eucalyptus cluster to launch it. OR Do we have to install the image first and then install the GridFTP application.

    Also, Is it possible to run the GridFTP application as soon as the launching the image in the cluster, instead of manually starting the GridFTP server in the terminal. ?

  5. Glad that it helped, Harsha.

    yes, you can install GridFTP on your image first and then upload and register your images. For this you have to build your own image, you can follow the next post for creating image and after installation just boot your image install whatever application you want to use.

    again, yes, it is also possible to run GridFTP as the image launches. look into rc.local for ubuntu, or for centos change the runlevel through chkconfig, that does the trick also.

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