1 == How To Install Ganeti Clusters and Instances ==
3 === How To Install Ganeti Clusters ===
5 Suppose that you have two identical hosts running squeeze, foo.debian.org and
6 bar.debian.org, that will be used as nodes in a ganeti cluster.
8 ==== install required packages ====
10 On each node, install the required packages:
13 apt-get install fai-client ssed extlinux
14 apt-get install -t squeeze-backports drbd8-utils ganeti2 ganeti-instance-debootstrap ganeti-htools
17 ==== configure kernel modules ====
19 On each node, ensure that required kernel modules are loaded at boot:
22 ainsl /etc/modules 'drbd minor_count=255 usermode_helper=/bin/true'
23 ainsl /etc/modules 'hmac'
24 ainsl /etc/modules 'tun'
27 ==== configure networking ====
29 Determine a hostname for the cluster (foobar.debian.org) and assign an A record.
31 On each node, ensure that all nodes and the cluster itself are listed in
34 On each node, create a bridge interface: br0.
36 ==== create storage ====
38 On each node, configure lvm to ignore drbd devices and to prefer
39 {{{/dev/cciss}}} devices names to {{{/dev/block}}} device names
40 ([[http://code.google.com/p/ganeti/issues/detail?id=93|why?]]):
44 -e 's#^\(\s*filter\s\).*#\1= [ "a|.*|", "r|/dev/drbd[0-9]+|" ]#'
45 -e 's#^\(\s*preferred_names\s\).*#\1= [ "^/dev/dm-*/", "^/dev/cciss/" ]#' \
49 On each node, create a volume group:
52 vgcreate vg_ganeti /dev/cciss/c0d0p3
55 ==== create kvmU symbolic links ====
58 ln -s -T /boot/vmlinuz-2.6.32-5-amd64 /boot/vmlinuz-2.6-kvmU
59 ln -s -T /boot/initrd.img-2.6.32-5-amd64 /boot/initrd.img-2.6-kvmU
62 ==== instantiate the cluster ====
64 On the master node (foo) only:
70 --secondary-ip 192.168.2.213 \
71 --enabled-hypervisors kvm \
72 --nic-parameters link=br0 \
73 --mac-prefix 00:16:37 \
76 --hypervisor-parameters kvm:initrd_path=/boot/initrd.img-2.6-kvmU \
80 ==== add slave nodes ===
82 For each slave node (bar), on the master node (foo):
86 --secondary-ip 192.168.2.217 \
92 ==== verify cluster ====
94 On the master node (foo):
100 === How To Install Ganeti Instances ===
102 Suppose that the first guest on will be qux.debian.org.
104 ==== define the instance ====
106 # add qux.debian.org entry in LDAP to establish A record
107 # ask hosting partner to establish PTR record as appropriate
108 # add qux.debian.org entry in puppet
109 # add qux.debian.org entry in nagios
111 ==== create the instance ====
113 On the master node (foo):
118 --disk-template drbd \
120 --os-type debootstrap+dsa \
121 --hypervisor-parameters kvm:initrd_path=,kernel_path= \