Small doc change
[ganeti-local] / README
1 Ganeti Cluster tools (ganeti-htools)
2 ====================================
3
4 These are some simple cluster tools for fixing common allocation
5 problems on Ganeti 2.0 clusters.
6
7 Note that these tools are most useful for bigger cluster sizes
8 (e.g. more than five or ten machines); at lower sizes, the
9 computations they do can also be done manually.
10
11 Available tools
12 ---------------
13
14 Cluster rebalancer
15 ~~~~~~~~~~~~~~~~~~
16
17 The rebalancer uses a simple algorithm to try to get the nodes of the
18 cluster as equal as possible in their resource usage. It tries to
19 repeatedly move each instance one step, so that the cluster score
20 becomes better. We stop when no further move can improve the score.
21
22 For algorithm details and usage, see the man page hbal(1).
23
24 Cluster N+1 solver
25 ~~~~~~~~~~~~~~~~~~
26
27 This program runs a very simple brute force algorithm over the instance
28 placement space in order to determine the shortest number of replace-disks
29 needed to fix the cluster. Note this means we won't get a balanced cluster,
30 just one that passes N+1 checks.
31
32 For algorithm details and usage, see the man page hn1(1).
33
34 .. note:: This program is deprecated, hbal should be used instead.
35
36 IAllocator plugin
37 ~~~~~~~~~~~~~~~~~
38
39 The ``hail`` iallocator plugin can be used for allocations of mirrored
40 and non-mirrored instances and for relocations of mirrored
41 instances. It needs to be installed in Ganeti's iallocator search
42 path—usually ``/usr/lib/ganeti/iallocators`` or
43 ``/usr/local/lib/ganeti/iallocators``. See the man page hail(1).
44
45 Integration with Ganeti
46 -----------------------
47
48 The ``hbal`` and ``hn1`` programs can either get their input from text
49 files, or online from a cluster via RAPI. For online collection via
50 RAPI, the "-m" argument to both hn1 and hbal should specify the
51 cluster or master node name. ``hail`` uses the standard iallocator API
52 and thus doesn't need any special setup (just needs to be installed in
53 the right directory).
54
55 For generating the text files, a separate tool (hscan) is provided to
56 automate their gathering if RAPI is available, which is better since
57 it can extract more precise information. In case RAPI is not usable
58 for whatever reason, the following two commands should be run::
59
60     gnt-node list -oname,mtotal,mnode,mfree,dtotal,dfree,offline \
61       --separator '|' --no-headers > nodes
62     gnt-instance list -oname,be/memory,sda_size,status,pnode,snodes \
63       --separator '|' --no-head > instances
64
65 These two files should be saved under the names of *nodes* and
66 *instances*.
67
68 Installation
69 ------------
70
71 If installing from source, you need a working ghc compiler (6.8 at
72 least) and some extra Haskell libraries which usually need to be
73 installed manually:
74
75 - json
76 - curl
77
78 Once these are available, just typing *make* in the top-level
79 directory should be enough.
80
81 Internal (implementation) documentation is available in the ``apidoc``
82 directory.
83
84 .. Local Variables:
85 .. mode: rst
86 .. End: