Проект

Общее

Профиль

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

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

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>
93 1 Dmitry Chernyak
94 1 Dmitry Chernyak
h2. PUPPET
95 1 Dmitry Chernyak
96 1 Dmitry Chernyak
Puppet http://www.puppetlabs.com/) is the open source platform for enterprise systems management.
97 1 Dmitry Chernyak
Puppet is used to deploy the configuration to the cluster instances.
98 1 Dmitry Chernyak
Documentation can be found at http://docs.puppetlabs.com/
99 1 Dmitry Chernyak
100 1 Dmitry Chernyak
Puppet master is installed on the instance 'sci'.
101 1 Dmitry Chernyak
102 1 Dmitry Chernyak
h2. DNS
103 1 Dmitry Chernyak
104 1 Dmitry Chernyak
DNS is configured on the instance 'sci' via puppet.
105 1 Dmitry Chernyak
106 1 Dmitry Chernyak
The zone file is stored as a template at @/etc/puppet/modules/bind9/templates/sci/zone.erb@
107 1 Dmitry Chernyak
On each update you should set new (growing) zone serial number, initially
108 1 Dmitry Chernyak
<pre>
109 1 Dmitry Chernyak
0000000001 ; Serial
110 1 Dmitry Chernyak
</pre>
111 1 Dmitry Chernyak
to the new growing value. YYYYMMDDNN is recommended (NN - is the change number in one day).
112 1 Dmitry Chernyak
Feel free to modify it to adjust your system.
113 1 Dmitry Chernyak
114 1 Dmitry Chernyak
New names should be placed below the string
115 1 Dmitry Chernyak
<pre>
116 1 Dmitry Chernyak
; here you can put any other records
117 1 Dmitry Chernyak
</pre>
118 1 Dmitry Chernyak
119 1 Dmitry Chernyak
To apply your changes quickly you should issue
120 1 Dmitry Chernyak
<pre>
121 1 Dmitry Chernyak
/etc/init.d/puppet restart
122 1 Dmitry Chernyak
</pre>
123 1 Dmitry Chernyak
124 1 Dmitry Chernyak
h2. Apt
125 1 Dmitry Chernyak
126 1 Dmitry Chernyak
Apt is configured on the instance 'sci' via puppet.
127 1 Dmitry Chernyak
128 1 Dmitry Chernyak
h3. sources.list
129 1 Dmitry Chernyak
130 1 Dmitry Chernyak
Global distributed sources.list template is resided in @/etc/puppet/modules/approx/templates/sources.list.erb@
131 1 Dmitry Chernyak
132 1 Dmitry Chernyak
h3. Approx
133 1 Dmitry Chernyak
134 1 Dmitry Chernyak
Approx is configured in @/etc/puppet/modules/approx/templates/approx.conf.erb@
135 1 Dmitry Chernyak
To apply your changes quickly you should issue
136 1 Dmitry Chernyak
<pre>
137 1 Dmitry Chernyak
/etc/init.d/puppet restart
138 1 Dmitry Chernyak
</pre>