Wire in hieradata overrides via ExtraConfig for CephStorage
authorSteven Hardy <shardy@redhat.com>
Thu, 16 Jul 2015 16:50:26 +0000 (17:50 +0100)
committerSteven Hardy <shardy@redhat.com>
Thu, 16 Jul 2015 16:55:48 +0000 (17:55 +0100)
Adds support for global (ExtraConfig) and role-specific
(CephStorageExtraConfig) hiera overrides, similar to those added
for the Controller, NovaCompute, BlockStorage, ObjectStorage roles.

Change-Id: Idbe73b86a772491cd3c55ba69b5a95cc291d2598

ceph-storage.yaml
overcloud-without-mergepy.yaml
puppet/ceph-storage-puppet.yaml

index 15092ba..5f9f537 100644 (file)
@@ -42,6 +42,18 @@ parameters:
   Hostname:
     type: string
     default: '' # Defaults to Heat created hostname
+  ExtraConfig:
+    default: {}
+    description: |
+      Additional configuration to inject into the cluster. Note
+      that CephStorageExtraConfig takes precedence over ExtraConfig.
+    type: json
+  CephStorageExtraConfig:
+    default: {}
+    description: |
+      Role specific additional configuration to inject into the cluster.
+    type: json
+
 
 resources:
   CephStorage:
index 1246706..2d2145e 100644 (file)
@@ -602,6 +602,12 @@ parameters:
     type: string
     constraints:
       - custom_constraint: nova.flavor
+  CephStorageExtraConfig:
+    default: {}
+    description: |
+      CephStorage specific configuration to inject into the cluster. Same
+      structure as ExtraConfig.
+    type: json
 
   # Hostname format for each role
   # Note %index% is translated into the index of the node, e.g 0/1/2 etc
@@ -945,6 +951,8 @@ resources:
               template: {get_param: CephStorageHostnameFormat}
               params:
                 '%stackname%': {get_param: 'OS::stack_name'}
+          ExtraConfig: {get_param: ExtraConfig}
+          CephStorageExtraConfig: {get_param: CephStorageExtraConfig}
 
   ControllerIpListMap:
     type: OS::TripleO::Network::Ports::NetIpListMap
index 2d08941..cef56a8 100644 (file)
@@ -42,6 +42,18 @@ parameters:
   Hostname:
     type: string
     default: '' # Defaults to Heat created hostname
+  ExtraConfig:
+    default: {}
+    description: |
+      Additional hiera configuration to inject into the cluster. Note
+      that CephStorageExtraConfig takes precedence over ExtraConfig.
+    type: json
+  CephStorageExtraConfig:
+    default: {}
+    description: |
+      Role specific additional hiera configuration to inject into the cluster.
+    type: json
+
 
 resources:
   CephStorage:
@@ -118,6 +130,8 @@ resources:
         hiera:
           hierarchy:
             - heat_config_%{::deploy_config_name}
+            - ceph_extraconfig
+            - extraconfig
             - ceph_cluster # provided by CephClusterConfig
             - ceph
             - '"%{::osfamily}"'
@@ -125,6 +139,10 @@ resources:
           datafiles:
             common:
               raw_data: {get_file: hieradata/common.yaml}
+            ceph_extraconfig:
+              mapped_data: {get_param: CephStorageExtraConfig}
+            extraconfig:
+              mapped_data: {get_param: ExtraConfig}
             ceph:
               raw_data: {get_file: hieradata/ceph.yaml}
               mapped_data: