From 640830a44046e4a17e41a48dcd8d32c1b53124d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nguy=E1=BB=85n=20Duy=20V=C5=A9=20=28CBR09=29?= Date: Thu, 8 Oct 2015 21:56:49 +0700 Subject: [PATCH] Add Ceph deployment document Deploy Ceph in kolla Change-Id: Icecc6f4ee25b5ee0cad4265c0b57790bfb32a905 --- doc/ceph-guide.rst | 123 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 123 insertions(+) create mode 100644 doc/ceph-guide.rst diff --git a/doc/ceph-guide.rst b/doc/ceph-guide.rst new file mode 100644 index 0000000000..97d735734e --- /dev/null +++ b/doc/ceph-guide.rst @@ -0,0 +1,123 @@ +Ceph in Kolla +============= + +Requirements +------------ + +Using Ceph requires at least two physical disks across the OpenStack deployment to operate correctly. + +Preparation and Deployment +-------------------------- + +For the disks used for Ceph, execute the following operations: + + +:: + + + parted $DISK -s -- mklabel gpt mkpart KOLLA_CEPH_OSD_BOOTSTRAP 1 -1 + where $DISK == /dev/sdb or something similiar + +The following shows an example of using parted to configure /dev/sdb for usage with Kolla. + +:: + + parted /dev/sdb -s -- mklabel gpt mkpart KOLLA_CEPH_OSD_BOOTSTRAP 1 -1 + parted /dev/sdb print + Model: VMware, VMware Virtual S (scsi) + Disk /dev/sdb: 10.7GB + Sector size (logical/physical): 512B/512B + Partition Table: gpt + Number Start End Size File system Name Flags + 1 1049kB 10.7GB 10.7GB KOLLA_CEPH_OSD_BOOTSTRAP + + +Edit the [storage] group in the inventory which contains the hostname(or IP) of the Ceph-OSD hosts +which have the above disks. Note: ssh authentication is required for Ceph, even in all-in-one. +(TODO(CBR09): insert link to bug around this if there is one). The following shows an example +of two Ceph-OSD hosts which using one disk of the controller node and one disk of compute1. + +:: + + file: ansible/inventory/multinode + ... + [storage] + controller + compute1 + ... + +For AIO: + +:: + + file: ansible/inventory/multinode + ... + [storage] + all-in-one + ... + + +Enable Ceph in /etc/kolla/globals.yml (Ceph is disabled by default): + +:: + + file: /etc/kolla/globals.yml + .... + enable_ceph: "yes" + .... + +Finally deploy the Ceph-enabled OpenStack: + +:: + + tools/kolla-ansible deploy -i ansible/inventory/multinode + +Debugging Ceph +-------------- + +If Ceph is run in an all-in-one deployment or with less than three storage nodes, further +configuration is required. It is necessary to change the default number of copies for the pool. +The following example demonstrates how to change the number of copies for the pool: + +If the deployment includes two Ceph-OSD hosts as mentioned above, set the pool to 2. + +:: + + docker exec ceph_mon ceph osd pool set rbd size 2 (default only have rdb pool) + +For AIO: + +:: + + docker exec ceph_mon ceph osd pool set rbd size 1 (default only have rdb pool) + +If Glance, Nova, and cinder have been deployed, all pools have to be modified. +An example of modifying the pools: + +:: + + for p in images vms volumes backups rbd; do docker exec ceph_mon ceph osd pool set $p size 2; done + + +For AIO: + +:: + + for p in images vms volumes backups rbd; do docker exec ceph_mon ceph osd pool set $p size 1; done + +After making this change, it is mandatory to restart all Ceph osd containers. + +Check the Ceph status for more diagnostic information. The sample output below +indicates a healthy cluster: + +:: + + docker exec ceph_mon ceph -s + cluster 5fba2fbc-551d-11e5-a8ce-01ef4c5cf93c + health HEALTH_OK + monmap e1: 1 mons at {controller=10.0.0.128:6789/0} + election epoch 2, quorum 0 controller + osdmap e18: 2 osds: 2 up, 2 in + pgmap v27: 64 pgs, 1 pools, 0 bytes data, 0 objects + 68676 kB used, 20390 MB / 20457 MB avail + 64 active+clean