Xen Cluster Management With Ganeti On Debian Etch - Page 6
11 Initializing The Clusternode1: Now we can initialize our cluster (this has to be done only once per cluster). Our clustername is cluster1.example.com, and I want node1.example.com to be the master, therefore we run the following command on node1.example.com: gnt-cluster init cluster1.example.com
12 Adding node2.example.com To The Clusternode1: Now that node1 is the master, we run all commands for managing the cluster on node1. In order to add node2.example.com to the cluster, we run: gnt-node add node2.example.com This will look like this: node1:/srv/ganeti/os# gnt-node add node2.example.com Now let's check if our cluster really consists out of node1 and node2: gnt-node list You should get something like this: node1:/srv/ganeti/os# gnt-node list
13 Setting Up An Instancenode1: Now let's create our first virtual machine (called an instance in Ganeti speak), inst1.example.com. I want to use DRBD for it (remote RAID1), I want node2 to be the primary node, and I want the instance to have a 5 GB hard drive, 256 MB swap and 64 MB RAM. Again, we run the command on the cluster master, node1.example.com: gnt-instance add -t remote_raid1 -n node2.example.com --secondary-node node1.example.com -o debian-etch -s 5g --swap-size 256 -m 64 inst1.example.com This can take some time. This is how the output looks: node1:~# gnt-instance add -t remote_raid1 -n node2.example.com --secondary-node node1.example.com -o debian-etch -s 5g --swap-size 256 -m 64 inst1.example.com Ganeti has created a complete virtual machine (using Debian Etch) which you can now use.
14 Configuring The Instancenode1: To get to inst1.example.com's command line, run gnt-instance console inst1.example.com on node1. inst1.example.com: Now you can log in to inst1.example.com. The username is root along with no password. Therefore the first thing we do after the login is create a password for root: passwd Next we must add a stanza for eth0 to /etc/network/interfaces. Right now, inst1.example.com has no network connectivity because only lo (the loopback interface) is up. As I said in chapter 1, I want inst1.example.com to have the IP address 192.168.0.105: vi /etc/network/interfaces
Restart the network afterwards: /etc/init.d/networking restart Run apt-get update to update the packages database on inst1, and then install OpenSSH and a full-featured vim: apt-get install ssh openssh-server vim-full Now you can connect to inst1.example.com using an SSH client such as PuTTY on the IP address 192.168.0.105. To leave inst1's console and get back to node1, type CTRL+] if you are at the console, or CTRL+5 if you're using PuTTY (this is the same as if you were using Xen's xm commands instead of Ganeti).
|




print: 
Recent comments
6 hours 20 min ago
7 hours 20 min ago
10 hours 4 min ago
10 hours 30 min ago
11 hours 1 min ago
11 hours 50 min ago
12 hours 12 min ago
12 hours 56 min ago
14 hours 16 min ago
14 hours 45 min ago