Kamis, 21 April 2016

Tips Virtualization : Membuat Cluster Server pada Proxmox 2.1


Secara umum, cluster server pada Proxmox versi 2.x tidak jauh berbeda dengan cluster server pada Proxmox 1.x. Letak perbedaanya adalah pada Proxmox versi 1.x menggunakan perintah pveca, sedangkan pada Proxmox versi 2.x kita dapat menggunakan perintah pvecm. Pada tulisan ini saya menggunakan Proxmox versi terbaru, yaitu Proxmox 2.1.
Adapun beberapa keuntungan dari cluster server Proxmox ini antara lain :
  1. Pemusatan web manajemen.
  2. Kita dapat memigrasikan virtual machines diantara node yang sudah tergabung dicluster tersebut secara live
  3. Feature HA (High Availability) pada proxmox dapat digunakan.
Sebelum kita membuat Proxmox Cluster server  ada beberapa hal yang perlu diperhatikan antara lain, :
  1. Seluruh node (server Proxmox) saling terhubung didalam 1 network.
  2. Waktu di seluruh node harus disinkronkan.
  3. Disarankan node atau server Proxmox yang akan dicluster memiliki spesifikasi yang sama.
Berikut adalah langkah-langkahnya
  1. Diasumsikan saya memiliki 2 node server Proxmox yang masing-masing memiliki Ip address 10.10.10.2/28 dan 10.10.10.3/28 yang selanjutnya akan disebut pve1 dan pve2.
  2. Pve1 akan bertindak sebagai master dan pve2 sebagai slave. Seluruh server Proxmox yang saya gunakan adalah fresh install.
  3. Siapkan console dari masing-masing Proxmox dan jalankan perintah-perintah dibawah ini
Pada pve1 jalankan perintah
pvecm create <nama cluster>
01.root@pve1:~# pvecm create cluster1
02.Generating public/private rsa key pair.
03.Your identification has been saved in /root/.ssh/id_rsa.
04.Your public key has been saved in /root/.ssh/id_rsa.pub.
05.The key fingerprint is:
06.a7:5d:af:35:08:a0:39:20:0a:21:c4:74:ad:de:30:74 root@pve1.excellent.co.id
07.The key's randomart image is:
08.+--[ RSA 2048]----+
09.|*o .. |
10.|.o.. E |
11.|. o + . |
12.|.. = . o . |
13.|. . + + S o . |
14.| . . . + o o |
15.| . . . + |
16.| o . |
17.| . |
18.+-----------------+
19.Restarting pve cluster filesystem: pve-cluster[dcdb] notice: wrote new cluster config '/etc/cluster/cluster.conf'
20..
21.Starting cluster:
22.Checking if cluster has been disabled at boot... [ OK ]
23.Checking Network Manager... [ OK ]
24.Global setup... [ OK ]
25.Loading kernel modules... [ OK ]
26.Mounting configfs... [ OK ]
27.Starting cman... [ OK ]
28.Waiting for quorum... [ OK ]
29.Starting fenced... [ OK ]
30.Starting dlm_controld... [ OK ]
31.Unfencing self... [ OK ]
32.root@pve1:~#

Pada pve2 jalankan perintah
pvecm add <ip address pve1> dan Proxmox akan meminta anda memasukan password pve1 untuk proses authentication
01.root@pve2:~# pvecm add 10.10.10.2
02.Generating public/private rsa key pair.
03.Your identification has been saved in /root/.ssh/id_rsa.
04.Your public key has been saved in /root/.ssh/id_rsa.pub.
05.The key fingerprint is:
06.ec:87:63:33:1f:35:cc:8f:f9:a8:25:6b:cb:97:d3:62 root@pve2
07.The key's randomart image is:
08.+--[ RSA 2048]----+
09.| |
10.| |
11.| |
12.| . o |
13.| S = |
14.| . . . = |
15.| B + +o. |
16.| . B.=Eo. |
17.| .*=.o. |
18.+-----------------+
19.The authenticity of host '10.10.10.2 (10.10.10.2)' can't be established.
20.RSA key fingerprint is 67:5a:04:3e:f4:e4:ea:e3:aa:90:c9:f1:a6:9b:5e:68.
21.Are you sure you want to continue connecting (yes/no)? yes
22.root@10.10.10.2's password:
23.copy corosync auth key
24.stopping pve-cluster service
25.Stopping pve cluster filesystem: pve-cluster.
26.backup old database
27.Starting pve cluster filesystem : pve-cluster.
28.Starting cluster:
29.Checking if cluster has been disabled at boot... [ OK ]
30.Checking Network Manager... [ OK ]
31.Global setup... [ OK ]
32.Loading kernel modules... [ OK ]
33.Mounting configfs... [ OK ]
34.Starting cman... [ OK ]
35.Waiting for quorum... [ OK ]
36.Starting fenced... [ OK ]
37.Starting dlm_controld... [ OK ]
38.Unfencing self... [ OK ]
39.waiting for quorum...OK
40.generating node certificates
41.merge known_hosts file
42.restart services
43.Restarting PVE Daemon: pvedaemon.
44.Restarting web server: apache2 ... waiting .
45.successfully added node 'pve2' to cluster.
46.root@pve2:~#
Cek status cluster dengan perintah
1.root@pve1:~# pvecm nodes
2.Node Sts Inc Joined Name
3.1 M 4 2012-07-03 08:54:12 pve1
4.2 M 8 2012-07-03 08:54:53 pve2
5.root@pve1:~#
Login ke web console pve1 yang memiliki ip 10.10.10.2 dan login seperti biasa. Jika tidak ada masalah harusnya tampilan pada web console akan seperti gambar dibawah ini.

Jika kita menggunakan SAN storage ataupun NFS storage untuk menyimpan data atau harddisk virtual dari VM yang kita miliki, kita dapat menggunakan feature live migration pada Proxmox seperti halnya vMotion pada VMware vSphere.

https://www.excellent.co.id/product-services/proxmox/tips-virtualization-membuat-cluster-server-pada-proxmox-2-1/

0 komentar:

Posting Komentar