Проект

Общее

Профиль

OPERATIONS » История » Версия 7

Владимир Ипатов, 24.10.2012 19:24

1 1 Dmitry Chernyak
h1. OPERATIONS
2 1 Dmitry Chernyak
3 1 Dmitry Chernyak
SCI cluster virtualization and HA capabilities are really bringed
4 1 Dmitry Chernyak
by a *Ganety* installation over the Debia/GNU Linux, so you should
5 1 Dmitry Chernyak
read Ganeti manuals on how to operate with virtualisation and HA
6 1 Dmitry Chernyak
features.
7 1 Dmitry Chernyak
8 1 Dmitry Chernyak
The main documentation page: http://docs.ganeti.org/ganeti/master/html/
9 1 Dmitry Chernyak
A brief operations overview: http://docs.ganeti.org/ganeti/master/html/walkthrough.html
10 1 Dmitry Chernyak
11 1 Dmitry Chernyak
Ganeti operations should be issued on the 'master' node which has additional the
12 1 Dmitry Chernyak
cluster's IP  as an interface alias.
13 1 Dmitry Chernyak
The first new nodes becames the 'master candidates', so they can be promoted to master
14 1 Dmitry Chernyak
if the master node will fail.
15 5 Владимир Ипатов
16 6 Владимир Ипатов
[[Basic cluster management]]
17 6 Владимир Ипатов
[[Failover management]]
18 6 Владимир Ипатов
[[SCI services management]]
19 5 Владимир Ипатов
20 1 Dmitry Chernyak
21 1 Dmitry Chernyak
Major commands:
22 1 Dmitry Chernyak
23 1 Dmitry Chernyak
h3. Check if all is ok
24 1 Dmitry Chernyak
25 1 Dmitry Chernyak
<pre>
26 1 Dmitry Chernyak
gnt-cluster verify
27 1 Dmitry Chernyak
</pre>
28 1 Dmitry Chernyak
29 1 Dmitry Chernyak
h3. Show detailed information
30 1 Dmitry Chernyak
31 1 Dmitry Chernyak
<pre>
32 1 Dmitry Chernyak
gnt-(cluster|node|instance) info
33 1 Dmitry Chernyak
</pre>
34 1 Dmitry Chernyak
35 1 Dmitry Chernyak
h3. List objects
36 1 Dmitry Chernyak
37 1 Dmitry Chernyak
Nodes
38 1 Dmitry Chernyak
<pre>
39 1 Dmitry Chernyak
gnt-node list
40 1 Dmitry Chernyak
</pre>
41 1 Dmitry Chernyak
42 1 Dmitry Chernyak
Configured instances
43 1 Dmitry Chernyak
<pre>
44 1 Dmitry Chernyak
gnt-instance list
45 1 Dmitry Chernyak
</pre>
46 1 Dmitry Chernyak
47 1 Dmitry Chernyak
h3. Create new instance
48 1 Dmitry Chernyak
49 1 Dmitry Chernyak
New instance on the NODE1 with failover on the NODE2, with one disk size 10Gb and 256M RAM.
50 1 Dmitry Chernyak
INSTANCE_NAME must be resolvable via DNS.
51 1 Dmitry Chernyak
<pre>
52 1 Dmitry Chernyak
gnt-instance add -t drbd -o debootstrap+default -s 10g -B memory=256m -n NODE1:NODE2 INSTANCE_NAME
53 1 Dmitry Chernyak
</pre>
54 1 Dmitry Chernyak
55 1 Dmitry Chernyak
Real example: create new instance
56 1 Dmitry Chernyak
* on the node gnt2
57 1 Dmitry Chernyak
* with failover on gnt1
58 1 Dmitry Chernyak
* with three disks:
59 1 Dmitry Chernyak
** 10g on volume group xenvg
60 1 Dmitry Chernyak
** 600m on volume group xenvg (probably for swap)
61 1 Dmitry Chernyak
* 5g on volume group xenvg
62 1 Dmitry Chernyak
* DNS name vg-test1
63 1 Dmitry Chernyak
* IP address will be configured automatically by resolving vg-test1' IP and matching it against @/etc/ganeti/networks@
64 1 Dmitry Chernyak
65 1 Dmitry Chernyak
<pre>
66 1 Dmitry Chernyak
gnt-instance add -t drbd -o debootstrap+default --disk 0:size=10g,vg=xenvg --disk 1:size=600m,vg=xenvg --disk 2:size=5g,vg=newvg -B memory=256m -n gnt2:gnt1 vg-test1
67 1 Dmitry Chernyak
</pre>
68 1 Dmitry Chernyak
69 1 Dmitry Chernyak
*NOTE:* the @vg=....@ option to specify different volume groups will be available since Ganeti 2.4.0 release.
70 1 Dmitry Chernyak
71 1 Dmitry Chernyak
h3. Instance manipulations
72 1 Dmitry Chernyak
73 1 Dmitry Chernyak
Various simple instance manipulations
74 1 Dmitry Chernyak
<pre>
75 1 Dmitry Chernyak
gnt-instance (startup|shutdown|reboot|failover|remove|console) INSTANCE
76 1 Dmitry Chernyak
</pre>
77 1 Dmitry Chernyak
78 1 Dmitry Chernyak
h3. OS command execution
79 1 Dmitry Chernyak
80 1 Dmitry Chernyak
Run OS command on all nodes
81 1 Dmitry Chernyak
<pre>
82 1 Dmitry Chernyak
gnt-cluster command .....
83 1 Dmitry Chernyak
</pre>
84 1 Dmitry Chernyak
85 1 Dmitry Chernyak
h2. SSH
86 1 Dmitry Chernyak
87 1 Dmitry Chernyak
All new instances, including 'sci' are going with empty root password and no ssh server installed.
88 1 Dmitry Chernyak
You should first log in to the instance using @gnt-instance console INSTANCE@ command, then set
89 1 Dmitry Chernyak
root's password using @passwd@ command and install ssh server using
90 1 Dmitry Chernyak
<pre>
91 1 Dmitry Chernyak
apt-get install openssh-server
92 1 Dmitry Chernyak
</pre>