Difference between revisions of "UEC: Instalasi dan Konfigurasi"

From OnnoWiki
Jump to navigation Jump to search
(New page: 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 ...)
 
 
(20 intermediate revisions by the same user not shown)
Line 1: Line 1:
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.
+
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
+
[[Image:Eucalyptus-based-cloud1.jpeg|center|200px|thumb|UEC SETUP]]
  
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.
+
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
 
  
Note:
+
{| border="1" cellpadding=2 style="border-collapse: collapse"
 +
! 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
 +
|}
  
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.
+
Catatan:
  
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.
+
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.
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).
+
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.
  
    * Server1 is a 64-bit server and Server2 is a 64-bit VT-enabled server.
+
{| border="1" cellpadding=2 style="border-collapse: collapse"
 +
!
 +
! 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
 +
|}
  
    * 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 )
+
* 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”
  
    * The UEC components will use a dedicated class ‘C’ private network for their interconnections – 192.168.20.0/255.255.255.0
+
==Server1==
  
    * Cluster Name – “myueccluster”
+
===Instalasi===
  
Server1
+
* Boot server menggunakan CD Ubuntu Server 10.04. Pada menu boot grafis, pilih “Install Ubuntu Enterprise Cloud” dan lanjutkan dengan langkah dasar instalasi.
Installation
+
* 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:
  
    * 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.
+
** Cloud Controller Address – Kosongkan ini, karena server1 adalah Cloud Controller pada setup ini.
    * Installation only lets you set up the IP address details for one interface. Please do that for eth0.
+
** Cloud Installation Mode – Pilih ‘Cloud controller’, ‘Walrus storage service’, ‘Cluster controller’ dan ‘Storage controller’.
    * You will need to choose certain configuration options for your UEC, during the course of the install:
+
** Network interface untuk komunikasi dengan nodes – eth1
 +
** Eucalyptus cluster name – myueccluster
 +
** Eucalyptus IP range – 192.168.10.200-192.168.10.220
  
    * Cloud Controller Address – Leave this blank as server1 is the Cloud Controller in this setup.
+
===Langkah dan Konfigurasi sesudah instalasi===
    * 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
+
* Setup statik IP untuk network interface yang ke dua eth1 dengan cara menambahkan ke /etc/network/interfaces
  
    * 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
  
view source
+
* Setelah konfigurasi di atas di lakukan, jalankan perintah berikut untuk me-restart networking.
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.
+
uecadmin@server1:~$sudo /etc/init.d/networking restart
  
view source
+
* Pastikan kita mempunyai versi terakhir dari EUCALYPTUS.
print?
 
1 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
  
view source
+
* Install paket NTP, mesin ini akan berfungsi sebagai NTP server untuk node yang tersambung. Waktu / jam / clock pada semua komponen UEC harus di sinkronkan. Jika CLC tersambung ke Internet, maka kita dapat menjalankan NTP Server disitu dan menset agar semua komponen UEC di sinkronkan kepadanya.
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.
+
uecadmin@server1:~$sudo apt-get install ntp
  
view source
+
* Buka file /etc/ntp.conf dan tambahkan dua line / kalimat berikut untuk memastika bahwa dia akan tetap berfungsi sebagai time server walaupun sambungan ke Internet terputus. Setup berikut untuk memastikan NTP Server menggunakan clock dia sendiri sebagai sumber clock.
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
  
view source
+
* Restart layanan NTP agar perubahan yang kita lakukan dilaksanakan.
print?
 
1 server 127.127.1.0
 
2 fudge  127.127.1.0 stratum 10
 
  
    * Restart ntp service to make the changes effective.
+
uecadmin@server1:~$sudo /etc/init.d/ntp restart
  
view source
+
* Simpan semua perubahan dan CC.
print?
 
1 uecadmin@server1:~$sudo /etc/init.d/ntp restart
 
  
    * Save the changes and restart CC.
+
uecadmin@server1:~$sudo start eucalyptus-cc CLEAN=1
  
view source
+
==Server2==
print?
 
1 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.
+
===Instalasi===
    * 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
+
* Boot Server menggunakan CD Ubuntu Server 10.04 CD. Pada menu grafis, pilih “Install Ubuntu Enterprise Cloud” dan lanjutkan dengan langkah instalasi dasar.
 +
* Instalasi hanya mengijinkan kita utuk menset IP address untuk satu interface. Lakukan untuk eth0 dan set agar IP address-nya adalah 192.168.20.2
 +
* Anda akan membutuhkan beberapa konfigurasi untuk UEC pada saat proses instalasi. Kita dapat mengabaikan banyak konfigurasi lainnya, kecuali yang berikut:
  
    * Cloud Installation Mode – Select ‘Node Controller’
+
** Cloud Controller Address – 192.168.20.1
 +
** Cloud Installation Mode – pilih ‘Node Controller’
 +
** Gateway – 192.168.20.1 ( IP address CC )
  
    * Gateway – 192.168.20.1 ( IP of the CC )
+
===Langkah dan Konfigurasi sesudah instalasi===
  
Post Install Steps & Configuration
+
* Tambahkan DNS server ke /etc/resolv.conf
  
    * Add your DNS server details to /etc/resolv.conf
+
nameserver 192.168.10.2
 +
nameserver 192.168.10.3
  
view source
+
* Pastikan kita menggunakan versi terakhir EUCALYPTUS.
print?
 
1 nameserver 192.168.10.2
 
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
  
view source
+
* Install paket NTP untuk mensinkronkan waktu ke NTP server
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
+
uecadmin@server2:~$sudo apt-get install ntp
  
view source
+
* Buka /etc/ntp.conf dan tambahkan line / kalimat
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
  
view source
+
* Restart layanan NTP agar perubahan yang kita lakukan dijalankan.
print?
 
1 server 192.168.20.1
 
  
    * Restart ntp service to make the changes effective.
+
uecadmin@server2:~$sudo /etc/init.d/ntp restart
  
view source
+
* Buka file /etc/eucalyptus/eucalyptus.conf dan lakukan perubahan berikut
print?
 
1 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"
  
view source
+
* Sesudah melakukan perubahan di atas, jalankan perintah berikut
print?
 
1 VNET_PUBINTERFACE="br0"
 
2 VNET_PRIVINTERFACE="br0"
 
3 VNET_BRIDGE="br0"
 
4 VNET_DHCPDAEMON="/usr/sbin/dhcpd3"
 
5 VNET_DHCPUSER="dhcpd"
 
6 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
  
view source
+
* Install CC ssh public key ke NC
print?
 
1 uecadmin@server2:~$sudo restart eucalyptus-nc-publication
 
2 uecadmin@server2:~$sudo restart eucalyptus-nc
 
  
    * Install CC’s ssh public key to NC
+
** Pada Node Controller (NC), set password sementara untuk user eucalyptus:
  
    * On the Node Controller, temporarily set a password for the eucalyptus user:
+
uecadmin@server2:~$sudo passwd eucalyptus
  
view source
+
** Pada Cluster Controller (CC) lakukan:
print?
 
1 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
  
view source
+
** Sekarang kita dapat membuang password dari account eucalyptus di NC:
print?
 
1 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
  
view source
 
print?
 
1 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)
+
==Client1==
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.
+
Fungsi dari mesin Client1 adalah untuk berinteraksi dengan setup Cloud, untuk bundling dan mendaftarkan Eucalyptus Machine Images (EMI) baru.
  
    * Install KVM to help us install images on KVM platform and bundle them.
+
===Installation===
  
view source
+
* Boot komputer menggunakan CD Ubuntu Desktop 10.04 CD dan install. Komputer akan tersambung ke jaringan LAN dan memperoleh [[IP address]] secara automatis dari DHCP Server.
print?
 
1 uecadmin@client1:~$apt-get install qemu-kvm
 
Post Install Configuration
 
  
    * Install euca2ools to be able to manage the cloud from it.
+
* Install KVM untuk menolong kita menginstalasi Image di platform KVM dan membundel Image tersebut.
  
view source
+
uecadmin@client1:~$apt-get install qemu-kvm
print?
 
1 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’.
+
===Langkah dan Konfigurasi sesudah instalasi===
  
    * 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.
+
* Install euca2ools untuk memungkinkan kita melakukan manajemen Cloud dari Client1.
  
    * 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.
+
uecadmin@client1:~$sudo apt-get install euca2ools
  
    * Extract the credentials archive.
+
* Login ke interface web CLC menggunakan alamat https://192.168.10.121:8443. Default username & password
  
view source
+
admin
print?
+
admin
1 cd .euca
 
2 unzip mycreds.zip
 
  
    * Source eucarc script to make sure that the environmental variables used by euca2ools are set properly.
+
* Perlu dicatat bahwa instalasi UEC akan menggunakan self signed certificate untuk web server. Browser akan memberikan peringatan yang menyatakan bahwa sertifikat web server tidak di tanda tangani oleh authoritas yang dapat dipercaya. Kita dapat mengijinkan browser untuk mengakses server dengan self signed certificate. Cara menginstalasi sertifikat yang valid yang di tanda tangani oleh certificate authority yang di percaya diluar lingkup panduan ini.
  
    * To verify that euca2ools are able to communicate with the UEC, try fetching the local cluster availability details:
+
* Pada saat kita login pertama kali, interface web akan meminta kita untuk mengubah password dan e-mail address dari administrator. Sesudah menyelesaikan langkah ini, download file Credential dari https://192.168.10.121:8443/#credentials dan simpan di directory ~/.euca
  
view source
+
* Extrak file credential
print?
 
1 $ . ~/.euca/eucarc
 
2 euca-describe-availability-zones verbose
 
  
You should see something like the following if it works properly:
+
  mkdir ~/.euca
view source
+
  cp ~/Desktop/euca2-admin-x509.zip ~/.euca/
print?
+
  cp ~/Downloads/euca2-admin-x509.zip ~/.euca/
1 $ euca-describe-availability-zones verbose
+
  cd ~/.euca
2 AVAILABILITYZONE        myueccluster    192.168.10.121
+
  unzip euca2-admin-x509.zip
3 AVAILABILITYZONE        |- vm types    free / max  cpu  ram  disk
 
4 AVAILABILITYZONE        |- m1.small    0016 / 0016  1    128    2
 
5 AVAILABILITYZONE        |- c1.medium    0014 / 0014  1    256    5
 
6 AVAILABILITYZONE        |- m1.large    0007 / 0007  2    512    10
 
7 AVAILABILITYZONE        |- m1.xlarge    0003 / 0003  2  1024    20
 
8 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.
+
unzip mycreds.zip
view source
+
 
print?
+
* Source script eucarc untuk memastikan semua variabel environment yang akan digunakan oleh euca2ools di set dengan benar.
1 uecadmin@client1:~$sudo euca_conf --discover-nodes
+
* Untuk memastikan bahwa euca2ools dapat berkomunikasi dengan UEC, coba ambil informasi ketersediaan dari cluster local:
 +
 
 +
$ . ~/.euca/eucarc
 +
$ source ~/.euca/eucarc
 +
euca-describe-availability-zones verbose
 +
 
 +
Anda akan melihat seperti berikut jika itu berjalan dengan baik:
 +
 
 +
$ 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
 +
 
 +
Jika kita melihat dalam daftar di atas free/max VCPU bernilai 0, hal ini berarti node (NC) tidak terdaftar secara automatis. Pada Server1 lakukan dan approve jika di tanya untuk menambahkan 192.168.20.2 sebaga Node Controller (NC).
 +
 
 +
uecadmin@client1:~$sudo euca_conf --discover-nodes
  
 
==Referensi==
 
==Referensi==
  
 
* http://cssoss.wordpress.com/2010/05/10/eucalyptus-beginner%E2%80%99s-guide-%E2%80%93-uec-edition-chapter-2-%E2%80%93-installation-%C2%A0configuration/
 
* http://cssoss.wordpress.com/2010/05/10/eucalyptus-beginner%E2%80%99s-guide-%E2%80%93-uec-edition-chapter-2-%E2%80%93-installation-%C2%A0configuration/
 +
* https://help.ubuntu.com/community/EucalyptusKarmic
  
 
==Pranala Menarik==
 
==Pranala Menarik==
  
* [[Ubuntu Enterprise Cloud: Eucalyptus Beginner’s Guide]] '''RECOMMENDED'''
+
* [[Ubuntu Enterprise Cloud: Panduan Untuk Pemula]] '''RECOMMENDED'''
 
* [[Ubuntu Enterprise Cloud: Instalasi UEC]]
 
* [[Ubuntu Enterprise Cloud: Instalasi UEC]]
 
* [[Cloud Computing]]
 
* [[Cloud Computing]]

Latest revision as of 19:30, 6 January 2011

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

Instalasi

  • 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. Waktu / jam / clock pada semua komponen UEC harus di sinkronkan. Jika CLC tersambung ke Internet, maka kita dapat menjalankan NTP Server disitu dan menset agar semua komponen UEC di sinkronkan kepadanya.
uecadmin@server1:~$sudo apt-get install ntp
  • Buka file /etc/ntp.conf dan tambahkan dua line / kalimat berikut untuk memastika bahwa dia akan tetap berfungsi sebagai time server walaupun sambungan ke Internet terputus. Setup berikut untuk memastikan NTP Server menggunakan clock dia sendiri sebagai sumber clock.
server 127.127.1.0
fudge  127.127.1.0 stratum 10
  • Restart layanan NTP agar perubahan yang kita lakukan dilaksanakan.
uecadmin@server1:~$sudo /etc/init.d/ntp restart
  • Simpan semua perubahan dan CC.
uecadmin@server1:~$sudo start eucalyptus-cc CLEAN=1

Server2

Instalasi

  • Boot Server menggunakan CD Ubuntu Server 10.04 CD. Pada menu grafis, pilih “Install Ubuntu Enterprise Cloud” dan lanjutkan dengan langkah instalasi dasar.
  • Instalasi hanya mengijinkan kita utuk menset IP address untuk satu interface. Lakukan untuk eth0 dan set agar IP address-nya adalah 192.168.20.2
  • Anda akan membutuhkan beberapa konfigurasi untuk UEC pada saat proses instalasi. Kita dapat mengabaikan banyak konfigurasi lainnya, kecuali yang berikut:
    • Cloud Controller Address – 192.168.20.1
    • Cloud Installation Mode – pilih ‘Node Controller’
    • Gateway – 192.168.20.1 ( IP address CC )

Langkah dan Konfigurasi sesudah instalasi

  • Tambahkan DNS server ke /etc/resolv.conf
nameserver 192.168.10.2
nameserver 192.168.10.3
  • Pastikan kita menggunakan versi terakhir EUCALYPTUS.
uecadmin@server2:~$sudo apt-get update
uecadmin@server2:~$sudo apt-get upgrade eucalyptus
  • Install paket NTP untuk mensinkronkan waktu ke NTP server
uecadmin@server2:~$sudo apt-get install ntp
  • Buka /etc/ntp.conf dan tambahkan line / kalimat
server 192.168.20.1
  • Restart layanan NTP agar perubahan yang kita lakukan dijalankan.
uecadmin@server2:~$sudo /etc/init.d/ntp restart
  • Buka file /etc/eucalyptus/eucalyptus.conf dan lakukan perubahan berikut
VNET_PUBINTERFACE="br0"
VNET_PRIVINTERFACE="br0"
VNET_BRIDGE="br0"
VNET_DHCPDAEMON="/usr/sbin/dhcpd3"
VNET_DHCPUSER="dhcpd"
VNET_MODE="MANAGED-NOVLAN"
  • Sesudah melakukan perubahan di atas, jalankan perintah berikut
uecadmin@server2:~$sudo restart eucalyptus-nc-publication
uecadmin@server2:~$sudo restart eucalyptus-nc
  • Install CC ssh public key ke NC
    • Pada Node Controller (NC), set password sementara untuk user eucalyptus:
uecadmin@server2:~$sudo passwd eucalyptus
    • Pada Cluster Controller (CC) lakukan:
uecadmin@server2:~$sudo -u eucalyptus ssh-copy-id -i ~eucalyptus/.ssh/id_rsa.pub eucalyptus@192.168.20.2
    • Sekarang kita dapat membuang password dari account eucalyptus di NC:
uecadmin@server2:~$sudo passwd -d eucalyptus


Client1

Fungsi dari mesin Client1 adalah untuk berinteraksi dengan setup Cloud, untuk bundling dan mendaftarkan Eucalyptus Machine Images (EMI) baru.

Installation

  • Boot komputer menggunakan CD Ubuntu Desktop 10.04 CD dan install. Komputer akan tersambung ke jaringan LAN dan memperoleh IP address secara automatis dari DHCP Server.
  • Install KVM untuk menolong kita menginstalasi Image di platform KVM dan membundel Image tersebut.
uecadmin@client1:~$apt-get install qemu-kvm

Langkah dan Konfigurasi sesudah instalasi

  • Install euca2ools untuk memungkinkan kita melakukan manajemen Cloud dari Client1.
uecadmin@client1:~$sudo apt-get install euca2ools
admin
admin
  • Perlu dicatat bahwa instalasi UEC akan menggunakan self signed certificate untuk web server. Browser akan memberikan peringatan yang menyatakan bahwa sertifikat web server tidak di tanda tangani oleh authoritas yang dapat dipercaya. Kita dapat mengijinkan browser untuk mengakses server dengan self signed certificate. Cara menginstalasi sertifikat yang valid yang di tanda tangani oleh certificate authority yang di percaya diluar lingkup panduan ini.
  • Pada saat kita login pertama kali, interface web akan meminta kita untuk mengubah password dan e-mail address dari administrator. Sesudah menyelesaikan langkah ini, download file Credential dari https://192.168.10.121:8443/#credentials dan simpan di directory ~/.euca
  • Extrak file credential
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 script eucarc untuk memastikan semua variabel environment yang akan digunakan oleh euca2ools di set dengan benar.
  • Untuk memastikan bahwa euca2ools dapat berkomunikasi dengan UEC, coba ambil informasi ketersediaan dari cluster local:
$ . ~/.euca/eucarc
$ source ~/.euca/eucarc
euca-describe-availability-zones verbose

Anda akan melihat seperti berikut jika itu berjalan dengan baik:

$ 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

Jika kita melihat dalam daftar di atas free/max VCPU bernilai 0, hal ini berarti node (NC) tidak terdaftar secara automatis. Pada Server1 lakukan dan approve jika di tanya untuk menambahkan 192.168.20.2 sebaga Node Controller (NC).

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

Referensi

Pranala Menarik