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