tripleo-heat-templates/extraconfig/post_deploy/example_run_on_update.yaml
Ben Nemec c02a343623 Make Deploy/UpdateIdentifier definition semi-consistent
It seems UpdateIdentifier is an overloaded parameter - it is used
both to trigger package updates in the minor update case as well as
to trigger the upgrade steps during a major upgrade.  I'm not sure
it's appropriate to change either of the descriptions as a result,
so for the moment that is added to the exclusion list.

Change-Id: Ied36cf259f6a6e5c8cfa7a01722fb7fda6900976
Partial-Bug: 1700664
2017-07-21 18:39:13 +00:00

43 lines
1.3 KiB
YAML

heat_template_version: pike
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
default: ''
description: >
Setting this to a unique value will re-run any deployment tasks which perform configuration on a Heat stack-update.
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}