diff --git a/ceph-storage-post.yaml b/ceph-storage-post.yaml index 2a0fa04377..12d03f188c 100644 --- a/ceph-storage-post.yaml +++ b/ceph-storage-post.yaml @@ -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} + diff --git a/cinder-storage-post.yaml b/cinder-storage-post.yaml index 0331685aa3..0881838140 100644 --- a/cinder-storage-post.yaml +++ b/cinder-storage-post.yaml @@ -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} + diff --git a/compute-post.yaml b/compute-post.yaml index 8c49709f14..bd7639c527 100644 --- a/compute-post.yaml +++ b/compute-post.yaml @@ -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} + diff --git a/controller-post.yaml b/controller-post.yaml index 31a3062a34..e630c221f8 100644 --- a/controller-post.yaml +++ b/controller-post.yaml @@ -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 index 0000000000..ddfe02432b --- /dev/null +++ b/extraconfig/post_deploy/default.yaml @@ -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 index 0000000000..6b816d40d2 --- /dev/null +++ b/extraconfig/post_deploy/example.yaml @@ -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 diff --git a/overcloud-resource-registry-puppet.yaml b/overcloud-resource-registry-puppet.yaml index 2536053003..c725ae850e 100644 --- a/overcloud-resource-registry-puppet.yaml +++ b/overcloud-resource-registry-puppet.yaml @@ -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 diff --git a/overcloud-resource-registry.yaml b/overcloud-resource-registry.yaml index aba2212a53..7436ea48b9 100644 --- a/overcloud-resource-registry.yaml +++ b/overcloud-resource-registry.yaml @@ -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 diff --git a/puppet/ceph-storage-post-puppet.yaml b/puppet/ceph-storage-post-puppet.yaml index 53ecbe1f51..93cc8d1d6d 100644 --- a/puppet/ceph-storage-post-puppet.yaml +++ b/puppet/ceph-storage-post-puppet.yaml @@ -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} + diff --git a/puppet/compute-post-puppet.yaml b/puppet/compute-post-puppet.yaml index 9b7eb0cfe6..26c1a9799b 100644 --- a/puppet/compute-post-puppet.yaml +++ b/puppet/compute-post-puppet.yaml @@ -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} + diff --git a/puppet/controller-post-puppet.yaml b/puppet/controller-post-puppet.yaml index 009a10aeef..debd715402 100644 --- a/puppet/controller-post-puppet.yaml +++ b/puppet/controller-post-puppet.yaml @@ -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} + diff --git a/puppet/swift-storage-post.yaml b/puppet/swift-storage-post.yaml index edceba97d6..3e01fe7722 100644 --- a/puppet/swift-storage-post.yaml +++ b/puppet/swift-storage-post.yaml @@ -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} + diff --git a/swift-storage-post.yaml b/swift-storage-post.yaml index dfac4b2aeb..dd51af0eb8 100644 --- a/swift-storage-post.yaml +++ b/swift-storage-post.yaml @@ -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} +