Add option to enable ceph storage on controller
authorDan Prince <dprince@redhat.com>
Fri, 10 Apr 2015 22:52:14 +0000 (18:52 -0400)
committerDan Prince <dprince@redhat.com>
Tue, 21 Apr 2015 13:14:02 +0000 (09:14 -0400)
This patch adds a new ControllerEnableCephStorage option
which can be used to install and configure Ceph storage
(OSD) on the controller node.

The default is to have this disabled by default (this is
probably a more production like setting).

The motivation for this change is to help facilitate CI
jobs which actually use Ceph. Right now we have an issue
where once the Heat stack finishes Ceph is configured
and ready, but Cinder volume (required by our CI
devtest_overcloud.sh test) may or may not have had
enough time to recognize the amount of storage
on the remote Ceph storage nodes. Waiting another
periodic cycle for Cinder volume to recognize the
actual amount of storage on the remote OSD nodes
would work but there isn't a good way to do this
ATM. The right solution here is probably to
implement Heat breakpoints in our CI. As we haven't quite
landed that change, another option is to simply
make the controller node also be a Ceph storage node.
Since this runs as "step 2" within the controller
it ensures that the OSD will be available and thus
Cinder volume will register the correct amount of
storage on startup.

Enabling this feature also matches what we do with Swift
storage on the Controller (although we should provide
an option to actually disable this as well).

Change-Id: Ic47d028591edbaab83a52d7f38283d7805b63042

controller.yaml
overcloud-without-mergepy.yaml
puppet/controller-puppet.yaml
puppet/manifests/overcloud_controller.pp

index 4037fb0..c46fe2e 100644 (file)
@@ -72,6 +72,10 @@ parameters:
     description: If enabled services will be monitored by Pacemaker; it
       will manage VIPs as well, in place of Keepalived.
     type: boolean
+  EnableCephStorage:
+    default: false
+    description: Whether to deploy Ceph Storage (OSD) on the Controller
+    type: boolean
   ExtraConfig:
     default: {}
     description: |
index 32dc970..68de0af 100644 (file)
@@ -268,6 +268,10 @@ parameters:
     description: If enabled services will be monitored by Pacemaker; it
       will manage VIPs as well, in place of Keepalived.
     type: boolean
+  ControllerEnableCephStorage:
+    default: false
+    description: Whether to deploy Ceph Storage (OSD) on the Controller
+    type: boolean
   ExtraConfig:
     default: {}
     description: |
@@ -548,6 +552,7 @@ resources:
           Debug: {get_param: Debug}
           EnableGalera: {get_param: EnableGalera}
           EnablePacemaker: {get_param: EnablePacemaker}
+          EnableCephStorage: {get_param: ControllerEnableCephStorage}
           ExtraConfig: {get_param: ExtraConfig}
           Flavor: {get_param: OvercloudControlFlavor}
           GlancePort: {get_param: GlancePort}
index a23a1db..e9b33e7 100644 (file)
@@ -72,6 +72,10 @@ parameters:
     description: If enabled services will be monitored by Pacemaker; it
       will manage VIPs as well, in place of Keepalived.
     type: boolean
+  EnableCephStorage:
+    default: false
+    description: Whether to deploy Ceph Storage (OSD) on the Controller
+    type: boolean
   ExtraConfig:
     default: {}
     description: |
@@ -521,6 +525,7 @@ resources:
               - ':5000/v2.0/'
         enable_galera: {get_param: EnableGalera}
         enable_pacemaker: {get_param: EnablePacemaker}
+        enable_ceph_storage: {get_param: EnableCephStorage}
         mysql_innodb_buffer_pool_size: {get_param: MysqlInnodbBufferPoolSize}
         mysql_root_password: {get_param: MysqlRootPassword}
         mysql_cluster_name:
@@ -732,6 +737,7 @@ resources:
                 # MySQL
                 admin_password: {get_input: admin_password}
                 enable_galera: {get_input: enable_galera}
+                enable_ceph_storage: {get_input: enable_ceph_storage}
                 mysql_innodb_buffer_pool_size: {get_input: mysql_innodb_buffer_pool_size}
                 mysql::server::root_password: {get_input: mysql_root_password}
                 mysql_cluster_name: {get_input: mysql_cluster_name}
index 8a8c0eb..caf9fcf 100644 (file)
@@ -206,6 +206,11 @@ if hiera('step') >= 2 {
     include ::ceph::profile::mon
   }
 
+  if str2bool(hiera('enable_ceph_storage', 'false')) {
+    include ::ceph::profile::client
+    include ::ceph::profile::osd
+  }
+
 } #END STEP 2
 
 if hiera('step') >= 3 {