Version 7 (modified by rock, 16 years ago) (diff) |
---|
叢集
1.佈署成Cluster
- 可使用 DRBL 或 CloneZilla 來佈署 Cluster
- 此次為了方便,可直接使用隔壁桌的電腦
2.第二台機器的設定
- 更改第二台主機名稱 node02
$ sudo vim /etc/hostname $ sudo hostname -f /etc/hostname CTRL + D $ sudo /etc/init.d/gdm restart
- 重複單機的 0 ~ 4 步驟
- 確認 /etc/hosts 有彼此的資訊
- 設定兩台的 auto login
$ ssh-keygen -P "" $ cp ~/.ssh/id_rsa.pub ~/.ssh/authorized_keys $ scp -r ~/.ssh node02:~/ $ ssh node02 $ ssh node01 CTRL + D
3.安裝 ONE
- 3.1 安裝需要的套件
$ sudo aptitude install ruby sqlite3 libsqlite3-0 libsqlite3-dev libsqlite3-ruby \ libxmlrpc-c3 libxmlrpc-c3-dev scons g++ flex bison
- 3.2 下載 ONE 和安裝
$ tar zxvf one-1.2.0.tar.gz $ cd one-1.2.0 $ scons $ sudo mkdir /home/one $ sudo ./install.sh -d /home/one
- 3.3 配置 ONE
$ sudo vim /etc/profile export ONE_LOCATION=/home/one export ONE_XMLRPC=http://localhost:2633/RPC2 export PATH=$ONE_LOCATION/bin:$PATH $ source /etc/profile
- 3.4 啟動 ONE
$ sudo $ONE_LOCATION/bin/one start
4.使用 ONE 於 Xen Cluster
- 4.1 新增 Host/dom0 到 ONE pool
$ sudo onehost add node01 im_xen vmm_xen tm_ssh $ sudo onehost add node02 im_xen vmm_xen tm_ssh $ sudo onehost list
- 4.1 使用 ONE 來開啟 VM
$ cat /etc/xen/xen01.one NAME = hadoop01 CPU = 1 MEMORY = 156 OS = [ kernel = /boot/vmlinuz-2.6.22.9, initrd = /boot/initrd.img-2.6.22.9, root = sda1, kernel_cmd = "ro xencons=tty console=tty1"] DISK = [ source = /home/domains/xen01/disk.img, clone = no, target = sda1, readonly = no] DISK = [ type = swap, size = 512, target = "sda2", readonly = "no" ] NIC = [NETWORK = "net", IP = "X.X.X.X"] $ sudo onevm create xen01.one $ sudo onevm list
5.設定 ONE 的網路
$ sudo vim /etc/xen/net.one $ sudo onevnet create net.one
6.使用 ONE 開啟 Cluster
$ cd /home/one $ ./one_create_cluster.sh
7.測試 Live Migration
- 7.1 建立共享的Storage (使用NFS)
// node01 的設定 $ vim /etc/export // node02 的設定 $ sudo mount -t nfs node01@/home/one /home/one
- 7.2 Live Migrate
$ sudo onevm livemigrate xen01 node02 $ sudo onevm list
Attachments (2)
- ONE_demo.png (22.4 KB) - added by rock 16 years ago.
- ONE_demo_2.png (11.8 KB) - added by rock 16 years ago.
Download all attachments as: .zip