Statistics
| Branch: | Tag: | Revision:

root / man / ganeti.rst @ 2237687b

History | View | Annotate | Download (5.2 kB)

1 cc424a1d Iustin Pop
ganeti(7) Ganeti | Version @GANETI_VERSION@
2 cc424a1d Iustin Pop
===========================================
3 cc424a1d Iustin Pop
4 cc424a1d Iustin Pop
Name
5 cc424a1d Iustin Pop
----
6 cc424a1d Iustin Pop
7 cc424a1d Iustin Pop
ganeti - cluster-based virtualization management
8 cc424a1d Iustin Pop
9 cc424a1d Iustin Pop
Synopsis
10 cc424a1d Iustin Pop
--------
11 cc424a1d Iustin Pop
12 cc424a1d Iustin Pop
::
13 cc424a1d Iustin Pop
14 cc424a1d Iustin Pop
    # gnt-cluster init cluster1.example.com
15 cc424a1d Iustin Pop
    # gnt-node add node2.example.com
16 cc424a1d Iustin Pop
    # gnt-instance add -n node2.example.com \
17 cc424a1d Iustin Pop
    > -o debootstrap --disk 0:size=30g \
18 cc424a1d Iustin Pop
    > -t plain instance1.example.com
19 cc424a1d Iustin Pop
20 cc424a1d Iustin Pop
21 cc424a1d Iustin Pop
DESCRIPTION
22 cc424a1d Iustin Pop
-----------
23 cc424a1d Iustin Pop
24 cc424a1d Iustin Pop
The Ganeti software manages physical nodes and virtual instances of a
25 cc424a1d Iustin Pop
cluster based on a virtualization software. The current version (2.3)
26 cc424a1d Iustin Pop
supports Xen 3.x and KVM (72 or above) as hypervisors, and LXC as an
27 cc424a1d Iustin Pop
experimental hypervisor.
28 cc424a1d Iustin Pop
29 cc424a1d Iustin Pop
Quick start
30 cc424a1d Iustin Pop
-----------
31 cc424a1d Iustin Pop
32 cc424a1d Iustin Pop
First you must install the software on all the cluster nodes, either
33 cc424a1d Iustin Pop
from sources or (if available) from a package. The next step is to
34 cc424a1d Iustin Pop
create the initial cluster configuration, using **gnt-cluster init**.
35 cc424a1d Iustin Pop
36 cc424a1d Iustin Pop
Then you can add other nodes, or start creating instances.
37 cc424a1d Iustin Pop
38 cc424a1d Iustin Pop
Cluster architecture
39 cc424a1d Iustin Pop
--------------------
40 cc424a1d Iustin Pop
41 cc424a1d Iustin Pop
In Ganeti 2.0, the architecture of the cluster is a little more
42 cc424a1d Iustin Pop
complicated than in 1.2. The cluster is coordinated by a master daemon
43 cc424a1d Iustin Pop
(**ganeti-masterd**(8)), running on the master node. Each node runs
44 cc424a1d Iustin Pop
(as before) a node daemon, and the master has the RAPI daemon running
45 cc424a1d Iustin Pop
too.
46 cc424a1d Iustin Pop
47 cc424a1d Iustin Pop
Node roles
48 cc424a1d Iustin Pop
~~~~~~~~~~
49 cc424a1d Iustin Pop
50 cc424a1d Iustin Pop
Each node can be in one of the following states:
51 cc424a1d Iustin Pop
52 cc424a1d Iustin Pop
master
53 cc424a1d Iustin Pop
    Only one node per cluster can be in this role, and this node is the
54 cc424a1d Iustin Pop
    one holding the authoritative copy of the cluster configuration and
55 cc424a1d Iustin Pop
    the one that can actually execute commands on the cluster and
56 cc424a1d Iustin Pop
    modify the cluster state. See more details under
57 cc424a1d Iustin Pop
    *Cluster configuration*.
58 cc424a1d Iustin Pop
59 cc424a1d Iustin Pop
master_candidate
60 cc424a1d Iustin Pop
    The node receives the full cluster configuration (configuration
61 cc424a1d Iustin Pop
    file and jobs) and can become a master via the
62 cc424a1d Iustin Pop
    **gnt-cluster master-failover** command. Nodes that are not in this
63 cc424a1d Iustin Pop
    state cannot transition into the master role due to missing state.
64 cc424a1d Iustin Pop
65 cc424a1d Iustin Pop
regular
66 cc424a1d Iustin Pop
    This the normal state of a node.
67 cc424a1d Iustin Pop
68 cc424a1d Iustin Pop
drained
69 cc424a1d Iustin Pop
    Nodes in this state are functioning normally but cannot receive
70 cc424a1d Iustin Pop
    new instances, because the intention is to set them to *offline*
71 cc424a1d Iustin Pop
    or remove them from the cluster.
72 cc424a1d Iustin Pop
73 cc424a1d Iustin Pop
offline
74 cc424a1d Iustin Pop
    These nodes are still recorded in the Ganeti configuration, but
75 cc424a1d Iustin Pop
    except for the master daemon startup voting procedure, they are not
76 cc424a1d Iustin Pop
    actually contacted by the master. This state was added in order to
77 cc424a1d Iustin Pop
    allow broken machines (that are being repaired) to remain in the
78 cc424a1d Iustin Pop
    cluster but without creating problems.
79 cc424a1d Iustin Pop
80 cc424a1d Iustin Pop
81 cc424a1d Iustin Pop
Node flags
82 cc424a1d Iustin Pop
~~~~~~~~~~
83 cc424a1d Iustin Pop
84 cc424a1d Iustin Pop
Nodes have two flags which govern which roles they can take:
85 cc424a1d Iustin Pop
86 cc424a1d Iustin Pop
master_capable
87 cc424a1d Iustin Pop
    The node can become a master candidate, and furthermore the master
88 cc424a1d Iustin Pop
    node. When this flag is disabled, the node cannot become a
89 cc424a1d Iustin Pop
    candidate; this can be useful for special networking cases, or less
90 cc424a1d Iustin Pop
    reliable hardware.
91 cc424a1d Iustin Pop
92 cc424a1d Iustin Pop
vm_capable
93 cc424a1d Iustin Pop
    The node can host instances. When enabled (the default state), the
94 cc424a1d Iustin Pop
    node will participate in instance allocation, capacity calculation,
95 cc424a1d Iustin Pop
    etc. When disabled, the node will be skipped in many cluster checks
96 cc424a1d Iustin Pop
    and operations.
97 cc424a1d Iustin Pop
98 cc424a1d Iustin Pop
99 b74bf80c René Nussbaumer
Node Parameters
100 b74bf80c René Nussbaumer
~~~~~~~~~~~~~~~
101 b74bf80c René Nussbaumer
102 b74bf80c René Nussbaumer
These parameters are node specific and can be preseeded on node-group
103 b74bf80c René Nussbaumer
and cluster level.
104 b74bf80c René Nussbaumer
105 b74bf80c René Nussbaumer
Currently we support the following node parameters:
106 b74bf80c René Nussbaumer
107 b74bf80c René Nussbaumer
oob_program
108 b74bf80c René Nussbaumer
    Path to an executable used as the out-of-band helper as described in
109 b74bf80c René Nussbaumer
    the `Ganeti Node OOB Management Framework <design-oob.rst>`_ design
110 b74bf80c René Nussbaumer
    document.
111 b74bf80c René Nussbaumer
112 b74bf80c René Nussbaumer
113 cc424a1d Iustin Pop
Cluster configuration
114 cc424a1d Iustin Pop
~~~~~~~~~~~~~~~~~~~~~
115 cc424a1d Iustin Pop
116 cc424a1d Iustin Pop
The master node keeps and is responsible for the cluster
117 cc424a1d Iustin Pop
configuration. On the filesystem, this is stored under the
118 cc424a1d Iustin Pop
``@LOCALSTATEDIR@/ganeti/lib`` directory, and if the master daemon is
119 cc424a1d Iustin Pop
stopped it can be backed up normally.
120 cc424a1d Iustin Pop
121 cc424a1d Iustin Pop
The master daemon will replicate the configuration database called
122 cc424a1d Iustin Pop
``config.data`` and the job files to all the nodes in the master
123 cc424a1d Iustin Pop
candidate role. It will also distribute a copy of some configuration
124 cc424a1d Iustin Pop
values via the *ssconf* files, which are stored in the same directory
125 cc424a1d Iustin Pop
and start with a ``ssconf_`` prefix, to all nodes.
126 cc424a1d Iustin Pop
127 cc424a1d Iustin Pop
Jobs
128 cc424a1d Iustin Pop
~~~~
129 cc424a1d Iustin Pop
130 cc424a1d Iustin Pop
All cluster modification are done via jobs. A job consists of one
131 cc424a1d Iustin Pop
or more opcodes, and the list of opcodes is processed serially. If
132 cc424a1d Iustin Pop
an opcode fails, the entire job is failed and later opcodes are no
133 cc424a1d Iustin Pop
longer processed. A job can be in one of the following states:
134 cc424a1d Iustin Pop
135 cc424a1d Iustin Pop
queued
136 cc424a1d Iustin Pop
    The job has been submitted but not yet processed by the master
137 cc424a1d Iustin Pop
    daemon.
138 cc424a1d Iustin Pop
139 cc424a1d Iustin Pop
waiting
140 cc424a1d Iustin Pop
    The job is waiting for for locks before the first of its opcodes.
141 cc424a1d Iustin Pop
142 cc424a1d Iustin Pop
canceling
143 cc424a1d Iustin Pop
    The job is waiting for locks, but is has been marked for
144 cc424a1d Iustin Pop
    cancellation. It will not transition to *running*, but to
145 cc424a1d Iustin Pop
    *canceled*.
146 cc424a1d Iustin Pop
147 cc424a1d Iustin Pop
running
148 cc424a1d Iustin Pop
    The job is currently being executed.
149 cc424a1d Iustin Pop
150 cc424a1d Iustin Pop
canceled
151 cc424a1d Iustin Pop
    The job has been canceled before starting execution.
152 cc424a1d Iustin Pop
153 cc424a1d Iustin Pop
success
154 cc424a1d Iustin Pop
    The job has finished successfully.
155 cc424a1d Iustin Pop
156 cc424a1d Iustin Pop
error
157 cc424a1d Iustin Pop
    The job has failed during runtime, or the master daemon has been
158 cc424a1d Iustin Pop
    stopped during the job execution.
159 cc424a1d Iustin Pop
160 cc424a1d Iustin Pop
161 cc424a1d Iustin Pop
Common options
162 cc424a1d Iustin Pop
--------------
163 cc424a1d Iustin Pop
164 cc424a1d Iustin Pop
Many Ganeti commands provide the following options. The
165 cc424a1d Iustin Pop
availability for a certain command can be checked by calling the
166 cc424a1d Iustin Pop
command using the ``--help`` option.
167 cc424a1d Iustin Pop
168 cc424a1d Iustin Pop
**gnt-...** *command* [--dry-run] [--priority {low | normal | high}]
169 cc424a1d Iustin Pop
170 cc424a1d Iustin Pop
The ``--dry-run`` option can be used to check whether an operation
171 cc424a1d Iustin Pop
would succeed.
172 cc424a1d Iustin Pop
173 cc424a1d Iustin Pop
The option ``--priority`` sets the priority for opcodes submitted
174 cc424a1d Iustin Pop
by the command.