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.
21 Command or script snippet to run on all overcloud nodes to
22 initialize the upgrade process. E.g. a repository switch.
27 # For the UpgradeInit also rename /etc/resolv.conf.save for +bug/1567004
29 type: OS::Heat::SoftwareConfig
36 - "if [[ -f /etc/resolv.conf.save ]] ; then rm /etc/resolv.conf.save; fi\n\n"
37 - get_param: UpgradeInitCommand
39 {% for role in roles %}
40 {{role.name}}Upgrade_Init:
41 type: OS::Heat::StructuredDeploymentGroup
43 name: {{role.name}}Upgrade_Init
44 servers: {get_param: [servers, {{role.name}}]}
45 config: {get_resource: UpgradeInitConfig}
48 # Upgrade Steps for all roles
49 # FIXME(shardy): would be nice to make the number of steps configurable
50 {% for step in range(1, 8) %}
51 {% for role in roles %}
52 # Step {{step}} resources
53 {{role.name}}UpgradeConfig_Step{{step}}:
54 type: OS::TripleO::UpgradeConfig
55 # The UpgradeConfig resources could actually be created without
56 # serialization, but the event output is easier to follow if we
57 # do, and there should be minimal performance hit (creating the
58 # config is cheap compared to the time to apply the deployment).
61 - {{role.name}}Upgrade_Init
63 {% for dep in roles %}
64 - {{dep.name}}Upgrade_Step{{step -1}}
68 UpgradeStepConfig: {get_param: [role_data, {{role.name}}, upgrade_tasks]}
71 {{role.name}}Upgrade_Step{{step}}:
72 type: OS::Heat::StructuredDeploymentGroup
75 {% for dep in roles %}
76 - {{dep.name}}Upgrade_Step{{step -1}}
80 name: {{role.name}}Upgrade_Step{{step}}
81 servers: {get_param: [servers, {{role.name}}]}
82 config: {get_resource: {{role.name}}UpgradeConfig_Step{{step}}}
85 update_identifier: {get_param: UpdateIdentifier}
90 # Output the config for each role, just use Step1 as the config should be
91 # the same for all steps (only the tag provided differs)
93 description: The per-role upgrade configuration used
95 {% for role in roles %}
96 {{role.name.lower()}}: {get_attr: [{{role.name}}UpgradeConfig_Step1, upgrade_config]}