Statistics
| Branch: | Tag: | Revision:

root / INSTALL @ e85444d0

History | View | Annotate | Download (6.5 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
- `RBD <http://ceph.newdream.net/>`_, kernel modules (rbd.ko/libceph.ko)
23
  and userspace utils (ceph-common)
24
- `LVM2 <http://sourceware.org/lvm2/>`_
25
- `OpenSSH <http://www.openssh.com/portable.html>`_
26
- `bridge utilities <http://www.linuxfoundation.org/en/Net:Bridge>`_
27
- `iproute2 <http://www.linuxfoundation.org/en/Net:Iproute2>`_
28
- `arping <http://www.skbuff.net/iputils/>`_ (part of iputils)
29
- `ndisc6 <http://www.remlab.net/ndisc6/>`_ (if using IPv6)
30
- `Python <http://www.python.org/>`_, version 2.4 or above, not 3.0
31
- `Python OpenSSL bindings <http://pyopenssl.sourceforge.net/>`_
32
- `simplejson Python module <http://code.google.com/p/simplejson/>`_
33
- `pyparsing Python module <http://pyparsing.wikispaces.com/>`_, version
34
  1.4.6 or above
35
- `pyinotify Python module <http://trac.dbzteam.org/pyinotify/>`_
36
- `PycURL Python module <http://pycurl.sourceforge.net/>`_
37
- `ctypes Python module
38
  <http://starship.python.net/crew/theller/ctypes/>`_, if running on
39
  python 2.4 (optional, used for node daemon memory locking)
40
- `socat <http://www.dest-unreach.org/socat/>`_, see :ref:`note
41
  <socat-note>` below
42
- `Paramiko <http://www.lag.net/paramiko/>`_, if you want automated SSH
43
  setup; optional otherwise but manual setup of the nodes required
44
- `affinity Python module <http://pypi.python.org/pypi/affinity/0.1.0>`_,
45
  optional python package for supporting CPU pinning under KVM
46
- `ElementTree Python module <http://effbot.org/zone/element-index.htm>`_,
47
  if running python 2.4 (optional, used by ovfconverter tool)
48
- `qemu-img <http://qemu.org/>`_, if you want to use ovfconverter
49
- `fping <http://fping.sourceforge.net/>`_
50

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

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

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

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

    
81
All of these are also available as package in Debian/Ubuntu::
82

    
83
  $ apt-get install ghc6 libghc6-json-dev libghc6-network-dev \
84
                    libghc6-parallel-dev libghc6-curl-dev
85

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

    
89
  $ apt-get install ghc libghc-json-dev libghc-network-dev \
90
                    libghc-parallel-dev libghc-curl-dev
91

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

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

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

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

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

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

    
123

    
124
Installation of the software
125
----------------------------
126

    
127
To install, simply run the following command::
128

    
129
  ./configure --localstatedir=/var --sysconfdir=/etc && \
130
  make && \
131
  make install
132

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

    
138

    
139
Cluster initialisation
140
----------------------
141

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

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

    
152
After this, use ``gnt-cluster init``.
153

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