Statistics
| Branch: | Tag: | Revision:

root / docs / installing.sgml @ 1005b0c1

History | View | Annotate | Download (14.2 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 f1a808df Guido Trotter
    <title>Ganeti node/cluster 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 a7a19281 Iustin Pop
> fping python2.4 python-twisted-core python-pyopenssl openssl
216 a7a19281 Iustin Pop
      </screen>
217 a7a19281 Iustin Pop
    </sect2>
218 a7a19281 Iustin Pop
219 f1a808df Guido Trotter
  </sect1>
220 f1a808df Guido Trotter
221 f1a808df Guido Trotter
222 f1a808df Guido Trotter
  <sect1>
223 f1a808df Guido Trotter
    <title>Setting up the environment for Ganeti</title>
224 f1a808df Guido Trotter
225 f1a808df Guido Trotter
    <sect2>
226 f1a808df Guido Trotter
      <title>Configuring the network</title>
227 f1a808df Guido Trotter
228 f1a808df Guido Trotter
      <para>Ganeti relies on Xen running in "bridge mode", which means the
229 f1a808df Guido Trotter
      instances network interfaces will be attached to a software bridge
230 f1a808df Guido Trotter
      running in dom0. Xen by default creates such a bridge at startup, but
231 f1a808df Guido Trotter
      your distribution might have a different way to do things.
232 f1a808df Guido Trotter
      </para>
233 f1a808df Guido Trotter
234 f1a808df Guido Trotter
      <para>
235 5d6dd340 Iustin Pop
      In Debian, in order to enable the default Xen behaviour, you
236 5d6dd340 Iustin Pop
      have to edit <filename>/etc/xen/xend-config.sxp</filename> and
237 5d6dd340 Iustin Pop
      replace <computeroutput>(network-script
238 5d6dd340 Iustin Pop
      network-dummy)</computeroutput> with
239 5d6dd340 Iustin Pop
      <computeroutput>(network-script
240 5d6dd340 Iustin Pop
      network-bridge)</computeroutput>. The recommended Debian way to
241 5d6dd340 Iustin Pop
      configure things, though, is to edit your
242 5d6dd340 Iustin Pop
      <filename>/etc/network/interfaces</filename> file and substitute
243 5d6dd340 Iustin Pop
      your normal ethernet stanza with something like:</para>
244 5d6dd340 Iustin Pop
245 5d6dd340 Iustin Pop
      <screen>
246 f1a808df Guido Trotter
auto br0
247 f1a808df Guido Trotter
iface br0 inet static
248 5d6dd340 Iustin Pop
        address <replaceable>YOUR_IP_ADDRESS</replaceable>
249 5d6dd340 Iustin Pop
        netmask <replaceable>YOUR_NETMASK</replaceable>
250 5d6dd340 Iustin Pop
        network <replaceable>YOUR_NETWORK</replaceable>
251 5d6dd340 Iustin Pop
        broadcast <replaceable>YOUR_BROADCAST_ADDRESS</replaceable>
252 5d6dd340 Iustin Pop
        gateway <replaceable>YOUR_GATEWAY</replaceable>
253 5d6dd340 Iustin Pop
        bridge_ports <replaceable>eth0</replaceable>
254 f1a808df Guido Trotter
        bridge_stp off
255 f1a808df Guido Trotter
        bridge_fd 0
256 5d6dd340 Iustin Pop
      </screen>
257 f1a808df Guido Trotter
258 f1a808df Guido Trotter
    <para>
259 5d6dd340 Iustin Pop
      Beware that the default name Ganeti uses is
260 5d6dd340 Iustin Pop
      <hardware>xen-br0</hardware> (which was used in Xen 2.0)
261 5d6dd340 Iustin Pop
      while Xen 3.0 uses <hardware>xenbr0</hardware> by
262 5d6dd340 Iustin Pop
      default. The default bridge your cluster will use for new
263 5d6dd340 Iustin Pop
      instances can be specified at cluster initialization time.
264 f1a808df Guido Trotter
    </para>
265 f1a808df Guido Trotter
266 f1a808df Guido Trotter
    </sect2>
267 f1a808df Guido Trotter
268 f1a808df Guido Trotter
    <sect2>
269 f1a808df Guido Trotter
      <title>Configuring LVM</title>
270 f1a808df Guido Trotter
271 f1a808df Guido Trotter
      <para>
272 5d6dd340 Iustin Pop
        If you haven't configured your LVM volume group at install
273 5d6dd340 Iustin Pop
        time you need to do it before trying to initialize the Ganeti
274 5d6dd340 Iustin Pop
        cluster. This is done by formatting the devices/partitions you
275 5d6dd340 Iustin Pop
        want to use for it and then adding them to the relevant volume
276 5d6dd340 Iustin Pop
        group:
277 5d6dd340 Iustin Pop
       </para>
278 5d6dd340 Iustin Pop
279 5d6dd340 Iustin Pop
       <screen>
280 f1a808df Guido Trotter
pvcreate /dev/sda4
281 f1a808df Guido Trotter
pvcreate /dev/sdb
282 f1a808df Guido Trotter
pvcreate /dev/sdc1
283 f1a808df Guido Trotter
vgcreate xenvg /dev/sda4 /dev/sdb /dev/sdc1
284 5d6dd340 Iustin Pop
       </screen>
285 f1a808df Guido Trotter
286 f1a808df Guido Trotter
      <para>
287 5d6dd340 Iustin Pop
	If you want to add a device later you can do so with the
288 53b78ba4 Guido Trotter
	<citerefentry><refentrytitle>vgextend</refentrytitle>
289 5d6dd340 Iustin Pop
	<manvolnum>8</manvolnum></citerefentry> command:
290 5d6dd340 Iustin Pop
      </para>
291 5d6dd340 Iustin Pop
292 5d6dd340 Iustin Pop
      <screen>
293 f1a808df Guido Trotter
pvcreate /dev/sdd
294 f1a808df Guido Trotter
vgextend xenvg /dev/sdd
295 5d6dd340 Iustin Pop
      </screen>
296 f1a808df Guido Trotter
297 f1a808df Guido Trotter
      <para>
298 f1a808df Guido Trotter
        As said before you may choose a different name for the volume group,
299 f1a808df Guido Trotter
        as long as you stick to the same name on all the nodes of a cluster.
300 f1a808df Guido Trotter
      </para>
301 f1a808df Guido Trotter
    </sect2>
302 f1a808df Guido Trotter
303 f1a808df Guido Trotter
    <sect2>
304 f1a808df Guido Trotter
      <title>Installing Ganeti</title>
305 f1a808df Guido Trotter
306 1005b0c1 Iustin Pop
      <para>
307 1005b0c1 Iustin Pop
        It's now time to install the Ganeti software itself. You can
308 1005b0c1 Iustin Pop
        do it from source, with the usual steps (note that the
309 1005b0c1 Iustin Pop
        <option>localstatedir</option> options must be set to
310 1005b0c1 Iustin Pop
        <filename class="directory">/var</filename>):
311 1005b0c1 Iustin Pop
      </para>
312 f1a808df Guido Trotter
313 5d6dd340 Iustin Pop
        <screen>
314 5d6dd340 Iustin Pop
./configure --localstatedir=/var
315 f1a808df Guido Trotter
make
316 f1a808df Guido Trotter
make install
317 1005b0c1 Iustin Pop
mkdir /srv/ganeti/ /srv/ganeti/os /srv/ganeti/export
318 5d6dd340 Iustin Pop
        </screen>
319 f1a808df Guido Trotter
320 1005b0c1 Iustin Pop
      <para>
321 1005b0c1 Iustin Pop
        You also need to copy from the source archive the file
322 1005b0c1 Iustin Pop
        <filename>docs/examples/ganeti.initd</filename> to
323 1005b0c1 Iustin Pop
        <filename>/etc/init.d/ganeti</filename> and register it into
324 1005b0c1 Iustin Pop
        your distribution's startup scripts, for example in Debian:
325 f1a808df Guido Trotter
      </para>
326 1005b0c1 Iustin Pop
      <screen>update-rc.d ganeti defaults 20 80</screen>
327 f1a808df Guido Trotter
328 f1a808df Guido Trotter
    </sect2>
329 f1a808df Guido Trotter
330 f1a808df Guido Trotter
    <sect2>
331 f1a808df Guido Trotter
      <title>Installing the Operating System support packages</title>
332 f1a808df Guido Trotter
333 a7a19281 Iustin Pop
      <para>
334 a7a19281 Iustin Pop
        Another important component for Ganeti are the OS support
335 a7a19281 Iustin Pop
        packages, which let different operating systems be used as
336 a7a19281 Iustin Pop
        instances. You can grab a simple package that allows
337 a7a19281 Iustin Pop
        installing Debian Etch instances on the project web site
338 a7a19281 Iustin Pop
        (after download, untar it and follow the instructions in the
339 a7a19281 Iustin Pop
        <filename>README</filename> file).
340 a7a19281 Iustin Pop
      </para>
341 a7a19281 Iustin Pop
342 a7a19281 Iustin Pop
      <para>
343 a7a19281 Iustin Pop
        Alternatively, you can create your own OS definitions, see
344 a7a19281 Iustin Pop
        <citerefentry>
345 a7a19281 Iustin Pop
        <refentrytitle>ganeti-os-interface</refentrytitle>
346 a7a19281 Iustin Pop
        <manvolnum>8</manvolnum>
347 a7a19281 Iustin Pop
        </citerefentry>.
348 f1a808df Guido Trotter
      </para>
349 f1a808df Guido Trotter
350 f1a808df Guido Trotter
    </sect2>
351 f1a808df Guido Trotter
352 f1a808df Guido Trotter
    <sect2>
353 f1a808df Guido Trotter
      <title>Initializing the cluster</title>
354 f1a808df Guido Trotter
355 5d6dd340 Iustin Pop
      <para><emphasis role="strong">Mandatory:</emphasis> only on one
356 5d6dd340 Iustin Pop
      node per cluster.</para>
357 f1a808df Guido Trotter
358 f1a808df Guido Trotter
359 f1a808df Guido Trotter
      <para>The last step is to initialize the cluster. After you've repeated
360 f1a808df Guido Trotter
        the above process or some semi-automatic form of it on all of your
361 f1a808df Guido Trotter
        nodes choose one as the master, and execute:
362 5d6dd340 Iustin Pop
      </para>
363 f1a808df Guido Trotter
364 5d6dd340 Iustin Pop
      <screen>
365 5d6dd340 Iustin Pop
gnt-cluster init <replaceable>CLUSTERNAME</replaceable>
366 5d6dd340 Iustin Pop
      </screen>
367 f1a808df Guido Trotter
368 5d6dd340 Iustin Pop
      <para>
369 1005b0c1 Iustin Pop
        If the node's network interface which will be used for access
370 1005b0c1 Iustin Pop
        from outside the cluster is not named
371 1005b0c1 Iustin Pop
        <hardware>xen-br0</hardware>, you need to use the
372 1005b0c1 Iustin Pop
        <option>--master-netdev=<replaceable>IFNAME</replaceable></option>
373 1005b0c1 Iustin Pop
        option, replacing <replaceable>IFNAME</replaceable> with the
374 1005b0c1 Iustin Pop
        correct one for your case (e.g. <hardware>xenbr0</hardware>,
375 1005b0c1 Iustin Pop
        <hardware>eth0</hardware>, etc.). Usually this will be the
376 1005b0c1 Iustin Pop
        same as the default bridge name (see below).
377 1005b0c1 Iustin Pop
      </para>
378 1005b0c1 Iustin Pop
379 1005b0c1 Iustin Pop
      <para>
380 1005b0c1 Iustin Pop
        Other options you can pass to <command>gnt-cluster
381 1005b0c1 Iustin Pop
        init</command> include the default bridge name
382 1005b0c1 Iustin Pop
        (<option>-b</option>), the cluster-wide name for the volume
383 1005b0c1 Iustin Pop
        group (<option>-g</option>) and the secondary ip address for
384 1005b0c1 Iustin Pop
        the initial node should you wish to keep the data replication
385 1005b0c1 Iustin Pop
        network separate. Invoke it with <option>--help</option> to
386 1005b0c1 Iustin Pop
        see all the possibilities.
387 f1a808df Guido Trotter
      </para>
388 f1a808df Guido Trotter
389 5d6dd340 Iustin Pop
      <para>
390 5d6dd340 Iustin Pop
        Note that the cluster name must exist in DNS. You must choose
391 5d6dd340 Iustin Pop
        a name different from any of the nodes names for a multi-node
392 5d6dd340 Iustin Pop
        cluster. In general the best choice is to have a unique name
393 1005b0c1 Iustin Pop
        for a cluster, even if it consists of only one machine, as you
394 1005b0c1 Iustin Pop
        will be able to expand it later without any problem.
395 f1a808df Guido Trotter
      </para>
396 f1a808df Guido Trotter
    </sect2>
397 f1a808df Guido Trotter
398 f1a808df Guido Trotter
    <sect2>
399 f1a808df Guido Trotter
      <title>Joining the nodes to the cluster.</title>
400 f1a808df Guido Trotter
401 5d6dd340 Iustin Pop
      <para>
402 5d6dd340 Iustin Pop
        <emphasis role="strong">Mandatory:</emphasis> for all the
403 5d6dd340 Iustin Pop
        other nodes.
404 f1a808df Guido Trotter
      </para>
405 f1a808df Guido Trotter
406 f1a808df Guido Trotter
      <para>
407 f1a808df Guido Trotter
        If you have already initialized your cluster you need to join the other
408 f1a808df Guido Trotter
        nodes to it. You can do so by executing the following command on the
409 f1a808df Guido Trotter
        master node:
410 5d6dd340 Iustin Pop
        <screen>
411 5d6dd340 Iustin Pop
gnt-node add <replaceable>NODENAME</replaceable>
412 5d6dd340 Iustin Pop
        </screen>
413 f1a808df Guido Trotter
414 5d6dd340 Iustin Pop
        The only option is <option>-s</option>, which sets the node's
415 5d6dd340 Iustin Pop
        secondary ip address for replication purposes, if you are
416 5d6dd340 Iustin Pop
        using a separate replication network.
417 f1a808df Guido Trotter
      </para>
418 f1a808df Guido Trotter
    </sect2>
419 f1a808df Guido Trotter
420 f1a808df Guido Trotter
  </sect1>
421 f1a808df Guido Trotter
422 f1a808df Guido Trotter
  <sect1>
423 f1a808df Guido Trotter
    <title>This is it!</title>
424 f1a808df Guido Trotter
425 5d6dd340 Iustin Pop
    <para>
426 5d6dd340 Iustin Pop
      Now you can follow the admin guide to use your new Ganeti
427 5d6dd340 Iustin Pop
      cluster.
428 f1a808df Guido Trotter
    </para>
429 f1a808df Guido Trotter
430 f1a808df Guido Trotter
  </sect1>
431 f1a808df Guido Trotter
432 f1a808df Guido Trotter
433 f1a808df Guido Trotter
  </article>