root / INSTALL @ c5a957c3
History | View | Annotate | Download (9.9 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 | be505f2c | Michael Hanselmann | - `pyinotify Python module <https://github.com/seb-m/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 | 78062de9 | Michael Hanselmann | - `Paramiko <http://www.lag.net/paramiko/>`_, if you want to use |
45 | 78062de9 | Michael Hanselmann | ``ganeti-listrunner`` |
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 | fc6075dd | Agata Murawska | if running on 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 | 0a09b080 | Michael Hanselmann | - `Python IP address manipulation library |
53 | 0a09b080 | Michael Hanselmann | <http://code.google.com/p/ipaddr-py/>`_ |
54 | 0a09b080 | Michael Hanselmann | - `Bitarray Python library <http://pypi.python.org/pypi/bitarray/>`_ |
55 | c27ba1cc | Michael Hanselmann | |
56 | c27ba1cc | Michael Hanselmann | These programs are supplied as part of most Linux distributions, so |
57 | c27ba1cc | Michael Hanselmann | usually they can be installed via the standard package manager. Also |
58 | c27ba1cc | Michael Hanselmann | many of them will already be installed on a standard machine. On |
59 | c27ba1cc | Michael Hanselmann | Debian/Ubuntu, you can use this command line to install all required |
60 | 7ed400f0 | Stratos Psomadakis | packages, except for RBD, DRBD and Xen:: |
61 | c27ba1cc | Michael Hanselmann | |
62 | c27ba1cc | Michael Hanselmann | $ apt-get install lvm2 ssh bridge-utils iproute iputils-arping \ |
63 | 69affe73 | Manuel Franceschini | ndisc6 python python-pyopenssl openssl \ |
64 | 69affe73 | Manuel Franceschini | python-pyparsing python-simplejson \ |
65 | fc6075dd | Agata Murawska | python-pyinotify python-pycurl socat fping |
66 | fc6075dd | Agata Murawska | |
67 | fc6075dd | Agata Murawska | Note that this does not install optional packages:: |
68 | fc6075dd | Agata Murawska | |
69 | fc6075dd | Agata Murawska | $ apt-get install python-paramiko python-affinity qemu-img |
70 | fc6075dd | Agata Murawska | |
71 | fc6075dd | Agata Murawska | If some of the python packages are not available in your system, |
72 | fc6075dd | Agata Murawska | you can try installing them using ``easy_install`` command. |
73 | fc6075dd | Agata Murawska | For example:: |
74 | fc6075dd | Agata Murawska | |
75 | fc6075dd | Agata Murawska | $ apt-get install python-setuptools |
76 | fc6075dd | Agata Murawska | $ cd / && sudo easy_install \ |
77 | fc6075dd | Agata Murawska | affinity |
78 | fc6075dd | Agata Murawska | |
79 | c27ba1cc | Michael Hanselmann | |
80 | aa9f166a | René Nussbaumer | On Fedora to install all required packages except RBD, DRBD and Xen:: |
81 | aa9f166a | René Nussbaumer | |
82 | aa9f166a | René Nussbaumer | $ yum install openssh openssh-clients bridge-utils iproute ndisc6 \ |
83 | aa9f166a | René Nussbaumer | pyOpenSSL pyparsing python-simplejson python-inotify \ |
84 | fc6075dd | Agata Murawska | python-lxm socat fping |
85 | fc6075dd | Agata Murawska | |
86 | fc6075dd | Agata Murawska | For optional packages use the command:: |
87 | aa9f166a | René Nussbaumer | |
88 | fc6075dd | Agata Murawska | $ yum install python-paramiko python-affinity qemu-img |
89 | aa9f166a | René Nussbaumer | |
90 | 727ee1ec | Iustin Pop | If you want to build from source, please see doc/devnotes.rst for more |
91 | 727ee1ec | Iustin Pop | dependencies. |
92 | 727ee1ec | Iustin Pop | |
93 | 727ee1ec | Iustin Pop | .. _socat-note: |
94 | 727ee1ec | Iustin Pop | .. note:: |
95 | 727ee1ec | Iustin Pop | Ganeti's import/export functionality uses ``socat`` with OpenSSL for |
96 | 727ee1ec | Iustin Pop | transferring data between nodes. By default, OpenSSL 0.9.8 and above |
97 | 727ee1ec | Iustin Pop | employ transparent compression of all data using zlib if supported by |
98 | 727ee1ec | Iustin Pop | both sides of a connection. In cases where a lot of data is |
99 | 727ee1ec | Iustin Pop | transferred, this can lead to an increased CPU usage. Additionally, |
100 | 727ee1ec | Iustin Pop | Ganeti already compresses all data using ``gzip`` where it makes sense |
101 | 727ee1ec | Iustin Pop | (for inter-cluster instance moves). |
102 | 727ee1ec | Iustin Pop | |
103 | 727ee1ec | Iustin Pop | To remedey this situation, patches implementing a new ``socat`` option |
104 | 727ee1ec | Iustin Pop | for disabling OpenSSL compression have been contributed and will |
105 | 727ee1ec | Iustin Pop | likely be included in the next feature release. Until then, users or |
106 | 727ee1ec | Iustin Pop | distributions need to apply the patches on their own. |
107 | 727ee1ec | Iustin Pop | |
108 | 727ee1ec | Iustin Pop | Ganeti will use the option if it's detected by the ``configure`` |
109 | 2ed0e208 | Iustin Pop | script; auto-detection can be disabled by explicitly passing |
110 | 727ee1ec | Iustin Pop | ``--enable-socat-compress`` (use the option to disable compression) or |
111 | 727ee1ec | Iustin Pop | ``--disable-socat-compress`` (don't use the option). |
112 | 727ee1ec | Iustin Pop | |
113 | 727ee1ec | Iustin Pop | The patches and more information can be found on |
114 | 727ee1ec | Iustin Pop | http://www.dest-unreach.org/socat/contrib/socat-opensslcompress.html. |
115 | 727ee1ec | Iustin Pop | |
116 | 727ee1ec | Iustin Pop | Haskell requirements |
117 | 727ee1ec | Iustin Pop | ~~~~~~~~~~~~~~~~~~~~ |
118 | 727ee1ec | Iustin Pop | |
119 | 21a5e56c | Iustin Pop | Starting with Ganeti 2.7, the Haskell GHC compiler and a few base |
120 | 21a5e56c | Iustin Pop | libraries are required in order to build Ganeti (but not to run and |
121 | 21a5e56c | Iustin Pop | deploy Ganeti on production machines). More specifically: |
122 | 77a180f6 | Iustin Pop | |
123 | 7345b69b | Iustin Pop | - `GHC <http://www.haskell.org/ghc/>`_ version 6.12 or higher |
124 | 77a180f6 | Iustin Pop | - or even better, `The Haskell Platform |
125 | 77a180f6 | Iustin Pop | <http://hackage.haskell.org/platform/>`_ which gives you a simple way |
126 | 77a180f6 | Iustin Pop | to bootstrap Haskell |
127 | 77a180f6 | Iustin Pop | - `json <http://hackage.haskell.org/package/json>`_, a JSON library |
128 | 77a180f6 | Iustin Pop | - `network <http://hackage.haskell.org/package/network>`_, a basic |
129 | 77a180f6 | Iustin Pop | network library |
130 | ee041788 | Iustin Pop | - `parallel <http://hackage.haskell.org/package/parallel>`_, a parallel |
131 | ee041788 | Iustin Pop | programming library (note: tested with up to version 3.x) |
132 | e821050d | Iustin Pop | - `bytestring <http://hackage.haskell.org/package/bytestring>`_ and |
133 | e821050d | Iustin Pop | `utf8-string <http://hackage.haskell.org/package/utf8-string>`_ |
134 | e821050d | Iustin Pop | libraries; these usually come with the GHC compiler |
135 | 21a5e56c | Iustin Pop | - `deepseq <http://hackage.haskell.org/package/deepseq>`_ |
136 | 77a180f6 | Iustin Pop | |
137 | 8a65c02b | Iustin Pop | Some of these are also available as package in Debian/Ubuntu:: |
138 | 77a180f6 | Iustin Pop | |
139 | 77a180f6 | Iustin Pop | $ apt-get install ghc6 libghc6-json-dev libghc6-network-dev \ |
140 | 21a5e56c | Iustin Pop | libghc6-parallel-dev libghc6-deepseq-dev |
141 | aa9f166a | René Nussbaumer | |
142 | 21a5e56c | Iustin Pop | Or in newer versions of these distributions (using GHC 7.x):: |
143 | aa9f166a | René Nussbaumer | |
144 | 21a5e56c | Iustin Pop | $ apt-get install ghc libghc-json-dev libghc-network-dev \ |
145 | 21a5e56c | Iustin Pop | libghc-parallel-dev libghc-deepseq-dev \ |
146 | 21a5e56c | Iustin Pop | libghc-utf8-string-dev |
147 | aa9f166a | René Nussbaumer | |
148 | 21a5e56c | Iustin Pop | In Fedora, they are available via packages as well:: |
149 | ee041788 | Iustin Pop | |
150 | 21a5e56c | Iustin Pop | $ yum install ghc ghc-json-devel ghc-network-devel \ |
151 | 21a5e56c | Iustin Pop | ghc-parallel-devel ghc-deepseq-devel |
152 | ee041788 | Iustin Pop | |
153 | fc6075dd | Agata Murawska | If using a distribution which does not provide them, first install |
154 | 21a5e56c | Iustin Pop | the Haskell platform. You can also install ``cabal`` manually:: |
155 | fc6075dd | Agata Murawska | |
156 | fc6075dd | Agata Murawska | $ apt-get install cabal-install |
157 | fc6075dd | Agata Murawska | |
158 | fc6075dd | Agata Murawska | Then install the additional libraries via |
159 | 727ee1ec | Iustin Pop | ``cabal``:: |
160 | 727ee1ec | Iustin Pop | |
161 | 21a5e56c | Iustin Pop | $ cabal install json network parallel utf8-string |
162 | 727ee1ec | Iustin Pop | |
163 | 1ebe6dbd | Iustin Pop | The compilation of the htools components is automatically enabled when |
164 | 1ebe6dbd | Iustin Pop | the compiler and the requisite libraries are found. You can use the |
165 | 1ebe6dbd | Iustin Pop | ``--enable-htools`` configure flag to force the selection (at which |
166 | 1ebe6dbd | Iustin Pop | point ``./configure`` will fail if it doesn't find the prerequisites). |
167 | 1ebe6dbd | Iustin Pop | |
168 | 5cd0d9c0 | Iustin Pop | |
169 | 21a5e56c | Iustin Pop | Haskell optional features |
170 | 21a5e56c | Iustin Pop | ~~~~~~~~~~~~~~~~~~~~~~~~~ |
171 | 21a5e56c | Iustin Pop | |
172 | 21a5e56c | Iustin Pop | Optionally, more functionality can be enabled if your build machine has |
173 | 21a5e56c | Iustin Pop | a few more Haskell libraries enabled: RAPI access to remote cluster from |
174 | 35c6e63d | Michele Tartara | htools (``--enable-htools-rapi``), the ``ganeti-confd`` |
175 | 35c6e63d | Michele Tartara | daemon (``--enable-confd``) and the monitoring agent |
176 | 35c6e63d | Michele Tartara | (``--enable-monitoring``). The list of extra dependencies for these is: |
177 | 21a5e56c | Iustin Pop | |
178 | 21a5e56c | Iustin Pop | - `curl <http://hackage.haskell.org/package/curl>`_, tested with |
179 | 21a5e56c | Iustin Pop | versions 1.3.4 and above |
180 | 727ee1ec | Iustin Pop | - `hslogger <http://software.complete.org/hslogger>`_, version 1.1 and |
181 | 727ee1ec | Iustin Pop | above (note that Debian Squeeze only has version 1.0.9) |
182 | 727ee1ec | Iustin Pop | - `Crypto <http://hackage.haskell.org/package/Crypto>`_, tested with |
183 | 727ee1ec | Iustin Pop | version 4.2.4 |
184 | 727ee1ec | Iustin Pop | - `text <http://hackage.haskell.org/package/text>`_ |
185 | fe7ad9c8 | Iustin Pop | - `hinotify <http://hackage.haskell.org/package/hinotify>`_, tested with |
186 | fe7ad9c8 | Iustin Pop | version 0.3.2 |
187 | 21a5e56c | Iustin Pop | - `regex-pcre <http://hackage.haskell.org/package/regex-pcre>`_, |
188 | 21a5e56c | Iustin Pop | bindings for the ``pcre`` library |
189 | 35c6e63d | Michele Tartara | - `attoparsec <http://hackage.haskell.org/package/attoparsec>`_ |
190 | fcc1977b | Helga Velroyen | - `vector <http://hackage.haskell.org/package/vector>`_ |
191 | e90739d6 | Michael Hanselmann | |
192 | 21a5e56c | Iustin Pop | These libraries are available in Debian Wheezy (but not in Squeeze, with |
193 | 21a5e56c | Iustin Pop | the exception of curl), so you can use either apt:: |
194 | e90739d6 | Michael Hanselmann | |
195 | e0e3586a | Agata Murawska | $ apt-get install libghc-hslogger-dev libghc-crypto-dev libghc-text-dev \ |
196 | 35c6e63d | Michele Tartara | libghc-hinotify-dev libghc-regex-pcre-dev libghc-curl-dev \ |
197 | fcc1977b | Helga Velroyen | libghc-attoparsec-dev libghc-vector-dev |
198 | e90739d6 | Michael Hanselmann | |
199 | 727ee1ec | Iustin Pop | or ``cabal``:: |
200 | 727ee1ec | Iustin Pop | |
201 | 35c6e63d | Michele Tartara | $ cabal install hslogger Crypto text hinotify regex-pcre curl \ |
202 | fcc1977b | Helga Velroyen | attoparsec vector |
203 | e90739d6 | Michael Hanselmann | |
204 | 727ee1ec | Iustin Pop | to install them. |
205 | bd785ecd | Michael Hanselmann | |
206 | 21a5e56c | Iustin Pop | The most recent Fedora doesn't provide ``curl``, ``crypto``, |
207 | 21a5e56c | Iustin Pop | ``inotify``. So these need to be installed using ``cabal``, if |
208 | 21a5e56c | Iustin Pop | desired. The other packages can be installed via ``yum``:: |
209 | 21a5e56c | Iustin Pop | |
210 | 21a5e56c | Iustin Pop | $ yum install ghc-hslogger-devel ghc-text-devel \ |
211 | 21a5e56c | Iustin Pop | ghc-regex-pcre-devel |
212 | 21a5e56c | Iustin Pop | |
213 | fc6075dd | Agata Murawska | .. _cabal-note: |
214 | fc6075dd | Agata Murawska | .. note:: |
215 | fc6075dd | Agata Murawska | If one of the cabal packages fails to install due to unfulfilled |
216 | fc6075dd | Agata Murawska | dependencies, you can try enabling symlinks in ``~/.cabal/config``. |
217 | fc6075dd | Agata Murawska | |
218 | fc6075dd | Agata Murawska | Make sure that your ``~/.cabal/bin`` directory (or whatever else |
219 | fc6075dd | Agata Murawska | is defined as ``bindir``) is in your ``PATH``. |
220 | fc6075dd | Agata Murawska | |
221 | bd785ecd | Michael Hanselmann | Installation of the software |
222 | c27ba1cc | Michael Hanselmann | ---------------------------- |
223 | c27ba1cc | Michael Hanselmann | |
224 | c27ba1cc | Michael Hanselmann | To install, simply run the following command:: |
225 | a8083063 | Iustin Pop | |
226 | 727ee1ec | Iustin Pop | $ ./configure --localstatedir=/var --sysconfdir=/etc && \ |
227 | 727ee1ec | Iustin Pop | make && \ |
228 | 727ee1ec | Iustin Pop | make install |
229 | a8083063 | Iustin Pop | |
230 | c27ba1cc | Michael Hanselmann | This will install the software under ``/usr/local``. You then need to |
231 | c27ba1cc | Michael Hanselmann | copy ``doc/examples/ganeti.initd`` to ``/etc/init.d/ganeti`` and |
232 | c27ba1cc | Michael Hanselmann | integrate it into your boot sequence (``chkconfig``, ``update-rc.d``, |
233 | c27ba1cc | Michael Hanselmann | etc.). |
234 | a8083063 | Iustin Pop | |
235 | bd785ecd | Michael Hanselmann | |
236 | a8083063 | Iustin Pop | Cluster initialisation |
237 | c27ba1cc | Michael Hanselmann | ---------------------- |
238 | a8083063 | Iustin Pop | |
239 | c27ba1cc | Michael Hanselmann | Before initialising the cluster, on each node you need to create the |
240 | c27ba1cc | Michael Hanselmann | following directories: |
241 | a8083063 | Iustin Pop | |
242 | c27ba1cc | Michael Hanselmann | - ``/etc/ganeti`` |
243 | c27ba1cc | Michael Hanselmann | - ``/var/lib/ganeti`` |
244 | c27ba1cc | Michael Hanselmann | - ``/var/log/ganeti`` |
245 | c27ba1cc | Michael Hanselmann | - ``/srv/ganeti`` |
246 | c27ba1cc | Michael Hanselmann | - ``/srv/ganeti/os`` |
247 | c27ba1cc | Michael Hanselmann | - ``/srv/ganeti/export`` |
248 | a8083063 | Iustin Pop | |
249 | a8083063 | Iustin Pop | After this, use ``gnt-cluster init``. |
250 | c27ba1cc | Michael Hanselmann | |
251 | c27ba1cc | Michael Hanselmann | .. vim: set textwidth=72 syntax=rst : |
252 | c27ba1cc | Michael Hanselmann | .. Local Variables: |
253 | c27ba1cc | Michael Hanselmann | .. mode: rst |
254 | c27ba1cc | Michael Hanselmann | .. fill-column: 72 |
255 | c27ba1cc | Michael Hanselmann | .. End: |