15 |
15 |
enough memory reserved for this operation without needing to shutdown
|
16 |
16 |
other instances or rebalance the cluster.
|
17 |
17 |
|
|
18 |
**Quick start** (see the installation section for more details):
|
|
19 |
|
|
20 |
- (have the ghc compiler and the prerequisite libraries installed)
|
|
21 |
- make
|
|
22 |
- ./hbal -m $cluster -C -p
|
|
23 |
- look at the original and final cluster layout, and if acceptable,
|
|
24 |
execute the given commands
|
|
25 |
|
|
26 |
|
18 |
27 |
Available tools
|
19 |
28 |
---------------
|
20 |
29 |
|
... | ... | |
47 |
56 |
and non-mirrored instances and for relocations of mirrored
|
48 |
57 |
instances. It needs to be installed in Ganeti's iallocator search
|
49 |
58 |
path—usually ``/usr/lib/ganeti/iallocators`` or
|
50 |
|
``/usr/local/lib/ganeti/iallocators``. See the man page hail(1).
|
|
59 |
``/usr/local/lib/ganeti/iallocators``, and after that it can be used
|
|
60 |
via ganeti's ``--iallocator`` option (in various gnt-node/gnt-instance
|
|
61 |
commands). See the man page hail(1) for more details.
|
51 |
62 |
|
52 |
63 |
Cluster capacity estimator
|
53 |
64 |
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
... | ... | |
61 |
72 |
Integration with Ganeti
|
62 |
73 |
-----------------------
|
63 |
74 |
|
64 |
|
The ``hbal`` and ``hn1`` programs can either get their input from text
|
65 |
|
files, or online from a cluster via RAPI. For online collection via
|
66 |
|
RAPI, the "-m" argument to both hn1 and hbal should specify the
|
67 |
|
cluster or master node name. ``hail`` uses the standard iallocator API
|
68 |
|
and thus doesn't need any special setup (just needs to be installed in
|
69 |
|
the right directory).
|
|
75 |
The ``hbal``, ``hspace`` and ``hn1`` programs can either get their
|
|
76 |
input from text files, or online from a cluster via RAPI. For online
|
|
77 |
collection via RAPI, the "-m" argument to both hn1 and hbal should
|
|
78 |
specify the cluster or master node name. ``hail`` uses the standard
|
|
79 |
iallocator API and thus doesn't need any special setup (just needs to
|
|
80 |
be installed in the right directory).
|
70 |
81 |
|
71 |
|
For generating the text files, a separate tool (hscan) is provided to
|
72 |
|
automate their gathering if RAPI is available, which is better since
|
73 |
|
it can extract more precise information. In case RAPI is not usable
|
74 |
|
for whatever reason, the following two commands should be run::
|
|
82 |
For generating the text files, a separate tool (``hscan``) is provided
|
|
83 |
to automate their gathering if RAPI is available, which is better
|
|
84 |
since it can extract more precise information. In case RAPI is not
|
|
85 |
usable for whatever reason, the following two commands should be run::
|
75 |
86 |
|
76 |
87 |
gnt-node list -oname,mtotal,mnode,mfree,dtotal,dfree,offline \
|
77 |
88 |
--separator '|' --no-headers > nodes
|
... | ... | |
81 |
92 |
These two files should be saved under the names of *nodes* and
|
82 |
93 |
*instances*.
|
83 |
94 |
|
|
95 |
The ``hail`` program gets its data automatically from Ganeti when used
|
|
96 |
as described in its section.
|
|
97 |
|
84 |
98 |
Installation
|
85 |
99 |
------------
|
86 |
100 |
|
... | ... | |
88 |
102 |
least) and some extra Haskell libraries which usually need to be
|
89 |
103 |
installed manually:
|
90 |
104 |
|
91 |
|
- json
|
92 |
|
- curl
|
|
105 |
- json (http://hackage.haskell.org/cgi-bin/hackage-scripts/package/json)
|
|
106 |
- curl (http://hackage.haskell.org/cgi-bin/hackage-scripts/package/curl)
|
93 |
107 |
|
94 |
|
Once these are available, just typing *make* in the top-level
|
|
108 |
Once these are installed, just typing *make* in the top-level
|
95 |
109 |
directory should be enough.
|
96 |
110 |
|
|
111 |
Only the ``hail`` program needs to be installed in a specific place,
|
|
112 |
the other tools are not location-dependent.
|
|
113 |
|
|
114 |
For running the (admittedly small) unittest suite (via *make check*),
|
|
115 |
the QuickCheck version 1 library is needed.
|
|
116 |
|
97 |
117 |
Internal (implementation) documentation is available in the ``apidoc``
|
98 |
118 |
directory.
|
99 |
119 |
|