~themue/clouddocs/001-cloud-administration-guide

« back to all changes in this revision

Viewing changes to cloud-administration-guide.md

  • Committer: Frank Mueller
  • Date: 2014-04-01 16:17:39 UTC
  • Revision ID: frank.mueller@canonical.com-20140401161739-po2fp8cz11jxctcv
Added Ceph snapshots.

Show diffs side-by-side

added added

removed removed

Lines of Context:
139
139
Glance also uses the directory named `/var/lib/glance` which also should be backed
140
140
up.
141
141
 
142
 
**TODO(mue)** Cover the backup of Ceph as Glance storage here.
143
 
 
144
142
##### Keystone
145
143
 
146
144
Keystone is using the directories `/etc/keystone`, `/var/lib/keystone`, and
162
160
is to copy the builder files to the storage nodes along with the ring files. So
163
161
multiple copies are spread throughout the cluster.
164
162
 
165
 
**TODO(mue)** Read more about the ring files and the builder files.
 
163
**TODO(mue)** Really needed when we use Ceph for storage?
166
164
 
167
165
#### Restore
168
166
 
207
205
 
208
206
The process for the other components look similar.
209
207
 
 
208
### Ceph
 
209
 
 
210
A snapshot is a read-only copy of the state of an image at a particular point in time. One 
 
211
of the advanced features of Ceph block devices is that you can create snapshots of the images 
 
212
to retain a history of an image’s state. Ceph also supports snapshot layering, which allows 
 
213
you to clone images (e.g., a VM image) quickly and easily. Ceph supports block device snapshots 
 
214
using the `rbd` command and many higher level interfaces including OpenStack.
 
215
 
 
216
#### Backup
 
217
 
 
218
To create a snapshot with `rbd`, specify the `snap create` option, the pool name and the 
 
219
image name.
 
220
 
 
221
````
 
222
rbd --pool {pool-name} snap create --snap {snap-name} {image-name}
 
223
rbd snap create {pool-name}/{image-name}@{snap-name}
 
224
````
 
225
 
 
226
For example:
 
227
 
 
228
````
 
229
rbd --pool rbd snap create --snap snapname foo
 
230
rbd snap create rbd/foo@snapname
 
231
````
 
232
 
 
233
#### Restore
 
234
 
 
235
To rollback to a snapshot with `rbd`, specify the `snap rollback` option, the pool name, the 
 
236
image name and the snap name.
 
237
 
 
238
````
 
239
rbd --pool {pool-name} snap rollback --snap {snap-name} {image-name}
 
240
rbd snap rollback {pool-name}/{image-name}@{snap-name}
 
241
````
 
242
 
 
243
For example:
 
244
 
 
245
````
 
246
rbd --pool rbd snap rollback --snap snapname foo
 
247
rbd snap rollback rbd/foo@snapname
 
248
````
 
249
 
 
250
**Note:** Rolling back an image to a snapshot means overwriting the current version of the image 
 
251
with data from a snapshot. The time it takes to execute a rollback increases with the size of the 
 
252
image. It is faster to clone from a snapshot than to rollback an image to a snapshot, and it is 
 
253
the preferred method of returning to a pre-existing state.
 
254
 
 
255
#### Maintenance
 
256
 
 
257
Taking snapshots increases your level of security but also costs disk space. To delete older ones
 
258
you can list them, delete individual ones or purge all snapshots.
 
259
 
 
260
To list snapshots of an image, specify the pool name and the image name.
 
261
 
 
262
````
 
263
rbd --pool {pool-name} snap ls {image-name}
 
264
rbd snap ls {pool-name}/{image-name}
 
265
````
 
266
 
 
267
For example:
 
268
 
 
269
````
 
270
rbd --pool rbd snap ls foo
 
271
rbd snap ls rbd/foo
 
272
````
 
273
 
 
274
To delete a snapshot with `rbd`, specify the `snap rm` option, the pool name, the image name 
 
275
and the username.
 
276
 
 
277
````
 
278
rbd --pool {pool-name} snap rm --snap {snap-name} {image-name}
 
279
rbd snap rm {pool-name}/{image-name}@{snap-name}
 
280
````
 
281
 
 
282
For example:
 
283
 
 
284
````
 
285
rbd --pool rbd snap rm --snap snapname foo
 
286
rbd snap rm rbd/foo@snapname
 
287
````
 
288
 
 
289
**Note:** Ceph OSDs delete data asynchronously, so deleting a snapshot doesn’t free up the 
 
290
disk space immediately.
 
291
 
 
292
To delete all snapshots for an image with `rbd`, specify the snap purge option and the 
 
293
image name.
 
294
 
 
295
````
 
296
rbd --pool {pool-name} snap purge {image-name}
 
297
rbd snap purge {pool-name}/{image-name}
 
298
````
 
299
 
 
300
For example:
 
301
 
 
302
````
 
303
rbd --pool rbd snap purge foo
 
304
rbd snap purge rbd/foo
 
305
````
 
306
 
210
307
## Upgrades and Patching
211
308
 
212
309
### Juju
303
400
  whether something is going horribly wrong in intercomponent communication if you 
304
401
  look at the network packets and see too many.
305
402
 
 
403
**TODO(mue)** Add more concrete description here.
 
404
 
306
405
## Connecting to Logging Systems
307
406
 
308
407
The controlling of individual logs is a cumbersome job, even in an environment with only
416
515
 
417
516
### Using Ceph for storage
418
517
 
419
 
**TODO(mue)** Compare standard procedure to our environment.
 
518
As documented in the *OpenStack Installation Guide* we're using Ceph as block device
 
519
for Cinder. It stripes block device images as objects across a cluster. This way it
 
520
provides a better performance than a typical standalone server. So it allows scalability 
 
521
and redundancy needs to be satisified and Cinder's RBD driver used to create, export and 
 
522
connect volumes to instances. This assumes a functioning Ceph cluster has already been 
 
523
deployed using the official Ceph charm like descibed in the document mentioned above. 
 
524
Here our `openstack-config.yaml` contains the setting `block-device: None` for Cinder.
 
525
This way we don't use the local device for Cinder.
 
526
 
 
527
The next step has to be adding the relations between Cinder and Ceph as well as Cinder
 
528
and other needed services.
 
529
 
 
530
````
 
531
juju add-relation cinder ceph
 
532
juju add-relation cinder keystone
 
533
juju add-relation cinder mysql
 
534
juju add-relation cinder rabbitmq-server
 
535
juju add-relation cinder nova-cloud-controller
 
536
````
 
537
 
 
538
The addition of Ceph nodes is done using the Juju `add-node` command. By default
 
539
it adds only one node, but it is possible to add the number of wanted nodes as
 
540
argument.
 
541
 
 
542
````
 
543
# Add one ceph node
 
544
$ juju add-node ceph
 
545
# Add ten ceph nodes
 
546
$ juju add-node ceph -n 10
 
547
````
 
548
 
 
549
**SEE ALSO** https://jujucharms.com/precise/ceph-22/#readme
 
550
 
 
551
**TODO(mue)** Description of how to tell MAAS to provide nodes for Ceph and to
 
552
explicitely choose them by their specs is missing.
 
553
 
 
554
**TODO(mue)** Hmm, text below seems not to be needed. Still useful in a different way?
420
555
 
421
556
Ceph stripes block device images as objects across a cluster. This way it provides
422
557
a better performance than standalone server. OpenStack is able to use Ceph Block Devices
642
777
Once OpenStack is up and running, you should be able to create a volume 
643
778
and boot from it.
644
779
 
645
 
#### Adding Ceph nodes
646
 
 
647
 
The addition of Ceph nodes is done using the Juju `add-node` command. By default
648
 
it adds only one node, but it is possible to add the number of wanted nodes as
649
 
argument.
650
 
 
651
 
````
652
 
# Add one ceph node
653
 
$ juju add-node ceph
654
 
# Add ten ceph nodes
655
 
$ juju add-node ceph -n 10
656
 
````
657
 
 
658
 
**TODO(mue)** How are the added nodes integrated to Cinder?
659
 
 
660
 
**SEE ALSO** https://jujucharms.com/precise/ceph-22/#readme
661
 
 
662
780
### Adding Nova instances
663
781
 
664
782
**TODO**