Split out BootstrapNode SoftwareConfig
authorDan Prince <dprince@redhat.com>
Thu, 19 Feb 2015 16:41:47 +0000 (08:41 -0800)
committerDan Prince <dprince@redhat.com>
Thu, 19 Feb 2015 18:36:13 +0000 (10:36 -0800)
This patch splits out the BootstrapNode config
such that alternate implementation (puppet for example)
can implement their own SoftwareConfig's via a nested stack.

This is controlled by the standard overcloud heat environment.

For os-apply-config deployments the implementation should work the
same as before.

For puppet deployments the implementation uses hiera metadata
to configure bootstrap_nodeid.

Change-Id: I691a9d7c474866038a5d47beab295899b5479d03

bootstrap-config.yaml [new file with mode: 0644]
overcloud-resource-registry-puppet.yaml
overcloud-resource-registry.yaml
overcloud-without-mergepy.yaml
puppet/bootstrap-config.yaml [new file with mode: 0644]
puppet/controller-puppet.yaml

diff --git a/bootstrap-config.yaml b/bootstrap-config.yaml
new file mode 100644 (file)
index 0000000..14ecc00
--- /dev/null
@@ -0,0 +1,21 @@
+heat_template_version: 2014-10-16
+description: 'Bootstrap Config'
+
+parameters:
+  bootstrap_nodeid:
+    type: string
+
+resources:
+
+  BootstrapNodeConfigImpl:
+    type: OS::Heat::StructuredConfig
+    properties:
+      config:
+        bootstrap_host:
+          bootstrap_nodeid: {get_param: bootstrap_nodeid}
+
+outputs:
+  config_id:
+    description: The ID of the BootstrapNodeConfigImpl resource.
+    value:
+      {get_resource: BootstrapNodeConfigImpl}
index 5669948..b487f42 100644 (file)
@@ -9,6 +9,7 @@ resource_registry:
   OS::TripleO::ControllerPostDeployment: puppet/controller-post-puppet.yaml
   OS::TripleO::SwiftDevicesAndProxy::SoftwareConfig: puppet/swift-devices-and-proxy-config.yaml
   OS::TripleO::AllNodes::SoftwareConfig: puppet/all-nodes-config.yaml
+  OS::TripleO::BootstrapNode::SoftwareConfig: puppet/bootstrap-config.yaml
 
 # NOTE(dprince): requires a new release of python-heatclient
 #default_parameters:
index f7b28b1..32e3ad4 100644 (file)
@@ -9,3 +9,4 @@ resource_registry:
   OS::TripleO::ControllerPostDeployment: controller-post.yaml
   OS::TripleO::SwiftDevicesAndProxy::SoftwareConfig: swift-devices-and-proxy-config.yaml
   OS::TripleO::AllNodes::SoftwareConfig: all-nodes-config.yaml
+  OS::TripleO::BootstrapNode::SoftwareConfig: bootstrap-config.yaml
index 42e2e0d..bd48ec6 100644 (file)
@@ -711,17 +711,14 @@ resources:
       replacement_policy: AUTO
 
   ControllerBootstrapNodeConfig:
-    type: OS::Heat::StructuredConfig
+    type: OS::TripleO::BootstrapNode::SoftwareConfig
     properties:
-      group: os-apply-config
-      config:
-        bootstrap_host:
-          bootstrap_nodeid: {get_attr: [Controller, resource.0.hostname]}
+      bootstrap_nodeid: {get_attr: [Controller, resource.0.hostname]}
 
   ControllerBootstrapNodeDeployment:
     type: OS::Heat::StructuredDeployments
     properties:
-      config: {get_resource: ControllerBootstrapNodeConfig}
+      config: {get_attr: [ControllerBootstrapNodeConfig, config_id]}
       servers: {get_attr: [Controller, attributes, nova_server_resource]}
       signal_transport: NO_SIGNAL
 
diff --git a/puppet/bootstrap-config.yaml b/puppet/bootstrap-config.yaml
new file mode 100644 (file)
index 0000000..29b7af7
--- /dev/null
@@ -0,0 +1,24 @@
+heat_template_version: 2014-10-16
+description: 'Bootstrap Config Puppet'
+
+parameters:
+  bootstrap_nodeid:
+    type: string
+
+resources:
+
+  BootstrapNodeConfigImpl:
+    type: OS::Heat::StructuredConfig
+    properties:
+      config:
+        hiera:
+          datafiles:
+            bootstrap_node:
+              mapped_data:
+                bootstrap_nodeid: {get_param: bootstrap_nodeid}
+
+outputs:
+  config_id:
+    description: The ID of the BootstrapNodeConfigImpl resource.
+    value:
+      {get_resource: BootstrapNodeConfigImpl}
index a3a422c..e24a666 100644 (file)
@@ -556,6 +556,7 @@ resources:
             - object
             - swift_devices_and_proxy # provided by SwiftDevicesAndProxyConfig
             - rabbit # provided by allNodesConfig
+            - bootstrap_node # provided by BootstrapNodeConfig
             - common
           datafiles:
             common:
@@ -564,8 +565,6 @@ resources:
               raw_data: {get_file: hieradata/object.yaml}
             controller:
               raw_data: {get_file: hieradata/controller.yaml}
-              oac_data: # data we map in from other OAC configurations
-                bootstrap_nodeid: bootstrap_host.bootstrap_nodeid
               mapped_data: # data supplied directly to this deployment configuration, etc
                 debug: {get_input: debug}
                 bootstack_nodeid: {get_input: bootstack_nodeid}