Add hooks for extra post-deployment config
authorSteven Hardy <shardy@redhat.com>
Thu, 9 Apr 2015 13:28:10 +0000 (14:28 +0100)
committerSteven Hardy <shardy@redhat.com>
Fri, 24 Apr 2015 09:19:04 +0000 (10:19 +0100)
Adds optional hooks which can run operator defined additional config on
nodes after the application deployment has completed.

Change-Id: I3f99e648efad82ce2cd51e2d5168c716f0cee8fe

13 files changed:
ceph-storage-post.yaml
cinder-storage-post.yaml
compute-post.yaml
controller-post.yaml
extraconfig/post_deploy/default.yaml [new file with mode: 0644]
extraconfig/post_deploy/example.yaml [new file with mode: 0644]
overcloud-resource-registry-puppet.yaml
overcloud-resource-registry.yaml
puppet/ceph-storage-post-puppet.yaml
puppet/compute-post-puppet.yaml
puppet/controller-post-puppet.yaml
puppet/swift-storage-post.yaml
swift-storage-post.yaml

index 2a0fa04..12d03f1 100644 (file)
@@ -5,4 +5,14 @@ description: 'Ceph Storage Post Deployment'
 
 parameters:
   servers:
-    type: json
\ No newline at end of file
+    type: json
+
+resources:
+
+  # Note, this should come last, so use depends_on to ensure
+  # this is created after any other resources.
+  ExtraConfig:
+    type: OS::TripleO::NodeExtraConfigPost
+    properties:
+        servers: {get_param: servers}
+
index 0331685..0881838 100644 (file)
@@ -6,3 +6,13 @@ description: 'Common Block Storage Post Deployment'
 parameters:
   servers:
     type: json
+
+resources:
+
+  # Note, this should come last, so use depends_on to ensure
+  # this is created after any other resources.
+  ExtraConfig:
+    type: OS::TripleO::NodeExtraConfigPost
+    properties:
+        servers: {get_param: servers}
+
index 8c49709..bd7639c 100644 (file)
@@ -6,3 +6,14 @@ description: 'Compute Post Deployment'
 parameters:
   servers:
     type: json
+
+resources:
+
+
+  # Note, this should come last, so use depends_on to ensure
+  # this is created after any other resources.
+  ExtraConfig:
+    type: OS::TripleO::NodeExtraConfigPost
+    properties:
+        servers: {get_param: servers}
+
index 31a3062..e630c22 100644 (file)
@@ -6,3 +6,12 @@ description: 'Controller Post Deployment'
 parameters:
   servers:
     type: json
+
+resources:
+
+  # Note, this should come last, so use depends_on to ensure
+  # this is created after any other resources.
+  ExtraConfig:
+    type: OS::TripleO::NodeExtraConfigPost
+    properties:
+        servers: {get_param: servers}
diff --git a/extraconfig/post_deploy/default.yaml b/extraconfig/post_deploy/default.yaml
new file mode 100644 (file)
index 0000000..ddfe024
--- /dev/null
@@ -0,0 +1,5 @@
+heat_template_version: 2014-10-16
+description: 'Extra Post Deployment Config'
+parameters:
+  servers:
+    type: json
diff --git a/extraconfig/post_deploy/example.yaml b/extraconfig/post_deploy/example.yaml
new file mode 100644 (file)
index 0000000..6b816d4
--- /dev/null
@@ -0,0 +1,27 @@
+heat_template_version: 2014-10-16
+
+description: >
+  Example extra config for post-deployment
+
+# Note extra parameters can be defined, then passed data via the
+# environment parameter_defaults, without modifying the parent template
+parameters:
+  servers:
+    type: json
+
+resources:
+
+  ExtraConfig:
+    type: OS::Heat::SoftwareConfig
+    properties:
+      group: script
+      config: |
+        #!/bin/sh
+        echo "extra" > /root/extra
+
+  ExtraDeployments:
+    type: OS::Heat::StructuredDeployments
+    properties:
+      servers:  {get_param: servers}
+      config: {get_resource: ExtraConfig}
+      actions: ['CREATE'] # Only do this on CREATE
index 2536053..c725ae8 100644 (file)
@@ -16,6 +16,7 @@ resource_registry:
   OS::TripleO::AllNodes::SoftwareConfig: puppet/all-nodes-config.yaml
   OS::TripleO::BootstrapNode::SoftwareConfig: puppet/bootstrap-config.yaml
   OS::TripleO::NodeUserData: firstboot/userdata_default.yaml
+  OS::TripleO::NodeExtraConfigPost: extraconfig/post_deploy/default.yaml
 
 parameter_defaults:
   EnablePackageInstall: false
index aba2212..7436ea4 100644 (file)
@@ -16,3 +16,4 @@ resource_registry:
   OS::TripleO::AllNodes::SoftwareConfig: all-nodes-config.yaml
   OS::TripleO::BootstrapNode::SoftwareConfig: bootstrap-config.yaml
   OS::TripleO::NodeUserData: firstboot/userdata_default.yaml
+  OS::TripleO::NodeExtraConfigPost: extraconfig/post_deploy/default.yaml
index 53ecbe1..93cc8d1 100644 (file)
@@ -22,3 +22,12 @@ resources:
     properties:
       servers:  {get_param: servers}
       config: {get_resource: CephStoragePuppetConfig}
+
+  # Note, this should come last, so use depends_on to ensure
+  # this is created after any other resources.
+  ExtraConfig:
+    depends_on: CephStorageDeployment_Step1
+    type: OS::TripleO::NodeExtraConfigPost
+    properties:
+        servers: {get_param: servers}
+
index 9b7eb0c..26c1a97 100644 (file)
@@ -23,3 +23,12 @@ resources:
     properties:
       servers:  {get_param: servers}
       config: {get_resource: ComputePuppetConfig}
+
+  # Note, this should come last, so use depends_on to ensure
+  # this is created after any other resources.
+  ExtraConfig:
+    depends_on: ComputePuppetDeployment
+    type: OS::TripleO::NodeExtraConfigPost
+    properties:
+        servers: {get_param: servers}
+
index 009a10a..debd715 100644 (file)
@@ -71,3 +71,12 @@ resources:
       config: {get_resource: ControllerPuppetConfig}
       input_values:
         step: 3
+
+  # Note, this should come last, so use depends_on to ensure
+  # this is created after any other resources.
+  ExtraConfig:
+    depends_on: ControllerDeploymentOvercloudServices_Step4
+    type: OS::TripleO::NodeExtraConfigPost
+    properties:
+        servers: {get_param: servers}
+
index edceba9..3e01fe7 100644 (file)
@@ -37,3 +37,12 @@ resources:
     properties:
       servers:  {get_param: servers}
       config: {get_resource: StorageRingbuilderPuppetConfig}
+
+  # Note, this should come last, so use depends_on to ensure
+  # this is created after any other resources.
+  ExtraConfig:
+    depends_on: StorageRingbuilderDeployment_Step2
+    type: OS::TripleO::NodeExtraConfigPost
+    properties:
+        servers: {get_param: servers}
+
index dfac4b2..dd51af0 100644 (file)
@@ -6,3 +6,13 @@ description: 'Swift Storage Post Deployment'
 parameters:
   servers:
     type: json
+
+resources:
+
+  # Note, this should come last, so use depends_on to ensure
+  # this is created after any other resources.
+  ExtraConfig:
+    type: OS::TripleO::NodeExtraConfigPost
+    properties:
+        servers: {get_param: servers}
+