Statistics
| Branch: | Tag: | Revision:

root / INSTALL @ d9eefcfa

History | View | Annotate | Download (6.4 kB)

1
Ganeti quick installation guide
2
===============================
3

    
4
Please note that a more detailed installation procedure is described in
5
the :doc:`install`. A glossary of terms can be found in the
6
:doc:`glossary`.
7

    
8

    
9
Software Requirements
10
---------------------
11

    
12
Before installing, please verify that you have the following programs:
13

    
14
- `Xen Hypervisor <http://www.xen.org/>`_, version 3.0 or above, if
15
  running on Xen
16
- `KVM Hypervisor <http://www.linux-kvm.org>`_, version 72 or above, if
17
  running on KVM. In order to use advanced features, such as live
18
  migration, virtio, etc, an even newer version is recommended (qemu-kvm
19
  versions 0.11.X or above have shown good behavior).
20
- `DRBD <http://www.drbd.org/>`_, kernel module and userspace utils,
21
  version 8.0.7 or above
22
- `LVM2 <http://sourceware.org/lvm2/>`_
23
- `OpenSSH <http://www.openssh.com/portable.html>`_
24
- `bridge utilities <http://www.linuxfoundation.org/en/Net:Bridge>`_
25
- `iproute2 <http://www.linuxfoundation.org/en/Net:Iproute2>`_
26
- `arping <http://www.skbuff.net/iputils/>`_ (part of iputils)
27
- `ndisc6 <http://www.remlab.net/ndisc6/>`_ (if using IPv6)
28
- `Python <http://www.python.org/>`_, version 2.4 or above, not 3.0
29
- `Python OpenSSL bindings <http://pyopenssl.sourceforge.net/>`_
30
- `simplejson Python module <http://code.google.com/p/simplejson/>`_
31
- `pyparsing Python module <http://pyparsing.wikispaces.com/>`_, version
32
  1.4.6 or above
33
- `pyinotify Python module <http://trac.dbzteam.org/pyinotify/>`_
34
- `PycURL Python module <http://pycurl.sourceforge.net/>`_
35
- `ctypes Python module
36
  <http://starship.python.net/crew/theller/ctypes/>`_, if running on
37
  python 2.4 (optional, used for node daemon memory locking)
38
- `socat <http://www.dest-unreach.org/socat/>`_, see :ref:`note
39
  <socat-note>` below
40
- `Paramiko <http://www.lag.net/paramiko/>`_, if you want automated SSH
41
  setup; optional otherwise but manual setup of the nodes required
42
- `affinity Python module <http://pypi.python.org/pypi/affinity/0.1.0>`_,
43
  optional python package for supporting CPU pinning under KVM
44
- `ElementTree Python module <http://effbot.org/zone/element-index.htm>`_,
45
  if running python 2.4 (optional, used by ovfconverter tool)
46
- `qemu-img <http://qemu.org/>`_, if you want to use ovfconverter
47
- `fping <http://fping.sourceforge.net/>`_
48

    
49
These programs are supplied as part of most Linux distributions, so
50
usually they can be installed via the standard package manager. Also
51
many of them will already be installed on a standard machine. On
52
Debian/Ubuntu, you can use this command line to install all required
53
packages, except for DRBD and Xen::
54

    
55
  $ apt-get install lvm2 ssh bridge-utils iproute iputils-arping \
56
                    ndisc6 python python-pyopenssl openssl \
57
                    python-pyparsing python-simplejson \
58
                    python-pyinotify python-pycurl socat \
59
                    python-elementtree qemu
60

    
61
If you want to also enable the `htools` components, which is recommended
62
on bigger deployments (they give you automatic instance placement,
63
cluster balancing, etc.), then you need to have a Haskell compiler
64
installed. More specifically:
65

    
66
- `GHC <http://www.haskell.org/ghc/>`_ version 6.10 or higher
67
- or even better, `The Haskell Platform
68
  <http://hackage.haskell.org/platform/>`_ which gives you a simple way
69
  to bootstrap Haskell
70
- `json <http://hackage.haskell.org/package/json>`_, a JSON library
71
- `network <http://hackage.haskell.org/package/network>`_, a basic
72
  network library
73
- `parallel <http://hackage.haskell.org/package/parallel>`_, a parallel
74
  programming library (note: tested with up to version 3.x)
75
- `curl <http://hackage.haskell.org/package/curl>`_, bindings for the
76
  curl library, only needed if you want these tools to connect to remote
77
  clusters (as opposed to the local one)
78

    
79
All of these are also available as package in Debian/Ubuntu::
80

    
81
  $ apt-get install ghc6 libghc6-json-dev libghc6-network-dev \
82
                    libghc6-parallel-dev libghc6-curl-dev
83

    
84
Note that more recent version have switched to GHC 7.x and the packages
85
were renamed::
86

    
87
  $ apt-get install ghc libghc-json-dev libghc-network-dev \
88
                    libghc-parallel-dev libghc-curl-dev
89

    
90
The compilation of the htools components is automatically enabled when
91
the compiler and the requisite libraries are found. You can use the
92
``--enable-htools`` configure flag to force the selection (at which
93
point ``./configure`` will fail if it doesn't find the prerequisites).
94

    
95
If you want to build from source, please see doc/devnotes.rst for more
96
dependencies.
97

    
98
.. _socat-note:
99
.. note::
100
  Ganeti's import/export functionality uses ``socat`` with OpenSSL for
101
  transferring data between nodes. By default, OpenSSL 0.9.8 and above
102
  employ transparent compression of all data using zlib if supported by
103
  both sides of a connection. In cases where a lot of data is
104
  transferred, this can lead to an increased CPU usage. Additionally,
105
  Ganeti already compresses all data using ``gzip`` where it makes sense
106
  (for inter-cluster instance moves).
107

    
108
  To remedey this situation, patches implementing a new ``socat`` option
109
  for disabling OpenSSL compression have been contributed and will
110
  likely be included in the next feature release. Until then, users or
111
  distributions need to apply the patches on their own.
112

    
113
  Ganeti will use the option if it's detected by the ``configure``
114
  script; auto-detection can be disabled by explicitely passing
115
  ``--enable-socat-compress`` (use the option to disable compression) or
116
  ``--disable-socat-compress`` (don't use the option).
117

    
118
  The patches and more information can be found on
119
  http://www.dest-unreach.org/socat/contrib/socat-opensslcompress.html.
120

    
121

    
122
Installation of the software
123
----------------------------
124

    
125
To install, simply run the following command::
126

    
127
  ./configure --localstatedir=/var --sysconfdir=/etc && \
128
  make && \
129
  make install
130

    
131
This will install the software under ``/usr/local``. You then need to
132
copy ``doc/examples/ganeti.initd`` to ``/etc/init.d/ganeti`` and
133
integrate it into your boot sequence (``chkconfig``, ``update-rc.d``,
134
etc.).
135

    
136

    
137
Cluster initialisation
138
----------------------
139

    
140
Before initialising the cluster, on each node you need to create the
141
following directories:
142

    
143
- ``/etc/ganeti``
144
- ``/var/lib/ganeti``
145
- ``/var/log/ganeti``
146
- ``/srv/ganeti``
147
- ``/srv/ganeti/os``
148
- ``/srv/ganeti/export``
149

    
150
After this, use ``gnt-cluster init``.
151

    
152
.. vim: set textwidth=72 syntax=rst :
153
.. Local Variables:
154
.. mode: rst
155
.. fill-column: 72
156
.. End: