diff options
author | 2015-12-15 13:26:50 +0000 | |
---|---|---|
committer | 2015-12-15 13:26:50 +0000 | |
commit | 0df1c1589877ffd57b6ef933060f6d3316c9d343 (patch) | |
tree | ee605e31177c69cde7aca90db5859e6483665327 /extraconfig/tasks/post_puppet_pacemaker.yaml | |
parent | 3e8010dc8506755f193d6e0f84006452b4eaeee5 (diff) | |
parent | ea1294fe9b11029edab719e8bf558733226b3fd4 (diff) |
Merge "Pacemaker maintenance mode for the duration of Puppet run on update"
Diffstat (limited to 'extraconfig/tasks/post_puppet_pacemaker.yaml')
-rw-r--r-- | extraconfig/tasks/post_puppet_pacemaker.yaml | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/extraconfig/tasks/post_puppet_pacemaker.yaml b/extraconfig/tasks/post_puppet_pacemaker.yaml new file mode 100644 index 00000000..7de41d94 --- /dev/null +++ b/extraconfig/tasks/post_puppet_pacemaker.yaml @@ -0,0 +1,44 @@ +heat_template_version: 2014-10-16 +description: 'Post-Puppet Config for Pacemaker deployments' + +parameters: + servers: + type: json + input_values: + type: json + description: input values for the software deployments + +resources: + + ControllerPostPuppetMaintenanceModeConfig: + type: OS::Heat::SoftwareConfig + properties: + group: script + config: | + #!/bin/bash + pacemaker_status=$(systemctl is-active pacemaker) + + if [ "$pacemaker_status" = "active" ]; then + pcs property set maintenance-mode=false + fi + + ControllerPostPuppetMaintenanceModeDeployment: + type: OS::Heat::SoftwareDeployments + properties: + servers: {get_param: servers} + config: {get_resource: ControllerPostPuppetMaintenanceModeConfig} + input_values: {get_param: input_values} + + ControllerPostPuppetRestartConfig: + type: OS::Heat::SoftwareConfig + properties: + group: script + config: {get_file: pacemaker_resource_restart.sh} + + ControllerPostPuppetRestartDeployment: + type: OS::Heat::SoftwareDeployments + depends_on: ControllerPostPuppetMaintenanceModeDeployment + properties: + servers: {get_param: servers} + config: {get_resource: ControllerPostPuppetRestartConfig} + input_values: {get_param: input_values} |