Statistics
| Branch: | Tag: | Revision:

root / INSTALL @ af8492ff

History | View | Annotate | Download (11.3 kB)

1 c27ba1cc Michael Hanselmann
Ganeti quick installation guide
2 c27ba1cc Michael Hanselmann
===============================
3 4096472d Iustin Pop
4 c27ba1cc Michael Hanselmann
Please note that a more detailed installation procedure is described in
5 3913eaa7 Thomas Thrainer
the :doc:`install`. Refer to it if you are setting up Ganeti the first time.
6 3913eaa7 Thomas Thrainer
This quick installation guide is mainly meant as reference for experienced
7 3913eaa7 Thomas Thrainer
users. A glossary of terms can be found in the :doc:`glossary`.
8 4096472d Iustin Pop
9 4096472d Iustin Pop
10 bd785ecd Michael Hanselmann
Software Requirements
11 c27ba1cc Michael Hanselmann
---------------------
12 a8083063 Iustin Pop
13 727ee1ec Iustin Pop
.. highlight:: shell-example
14 727ee1ec Iustin Pop
15 a8083063 Iustin Pop
Before installing, please verify that you have the following programs:
16 c27ba1cc Michael Hanselmann
17 c4b2b2e2 Guido Trotter
- `Xen Hypervisor <http://www.xen.org/>`_, version 3.0 or above, if
18 c4b2b2e2 Guido Trotter
  running on Xen
19 c4b2b2e2 Guido Trotter
- `KVM Hypervisor <http://www.linux-kvm.org>`_, version 72 or above, if
20 c4b2b2e2 Guido Trotter
  running on KVM. In order to use advanced features, such as live
21 c4b2b2e2 Guido Trotter
  migration, virtio, etc, an even newer version is recommended (qemu-kvm
22 727ee1ec Iustin Pop
  versions 0.11.X and above have shown good behavior).
23 c27ba1cc Michael Hanselmann
- `DRBD <http://www.drbd.org/>`_, kernel module and userspace utils,
24 727ee1ec Iustin Pop
  version 8.0.7 or above; note that Ganeti doesn't yet support version 8.4
25 727ee1ec Iustin Pop
- `RBD <http://ceph.newdream.net/>`_, kernel modules
26 727ee1ec Iustin Pop
  (``rbd.ko``/``libceph.ko``) and userspace utils (``ceph-common``)
27 c27ba1cc Michael Hanselmann
- `LVM2 <http://sourceware.org/lvm2/>`_
28 c27ba1cc Michael Hanselmann
- `OpenSSH <http://www.openssh.com/portable.html>`_
29 c27ba1cc Michael Hanselmann
- `bridge utilities <http://www.linuxfoundation.org/en/Net:Bridge>`_
30 c27ba1cc Michael Hanselmann
- `iproute2 <http://www.linuxfoundation.org/en/Net:Iproute2>`_
31 c27ba1cc Michael Hanselmann
- `arping <http://www.skbuff.net/iputils/>`_ (part of iputils)
32 69affe73 Manuel Franceschini
- `ndisc6 <http://www.remlab.net/ndisc6/>`_ (if using IPv6)
33 777ea2c6 Guido Trotter
- `Python <http://www.python.org/>`_, version 2.6 or above, not 3.0
34 c27ba1cc Michael Hanselmann
- `Python OpenSSL bindings <http://pyopenssl.sourceforge.net/>`_
35 c27ba1cc Michael Hanselmann
- `simplejson Python module <http://code.google.com/p/simplejson/>`_
36 7578ab0a Michael Hanselmann
- `pyparsing Python module <http://pyparsing.wikispaces.com/>`_, version
37 7578ab0a Michael Hanselmann
  1.4.6 or above
38 be505f2c Michael Hanselmann
- `pyinotify Python module <https://github.com/seb-m/pyinotify>`_
39 2a7c3583 Michael Hanselmann
- `PycURL Python module <http://pycurl.sourceforge.net/>`_
40 e90739d6 Michael Hanselmann
- `socat <http://www.dest-unreach.org/socat/>`_, see :ref:`note
41 e90739d6 Michael Hanselmann
  <socat-note>` below
42 78062de9 Michael Hanselmann
- `Paramiko <http://www.lag.net/paramiko/>`_, if you want to use
43 78062de9 Michael Hanselmann
  ``ganeti-listrunner``
44 0cd2fe76 Tsachy Shacham
- `affinity Python module <http://pypi.python.org/pypi/affinity/0.1.0>`_,
45 0cd2fe76 Tsachy Shacham
  optional python package for supporting CPU pinning under KVM
46 727ee1ec Iustin Pop
- `qemu-img <http://qemu.org/>`_, if you want to use ``ovfconverter``
47 d9eefcfa Andrea Spadaccini
- `fping <http://fping.sourceforge.net/>`_
48 0a09b080 Michael Hanselmann
- `Python IP address manipulation library
49 0a09b080 Michael Hanselmann
  <http://code.google.com/p/ipaddr-py/>`_
50 0a09b080 Michael Hanselmann
- `Bitarray Python library <http://pypi.python.org/pypi/bitarray/>`_
51 bae473ed Michele Tartara
- `GNU Make <http://www.gnu.org/software/make/>`_
52 bd341bff Thomas Thrainer
- `GNU M4 <http://www.gnu.org/software/m4/>`_
53 c27ba1cc Michael Hanselmann
54 c27ba1cc Michael Hanselmann
These programs are supplied as part of most Linux distributions, so
55 c27ba1cc Michael Hanselmann
usually they can be installed via the standard package manager. Also
56 c27ba1cc Michael Hanselmann
many of them will already be installed on a standard machine. On
57 c27ba1cc Michael Hanselmann
Debian/Ubuntu, you can use this command line to install all required
58 7ed400f0 Stratos Psomadakis
packages, except for RBD, DRBD and Xen::
59 c27ba1cc Michael Hanselmann
60 bd341bff Thomas Thrainer
  $ apt-get install lvm2 ssh bridge-utils iproute iputils-arping make m4 \
61 bbc50106 Klaus Aehlig
                    ndisc6 python python-openssl openssl \
62 db0e97f0 Guido Trotter
                    python-pyparsing python-simplejson python-bitarray \
63 db0e97f0 Guido Trotter
                    python-pyinotify python-pycurl python-ipaddr socat fping
64 db0e97f0 Guido Trotter
65 bbc50106 Klaus Aehlig
For older distributions (eg. Debian  Squeeze) the package names are
66 bbc50106 Klaus Aehlig
different.::
67 db0e97f0 Guido Trotter
68 bae473ed Michele Tartara
  $ apt-get install lvm2 ssh bridge-utils iproute iputils-arping make \
69 bbc50106 Klaus Aehlig
                    ndisc6 python python-pyopenssl openssl \
70 db0e97f0 Guido Trotter
                    python-pyparsing python-simplejson python-bitarray \
71 db0e97f0 Guido Trotter
                    python-pyinotify python-pycurl python-ipaddr socat fping
72 fc6075dd Agata Murawska
73 bbc50106 Klaus Aehlig
If bitarray is missing it can be installed from easy-install::
74 bbc50106 Klaus Aehlig
75 bbc50106 Klaus Aehlig
  $ easy_install bitarray
76 bbc50106 Klaus Aehlig
77 fc6075dd Agata Murawska
Note that this does not install optional packages::
78 fc6075dd Agata Murawska
79 bd341bff Thomas Thrainer
  $ apt-get install python-paramiko python-affinity qemu-utils
80 fc6075dd Agata Murawska
81 fc6075dd Agata Murawska
If some of the python packages are not available in your system,
82 fc6075dd Agata Murawska
you can try installing them using ``easy_install`` command.
83 fc6075dd Agata Murawska
For example::
84 fc6075dd Agata Murawska
85 958a800a Michele Tartara
  $ apt-get install python-setuptools python-dev
86 bd341bff Thomas Thrainer
  $ cd / && easy_install \
87 8d53117b Michele Tartara
            affinity \
88 8d53117b Michele Tartara
            bitarray \
89 0f4d34a8 Michele Tartara
            ipaddr
90 fc6075dd Agata Murawska
91 c27ba1cc Michael Hanselmann
92 aa9f166a René Nussbaumer
On Fedora to install all required packages except RBD, DRBD and Xen::
93 aa9f166a René Nussbaumer
94 bae473ed Michele Tartara
  $ yum install openssh openssh-clients bridge-utils iproute ndisc6 make \
95 aa9f166a René Nussbaumer
                pyOpenSSL pyparsing python-simplejson python-inotify \
96 8d53117b Michele Tartara
                python-lxm socat fping python-bitarray python-ipaddr
97 fc6075dd Agata Murawska
98 fc6075dd Agata Murawska
For optional packages use the command::
99 aa9f166a René Nussbaumer
100 fc6075dd Agata Murawska
  $ yum install python-paramiko python-affinity qemu-img
101 aa9f166a René Nussbaumer
102 727ee1ec Iustin Pop
If you want to build from source, please see doc/devnotes.rst for more
103 727ee1ec Iustin Pop
dependencies.
104 727ee1ec Iustin Pop
105 727ee1ec Iustin Pop
.. _socat-note:
106 727ee1ec Iustin Pop
.. note::
107 727ee1ec Iustin Pop
  Ganeti's import/export functionality uses ``socat`` with OpenSSL for
108 727ee1ec Iustin Pop
  transferring data between nodes. By default, OpenSSL 0.9.8 and above
109 727ee1ec Iustin Pop
  employ transparent compression of all data using zlib if supported by
110 727ee1ec Iustin Pop
  both sides of a connection. In cases where a lot of data is
111 727ee1ec Iustin Pop
  transferred, this can lead to an increased CPU usage. Additionally,
112 727ee1ec Iustin Pop
  Ganeti already compresses all data using ``gzip`` where it makes sense
113 727ee1ec Iustin Pop
  (for inter-cluster instance moves).
114 727ee1ec Iustin Pop
115 727ee1ec Iustin Pop
  To remedey this situation, patches implementing a new ``socat`` option
116 727ee1ec Iustin Pop
  for disabling OpenSSL compression have been contributed and will
117 727ee1ec Iustin Pop
  likely be included in the next feature release. Until then, users or
118 727ee1ec Iustin Pop
  distributions need to apply the patches on their own.
119 727ee1ec Iustin Pop
120 727ee1ec Iustin Pop
  Ganeti will use the option if it's detected by the ``configure``
121 2ed0e208 Iustin Pop
  script; auto-detection can be disabled by explicitly passing
122 727ee1ec Iustin Pop
  ``--enable-socat-compress`` (use the option to disable compression) or
123 727ee1ec Iustin Pop
  ``--disable-socat-compress`` (don't use the option).
124 727ee1ec Iustin Pop
125 727ee1ec Iustin Pop
  The patches and more information can be found on
126 727ee1ec Iustin Pop
  http://www.dest-unreach.org/socat/contrib/socat-opensslcompress.html.
127 727ee1ec Iustin Pop
128 727ee1ec Iustin Pop
Haskell requirements
129 727ee1ec Iustin Pop
~~~~~~~~~~~~~~~~~~~~
130 727ee1ec Iustin Pop
131 21a5e56c Iustin Pop
Starting with Ganeti 2.7, the Haskell GHC compiler and a few base
132 21a5e56c Iustin Pop
libraries are required in order to build Ganeti (but not to run and
133 21a5e56c Iustin Pop
deploy Ganeti on production machines). More specifically:
134 77a180f6 Iustin Pop
135 7345b69b Iustin Pop
- `GHC <http://www.haskell.org/ghc/>`_ version 6.12 or higher
136 77a180f6 Iustin Pop
- or even better, `The Haskell Platform
137 77a180f6 Iustin Pop
  <http://hackage.haskell.org/platform/>`_ which gives you a simple way
138 77a180f6 Iustin Pop
  to bootstrap Haskell
139 77a180f6 Iustin Pop
- `json <http://hackage.haskell.org/package/json>`_, a JSON library
140 77a180f6 Iustin Pop
- `network <http://hackage.haskell.org/package/network>`_, a basic
141 77a180f6 Iustin Pop
  network library
142 ee041788 Iustin Pop
- `parallel <http://hackage.haskell.org/package/parallel>`_, a parallel
143 ee041788 Iustin Pop
  programming library (note: tested with up to version 3.x)
144 e821050d Iustin Pop
- `bytestring <http://hackage.haskell.org/package/bytestring>`_ and
145 e821050d Iustin Pop
  `utf8-string <http://hackage.haskell.org/package/utf8-string>`_
146 e821050d Iustin Pop
  libraries; these usually come with the GHC compiler
147 5a5a64c6 Petr Pudlak
- `text <http://hackage.haskell.org/package/text>`_
148 21a5e56c Iustin Pop
- `deepseq <http://hackage.haskell.org/package/deepseq>`_
149 1ca709c1 Iustin Pop
- `curl <http://hackage.haskell.org/package/curl>`_, tested with
150 1ca709c1 Iustin Pop
  versions 1.3.4 and above
151 f7b9f4c1 Klaus Aehlig
- `hslogger <http://software.complete.org/hslogger>`_, version 1.1 and
152 f7b9f4c1 Klaus Aehlig
  above (note that Debian Squeeze only has version 1.0.9)
153 5a5a64c6 Petr Pudlak
- `hinotify <http://hackage.haskell.org/package/hinotify>`_, tested with
154 5a5a64c6 Petr Pudlak
  version 0.3.2
155 5a5a64c6 Petr Pudlak
- `Crypto <http://hackage.haskell.org/package/Crypto>`_, tested with
156 5a5a64c6 Petr Pudlak
  version 4.2.4
157 5a5a64c6 Petr Pudlak
- `regex-pcre <http://hackage.haskell.org/package/regex-pcre>`_,
158 5a5a64c6 Petr Pudlak
  bindings for the ``pcre`` library
159 5a5a64c6 Petr Pudlak
- `attoparsec <http://hackage.haskell.org/package/attoparsec>`_
160 5a5a64c6 Petr Pudlak
- `vector <http://hackage.haskell.org/package/vector>`_
161 5a5a64c6 Petr Pudlak
- `process <http://hackage.haskell.org/package/process>`_, version 1.0.1.1 and
162 5a5a64c6 Petr Pudlak
  above
163 e1b9b5c6 Petr Pudlak
- `lifted-base <http://hackage.haskell.org/package/lifted-base>`_,
164 e1b9b5c6 Petr Pudlak
  version 0.1.1 and above.
165 77a180f6 Iustin Pop
166 8a65c02b Iustin Pop
Some of these are also available as package in Debian/Ubuntu::
167 77a180f6 Iustin Pop
168 21a5e56c Iustin Pop
  $ apt-get install ghc libghc-json-dev libghc-network-dev \
169 1ca709c1 Iustin Pop
                    libghc-parallel-dev libghc-deepseq-dev \
170 f7b9f4c1 Klaus Aehlig
                    libghc-utf8-string-dev libghc-curl-dev \
171 5a5a64c6 Petr Pudlak
                    libghc-hslogger-dev \
172 5a5a64c6 Petr Pudlak
                    libghc-crypto-dev libghc-text-dev \
173 5a5a64c6 Petr Pudlak
                    libghc-hinotify-dev libghc-regex-pcre-dev \
174 5a5a64c6 Petr Pudlak
                    libpcre3-dev \
175 5a5a64c6 Petr Pudlak
                    libghc-attoparsec-dev libghc-vector-dev
176 aa9f166a René Nussbaumer
177 bbc50106 Klaus Aehlig
Or in older versions of these distributions (using GHC 6.x)::
178 bbc50106 Klaus Aehlig
179 bbc50106 Klaus Aehlig
  $ apt-get install ghc6 libghc6-json-dev libghc6-network-dev \
180 bbc50106 Klaus Aehlig
                    libghc6-parallel-dev libghc6-deepseq-dev \
181 bbc50106 Klaus Aehlig
                    libghc6-curl-dev
182 bbc50106 Klaus Aehlig
183 1ca709c1 Iustin Pop
In Fedora, some of them are available via packages as well::
184 ee041788 Iustin Pop
185 21a5e56c Iustin Pop
  $ yum install ghc ghc-json-devel ghc-network-devel \
186 5a5a64c6 Petr Pudlak
                    ghc-parallel-devel ghc-deepseq-devel \
187 5a5a64c6 Petr Pudlak
                    ghc-hslogger-devel ghc-text-devel \
188 5a5a64c6 Petr Pudlak
                    ghc-regex-pcre-devel
189 ee041788 Iustin Pop
190 5a5a64c6 Petr Pudlak
The most recent Fedora doesn't provide ``crypto``, ``inotify``. So these
191 5a5a64c6 Petr Pudlak
need to be installed using ``cabal``.
192 5a5a64c6 Petr Pudlak
193 5a5a64c6 Petr Pudlak
If using a distribution which does not provide these libraries, first
194 5a5a64c6 Petr Pudlak
install the Haskell platform. You can also install ``cabal`` manually::
195 fc6075dd Agata Murawska
196 fc6075dd Agata Murawska
  $ apt-get install cabal-install
197 09bf829d Michele Tartara
  $ cabal update
198 fc6075dd Agata Murawska
199 5a5a64c6 Petr Pudlak
Then install the additional native libraries::
200 5a5a64c6 Petr Pudlak
201 5a5a64c6 Petr Pudlak
  $ apt-get install libpcre3-dev libcurl4-openssl-dev
202 5a5a64c6 Petr Pudlak
203 5a5a64c6 Petr Pudlak
And finally the libraries required for building the packages (only the
204 5a5a64c6 Petr Pudlak
ones not available in your distribution packages) via ``cabal``::
205 727ee1ec Iustin Pop
206 5a5a64c6 Petr Pudlak
  $ cabal install json network parallel utf8-string curl hslogger \
207 5a5a64c6 Petr Pudlak
                  Crypto text hinotify==0.3.2 regex-pcre \
208 5a5a64c6 Petr Pudlak
                  attoparsec vector
209 5cd0d9c0 Iustin Pop
210 21a5e56c Iustin Pop
Haskell optional features
211 21a5e56c Iustin Pop
~~~~~~~~~~~~~~~~~~~~~~~~~
212 21a5e56c Iustin Pop
213 21a5e56c Iustin Pop
Optionally, more functionality can be enabled if your build machine has
214 5a5a64c6 Petr Pudlak
a few more Haskell libraries enabled: the ``ganeti-confd`` daemon
215 5a5a64c6 Petr Pudlak
(``--enable-confd``) and the monitoring daemon (``--enable-mond``).
216 5a5a64c6 Petr Pudlak
The extra dependency for these is:
217 21a5e56c Iustin Pop
218 2fa8f963 Michele Tartara
- `snap-server` <http://hackage.haskell.org/package/snap-server>`_, version
219 2fa8f963 Michele Tartara
  0.8.1 and above.
220 e90739d6 Michael Hanselmann
221 5a5a64c6 Petr Pudlak
This library is available in Debian Wheezy (but not in Squeeze), so you
222 25f8d59c Michele Tartara
can use either apt::
223 e90739d6 Michael Hanselmann
224 5a5a64c6 Petr Pudlak
  $ apt-get install libghc-snap-server-dev
225 e90739d6 Michael Hanselmann
226 5a5a64c6 Petr Pudlak
or ``cabal``::
227 727ee1ec Iustin Pop
228 5a5a64c6 Petr Pudlak
  $ cabal install snap-server
229 e90739d6 Michael Hanselmann
230 5a5a64c6 Petr Pudlak
to install it.
231 bd785ecd Michael Hanselmann
232 2fa8f963 Michele Tartara
In case you still use ghc-6.12, note that ``cabal`` would automatically try to
233 2fa8f963 Michele Tartara
install newer versions of some of the libraries snap-server depends on, that
234 2fa8f963 Michele Tartara
cannot be compiled with ghc-6.12, so you have to install snap-server on its
235 bd341bff Thomas Thrainer
own, explicitly forcing the installation of compatible versions::
236 2fa8f963 Michele Tartara
237 2fa8f963 Michele Tartara
  $ cabal install MonadCatchIO-transformers==0.2.2.0 mtl==2.0.1.0 \
238 2fa8f963 Michele Tartara
                  hashable==1.1.2.0 case-insensitive==0.3 parsec==3.0.1 \
239 2fa8f963 Michele Tartara
                  network==2.3 snap-server==0.8.1
240 2fa8f963 Michele Tartara
241 fc6075dd Agata Murawska
.. _cabal-note:
242 fc6075dd Agata Murawska
.. note::
243 fc6075dd Agata Murawska
  If one of the cabal packages fails to install due to unfulfilled
244 fc6075dd Agata Murawska
  dependencies, you can try enabling symlinks in ``~/.cabal/config``.
245 fc6075dd Agata Murawska
246 fc6075dd Agata Murawska
  Make sure that your ``~/.cabal/bin`` directory (or whatever else
247 fc6075dd Agata Murawska
  is defined as ``bindir``) is in your ``PATH``.
248 fc6075dd Agata Murawska
249 bd785ecd Michael Hanselmann
Installation of the software
250 c27ba1cc Michael Hanselmann
----------------------------
251 c27ba1cc Michael Hanselmann
252 c27ba1cc Michael Hanselmann
To install, simply run the following command::
253 a8083063 Iustin Pop
254 727ee1ec Iustin Pop
  $ ./configure --localstatedir=/var --sysconfdir=/etc && \
255 727ee1ec Iustin Pop
    make && \
256 727ee1ec Iustin Pop
    make install
257 a8083063 Iustin Pop
258 c27ba1cc Michael Hanselmann
This will install the software under ``/usr/local``. You then need to
259 c27ba1cc Michael Hanselmann
copy ``doc/examples/ganeti.initd`` to ``/etc/init.d/ganeti`` and
260 c27ba1cc Michael Hanselmann
integrate it into your boot sequence (``chkconfig``, ``update-rc.d``,
261 4dbc4c85 Klaus Aehlig
etc.). Also, Ganeti uses symbolic links in the sysconfdir to determine,
262 4dbc4c85 Klaus Aehlig
which of potentially many installed versions currently is used. If these
263 4dbc4c85 Klaus Aehlig
symbolic links should be added by the install as well, add the
264 4dbc4c85 Klaus Aehlig
option ``--enable-symlinks`` to the ``configure`` call.
265 a8083063 Iustin Pop
266 bd785ecd Michael Hanselmann
267 a8083063 Iustin Pop
Cluster initialisation
268 c27ba1cc Michael Hanselmann
----------------------
269 a8083063 Iustin Pop
270 c27ba1cc Michael Hanselmann
Before initialising the cluster, on each node you need to create the
271 c27ba1cc Michael Hanselmann
following directories:
272 a8083063 Iustin Pop
273 c27ba1cc Michael Hanselmann
- ``/etc/ganeti``
274 c27ba1cc Michael Hanselmann
- ``/var/lib/ganeti``
275 c27ba1cc Michael Hanselmann
- ``/var/log/ganeti``
276 c27ba1cc Michael Hanselmann
- ``/srv/ganeti``
277 c27ba1cc Michael Hanselmann
- ``/srv/ganeti/os``
278 c27ba1cc Michael Hanselmann
- ``/srv/ganeti/export``
279 a8083063 Iustin Pop
280 a8083063 Iustin Pop
After this, use ``gnt-cluster init``.
281 c27ba1cc Michael Hanselmann
282 c27ba1cc Michael Hanselmann
.. vim: set textwidth=72 syntax=rst :
283 c27ba1cc Michael Hanselmann
.. Local Variables:
284 c27ba1cc Michael Hanselmann
.. mode: rst
285 c27ba1cc Michael Hanselmann
.. fill-column: 72
286 c27ba1cc Michael Hanselmann
.. End: