diff options
author | Jenkins <jenkins@review.openstack.org> | 2016-05-20 10:16:35 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2016-05-20 10:16:36 +0000 |
commit | 172ded7a402e1ac28cc9601ab9faf815df98742e (patch) | |
tree | 545f238da0cdddb6f5f50332df30b315a5dd43b1 | |
parent | e790ff12e81f0cdce538ee00b9d2d7530f0fc224 (diff) | |
parent | 8c0ba4c09ef26a1d83ab440baf2e739d6a85053b (diff) |
Merge "Add ExtraConfig example that always runs on update"
-rw-r--r-- | extraconfig/post_deploy/example_run_on_update.yaml | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/extraconfig/post_deploy/example_run_on_update.yaml b/extraconfig/post_deploy/example_run_on_update.yaml new file mode 100644 index 00000000..234488af --- /dev/null +++ b/extraconfig/post_deploy/example_run_on_update.yaml @@ -0,0 +1,39 @@ +heat_template_version: 2014-10-16 + +description: > + Example extra config for post-deployment, this re-runs every update + +# Note extra parameters can be defined, then passed data via the +# environment parameter_defaults, without modifying the parent template +parameters: + servers: + type: json + # This is provided via parameter_defaults from tripleoclient + # it changes to a new timestamp every update, so we can use it to + # trigger the deployment to run even though it and the config are + # otherwise unchanged + DeployIdentifier: + type: string + +resources: + + ExtraConfig: + type: OS::Heat::SoftwareConfig + properties: + group: script + inputs: + - name: deploy_identifier + config: | + #!/bin/sh + echo "extra_update $deploy_identifier" >> /root/extra_update + + ExtraDeployments: + type: OS::Heat::SoftwareDeployments + properties: + name: ExtraDeployments + servers: {get_param: servers} + config: {get_resource: ExtraConfig} + # Do this on CREATE/UPDATE (which is actually the default) + actions: ['CREATE', 'UPDATE'] + input_values: + deploy_identifier: {get_param: DeployIdentifier} |