UEC: Instalasi dan Konfigurasi

From OnnoWiki
Revision as of 07:26, 26 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. Client1 tidak perlu berupa sebuah mesin khusus. Jika kita butuh untuk men-setup Eucalyptus di sebuah mesin, maka sebetulya kita dapat membuat EUC: CC dan NC dalam sebuahmesi. AKan tetapi, setup ini tidak memungkinkan untuk mendukung mode Managed dan Managed-NOVLAN 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

Catatan:

Instalasi UEC sangat mirip dengan instalasi Ubuntu server biasa, bedanya ada tambahan screen konfigurasi untuk komponen UEC. Instruksi berikut akan membahas tentang proses instalasi spesifik UEC yang mengasumsikan kita familiar dengan instalasi Ubuntu Server.

Untuk memudahkan, instruksi di bagin ini maupun di beberapa bagian lain akan mengasumsikan contoh setup berikut. Mohon melakukan modifikasi seperlunya untuk memenuhi setup yang kita lakukan.

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) eth0 – (Eucalyptus Network) eth0 – (Enterprise Network)
eth1 – (Eucalyptus N/W) eth1 – (Eucalyptus Network)
IP Addresses eth0 – 192.168.10.121 (set during install) eth0 – 192.168.20.2 (set during install) eth0 – ???
eth1 – 192.168.20.1 (set after install) eth1 – ???
Hostname server1.example.com server2.example.com client1.example.com
Enterprise Name Servers 192.168.10.2 192.168.10.2 192.168.10.2
192.168.10.3 192.168.10.3 192.168.10.3
Gateway IP 192.168.10.100 192.168.20.1 192.168.10.2
192.168.10.3


  • Gateway pada Server2 di set ke IP dari CC – IP 192.168.20.1 . Hal ini memungkinkan Server2 untuk tersambung ke enterprise network melalui Server1 (CC).
  • Server1 adalah 64-bit server dan Server2 adalah sebuah server 64-bit dengan VT-enabled.
  • Jaringan enterprise menggunakan kelas ‘C’ private network – 192.168.10.0/255.255.255.0
  • IP address yang di alokasikan untuk cloud instances adalah public IP addresses : 192.168.10.200-192.168.10.220 ( Enterprise range )
  • Komponen UEC akan menggunakan dedicated kelas 'C' private network untuk interkoneksi mereka – 192.168.20.0/255.255.255.0
  • Nama Cluster – “myueccluster”

Server1

Installation

  • Boot server menggunakan CD Ubuntu Server 10.04. Pada menu boot grafis, pilih “Install Ubuntu Enterprise Cloud” dan lanjutkan dengan langkah dasar instalasi.
  • Proses instalasi hanya mengijinkan kita untuk mengkonfigurasi IP address untuk salah satu interface saja. Lakukan itu untuk eth0.
  • Kita perlu memilih beberapa pilihan untuk UEC pada saat proses instalasi:
    • Cloud Controller Address – Kosongkan ini, karena server1 adalah Cloud Controller pada setup ini.
    • Cloud Installation Mode – Pilih ‘Cloud controller’, ‘Walrus storage service’, ‘Cluster controller’ dan ‘Storage controller’.
    • Network interface untuk komunikasi dengan nodes – eth1
    • Eucalyptus cluster name – myueccluster
    • Eucalyptus IP range – 192.168.10.200-192.168.10.220

Langkah dan Konfigurasi sesudah instalasi

  • Setup statik IP untuk network interface yang ke dua eth1 dengan cara menambahkan ke /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
  • Setelah konfigurasi di atas di lakukan, jalankan perintah berikut untuk me-restart networking.
uecadmin@server1:~$sudo /etc/init.d/networking restart
  • Pastikan kita mempunyai versi terakhir dari EUCALYPTUS.
uecadmin@server1:~$sudo apt-get update
uecadmin@server1:~$sudo apt-get upgrade eucalyptus
  • Install paket NTP, mesin ini akan berfungsi sebagai NTP server untuk node yang tersambung. 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 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
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 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