1 heat_template_version: ocata
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(0, 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 {% if not dep.disable_upgrade_deployment|default(false) %}
35 - {{dep.name}}Upgrade_Step{{step -1}}
40 UpgradeStepConfig: {get_param: [role_data, {{role.name}}, upgrade_tasks]}
42 {% if not role.disable_upgrade_deployment|default(false) %}
43 {{role.name}}Upgrade_Step{{step}}:
44 type: OS::Heat::StructuredDeploymentGroup
47 {% for dep in roles %}
48 {% if not dep.disable_upgrade_deployment|default(false) %}
49 - {{dep.name}}Upgrade_Step{{step -1}}
54 name: {{role.name}}Upgrade_Step{{step}}
55 servers: {get_param: [servers, {{role.name}}]}
56 config: {get_resource: {{role.name}}UpgradeConfig_Step{{step}}}
59 update_identifier: {get_param: UpdateIdentifier}
65 # Output the config for each role, just use Step1 as the config should be
66 # the same for all steps (only the tag provided differs)
68 description: The per-role upgrade configuration used
70 {% for role in roles %}
71 {{role.name.lower()}}: {get_attr: [{{role.name}}UpgradeConfig_Step1, upgrade_config]}