root / docs / install.sgml @ b212bf8b
History | View | Annotate | Download (14.8 kB)
1 | f1a808df | Guido Trotter | <!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook V4.2//EN" [ |
---|---|---|---|
2 | f1a808df | Guido Trotter | ]> |
3 | f1a808df | Guido Trotter | <article class="specification"> |
4 | f1a808df | Guido Trotter | <articleinfo> |
5 | b212bf8b | Iustin Pop | <title>Ganeti installation tutorial</title> |
6 | f1a808df | Guido Trotter | </articleinfo> |
7 | f1a808df | Guido Trotter | <para>Documents Ganeti version 1.2</para> |
8 | f1a808df | Guido Trotter | |
9 | f1a808df | Guido Trotter | <sect1> |
10 | f1a808df | Guido Trotter | <title>Introduction</title> |
11 | f1a808df | Guido Trotter | |
12 | 5d6dd340 | Iustin Pop | <para> |
13 | 5d6dd340 | Iustin Pop | Ganeti is a cluster virtualization management system. This |
14 | 5d6dd340 | Iustin Pop | document explains how to bootstrap a Ganeti node and create a |
15 | 5d6dd340 | Iustin Pop | running cluster. You need to repeat most of the steps in this |
16 | 5d6dd340 | Iustin Pop | document for every node you want to install, but of course we |
17 | 5d6dd340 | Iustin Pop | recommend creating some semi-automatic procedure if you plan to |
18 | 5d6dd340 | Iustin Pop | deploy Ganeti on a medium/large scale. |
19 | f1a808df | Guido Trotter | </para> |
20 | f1a808df | Guido Trotter | |
21 | f1a808df | Guido Trotter | <para>This document is divided into two main sections: |
22 | f1a808df | Guido Trotter | |
23 | f1a808df | Guido Trotter | <itemizedlist> |
24 | f1a808df | Guido Trotter | <listitem> |
25 | 5d6dd340 | Iustin Pop | <simpara>Installation of the core system and base |
26 | 5d6dd340 | Iustin Pop | components</simpara> |
27 | f1a808df | Guido Trotter | </listitem> |
28 | f1a808df | Guido Trotter | <listitem> |
29 | 5d6dd340 | Iustin Pop | <simpara>Configuration of the environment for |
30 | 5d6dd340 | Iustin Pop | Ganeti</simpara> |
31 | f1a808df | Guido Trotter | </listitem> |
32 | f1a808df | Guido Trotter | </itemizedlist> |
33 | f1a808df | Guido Trotter | |
34 | 5d6dd340 | Iustin Pop | Each of these is divided into sub-sections. While a full Ganeti |
35 | 5d6dd340 | Iustin Pop | system will need all of the steps specified, some are not strictly |
36 | 5d6dd340 | Iustin Pop | required for every environment. Which ones they are, and why, is |
37 | 5d6dd340 | Iustin Pop | specified in the corresponding sections. |
38 | f1a808df | Guido Trotter | </para> |
39 | f1a808df | Guido Trotter | |
40 | 5d6dd340 | Iustin Pop | <para> |
41 | 5d6dd340 | Iustin Pop | While Ganeti itself is distribution-agnostic most of the |
42 | 5d6dd340 | Iustin Pop | examples in this document will be targeted at Debian or |
43 | 5d6dd340 | Iustin Pop | Debian-derived distributions. You are expected to be familiar |
44 | 5d6dd340 | Iustin Pop | with your distribution, its package management system, and Xen |
45 | 5d6dd340 | Iustin Pop | before trying to use Ganeti. |
46 | f1a808df | Guido Trotter | </para> |
47 | f1a808df | Guido Trotter | |
48 | 5d6dd340 | Iustin Pop | <para> |
49 | 5d6dd340 | Iustin Pop | A basic Ganeti terminology glossary is provided in the |
50 | 5d6dd340 | Iustin Pop | introductory section of the "admin guide". Please refer to that |
51 | 5d6dd340 | Iustin Pop | if you are uncertain about the terms we are using. |
52 | 6bf0c9bb | Guido Trotter | </para> |
53 | 6bf0c9bb | Guido Trotter | |
54 | f1a808df | Guido Trotter | </sect1> |
55 | f1a808df | Guido Trotter | |
56 | f1a808df | Guido Trotter | <sect1> |
57 | f1a808df | Guido Trotter | <title>Installing the system and base components</title> |
58 | f1a808df | Guido Trotter | |
59 | f1a808df | Guido Trotter | <sect2> |
60 | f1a808df | Guido Trotter | <title>Installing the base system</title> |
61 | f1a808df | Guido Trotter | |
62 | 5d6dd340 | Iustin Pop | <para><emphasis role="strong">Mandatory.</emphasis></para> |
63 | f1a808df | Guido Trotter | |
64 | 5d6dd340 | Iustin Pop | <para> |
65 | 5d6dd340 | Iustin Pop | Please install your operating system as you would normally |
66 | 5d6dd340 | Iustin Pop | do. The only requirement you need to be aware of at this stage |
67 | 5d6dd340 | Iustin Pop | is to partition leaving enough space for a big LVM volume |
68 | 5d6dd340 | Iustin Pop | group which will then host your instance file systems. You can |
69 | 5d6dd340 | Iustin Pop | even create the volume group at installation time, of course: |
70 | 5d6dd340 | Iustin Pop | the default volume group name Ganeti 1.2 uses is "xenvg" but |
71 | 5d6dd340 | Iustin Pop | you may name it differently should you wish to, as long as the |
72 | 5d6dd340 | Iustin Pop | name is the same for all the nodes in the cluster. |
73 | f1a808df | Guido Trotter | </para> |
74 | f1a808df | Guido Trotter | |
75 | f1a808df | Guido Trotter | </sect2> |
76 | f1a808df | Guido Trotter | |
77 | f1a808df | Guido Trotter | <sect2> |
78 | f1a808df | Guido Trotter | <title>Installing Xen</title> |
79 | f1a808df | Guido Trotter | |
80 | 5d6dd340 | Iustin Pop | <para> |
81 | 5d6dd340 | Iustin Pop | <emphasis role="strong">Mandatory:</emphasis> While Ganeti is |
82 | 5d6dd340 | Iustin Pop | developed with the ability to modularly run on different |
83 | 5d6dd340 | Iustin Pop | virtualization environments in mind the only one currently |
84 | a7a19281 | Iustin Pop | useable on a live system is <ulink |
85 | a7a19281 | Iustin Pop | url="http://xen.xensource.com/">Xen</ulink>. |
86 | f1a808df | Guido Trotter | </para> |
87 | f1a808df | Guido Trotter | |
88 | 5d6dd340 | Iustin Pop | <para> |
89 | 5d6dd340 | Iustin Pop | Please follow your distribution's recommended way to install |
90 | 5d6dd340 | Iustin Pop | and set up Xen, or install Xen from the upstream source, if |
91 | 5d6dd340 | Iustin Pop | you wish, following their manual. |
92 | f1a808df | Guido Trotter | </para> |
93 | f1a808df | Guido Trotter | |
94 | 5d6dd340 | Iustin Pop | <para> |
95 | 5d6dd340 | Iustin Pop | For example under Debian 4.0 or 3.1+backports you can install |
96 | 5d6dd340 | Iustin Pop | the relevant xen-linux-system package, which will pull in both |
97 | 5d6dd340 | Iustin Pop | the hypervisor and the relevant kernel. On Ubuntu (from Gutsy |
98 | 5d6dd340 | Iustin Pop | on) the package is called ubuntu-xen-server. |
99 | f1a808df | Guido Trotter | </para> |
100 | f1a808df | Guido Trotter | |
101 | 5d6dd340 | Iustin Pop | <para> |
102 | 5d6dd340 | Iustin Pop | After installing Xen you need to reboot into your xenified |
103 | 5d6dd340 | Iustin Pop | dom0 system. Again on some distributions this might involve |
104 | 5d6dd340 | Iustin Pop | configuring GRUB appropriately. |
105 | f1a808df | Guido Trotter | </para> |
106 | f1a808df | Guido Trotter | |
107 | f1a808df | Guido Trotter | </sect2> |
108 | f1a808df | Guido Trotter | |
109 | f1a808df | Guido Trotter | <sect2> |
110 | f1a808df | Guido Trotter | <title>Installing DRBD</title> |
111 | f1a808df | Guido Trotter | |
112 | 5d6dd340 | Iustin Pop | <para> |
113 | a7a19281 | Iustin Pop | Recommended: <ulink url="http://www.drbd.org/">DRBD</ulink> |
114 | a7a19281 | Iustin Pop | is required if you want to use the high availability (HA) |
115 | a7a19281 | Iustin Pop | features of Ganeti, but optional if you don't require HA or |
116 | a7a19281 | Iustin Pop | only run Ganeti on single-node clusters. You can upgrade a |
117 | a7a19281 | Iustin Pop | non-HA cluster to an HA one later, but you might need to |
118 | a7a19281 | Iustin Pop | export and reimport all your instances to take advantage of |
119 | a7a19281 | Iustin Pop | the new features. |
120 | f1a808df | Guido Trotter | </para> |
121 | f1a808df | Guido Trotter | |
122 | 5d6dd340 | Iustin Pop | <para> |
123 | 5d6dd340 | Iustin Pop | Now the bad news: unless your distribution already provides it |
124 | 5d6dd340 | Iustin Pop | installing DRBD might involve recompiling your kernel or |
125 | 5d6dd340 | Iustin Pop | anyway fiddling with it. Hopefully at least the xenified |
126 | 5d6dd340 | Iustin Pop | kernel source to start from will be provided. |
127 | f1a808df | Guido Trotter | </para> |
128 | f1a808df | Guido Trotter | |
129 | 5d6dd340 | Iustin Pop | <para> |
130 | 5d6dd340 | Iustin Pop | Under Debian you can just install the drbd0.7-module-source |
131 | 5d6dd340 | Iustin Pop | and drbd0.7-utils packages, and your kernel source, and then |
132 | 5d6dd340 | Iustin Pop | run module-assistant to compile the drbd0.7 module. The |
133 | 5d6dd340 | Iustin Pop | following commands should do it: |
134 | 5d6dd340 | Iustin Pop | </para> |
135 | f1a808df | Guido Trotter | |
136 | 5d6dd340 | Iustin Pop | <screen> |
137 | f1a808df | Guido Trotter | m-a update |
138 | f1a808df | Guido Trotter | m-a a-i drbd0.7 |
139 | 5d6dd340 | Iustin Pop | </screen> |
140 | f1a808df | Guido Trotter | |
141 | 5d6dd340 | Iustin Pop | <para> |
142 | 5d6dd340 | Iustin Pop | The good news is that you don't need to configure DRBD at all. |
143 | 5d6dd340 | Iustin Pop | Ganeti will do it for you for every instance you set up. If |
144 | 5d6dd340 | Iustin Pop | you have the DRBD utils installed and the module in your |
145 | 5d6dd340 | Iustin Pop | kernel you're fine. Please check that your system is |
146 | 5d6dd340 | Iustin Pop | configured to load the module at every boot. |
147 | f1a808df | Guido Trotter | </para> |
148 | f1a808df | Guido Trotter | |
149 | f1a808df | Guido Trotter | </sect2> |
150 | f1a808df | Guido Trotter | |
151 | a7a19281 | Iustin Pop | <sect2> |
152 | a7a19281 | Iustin Pop | <title>Other required software</title> |
153 | a7a19281 | Iustin Pop | |
154 | a7a19281 | Iustin Pop | <para>Besides Xen and DRBD, you will need to install the |
155 | a7a19281 | Iustin Pop | following:</para> |
156 | a7a19281 | Iustin Pop | |
157 | a7a19281 | Iustin Pop | <itemizedlist> |
158 | a7a19281 | Iustin Pop | <listitem> |
159 | a7a19281 | Iustin Pop | <simpara><ulink url="http://sourceware.org/lvm2/">LVM |
160 | a7a19281 | Iustin Pop | version 2</ulink></simpara> |
161 | a7a19281 | Iustin Pop | </listitem> |
162 | a7a19281 | Iustin Pop | <listitem> |
163 | a7a19281 | Iustin Pop | <simpara><ulink |
164 | a7a19281 | Iustin Pop | url="http://www.openssl.org/">OpenSSL</ulink></simpara> |
165 | a7a19281 | Iustin Pop | </listitem> |
166 | a7a19281 | Iustin Pop | <listitem> |
167 | a7a19281 | Iustin Pop | <simpara><ulink |
168 | a7a19281 | Iustin Pop | url="http://www.openssh.com/portable.html">OpenSSH</ulink></simpara> |
169 | a7a19281 | Iustin Pop | </listitem> |
170 | a7a19281 | Iustin Pop | <listitem> |
171 | a7a19281 | Iustin Pop | <simpara><ulink url="http://bridge.sourceforge.net/">Bridge |
172 | a7a19281 | Iustin Pop | utilities</ulink></simpara> |
173 | a7a19281 | Iustin Pop | </listitem> |
174 | a7a19281 | Iustin Pop | <listitem> |
175 | a7a19281 | Iustin Pop | <simpara><ulink |
176 | a7a19281 | Iustin Pop | url="http://fping.sourceforge.net/">fping</ulink></simpara> |
177 | a7a19281 | Iustin Pop | </listitem> |
178 | a7a19281 | Iustin Pop | <listitem> |
179 | a7a19281 | Iustin Pop | <simpara><ulink |
180 | a7a19281 | Iustin Pop | url="http://developer.osdl.org/dev/iproute2">iproute2</ulink></simpara> |
181 | a7a19281 | Iustin Pop | </listitem> |
182 | a7a19281 | Iustin Pop | <listitem> |
183 | a7a19281 | Iustin Pop | <simpara><ulink |
184 | a7a19281 | Iustin Pop | url="ftp://ftp.inr.ac.ru/ip-routing/iputils-current.tar.gz">arping</ulink> |
185 | a7a19281 | Iustin Pop | (part of iputils package)</simpara> |
186 | a7a19281 | Iustin Pop | </listitem> |
187 | a7a19281 | Iustin Pop | <listitem> |
188 | a7a19281 | Iustin Pop | <simpara><ulink |
189 | a7a19281 | Iustin Pop | url="http://www.kernel.org/pub/linux/utils/raid/mdadm/">mdadm</ulink> |
190 | a7a19281 | Iustin Pop | (Linux Software Raid tools)</simpara> |
191 | a7a19281 | Iustin Pop | </listitem> |
192 | a7a19281 | Iustin Pop | <listitem> |
193 | a7a19281 | Iustin Pop | <simpara><ulink url="http://www.python.org">Python 2.4</ulink></simpara> |
194 | a7a19281 | Iustin Pop | </listitem> |
195 | a7a19281 | Iustin Pop | <listitem> |
196 | a7a19281 | Iustin Pop | <simpara><ulink url="http://twistedmatrix.com/">Python |
197 | a7a19281 | Iustin Pop | Twisted library</ulink> - the core library is |
198 | a7a19281 | Iustin Pop | enough</simpara> |
199 | a7a19281 | Iustin Pop | </listitem> |
200 | a7a19281 | Iustin Pop | <listitem> |
201 | a7a19281 | Iustin Pop | <simpara><ulink |
202 | a7a19281 | Iustin Pop | url="http://pyopenssl.sourceforge.net/">Python OpenSSL |
203 | a7a19281 | Iustin Pop | bindings</ulink></simpara> |
204 | a7a19281 | Iustin Pop | </listitem> |
205 | a7a19281 | Iustin Pop | </itemizedlist> |
206 | a7a19281 | Iustin Pop | |
207 | a7a19281 | Iustin Pop | <para>These programs are supplied as part of most Linux |
208 | a7a19281 | Iustin Pop | distributions, so usually they can be installed via apt or |
209 | a7a19281 | Iustin Pop | similar methods. Also many of them will already be installed on |
210 | a7a19281 | Iustin Pop | a standard machine. On Debian Etch you can use this command line |
211 | a7a19281 | Iustin Pop | to install all of them:</para> |
212 | a7a19281 | Iustin Pop | |
213 | a7a19281 | Iustin Pop | <screen> |
214 | a7a19281 | Iustin Pop | # apt-get install lvm2 ssh bridge-utils iproute iputils-arping \ |
215 | 5cd0d9c0 | Iustin Pop | fping python2.4 python-twisted-core python-pyopenssl openssl |
216 | a7a19281 | Iustin Pop | </screen> |
217 | 5cd0d9c0 | Iustin Pop | |
218 | 5cd0d9c0 | Iustin Pop | <para> |
219 | 5cd0d9c0 | Iustin Pop | When installing from source, you will also need the following: |
220 | 5cd0d9c0 | Iustin Pop | </para> |
221 | 5cd0d9c0 | Iustin Pop | <itemizedlist> |
222 | 5cd0d9c0 | Iustin Pop | <listitem> |
223 | 5cd0d9c0 | Iustin Pop | <simpara>make</simpara> |
224 | 5cd0d9c0 | Iustin Pop | </listitem> |
225 | 5cd0d9c0 | Iustin Pop | <listitem> |
226 | 5cd0d9c0 | Iustin Pop | <simpara>tar</simpara> |
227 | 5cd0d9c0 | Iustin Pop | </listitem> |
228 | 5cd0d9c0 | Iustin Pop | <listitem> |
229 | 5cd0d9c0 | Iustin Pop | <simpara>gzip or bzip2</simpara> |
230 | 5cd0d9c0 | Iustin Pop | </listitem> |
231 | 5cd0d9c0 | Iustin Pop | </itemizedlist> |
232 | 5cd0d9c0 | Iustin Pop | |
233 | 5cd0d9c0 | Iustin Pop | <para> |
234 | 5cd0d9c0 | Iustin Pop | Again, these are available in most if not all linux distributions. For Debian, do: |
235 | 5cd0d9c0 | Iustin Pop | <screen> |
236 | 5cd0d9c0 | Iustin Pop | # apt-get install make tar gzip bzip2 |
237 | 5cd0d9c0 | Iustin Pop | </screen> |
238 | 5cd0d9c0 | Iustin Pop | </para> |
239 | a7a19281 | Iustin Pop | </sect2> |
240 | a7a19281 | Iustin Pop | |
241 | f1a808df | Guido Trotter | </sect1> |
242 | f1a808df | Guido Trotter | |
243 | f1a808df | Guido Trotter | |
244 | f1a808df | Guido Trotter | <sect1> |
245 | f1a808df | Guido Trotter | <title>Setting up the environment for Ganeti</title> |
246 | f1a808df | Guido Trotter | |
247 | f1a808df | Guido Trotter | <sect2> |
248 | f1a808df | Guido Trotter | <title>Configuring the network</title> |
249 | f1a808df | Guido Trotter | |
250 | f1a808df | Guido Trotter | <para>Ganeti relies on Xen running in "bridge mode", which means the |
251 | f1a808df | Guido Trotter | instances network interfaces will be attached to a software bridge |
252 | f1a808df | Guido Trotter | running in dom0. Xen by default creates such a bridge at startup, but |
253 | f1a808df | Guido Trotter | your distribution might have a different way to do things. |
254 | f1a808df | Guido Trotter | </para> |
255 | f1a808df | Guido Trotter | |
256 | f1a808df | Guido Trotter | <para> |
257 | 5d6dd340 | Iustin Pop | In Debian, in order to enable the default Xen behaviour, you |
258 | 5d6dd340 | Iustin Pop | have to edit <filename>/etc/xen/xend-config.sxp</filename> and |
259 | 5d6dd340 | Iustin Pop | replace <computeroutput>(network-script |
260 | 5d6dd340 | Iustin Pop | network-dummy)</computeroutput> with |
261 | 5d6dd340 | Iustin Pop | <computeroutput>(network-script |
262 | 5d6dd340 | Iustin Pop | network-bridge)</computeroutput>. The recommended Debian way to |
263 | 5d6dd340 | Iustin Pop | configure things, though, is to edit your |
264 | 5d6dd340 | Iustin Pop | <filename>/etc/network/interfaces</filename> file and substitute |
265 | 5d6dd340 | Iustin Pop | your normal ethernet stanza with something like:</para> |
266 | 5d6dd340 | Iustin Pop | |
267 | 5d6dd340 | Iustin Pop | <screen> |
268 | f1a808df | Guido Trotter | auto br0 |
269 | f1a808df | Guido Trotter | iface br0 inet static |
270 | 5d6dd340 | Iustin Pop | address <replaceable>YOUR_IP_ADDRESS</replaceable> |
271 | 5d6dd340 | Iustin Pop | netmask <replaceable>YOUR_NETMASK</replaceable> |
272 | 5d6dd340 | Iustin Pop | network <replaceable>YOUR_NETWORK</replaceable> |
273 | 5d6dd340 | Iustin Pop | broadcast <replaceable>YOUR_BROADCAST_ADDRESS</replaceable> |
274 | 5d6dd340 | Iustin Pop | gateway <replaceable>YOUR_GATEWAY</replaceable> |
275 | 5d6dd340 | Iustin Pop | bridge_ports <replaceable>eth0</replaceable> |
276 | f1a808df | Guido Trotter | bridge_stp off |
277 | f1a808df | Guido Trotter | bridge_fd 0 |
278 | 5d6dd340 | Iustin Pop | </screen> |
279 | f1a808df | Guido Trotter | |
280 | f1a808df | Guido Trotter | <para> |
281 | 5d6dd340 | Iustin Pop | Beware that the default name Ganeti uses is |
282 | 5d6dd340 | Iustin Pop | <hardware>xen-br0</hardware> (which was used in Xen 2.0) |
283 | 5d6dd340 | Iustin Pop | while Xen 3.0 uses <hardware>xenbr0</hardware> by |
284 | 5d6dd340 | Iustin Pop | default. The default bridge your cluster will use for new |
285 | 5d6dd340 | Iustin Pop | instances can be specified at cluster initialization time. |
286 | f1a808df | Guido Trotter | </para> |
287 | f1a808df | Guido Trotter | |
288 | f1a808df | Guido Trotter | </sect2> |
289 | f1a808df | Guido Trotter | |
290 | f1a808df | Guido Trotter | <sect2> |
291 | f1a808df | Guido Trotter | <title>Configuring LVM</title> |
292 | f1a808df | Guido Trotter | |
293 | f1a808df | Guido Trotter | <para> |
294 | 5d6dd340 | Iustin Pop | If you haven't configured your LVM volume group at install |
295 | 5d6dd340 | Iustin Pop | time you need to do it before trying to initialize the Ganeti |
296 | 5d6dd340 | Iustin Pop | cluster. This is done by formatting the devices/partitions you |
297 | 5d6dd340 | Iustin Pop | want to use for it and then adding them to the relevant volume |
298 | 5d6dd340 | Iustin Pop | group: |
299 | 5d6dd340 | Iustin Pop | </para> |
300 | 5d6dd340 | Iustin Pop | |
301 | 5d6dd340 | Iustin Pop | <screen> |
302 | f1a808df | Guido Trotter | pvcreate /dev/sda4 |
303 | f1a808df | Guido Trotter | pvcreate /dev/sdb |
304 | f1a808df | Guido Trotter | pvcreate /dev/sdc1 |
305 | f1a808df | Guido Trotter | vgcreate xenvg /dev/sda4 /dev/sdb /dev/sdc1 |
306 | 5d6dd340 | Iustin Pop | </screen> |
307 | f1a808df | Guido Trotter | |
308 | f1a808df | Guido Trotter | <para> |
309 | 5d6dd340 | Iustin Pop | If you want to add a device later you can do so with the |
310 | 53b78ba4 | Guido Trotter | <citerefentry><refentrytitle>vgextend</refentrytitle> |
311 | 5d6dd340 | Iustin Pop | <manvolnum>8</manvolnum></citerefentry> command: |
312 | 5d6dd340 | Iustin Pop | </para> |
313 | 5d6dd340 | Iustin Pop | |
314 | 5d6dd340 | Iustin Pop | <screen> |
315 | f1a808df | Guido Trotter | pvcreate /dev/sdd |
316 | f1a808df | Guido Trotter | vgextend xenvg /dev/sdd |
317 | 5d6dd340 | Iustin Pop | </screen> |
318 | f1a808df | Guido Trotter | |
319 | f1a808df | Guido Trotter | <para> |
320 | f1a808df | Guido Trotter | As said before you may choose a different name for the volume group, |
321 | f1a808df | Guido Trotter | as long as you stick to the same name on all the nodes of a cluster. |
322 | f1a808df | Guido Trotter | </para> |
323 | f1a808df | Guido Trotter | </sect2> |
324 | f1a808df | Guido Trotter | |
325 | f1a808df | Guido Trotter | <sect2> |
326 | f1a808df | Guido Trotter | <title>Installing Ganeti</title> |
327 | f1a808df | Guido Trotter | |
328 | 1005b0c1 | Iustin Pop | <para> |
329 | 1005b0c1 | Iustin Pop | It's now time to install the Ganeti software itself. You can |
330 | 1005b0c1 | Iustin Pop | do it from source, with the usual steps (note that the |
331 | 1005b0c1 | Iustin Pop | <option>localstatedir</option> options must be set to |
332 | 1005b0c1 | Iustin Pop | <filename class="directory">/var</filename>): |
333 | 1005b0c1 | Iustin Pop | </para> |
334 | f1a808df | Guido Trotter | |
335 | 5d6dd340 | Iustin Pop | <screen> |
336 | 5d6dd340 | Iustin Pop | ./configure --localstatedir=/var |
337 | f1a808df | Guido Trotter | make |
338 | f1a808df | Guido Trotter | make install |
339 | 1005b0c1 | Iustin Pop | mkdir /srv/ganeti/ /srv/ganeti/os /srv/ganeti/export |
340 | 5d6dd340 | Iustin Pop | </screen> |
341 | f1a808df | Guido Trotter | |
342 | 1005b0c1 | Iustin Pop | <para> |
343 | 1005b0c1 | Iustin Pop | You also need to copy from the source archive the file |
344 | 1005b0c1 | Iustin Pop | <filename>docs/examples/ganeti.initd</filename> to |
345 | 1005b0c1 | Iustin Pop | <filename>/etc/init.d/ganeti</filename> and register it into |
346 | 1005b0c1 | Iustin Pop | your distribution's startup scripts, for example in Debian: |
347 | f1a808df | Guido Trotter | </para> |
348 | 1005b0c1 | Iustin Pop | <screen>update-rc.d ganeti defaults 20 80</screen> |
349 | f1a808df | Guido Trotter | |
350 | f1a808df | Guido Trotter | </sect2> |
351 | f1a808df | Guido Trotter | |
352 | f1a808df | Guido Trotter | <sect2> |
353 | f1a808df | Guido Trotter | <title>Installing the Operating System support packages</title> |
354 | f1a808df | Guido Trotter | |
355 | a7a19281 | Iustin Pop | <para> |
356 | a7a19281 | Iustin Pop | Another important component for Ganeti are the OS support |
357 | a7a19281 | Iustin Pop | packages, which let different operating systems be used as |
358 | a7a19281 | Iustin Pop | instances. You can grab a simple package that allows |
359 | a7a19281 | Iustin Pop | installing Debian Etch instances on the project web site |
360 | a7a19281 | Iustin Pop | (after download, untar it and follow the instructions in the |
361 | a7a19281 | Iustin Pop | <filename>README</filename> file). |
362 | a7a19281 | Iustin Pop | </para> |
363 | a7a19281 | Iustin Pop | |
364 | a7a19281 | Iustin Pop | <para> |
365 | a7a19281 | Iustin Pop | Alternatively, you can create your own OS definitions, see |
366 | a7a19281 | Iustin Pop | <citerefentry> |
367 | a7a19281 | Iustin Pop | <refentrytitle>ganeti-os-interface</refentrytitle> |
368 | a7a19281 | Iustin Pop | <manvolnum>8</manvolnum> |
369 | a7a19281 | Iustin Pop | </citerefentry>. |
370 | f1a808df | Guido Trotter | </para> |
371 | f1a808df | Guido Trotter | |
372 | f1a808df | Guido Trotter | </sect2> |
373 | f1a808df | Guido Trotter | |
374 | f1a808df | Guido Trotter | <sect2> |
375 | f1a808df | Guido Trotter | <title>Initializing the cluster</title> |
376 | f1a808df | Guido Trotter | |
377 | 5d6dd340 | Iustin Pop | <para><emphasis role="strong">Mandatory:</emphasis> only on one |
378 | 5d6dd340 | Iustin Pop | node per cluster.</para> |
379 | f1a808df | Guido Trotter | |
380 | f1a808df | Guido Trotter | |
381 | f1a808df | Guido Trotter | <para>The last step is to initialize the cluster. After you've repeated |
382 | f1a808df | Guido Trotter | the above process or some semi-automatic form of it on all of your |
383 | f1a808df | Guido Trotter | nodes choose one as the master, and execute: |
384 | 5d6dd340 | Iustin Pop | </para> |
385 | f1a808df | Guido Trotter | |
386 | 5d6dd340 | Iustin Pop | <screen> |
387 | 5d6dd340 | Iustin Pop | gnt-cluster init <replaceable>CLUSTERNAME</replaceable> |
388 | 5d6dd340 | Iustin Pop | </screen> |
389 | f1a808df | Guido Trotter | |
390 | 5d6dd340 | Iustin Pop | <para> |
391 | 1005b0c1 | Iustin Pop | If the node's network interface which will be used for access |
392 | 1005b0c1 | Iustin Pop | from outside the cluster is not named |
393 | 1005b0c1 | Iustin Pop | <hardware>xen-br0</hardware>, you need to use the |
394 | 1005b0c1 | Iustin Pop | <option>--master-netdev=<replaceable>IFNAME</replaceable></option> |
395 | 1005b0c1 | Iustin Pop | option, replacing <replaceable>IFNAME</replaceable> with the |
396 | 1005b0c1 | Iustin Pop | correct one for your case (e.g. <hardware>xenbr0</hardware>, |
397 | 1005b0c1 | Iustin Pop | <hardware>eth0</hardware>, etc.). Usually this will be the |
398 | 1005b0c1 | Iustin Pop | same as the default bridge name (see below). |
399 | 1005b0c1 | Iustin Pop | </para> |
400 | 1005b0c1 | Iustin Pop | |
401 | 1005b0c1 | Iustin Pop | <para> |
402 | 1005b0c1 | Iustin Pop | Other options you can pass to <command>gnt-cluster |
403 | 1005b0c1 | Iustin Pop | init</command> include the default bridge name |
404 | 1005b0c1 | Iustin Pop | (<option>-b</option>), the cluster-wide name for the volume |
405 | 1005b0c1 | Iustin Pop | group (<option>-g</option>) and the secondary ip address for |
406 | 1005b0c1 | Iustin Pop | the initial node should you wish to keep the data replication |
407 | 1005b0c1 | Iustin Pop | network separate. Invoke it with <option>--help</option> to |
408 | 1005b0c1 | Iustin Pop | see all the possibilities. |
409 | f1a808df | Guido Trotter | </para> |
410 | f1a808df | Guido Trotter | |
411 | 5d6dd340 | Iustin Pop | <para> |
412 | 5d6dd340 | Iustin Pop | Note that the cluster name must exist in DNS. You must choose |
413 | 5d6dd340 | Iustin Pop | a name different from any of the nodes names for a multi-node |
414 | 5d6dd340 | Iustin Pop | cluster. In general the best choice is to have a unique name |
415 | 1005b0c1 | Iustin Pop | for a cluster, even if it consists of only one machine, as you |
416 | 1005b0c1 | Iustin Pop | will be able to expand it later without any problem. |
417 | f1a808df | Guido Trotter | </para> |
418 | f1a808df | Guido Trotter | </sect2> |
419 | f1a808df | Guido Trotter | |
420 | f1a808df | Guido Trotter | <sect2> |
421 | f1a808df | Guido Trotter | <title>Joining the nodes to the cluster.</title> |
422 | f1a808df | Guido Trotter | |
423 | 5d6dd340 | Iustin Pop | <para> |
424 | 5d6dd340 | Iustin Pop | <emphasis role="strong">Mandatory:</emphasis> for all the |
425 | 5d6dd340 | Iustin Pop | other nodes. |
426 | f1a808df | Guido Trotter | </para> |
427 | f1a808df | Guido Trotter | |
428 | f1a808df | Guido Trotter | <para> |
429 | f1a808df | Guido Trotter | If you have already initialized your cluster you need to join the other |
430 | f1a808df | Guido Trotter | nodes to it. You can do so by executing the following command on the |
431 | f1a808df | Guido Trotter | master node: |
432 | 5d6dd340 | Iustin Pop | <screen> |
433 | 5d6dd340 | Iustin Pop | gnt-node add <replaceable>NODENAME</replaceable> |
434 | 5d6dd340 | Iustin Pop | </screen> |
435 | f1a808df | Guido Trotter | |
436 | 5d6dd340 | Iustin Pop | The only option is <option>-s</option>, which sets the node's |
437 | 5d6dd340 | Iustin Pop | secondary ip address for replication purposes, if you are |
438 | 5d6dd340 | Iustin Pop | using a separate replication network. |
439 | f1a808df | Guido Trotter | </para> |
440 | f1a808df | Guido Trotter | </sect2> |
441 | f1a808df | Guido Trotter | |
442 | f1a808df | Guido Trotter | </sect1> |
443 | f1a808df | Guido Trotter | |
444 | f1a808df | Guido Trotter | <sect1> |
445 | f1a808df | Guido Trotter | <title>This is it!</title> |
446 | f1a808df | Guido Trotter | |
447 | 5d6dd340 | Iustin Pop | <para> |
448 | 5d6dd340 | Iustin Pop | Now you can follow the admin guide to use your new Ganeti |
449 | 5d6dd340 | Iustin Pop | cluster. |
450 | f1a808df | Guido Trotter | </para> |
451 | f1a808df | Guido Trotter | |
452 | f1a808df | Guido Trotter | </sect1> |
453 | f1a808df | Guido Trotter | |
454 | f1a808df | Guido Trotter | |
455 | f1a808df | Guido Trotter | </article> |