1 heat_template_version: 2016-10-14
2 description: 'Upgrade steps for all roles'
10 description: Mapping of Role name e.g Controller to the per-role data
15 Setting to a previously unused value during stack-update will trigger
16 the Upgrade resources to re-run on all roles.
20 # Upgrade Steps for all roles
21 # FIXME(shardy): would be nice to make the number of steps configurable
22 {% for step in range(1, 8) %}
23 {% for role in roles %}
24 # Step {{step}} resources
25 {{role.name}}UpgradeConfig_Step{{step}}:
26 type: OS::TripleO::UpgradeConfig
27 # The UpgradeConfig resources could actually be created without
28 # serialization, but the event output is easier to follow if we
29 # do, and there should be minimal performance hit (creating the
30 # config is cheap compared to the time to apply the deployment).
33 {% for dep in roles %}
34 - {{dep.name}}Upgrade_Step{{step -1}}
38 UpgradeStepConfig: {get_param: [role_data, {{role.name}}, upgrade_tasks]}
41 {{role.name}}Upgrade_Step{{step}}:
42 type: OS::Heat::StructuredDeploymentGroup
45 {% for dep in roles %}
46 - {{dep.name}}Upgrade_Step{{step -1}}
50 name: {{role.name}}Upgrade_Step{{step}}
51 servers: {get_param: [servers, {{role.name}}]}
52 config: {get_resource: {{role.name}}UpgradeConfig_Step{{step}}}
55 update_identifier: {get_param: UpdateIdentifier}
60 # Output the config for each role, just use Step1 as the config should be
61 # the same for all steps (only the tag provided differs)
63 description: The per-role upgrade configuration used
65 {% for role in roles %}
66 {{role.name.lower()}}: {get_attr: [{{role.name}}UpgradeConfig_Step1, upgrade_config]}