Allow customization of the Ceph pool names
authorGiulio Fidente <gfidente@redhat.com>
Thu, 13 Aug 2015 17:04:17 +0000 (19:04 +0200)
committerGiulio Fidente <gfidente@redhat.com>
Thu, 5 Nov 2015 18:38:44 +0000 (19:38 +0100)
This is useful in those scenarios were we want to use an external
Ceph deployment with multiple overclouds.

Change-Id: I1749d2a6547f6ce25843709e46a1447e8d42cfff

environments/puppet-ceph-external.yaml
os-apply-config/ceph-cluster-config.yaml
puppet/ceph-cluster-config.yaml
puppet/extraconfig/ceph/ceph-external-config.yaml
puppet/hieradata/ceph.yaml
puppet/hieradata/compute.yaml
puppet/manifests/overcloud_controller.pp
puppet/manifests/overcloud_controller_pacemaker.pp

index 3c7901c..f22967f 100644 (file)
@@ -3,7 +3,7 @@
 resource_registry:
   OS::TripleO::CephClusterConfig::SoftwareConfig: ../puppet/extraconfig/ceph/ceph-external-config.yaml
 
-parameters:
+parameter_defaults:
   # NOTE: These example parameters are required when using Ceph External
   #CephClusterFSID: '4b5c8c0a-ff60-454b-a1b4-9747aa737d19'
   #CephClientKey: 'AQDLOh1VgEp6FRAAFzT7Zw+Y9V6JJExQAsRnRQ=='
@@ -13,6 +13,11 @@ parameters:
   NovaEnableRbdBackend: true
   CinderEnableRbdBackend: true
   GlanceBackend: rbd
+  # If the Ceph pools which host VMs, Volumes and Images do not match these
+  # names, edit the following as needed.
+  NovaRbdPoolName: vms
+  CinderRbdPoolName: volumes
+  GlanceRbdPoolName: images
 
   # finally we disable the Cinder LVM backend
   CinderEnableIscsiBackend: false
index c3cf8e8..4e435ff 100644 (file)
@@ -27,6 +27,15 @@ parameters:
     type: comma_delimited_list
   ceph_mon_ips:
     type: comma_delimited_list
+  NovaRbdPoolName:
+    default: vms
+    type: string
+  CinderRbdPoolName:
+    default: volumes
+    type: string
+  GlanceRbdPoolName:
+    default: images
+    type: string
 
 resources:
   CephClusterConfigImpl:
index 9926549..5e54a62 100644 (file)
@@ -27,6 +27,15 @@ parameters:
     type: comma_delimited_list
   ceph_mon_ips:
     type: comma_delimited_list
+  NovaRbdPoolName:
+    default: vms
+    type: string
+  CinderRbdPoolName:
+    default: volumes
+    type: string
+  GlanceRbdPoolName:
+    default: images
+    type: string
 
 resources:
   CephClusterConfigImpl:
@@ -69,11 +78,21 @@ resources:
                         secret: 'ADMIN_KEY',
                         mode: '0644',
                         cap_mon: 'allow r',
-                        cap_osd: 'allow class-read object_prefix rbd_children, allow rwx pool=volumes, allow rwx pool=vms, allow rwx pool=images'
+                        cap_osd: 'allow class-read object_prefix rbd_children, allow rwx pool=CINDER_POOL, allow rwx pool=NOVA_POOL, allow rwx pool=GLANCE_POOL'
                       }
                     }"
                     params:
                       ADMIN_KEY: {get_param: ceph_admin_key}
+                      NOVA_POOL: {get_param: NovaRbdPoolName}
+                      CINDER_POOL: {get_param: CinderRbdPoolName}
+                      GLANCE_POOL: {get_param: GlanceRbdPoolName}
+                nova::compute::rbd::libvirt_images_rbd_pool: {get_param: NovaRbdPoolName}
+                cinder_rbd_pool_name: {get_param: CinderRbdPoolName}
+                glance::backend::rbd::rbd_store_pool: {get_param: GlanceRbdPoolName}
+                ceph_pools:
+                  - {get_param: CinderRbdPoolName}
+                  - {get_param: NovaRbdPoolName}
+                  - {get_param: GlanceRbdPoolName}
 
 outputs:
   config_id:
index 6290710..fadc8a0 100644 (file)
@@ -29,6 +29,15 @@ parameters:
     type: comma_delimited_list
   ceph_mon_ips:
     type: comma_delimited_list
+  NovaRbdPoolName:
+    default: vms
+    type: string
+  CinderRbdPoolName:
+    default: volumes
+    type: string
+  GlanceRbdPoolName:
+    default: images
+    type: string
 
 resources:
   CephClusterConfigImpl:
@@ -51,12 +60,21 @@ resources:
                         secret: 'CLIENT_KEY',
                         mode: '0644',
                         cap_mon: 'allow r',
-                        cap_osd: 'allow class-read object_prefix rbd_children, allow rwx pool=volumes, allow rwx pool=vms, allow rwx pool=images'
+                        cap_osd: 'allow class-read object_prefix rbd_children, allow rwx pool=CINDER_POOL, allow rwx pool=NOVA_POOL, allow rwx pool=GLANCE_POOL'
                       }
                     }"
                     params:
                       CLIENT_KEY: {get_param: ceph_client_key}
-
+                      NOVA_POOL: {get_param: NovaRbdPoolName}
+                      CINDER_POOL: {get_param: CinderRbdPoolName}
+                      GLANCE_POOL: {get_param: GlanceRbdPoolName}
+                nova::compute::rbd::libvirt_images_rbd_pool: {get_param: NovaRbdPoolName}
+                cinder_rbd_pool_name: {get_param: CinderRbdPoolName}
+                glance::backend::rbd::rbd_store_pool: {get_param: GlanceRbdPoolName}
+                ceph_pools:
+                  - {get_param: CinderRbdPoolName}
+                  - {get_param: NovaRbdPoolName}
+                  - {get_param: GlanceRbdPoolName}
 
 outputs:
   config_id:
index 18a4862..ca6d395 100644 (file)
@@ -7,11 +7,6 @@ ceph::profile::params::osds: {/srv/data: {}}
 ceph::profile::params::manage_repo: false
 ceph::profile::params::authentication_type: cephx
 
-ceph_pools:
-  - volumes
-  - vms
-  - images
-
 ceph_classes: []
 
 ceph_osd_selinux_permissive: true
index 16aeb98..659008a 100644 (file)
@@ -12,7 +12,6 @@ nova::compute::libvirt::migration_support: true
 
 nova::compute::rbd::libvirt_rbd_user: 'openstack'
 nova::compute::rbd::rbd_keyring: 'client.openstack'
-nova::compute::rbd::libvirt_images_rbd_pool: 'vms'
 nova::compute::rbd::libvirt_rbd_secret_uuid: "%{hiera('ceph::profile::params::fsid')}"
 
 ceilometer::agent::auth::auth_tenant_name: 'service'
index 96302f2..f5b69f7 100644 (file)
@@ -316,7 +316,7 @@ if hiera('step') >= 3 {
     $ceph_pools = hiera('ceph_pools')
     ceph::pool { $ceph_pools : }
 
-    $cinder_pool_requires = [Ceph::Pool['volumes']]
+    $cinder_pool_requires = [Ceph::Pool[hiera('cinder_rbd_pool_name')]]
 
   } else {
     $cinder_pool_requires = []
@@ -326,7 +326,7 @@ if hiera('step') >= 3 {
     $cinder_rbd_backend = 'tripleo_ceph'
 
     cinder::backend::rbd { $cinder_rbd_backend :
-      rbd_pool        => 'volumes',
+      rbd_pool        => hiera('cinder_rbd_pool_name'),
       rbd_user        => 'openstack',
       rbd_secret_uuid => hiera('ceph::profile::params::fsid'),
       require         => $cinder_pool_requires,
index f8ef721..153b25e 100644 (file)
@@ -692,7 +692,7 @@ if hiera('step') >= 3 {
     $ceph_pools = hiera('ceph_pools')
     ceph::pool { $ceph_pools : }
 
-    $cinder_pool_requires = [Ceph::Pool['volumes']]
+    $cinder_pool_requires = [Ceph::Pool[hiera('cinder_rbd_pool_name')]]
 
   } else {
     $cinder_pool_requires = []
@@ -702,7 +702,7 @@ if hiera('step') >= 3 {
     $cinder_rbd_backend = 'tripleo_ceph'
 
     cinder::backend::rbd { $cinder_rbd_backend :
-      rbd_pool        => 'volumes',
+      rbd_pool        => hiera('cinder_rbd_pool_name'),
       rbd_user        => 'openstack',
       rbd_secret_uuid => hiera('ceph::profile::params::fsid'),
       require         => $cinder_pool_requires,