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