Statistics
| Branch: | Tag: | Revision:

root / INSTALL @ f14a8b15

History | View | Annotate | Download (8.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 c27ba1cc Michael Hanselmann
the :doc:`install`. A glossary of terms can be found in the
6 c27ba1cc Michael Hanselmann
:doc:`glossary`.
7 4096472d Iustin Pop
8 4096472d Iustin Pop
9 bd785ecd Michael Hanselmann
Software Requirements
10 c27ba1cc Michael Hanselmann
---------------------
11 a8083063 Iustin Pop
12 727ee1ec Iustin Pop
.. highlight:: shell-example
13 727ee1ec Iustin Pop
14 a8083063 Iustin Pop
Before installing, please verify that you have the following programs:
15 c27ba1cc Michael Hanselmann
16 c4b2b2e2 Guido Trotter
- `Xen Hypervisor <http://www.xen.org/>`_, version 3.0 or above, if
17 c4b2b2e2 Guido Trotter
  running on Xen
18 c4b2b2e2 Guido Trotter
- `KVM Hypervisor <http://www.linux-kvm.org>`_, version 72 or above, if
19 c4b2b2e2 Guido Trotter
  running on KVM. In order to use advanced features, such as live
20 c4b2b2e2 Guido Trotter
  migration, virtio, etc, an even newer version is recommended (qemu-kvm
21 727ee1ec Iustin Pop
  versions 0.11.X and above have shown good behavior).
22 c27ba1cc Michael Hanselmann
- `DRBD <http://www.drbd.org/>`_, kernel module and userspace utils,
23 727ee1ec Iustin Pop
  version 8.0.7 or above; note that Ganeti doesn't yet support version 8.4
24 727ee1ec Iustin Pop
- `RBD <http://ceph.newdream.net/>`_, kernel modules
25 727ee1ec Iustin Pop
  (``rbd.ko``/``libceph.ko``) and userspace utils (``ceph-common``)
26 c27ba1cc Michael Hanselmann
- `LVM2 <http://sourceware.org/lvm2/>`_
27 c27ba1cc Michael Hanselmann
- `OpenSSH <http://www.openssh.com/portable.html>`_
28 c27ba1cc Michael Hanselmann
- `bridge utilities <http://www.linuxfoundation.org/en/Net:Bridge>`_
29 c27ba1cc Michael Hanselmann
- `iproute2 <http://www.linuxfoundation.org/en/Net:Iproute2>`_
30 c27ba1cc Michael Hanselmann
- `arping <http://www.skbuff.net/iputils/>`_ (part of iputils)
31 69affe73 Manuel Franceschini
- `ndisc6 <http://www.remlab.net/ndisc6/>`_ (if using IPv6)
32 c27ba1cc Michael Hanselmann
- `Python <http://www.python.org/>`_, version 2.4 or above, not 3.0
33 c27ba1cc Michael Hanselmann
- `Python OpenSSL bindings <http://pyopenssl.sourceforge.net/>`_
34 c27ba1cc Michael Hanselmann
- `simplejson Python module <http://code.google.com/p/simplejson/>`_
35 7578ab0a Michael Hanselmann
- `pyparsing Python module <http://pyparsing.wikispaces.com/>`_, version
36 7578ab0a Michael Hanselmann
  1.4.6 or above
37 c27ba1cc Michael Hanselmann
- `pyinotify Python module <http://trac.dbzteam.org/pyinotify/>`_
38 2a7c3583 Michael Hanselmann
- `PycURL Python module <http://pycurl.sourceforge.net/>`_
39 b447ab51 Luca Bigliardi
- `ctypes Python module
40 b447ab51 Luca Bigliardi
  <http://starship.python.net/crew/theller/ctypes/>`_, if running on
41 b447ab51 Luca Bigliardi
  python 2.4 (optional, used for node daemon memory locking)
42 e90739d6 Michael Hanselmann
- `socat <http://www.dest-unreach.org/socat/>`_, see :ref:`note
43 e90739d6 Michael Hanselmann
  <socat-note>` below
44 a40b1fc4 René Nussbaumer
- `Paramiko <http://www.lag.net/paramiko/>`_, if you want automated SSH
45 a40b1fc4 René Nussbaumer
  setup; optional otherwise but manual setup of the nodes required
46 0cd2fe76 Tsachy Shacham
- `affinity Python module <http://pypi.python.org/pypi/affinity/0.1.0>`_,
47 0cd2fe76 Tsachy Shacham
  optional python package for supporting CPU pinning under KVM
48 daa4dcc1 Agata Murawska
- `ElementTree Python module <http://effbot.org/zone/element-index.htm>`_,
49 727ee1ec Iustin Pop
  if running python 2.4 (optional, used by the ``ovfconverter`` tool)
50 727ee1ec Iustin Pop
- `qemu-img <http://qemu.org/>`_, if you want to use ``ovfconverter``
51 d9eefcfa Andrea Spadaccini
- `fping <http://fping.sourceforge.net/>`_
52 c27ba1cc Michael Hanselmann
53 c27ba1cc Michael Hanselmann
These programs are supplied as part of most Linux distributions, so
54 c27ba1cc Michael Hanselmann
usually they can be installed via the standard package manager. Also
55 c27ba1cc Michael Hanselmann
many of them will already be installed on a standard machine. On
56 c27ba1cc Michael Hanselmann
Debian/Ubuntu, you can use this command line to install all required
57 7ed400f0 Stratos Psomadakis
packages, except for RBD, DRBD and Xen::
58 c27ba1cc Michael Hanselmann
59 c27ba1cc Michael Hanselmann
  $ apt-get install lvm2 ssh bridge-utils iproute iputils-arping \
60 69affe73 Manuel Franceschini
                    ndisc6 python python-pyopenssl openssl \
61 69affe73 Manuel Franceschini
                    python-pyparsing python-simplejson \
62 daa4dcc1 Agata Murawska
                    python-pyinotify python-pycurl socat \
63 6567f1d9 Agata Murawska
                    python-elementtree qemu
64 c27ba1cc Michael Hanselmann
65 aa9f166a René Nussbaumer
On Fedora to install all required packages except RBD, DRBD and Xen::
66 aa9f166a René Nussbaumer
67 aa9f166a René Nussbaumer
  $ yum install openssh openssh-clients bridge-utils iproute ndisc6 \
68 aa9f166a René Nussbaumer
                pyOpenSSL pyparsing python-simplejson python-inotify \
69 aa9f166a René Nussbaumer
                python-lxml python-paramiko socat qemu-img
70 aa9f166a René Nussbaumer
71 aa9f166a René Nussbaumer
72 727ee1ec Iustin Pop
If you want to build from source, please see doc/devnotes.rst for more
73 727ee1ec Iustin Pop
dependencies.
74 727ee1ec Iustin Pop
75 727ee1ec Iustin Pop
.. _socat-note:
76 727ee1ec Iustin Pop
.. note::
77 727ee1ec Iustin Pop
  Ganeti's import/export functionality uses ``socat`` with OpenSSL for
78 727ee1ec Iustin Pop
  transferring data between nodes. By default, OpenSSL 0.9.8 and above
79 727ee1ec Iustin Pop
  employ transparent compression of all data using zlib if supported by
80 727ee1ec Iustin Pop
  both sides of a connection. In cases where a lot of data is
81 727ee1ec Iustin Pop
  transferred, this can lead to an increased CPU usage. Additionally,
82 727ee1ec Iustin Pop
  Ganeti already compresses all data using ``gzip`` where it makes sense
83 727ee1ec Iustin Pop
  (for inter-cluster instance moves).
84 727ee1ec Iustin Pop
85 727ee1ec Iustin Pop
  To remedey this situation, patches implementing a new ``socat`` option
86 727ee1ec Iustin Pop
  for disabling OpenSSL compression have been contributed and will
87 727ee1ec Iustin Pop
  likely be included in the next feature release. Until then, users or
88 727ee1ec Iustin Pop
  distributions need to apply the patches on their own.
89 727ee1ec Iustin Pop
90 727ee1ec Iustin Pop
  Ganeti will use the option if it's detected by the ``configure``
91 727ee1ec Iustin Pop
  script; auto-detection can be disabled by explicitely passing
92 727ee1ec Iustin Pop
  ``--enable-socat-compress`` (use the option to disable compression) or
93 727ee1ec Iustin Pop
  ``--disable-socat-compress`` (don't use the option).
94 727ee1ec Iustin Pop
95 727ee1ec Iustin Pop
  The patches and more information can be found on
96 727ee1ec Iustin Pop
  http://www.dest-unreach.org/socat/contrib/socat-opensslcompress.html.
97 727ee1ec Iustin Pop
98 727ee1ec Iustin Pop
Haskell requirements
99 727ee1ec Iustin Pop
~~~~~~~~~~~~~~~~~~~~
100 727ee1ec Iustin Pop
101 727ee1ec Iustin Pop
If you want to enable the `htools` component, which is recommended on
102 727ee1ec Iustin Pop
bigger deployments (this give you automatic instance placement, cluster
103 727ee1ec Iustin Pop
balancing, etc.), then you need to have a Haskell compiler installed on
104 727ee1ec Iustin Pop
your build machine (but this is not required on the machines which are
105 727ee1ec Iustin Pop
just going to run Ganeti). More specifically:
106 77a180f6 Iustin Pop
107 7345b69b Iustin Pop
- `GHC <http://www.haskell.org/ghc/>`_ version 6.12 or higher
108 77a180f6 Iustin Pop
- or even better, `The Haskell Platform
109 77a180f6 Iustin Pop
  <http://hackage.haskell.org/platform/>`_ which gives you a simple way
110 77a180f6 Iustin Pop
  to bootstrap Haskell
111 77a180f6 Iustin Pop
- `json <http://hackage.haskell.org/package/json>`_, a JSON library
112 77a180f6 Iustin Pop
- `network <http://hackage.haskell.org/package/network>`_, a basic
113 77a180f6 Iustin Pop
  network library
114 ee041788 Iustin Pop
- `parallel <http://hackage.haskell.org/package/parallel>`_, a parallel
115 ee041788 Iustin Pop
  programming library (note: tested with up to version 3.x)
116 77a180f6 Iustin Pop
- `curl <http://hackage.haskell.org/package/curl>`_, bindings for the
117 77a180f6 Iustin Pop
  curl library, only needed if you want these tools to connect to remote
118 77a180f6 Iustin Pop
  clusters (as opposed to the local one)
119 77a180f6 Iustin Pop
120 77a180f6 Iustin Pop
All of these are also available as package in Debian/Ubuntu::
121 77a180f6 Iustin Pop
122 77a180f6 Iustin Pop
  $ apt-get install ghc6 libghc6-json-dev libghc6-network-dev \
123 77a180f6 Iustin Pop
                    libghc6-parallel-dev libghc6-curl-dev
124 77a180f6 Iustin Pop
125 aa9f166a René Nussbaumer
Or in Fedora running::
126 aa9f166a René Nussbaumer
127 aa9f166a René Nussbaumer
  $ yum install ghc ghc-json-devel ghc-network-devel ghc-parallel-devel
128 aa9f166a René Nussbaumer
129 aa9f166a René Nussbaumer
The most recent Fedora doesn't provide ``ghc-curl``. So this needs to be
130 aa9f166a René Nussbaumer
installed using ``cabal`` or alternatively htools can be build without
131 aa9f166a René Nussbaumer
curl support.
132 aa9f166a René Nussbaumer
133 ee041788 Iustin Pop
Note that more recent version have switched to GHC 7.x and the packages
134 ee041788 Iustin Pop
were renamed::
135 ee041788 Iustin Pop
136 ee041788 Iustin Pop
  $ apt-get install ghc libghc-json-dev libghc-network-dev \
137 ee041788 Iustin Pop
                    libghc-parallel-dev libghc-curl-dev
138 ee041788 Iustin Pop
139 727ee1ec Iustin Pop
If using a distribution which does not provide them, the first install
140 727ee1ec Iustin Pop
the Haskell platform and then install the additional libraries via
141 727ee1ec Iustin Pop
``cabal``::
142 727ee1ec Iustin Pop
143 727ee1ec Iustin Pop
  $ cabal install json network parallel curl
144 727ee1ec Iustin Pop
145 1ebe6dbd Iustin Pop
The compilation of the htools components is automatically enabled when
146 1ebe6dbd Iustin Pop
the compiler and the requisite libraries are found. You can use the
147 1ebe6dbd Iustin Pop
``--enable-htools`` configure flag to force the selection (at which
148 1ebe6dbd Iustin Pop
point ``./configure`` will fail if it doesn't find the prerequisites).
149 1ebe6dbd Iustin Pop
150 727ee1ec Iustin Pop
In Ganeti version 2.6, one of the daemons (``ganeti-confd``) is shipped
151 727ee1ec Iustin Pop
in two versions: the Python default version (which has no extra
152 727ee1ec Iustin Pop
dependencies), and an experimental Haskell version. This latter version
153 727ee1ec Iustin Pop
can be enabled via the ``./configure`` flag ``--enable-confd=haskell``
154 727ee1ec Iustin Pop
and a few has extra dependencies:
155 5cd0d9c0 Iustin Pop
156 727ee1ec Iustin Pop
- `hslogger <http://software.complete.org/hslogger>`_, version 1.1 and
157 727ee1ec Iustin Pop
  above (note that Debian Squeeze only has version 1.0.9)
158 727ee1ec Iustin Pop
- `Crypto <http://hackage.haskell.org/package/Crypto>`_, tested with
159 727ee1ec Iustin Pop
  version 4.2.4
160 727ee1ec Iustin Pop
- `text <http://hackage.haskell.org/package/text>`_
161 727ee1ec Iustin Pop
- ``bytestring``, which usually comes with the compiler
162 e90739d6 Michael Hanselmann
163 727ee1ec Iustin Pop
These libraries are available in Debian Wheezy (but not in Squeeze), so
164 727ee1ec Iustin Pop
you can use either apt::
165 e90739d6 Michael Hanselmann
166 727ee1ec Iustin Pop
  $ apt-get install libghc-hslogger-dev libghc-crypto-dev libghc-text-dev
167 e90739d6 Michael Hanselmann
168 727ee1ec Iustin Pop
or ``cabal``::
169 727ee1ec Iustin Pop
170 727ee1ec Iustin Pop
  $ cabal install hslogger Crypto text
171 e90739d6 Michael Hanselmann
172 727ee1ec Iustin Pop
to install them.
173 bd785ecd Michael Hanselmann
174 bd785ecd Michael Hanselmann
Installation of the software
175 c27ba1cc Michael Hanselmann
----------------------------
176 c27ba1cc Michael Hanselmann
177 c27ba1cc Michael Hanselmann
To install, simply run the following command::
178 a8083063 Iustin Pop
179 727ee1ec Iustin Pop
  $ ./configure --localstatedir=/var --sysconfdir=/etc && \
180 727ee1ec Iustin Pop
    make && \
181 727ee1ec Iustin Pop
    make install
182 a8083063 Iustin Pop
183 c27ba1cc Michael Hanselmann
This will install the software under ``/usr/local``. You then need to
184 c27ba1cc Michael Hanselmann
copy ``doc/examples/ganeti.initd`` to ``/etc/init.d/ganeti`` and
185 c27ba1cc Michael Hanselmann
integrate it into your boot sequence (``chkconfig``, ``update-rc.d``,
186 c27ba1cc Michael Hanselmann
etc.).
187 a8083063 Iustin Pop
188 bd785ecd Michael Hanselmann
189 a8083063 Iustin Pop
Cluster initialisation
190 c27ba1cc Michael Hanselmann
----------------------
191 a8083063 Iustin Pop
192 c27ba1cc Michael Hanselmann
Before initialising the cluster, on each node you need to create the
193 c27ba1cc Michael Hanselmann
following directories:
194 a8083063 Iustin Pop
195 c27ba1cc Michael Hanselmann
- ``/etc/ganeti``
196 c27ba1cc Michael Hanselmann
- ``/var/lib/ganeti``
197 c27ba1cc Michael Hanselmann
- ``/var/log/ganeti``
198 c27ba1cc Michael Hanselmann
- ``/srv/ganeti``
199 c27ba1cc Michael Hanselmann
- ``/srv/ganeti/os``
200 c27ba1cc Michael Hanselmann
- ``/srv/ganeti/export``
201 a8083063 Iustin Pop
202 a8083063 Iustin Pop
After this, use ``gnt-cluster init``.
203 c27ba1cc Michael Hanselmann
204 c27ba1cc Michael Hanselmann
.. vim: set textwidth=72 syntax=rst :
205 c27ba1cc Michael Hanselmann
.. Local Variables:
206 c27ba1cc Michael Hanselmann
.. mode: rst
207 c27ba1cc Michael Hanselmann
.. fill-column: 72
208 c27ba1cc Michael Hanselmann
.. End: