UEC: Instalasi dan Konfigurasi

From OnnoWiki
Revision as of 09:18, 25 October 2010 by Onnowpurbo (talk | contribs)
Jump to navigation Jump to search

Bagian ini menjelaskan bagaimana cara menginstalasi dan mengkonfigurasi sebuah setup dasar EUC yang terdiri dari 3 server. 2 Server (Server1 dan Server2) menjalankan versi server Lucid 64 bit, sedang server ke tiga menjalankan Lucid Desktop versi 64-bit (Client1). Kita mengunakan versi Desktop di Client1 sehingga kita dapat menggunakan Firefox atau browser lainnya untuk mengakses interface web dari UEC dan juga menggunakan RDP/VNC client pada saat proses membuat image.

UEC SETUP

Setup yang kita gunakan adalah contoh setup dari sebuah setup minimal yang biasa digunakan di Eucalyptus.


What we have used as a sample setup is a typical minimal Eucalyptus setup. Client1 above need not be a dedicated machine. If you need to setup Eucalyptus on a single server, you can refer to UEC: CC and NC on a single machine . However, such a setup will not support Managed and Managed-NOVLAN modes of networking.

Hardware Server 1 Server 2 Server 3
Minimum Suggested Minimum Suggested Minimum Suggested
CPU 1GHz 2 x 2GHz VT extensions VT, 64Bit, Multicore VT extensions VT, 64Bit, Multicore
Memory 1 GiB 2 GiB 1 GiB 4 GiB 1 GiB 2 GiB
Disk 5400rpm IDE 7200rpm SATA 5400rpm IDE 7200rpm SATA or SCSI 5400rpm IDE 7200rpm SATA or SCSI
Disk Space 40GB 200GB 40GB 100GB 40GB 100GB
Networking 100Mbps 1000Mbps 100Mbps 1000Mbps 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 familiar with the installation of Ubuntu server.

For ease of understanding, the instructions here in this chapter and the rest of the book assume the following sample setup. Please make necessary modifications to suit your setup. Server 1 Server 2 Client Common Username to log-in “uecadmin” Functionality CLC, CC and Walrus NC Bundling and Web Interface Client No. of NICs eth0 – (Enterprise N/W) eth1 – (Eucalyptus N/W) eth0 – (Eucalyptus Network) eth0 – (Enterprise Network) eth1 – (Eucalyptus Network) IP Addresses eth0 – 192.168.10.121 (set during install) eth1 – 192.168.20.1 (set after install) eth0 – 192.168.20.2 (set during install) eth0 – ??? eth1 – ??? Hostname server1.example.com server2.example.com client1.example.com Enterprise Name Servers 192.168.10.2 192.168.10.3 192.168.10.2 192.168.10.3 192.168.10.2 192.168.10.3 Gateway IP 192.168.10.100 192.168.20.1 192.168.10.2 192.168.10.3

   * 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).
   * 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
   * IP addresses allocated for the cloud instances as public IP addresses : 192.168.10.200-192.168.10.220 ( Enterprise range )
   * 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”

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:
   * Cloud Controller Address – Leave this blank as server1 is the Cloud Controller in this setup.
   * Cloud Installation Mode – Select ‘Cloud controller’, ‘Walrus storage service’, ‘Cluster controller’ and ‘Storage controller’.
   * Network interface for communication with nodes – eth1
   * Eucalyptus cluster name – myueccluster
   * 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

view source print? 1 auto eth1 2 iface eth1 inet static 3 address 192.168.20.1 4 netmask 255.255.255.0 5 network 192.168.20.0 6 broadcast 192.168.20.255

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

view source print? 1 uecadmin@server1:~$sudo /etc/init.d/networking restart

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

view source print? 1 uecadmin@server1:~$sudo apt-get update 2 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.

view source print? 1 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 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 ignore all the settings, except the following:
   * Cloud Controller Address – 192.168.20.1
   * Cloud Installation Mode – Select ‘Node Controller’
   * Gateway – 192.168.20.1 ( IP of the CC )

Post Install Steps & Configuration

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

view source print? 1 nameserver 192.168.10.2 2 nameserver 192.168.10.3

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

view source print? 1 uecadmin@server2:~$sudo apt-get update 2 uecadmin@server2:~$sudo apt-get upgrade eucalyptus

   * Install the NTP package to synchronize with the NTP server

view source print? 1 uecadmin@server2:~$sudo apt-get install ntp

   * Open the file /etc/ntp.conf and append the following 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
   * 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
   * Login to the web interface of CLC by using the following link https://192.168.10.121:8443. The default username is ‘admin’ and the default password is ‘admin’.
   * 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.
mkdir ~/.euca
cp ~/Desktop/euca2-admin-x509.zip ~/.euca/
cp ~/Downloads/euca2-admin-x509.zip ~/.euca/
cd ~/.euca
unzip euca2-admin-x509.zip
unzip mycreds.zip
   * Source eucarc script to make sure that the environmental variables used by euca2ools are set properly.
   * To verify that euca2ools are able to communicate with the UEC, try fetching the local cluster availability details:
$ . ~/.euca/eucarc
$ source ~/.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

Referensi

Pranala Menarik