Update puppet post config to enable stepped deployments
authorGiulio Fidente <gfidente@redhat.com>
Wed, 18 Mar 2015 16:54:33 +0000 (12:54 -0400)
committerGiulio Fidente <gfidente@redhat.com>
Wed, 18 Mar 2015 16:54:33 +0000 (12:54 -0400)
The upcoming heat hook/breakpoint features will enable stepped deployments
via setting stop points via the resource_registry.

For this to work, we need hard dependencies between each step of the
puppet deployments, because the current "soft" dependencies caused by the
name property only influences the hook script application ordering, not
the graph traversed by heat during deployment.

Since removing the name: puppet_n completely removes some useful self-
documenting context, move this to a resource naming convention, which
should also be useful for heat hooks/breakpoints, as they are expected
to support globbed specification of each step.

Related heat patch (not yet landed, but this is not dependent on it):

https://review.openstack.org/#/c/146123/

Change-Id: I05b02a46d4e80c08a308d033c33d4901c8f6c94e

puppet/ceph-storage-post-puppet.yaml
puppet/cinder-storage-post.yaml
puppet/controller-post-puppet.yaml
puppet/swift-storage-post.yaml

index dd01d4f..5e1c42f 100644 (file)
@@ -17,7 +17,7 @@ resources:
       config:
         get_file: manifests/overcloud_cephstorage.pp
 
-  CephStoragePuppetDeployment:
+  CephStorageDeployment_Step1:
     type: OS::Heat::StructuredDeployments
     properties:
       servers:  {get_param: servers}
index 960cc5b..28e8780 100644 (file)
@@ -18,9 +18,8 @@ resources:
       config:
         get_file: manifests/overcloud_volume.pp
 
-  VolumePuppetDeployment:
+  VolumeDeployment_Step1:
     type: OS::Heat::StructuredDeployments
     properties:
-      name: puppet_1
       servers:  {get_param: servers}
       config: {get_resource: VolumePuppetConfig}
index 38a7e59..009a10a 100644 (file)
@@ -24,20 +24,19 @@ resources:
   # Step through a series of Puppet runs using the same manifest.
   # NOTE(dprince): Heat breakpoints would make for a really cool way to step
   # through breakpoints in a controlled manner across the entire cluster
-  ControllerPuppetDeploymentLoadBalancer:
+  ControllerDeploymentLoadBalancer_Step1:
     type: OS::Heat::StructuredDeployments
     properties:
-      name: puppet_1
       servers:  {get_param: servers}
       config: {get_resource: ControllerPuppetConfig}
       input_values:
         step: 1
       actions: ['CREATE'] # no need for two passes on an UPDATE
 
-  ControllerPuppetDeploymentServicesBase:
+  ControllerDeploymentServicesBase_Step2:
     type: OS::Heat::StructuredDeployments
+    depends_on: ControllerDeploymentLoadBalancer_Step1
     properties:
-      name: puppet_2
       servers:  {get_param: servers}
       config: {get_resource: ControllerPuppetConfig}
       input_values:
@@ -57,17 +56,17 @@ resources:
       config:
         get_file: manifests/ringbuilder.pp
 
-  ControllerRingbuilderPuppetDeployment:
+  ControllerRingbuilderDeployment_Step3:
     type: OS::Heat::StructuredDeployments
+    depends_on: ControllerDeploymentServicesBase_Step2
     properties:
-      name: puppet_3
       servers:  {get_param: servers}
       config: {get_resource: ControllerRingbuilderPuppetConfig}
 
-  ControllerPuppetDeploymentOvercloudServices:
+  ControllerDeploymentOvercloudServices_Step4:
     type: OS::Heat::StructuredDeployments
+    depends_on: ControllerRingbuilderDeployment_Step3
     properties:
-      name: puppet_4
       servers:  {get_param: servers}
       config: {get_resource: ControllerPuppetConfig}
       input_values:
index 89cf973..3f06931 100644 (file)
@@ -18,10 +18,9 @@ resources:
       config:
         get_file: manifests/overcloud_object.pp
 
-  StoragePuppetDeployment:
+  StorageDeployment_Step1:
     type: OS::Heat::StructuredDeployments
     properties:
-      name: puppet_1
       servers:  {get_param: servers}
       config: {get_resource: StoragePuppetConfig}
 
@@ -34,9 +33,9 @@ resources:
       config:
         get_file: manifests/ringbuilder.pp
 
-  StorageRingbuilderPuppetDeployment:
+  StorageRingbuilderDeployment_Step2:
     type: OS::Heat::StructuredDeployments
+    depends_on: StorageDeployment_Step1
     properties:
-      name: puppet_2
       servers:  {get_param: servers}
       config: {get_resource: StorageRingbuilderPuppetConfig}