Проект

Общее

Профиль

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

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

1 1 Dmitry Chernyak
h1. OPERATIONS
2 1 Dmitry Chernyak
3 2 Владимир Ипатов
[[Cluster management]]
4 2 Владимир Ипатов
[[Instance management]]
5 2 Владимир Ипатов
[[Puppet]]
6 3 Владимир Ипатов
[[DNS+DHCP]]
7 4 Владимир Ипатов
[[Other]]
8 2 Владимир Ипатов
9 1 Dmitry Chernyak
{{toc}}
10 1 Dmitry Chernyak
11 1 Dmitry Chernyak
h2. Virtualization and HA
12 1 Dmitry Chernyak
13 1 Dmitry Chernyak
SCI cluster virtualization and HA capabilities are really bringed
14 1 Dmitry Chernyak
by a *Ganety* installation over the Debia/GNU Linux, so you should
15 1 Dmitry Chernyak
read Ganeti manuals on how to operate with virtualisation and HA
16 1 Dmitry Chernyak
features.
17 1 Dmitry Chernyak
18 1 Dmitry Chernyak
The main documentation page: http://docs.ganeti.org/ganeti/master/html/
19 1 Dmitry Chernyak
A brief operations overview: http://docs.ganeti.org/ganeti/master/html/walkthrough.html
20 1 Dmitry Chernyak
21 1 Dmitry Chernyak
Ganeti operations should be issued on the 'master' node which has additional the
22 1 Dmitry Chernyak
cluster's IP  as an interface alias.
23 1 Dmitry Chernyak
The first new nodes becames the 'master candidates', so they can be promoted to master
24 1 Dmitry Chernyak
if the master node will fail.
25 1 Dmitry Chernyak
26 1 Dmitry Chernyak
Major commands:
27 1 Dmitry Chernyak
28 1 Dmitry Chernyak
h3. Check if all is ok
29 1 Dmitry Chernyak
30 1 Dmitry Chernyak
<pre>
31 1 Dmitry Chernyak
gnt-cluster verify
32 1 Dmitry Chernyak
</pre>
33 1 Dmitry Chernyak
34 1 Dmitry Chernyak
h3. Show detailed information
35 1 Dmitry Chernyak
36 1 Dmitry Chernyak
<pre>
37 1 Dmitry Chernyak
gnt-(cluster|node|instance) info
38 1 Dmitry Chernyak
</pre>
39 1 Dmitry Chernyak
40 1 Dmitry Chernyak
h3. List objects
41 1 Dmitry Chernyak
42 1 Dmitry Chernyak
Nodes
43 1 Dmitry Chernyak
<pre>
44 1 Dmitry Chernyak
gnt-node list
45 1 Dmitry Chernyak
</pre>
46 1 Dmitry Chernyak
47 1 Dmitry Chernyak
Configured instances
48 1 Dmitry Chernyak
<pre>
49 1 Dmitry Chernyak
gnt-instance list
50 1 Dmitry Chernyak
</pre>
51 1 Dmitry Chernyak
52 1 Dmitry Chernyak
h3. Create new instance
53 1 Dmitry Chernyak
54 1 Dmitry Chernyak
New instance on the NODE1 with failover on the NODE2, with one disk size 10Gb and 256M RAM.
55 1 Dmitry Chernyak
INSTANCE_NAME must be resolvable via DNS.
56 1 Dmitry Chernyak
<pre>
57 1 Dmitry Chernyak
gnt-instance add -t drbd -o debootstrap+default -s 10g -B memory=256m -n NODE1:NODE2 INSTANCE_NAME
58 1 Dmitry Chernyak
</pre>
59 1 Dmitry Chernyak
60 1 Dmitry Chernyak
Real example: create new instance
61 1 Dmitry Chernyak
* on the node gnt2
62 1 Dmitry Chernyak
* with failover on gnt1
63 1 Dmitry Chernyak
* with three disks:
64 1 Dmitry Chernyak
** 10g on volume group xenvg
65 1 Dmitry Chernyak
** 600m on volume group xenvg (probably for swap)
66 1 Dmitry Chernyak
* 5g on volume group xenvg
67 1 Dmitry Chernyak
* DNS name vg-test1
68 1 Dmitry Chernyak
* IP address will be configured automatically by resolving vg-test1' IP and matching it against @/etc/ganeti/networks@
69 1 Dmitry Chernyak
70 1 Dmitry Chernyak
<pre>
71 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
72 1 Dmitry Chernyak
</pre>
73 1 Dmitry Chernyak
74 1 Dmitry Chernyak
*NOTE:* the @vg=....@ option to specify different volume groups will be available since Ganeti 2.4.0 release.
75 1 Dmitry Chernyak
76 1 Dmitry Chernyak
h3. Instance manipulations
77 1 Dmitry Chernyak
78 1 Dmitry Chernyak
Various simple instance manipulations
79 1 Dmitry Chernyak
<pre>
80 1 Dmitry Chernyak
gnt-instance (startup|shutdown|reboot|failover|remove|console) INSTANCE
81 1 Dmitry Chernyak
</pre>
82 1 Dmitry Chernyak
83 1 Dmitry Chernyak
h3. OS command execution
84 1 Dmitry Chernyak
85 1 Dmitry Chernyak
Run OS command on all nodes
86 1 Dmitry Chernyak
<pre>
87 1 Dmitry Chernyak
gnt-cluster command .....
88 1 Dmitry Chernyak
</pre>
89 1 Dmitry Chernyak
90 1 Dmitry Chernyak
h2. SSH
91 1 Dmitry Chernyak
92 1 Dmitry Chernyak
All new instances, including 'sci' are going with empty root password and no ssh server installed.
93 1 Dmitry Chernyak
You should first log in to the instance using @gnt-instance console INSTANCE@ command, then set
94 1 Dmitry Chernyak
root's password using @passwd@ command and install ssh server using
95 1 Dmitry Chernyak
<pre>
96 1 Dmitry Chernyak
apt-get install openssh-server
97 1 Dmitry Chernyak
</pre>
98 1 Dmitry Chernyak
99 1 Dmitry Chernyak
h2. PUPPET
100 1 Dmitry Chernyak
101 1 Dmitry Chernyak
Puppet http://www.puppetlabs.com/) is the open source platform for enterprise systems management.
102 1 Dmitry Chernyak
Puppet is used to deploy the configuration to the cluster instances.
103 1 Dmitry Chernyak
Documentation can be found at http://docs.puppetlabs.com/
104 1 Dmitry Chernyak
105 1 Dmitry Chernyak
Puppet master is installed on the instance 'sci'.
106 1 Dmitry Chernyak
107 1 Dmitry Chernyak
h2. DNS
108 1 Dmitry Chernyak
109 1 Dmitry Chernyak
DNS is configured on the instance 'sci' via puppet.
110 1 Dmitry Chernyak
111 1 Dmitry Chernyak
The zone file is stored as a template at @/etc/puppet/modules/bind9/templates/sci/zone.erb@
112 1 Dmitry Chernyak
On each update you should set new (growing) zone serial number, initially
113 1 Dmitry Chernyak
<pre>
114 1 Dmitry Chernyak
0000000001 ; Serial
115 1 Dmitry Chernyak
</pre>
116 1 Dmitry Chernyak
to the new growing value. YYYYMMDDNN is recommended (NN - is the change number in one day).
117 1 Dmitry Chernyak
Feel free to modify it to adjust your system.
118 1 Dmitry Chernyak
119 1 Dmitry Chernyak
New names should be placed below the string
120 1 Dmitry Chernyak
<pre>
121 1 Dmitry Chernyak
; here you can put any other records
122 1 Dmitry Chernyak
</pre>
123 1 Dmitry Chernyak
124 1 Dmitry Chernyak
To apply your changes quickly you should issue
125 1 Dmitry Chernyak
<pre>
126 1 Dmitry Chernyak
/etc/init.d/puppet restart
127 1 Dmitry Chernyak
</pre>
128 1 Dmitry Chernyak
129 1 Dmitry Chernyak
h2. Apt
130 1 Dmitry Chernyak
131 1 Dmitry Chernyak
Apt is configured on the instance 'sci' via puppet.
132 1 Dmitry Chernyak
133 1 Dmitry Chernyak
h3. sources.list
134 1 Dmitry Chernyak
135 1 Dmitry Chernyak
Global distributed sources.list template is resided in @/etc/puppet/modules/approx/templates/sources.list.erb@
136 1 Dmitry Chernyak
137 1 Dmitry Chernyak
h3. Approx
138 1 Dmitry Chernyak
139 1 Dmitry Chernyak
Approx is configured in @/etc/puppet/modules/approx/templates/approx.conf.erb@
140 1 Dmitry Chernyak
To apply your changes quickly you should issue
141 1 Dmitry Chernyak
<pre>
142 1 Dmitry Chernyak
/etc/init.d/puppet restart
143 1 Dmitry Chernyak
</pre>