ObjectStore: Exec puppet after all configuration
authorDan Prince <dprince@redhat.com>
Fri, 20 Feb 2015 00:31:38 +0000 (16:31 -0800)
committerDan Prince <dprince@redhat.com>
Tue, 24 Feb 2015 01:45:03 +0000 (20:45 -0500)
This patch adds a new ObjectStoreNodesPostDeployment resource
which can be used along with the environment file to
specify a nested stack which is guaranteed to execute
after all the ObjectStore config deployments have executed.

This is really useful for Puppet in that Heat actually
controls where puppet executes in the deployment
process and we want to ensure puppet runs after
all hiera configuration data has be deployed to
the nodes. With the previous approach some of the
data would be there, but allNodes data would not be
guaranteed to be there in time.

As os-apply-config (tripleo-image-elements) have their
ordering controlled within the elements themselves an empty stubbed
in nested stack has been added so that we don't break that
implementation.

Change-Id: I778b87a17d5e6824233fdf9957c76549c36b3f78

overcloud-resource-registry-puppet.yaml
overcloud-resource-registry.yaml
overcloud-without-mergepy.yaml
puppet/swift-storage-post.yaml [new file with mode: 0644]
puppet/swift-storage-puppet.yaml
swift-storage-post.yaml [new file with mode: 0644]

index eeef6d1..11d949b 100644 (file)
@@ -8,6 +8,7 @@ resource_registry:
   OS::TripleO::CephStorage: puppet/ceph-storage-puppet.yaml
   OS::TripleO::ControllerPostDeployment: puppet/controller-post-puppet.yaml
   OS::TripleO::ComputePostDeployment: puppet/compute-post-puppet.yaml
+  OS::TripleO::ObjectStoragePostDeployment: puppet/swift-storage-post.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
index 9d0f653..737842a 100644 (file)
@@ -8,6 +8,7 @@ resource_registry:
   OS::TripleO::CephStorage: ceph-storage.yaml
   OS::TripleO::ControllerPostDeployment: controller-post.yaml
   OS::TripleO::ComputePostDeployment: compute-post.yaml
+  OS::TripleO::ObjectStoragePostDeployment: swift-storage-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 3a719e3..a1e54bc 100644 (file)
@@ -790,6 +790,12 @@ resources:
     properties:
       servers: {get_attr: [Compute, attributes, nova_server_resource]}
 
+  ObjectStorageNodesPostDeployment:
+    type: OS::TripleO::ObjectStoragePostDeployment
+    depends_on: ObjectStorageSwiftDeployment
+    properties:
+      servers: {get_attr: [ObjectStorage, attributes, nova_server_resource]}
+
 outputs:
   KeystoneURL:
     description: URL for the Overcloud Keystone service
diff --git a/puppet/swift-storage-post.yaml b/puppet/swift-storage-post.yaml
new file mode 100644 (file)
index 0000000..89cf973
--- /dev/null
@@ -0,0 +1,42 @@
+heat_template_version: 2014-10-16
+description: 'Swift Storage Post Deployment'
+# NOTE: this is a noop for os-apply-config style deployments because
+# post deployment ordering is controlled by tripleo-image-elements
+
+parameters:
+  servers:
+    type: json
+
+resources:
+
+  StoragePuppetConfig:
+    type: OS::Heat::SoftwareConfig
+    properties:
+      group: puppet
+      outputs:
+      - name: result
+      config:
+        get_file: manifests/overcloud_object.pp
+
+  StoragePuppetDeployment:
+    type: OS::Heat::StructuredDeployments
+    properties:
+      name: puppet_1
+      servers:  {get_param: servers}
+      config: {get_resource: StoragePuppetConfig}
+
+  StorageRingbuilderPuppetConfig:
+    type: OS::Heat::SoftwareConfig
+    properties:
+      group: puppet
+      outputs:
+      - name: result
+      config:
+        get_file: manifests/ringbuilder.pp
+
+  StorageRingbuilderPuppetDeployment:
+    type: OS::Heat::StructuredDeployments
+    properties:
+      name: puppet_2
+      servers:  {get_param: servers}
+      config: {get_resource: StorageRingbuilderPuppetConfig}
index 7a831a5..9caa848 100644 (file)
@@ -64,38 +64,6 @@ resources:
       networks:
         - network: ctlplane
 
-  StoragePuppetConfig:
-    type: OS::Heat::SoftwareConfig
-    properties:
-      group: puppet
-      outputs:
-      - name: result
-      config:
-        get_file: manifests/overcloud_object.pp
-
-  StoragePuppetDeployment:
-    type: OS::Heat::StructuredDeployment
-    properties:
-      name: puppet_1
-      server: {get_resource: SwiftStorage}
-      config: {get_resource: StoragePuppetConfig}
-
-  StorageRingbuilderPuppetConfig:
-    type: OS::Heat::SoftwareConfig
-    properties:
-      group: puppet
-      outputs:
-      - name: result
-      config:
-        get_file: manifests/ringbuilder.pp
-
-  StorageRingbuilderPuppetDeployment:
-    type: OS::Heat::StructuredDeployment
-    properties:
-      name: puppet_2
-      server: {get_resource: SwiftStorage}
-      config: {get_resource: StorageRingbuilderPuppetConfig}
-
   SwiftStorageHieraConfig:
     type: OS::Heat::StructuredConfig
     properties:
diff --git a/swift-storage-post.yaml b/swift-storage-post.yaml
new file mode 100644 (file)
index 0000000..dfac4b2
--- /dev/null
@@ -0,0 +1,8 @@
+heat_template_version: 2014-10-16
+description: 'Swift Storage Post Deployment'
+# NOTE: this is a noop for os-apply-config style deployments because
+# post deployment ordering is controlled by tripleo-image-elements
+
+parameters:
+  servers:
+    type: json