tripleo-heat-templates/puppet/puppet-steps.j2
Carlos Camacho 834fe9cde3 Moving *postconfig where it was *postpuppet
We need to ensure that the pacemaker cluster restarts
in the end of the deployment.

Due to the resources renaming we added the
postconfig resource not in the end of the
deployment as it was *postpuppet.

Closes-bug: 1695904

Change-Id: Ic6978fcff591635223b354831cd6cbe0802316cf
2017-06-12 19:17:21 +02:00

75 lines
2.4 KiB
Django/Jinja

# Post deployment steps for all roles
# A single config is re-applied with an incrementing step number
{% for role in roles %}
# {{role.name}} Role post-deploy steps
{{role.name}}ArtifactsConfig:
type: deploy-artifacts.yaml
{{role.name}}ArtifactsDeploy:
type: OS::Heat::StructuredDeployments
properties:
servers: {get_param: [servers, {{role.name}}]}
config: {get_resource: {{role.name}}ArtifactsConfig}
{{role.name}}PreConfig:
type: OS::TripleO::Tasks::{{role.name}}PreConfig
properties:
servers: {get_param: [servers, {{role.name}}]}
input_values:
update_identifier: {get_param: DeployIdentifier}
{{role.name}}Config:
type: OS::TripleO::{{role.name}}Config
properties:
StepConfig: {list_join: ["\n", {get_param: [role_data, {{role.name}}, step_config]}]}
# Step through a series of configuration steps
{% for step in range(1, 6) %}
{{role.name}}Deployment_Step{{step}}:
type: OS::Heat::StructuredDeploymentGroup
{% if step == 1 %}
depends_on: [{{role.name}}PreConfig, {{role.name}}ArtifactsDeploy]
{% else %}
depends_on:
{% for dep in roles %}
- {{dep.name}}Deployment_Step{{step -1}}
{% endfor %}
{% endif %}
properties:
name: {{role.name}}Deployment_Step{{step}}
servers: {get_param: [servers, {{role.name}}]}
config: {get_resource: {{role.name}}Config}
input_values:
step: {{step}}
update_identifier: {get_param: DeployIdentifier}
{% endfor %}
# Note, this should be the last step to execute configuration changes.
# Ensure that all {{role.name}}ExtraConfigPost steps are executed
# after all the previous deployment steps.
{{role.name}}ExtraConfigPost:
depends_on:
{% for dep in roles %}
- {{dep.name}}Deployment_Step5
{% endfor %}
type: OS::TripleO::NodeExtraConfigPost
properties:
servers: {get_param: [servers, {{role.name}}]}
# The {{role.name}}PostConfig steps are in charge of
# quiescing all services, i.e. in the Controller case,
# we should run a full service reload.
{{role.name}}PostConfig:
type: OS::TripleO::Tasks::{{role.name}}PostConfig
depends_on:
{% for dep in roles %}
- {{dep.name}}ExtraConfigPost
{% endfor %}
properties:
servers: {get_param: servers}
input_values:
update_identifier: {get_param: DeployIdentifier}
{% endfor %}