summaryrefslogtreecommitdiffstats
path: root/puppet/major_upgrade_steps.j2.yaml
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2017-02-03 21:42:40 +0000
committerGerrit Code Review <review@openstack.org>2017-02-03 21:42:40 +0000
commit17b3de6d56b8d8aa2b8517ca085212482d8da8ca (patch)
tree189bead56019aaba73337954829ca3c068394bb2 /puppet/major_upgrade_steps.j2.yaml
parentb64f7fa512b4209e781d7159fe7d93bc3d37a99e (diff)
parent0bd4cfc1972b34796ddcd920c543901e2e854d06 (diff)
Merge "Disable batch upgrade deployments for disabled roles"
Diffstat (limited to 'puppet/major_upgrade_steps.j2.yaml')
-rw-r--r--puppet/major_upgrade_steps.j2.yaml87
1 files changed, 44 insertions, 43 deletions
diff --git a/puppet/major_upgrade_steps.j2.yaml b/puppet/major_upgrade_steps.j2.yaml
index 88732f49..b879fafa 100644
--- a/puppet/major_upgrade_steps.j2.yaml
+++ b/puppet/major_upgrade_steps.j2.yaml
@@ -36,34 +36,37 @@ conditions:
resources:
# Upgrade Steps for all roles, batched updates
+# The UpgradeConfig resources could actually be created without
+# serialization, but the event output is easier to follow if we
+# do, and there should be minimal performance hit (creating the
+# config is cheap compared to the time to apply the deployment).
{% for step in range(0, batch_upgrade_steps_max) %}
- {% for role in roles %}
- # Step {{step}} resources
+ # Batch config resources step {{step}}
+ {%- for role in roles %}
{{role.name}}UpgradeBatchConfig_Step{{step}}:
type: OS::TripleO::UpgradeConfig
- # The UpgradeConfig resources could actually be created without
- # serialization, but the event output is easier to follow if we
- # do, and there should be minimal performance hit (creating the
- # config is cheap compared to the time to apply the deployment).
- {% if step > 0 %}
+ {%- if step > 0 %}
depends_on:
- {% for dep in roles %}
+ {%- for dep in enabled_roles %}
- {{dep.name}}UpgradeBatch_Step{{step -1}}
- {% endfor %}
- {% endif %}
+ {%- endfor %}
+ {%- endif %}
properties:
UpgradeStepConfig: {get_param: [role_data, {{role.name}}, upgrade_batch_tasks]}
step: {{step}}
+ {%- endfor %}
+ # Batch deployment resources for step {{step}} (only for enabled roles)
+ {%- for role in enabled_roles %}
{{role.name}}UpgradeBatch_Step{{step}}:
- type: OS::Heat::StructuredDeploymentGroup
+ type: OS::Heat::SoftwareDeploymentGroup
condition: {{role.name}}UpgradeBatchConfigEnabled
- {% if step > 0 %}
+ {%- if step > 0 %}
depends_on:
- {% for dep in roles %}
+ {%- for dep in enabled_roles %}
- {{dep.name}}UpgradeBatch_Step{{step -1}}
- {% endfor %}
- {% endif %}
+ {%- endfor %}
+ {%- endif %}
update_policy:
batch_create:
max_batch_size: {{role.upgrade_batch_size|default(1)}}
@@ -76,13 +79,13 @@ resources:
input_values:
role: {{role.name}}
update_identifier: {get_param: UpdateIdentifier}
- {% endfor %}
-{% endfor %}
+ {%- endfor %}
+{%- endfor %}
# Upgrade Steps for all roles
-{% for step in range(0, upgrade_steps_max) %}
- {% for role in roles %}
- # Step {{step}} resources
+{%- for step in range(0, upgrade_steps_max) %}
+ # Config resources for step {{step}}
+ {%- for role in roles %}
{{role.name}}UpgradeConfig_Step{{step}}:
type: OS::TripleO::UpgradeConfig
# The UpgradeConfig resources could actually be created without
@@ -90,36 +93,35 @@ resources:
# do, and there should be minimal performance hit (creating the
# config is cheap compared to the time to apply the deployment).
depends_on:
- {% if step > 0 %}
- {% for dep in roles %}
- {% if not dep.disable_upgrade_deployment|default(false) %}
+ {%- if step > 0 %}
+ {%- for dep in enabled_roles %}
- {{dep.name}}Upgrade_Step{{step -1}}
- {% endif %}
- {% endfor %}
- {% else %}
- {% for dep in roles %}
+ {%- endfor %}
+ {%- else %}
+ {%- for dep in enabled_roles %}
- {{dep.name}}UpgradeBatch_Step{{batch_upgrade_steps_max -1}}
- {% endfor %}
- {% endif %}
+ {%- endfor %}
+ {%- endif %}
properties:
UpgradeStepConfig: {get_param: [role_data, {{role.name}}, upgrade_tasks]}
step: {{step}}
- {% if not role.disable_upgrade_deployment|default(false) %}
+ {%- endfor %}
+
+ # Deployment resources for step {{step}} (only for enabled roles)
+ {%- for role in enabled_roles %}
{{role.name}}Upgrade_Step{{step}}:
- type: OS::Heat::StructuredDeploymentGroup
+ type: OS::Heat::SoftwareDeploymentGroup
condition: {{role.name}}UpgradeConfigEnabled
depends_on:
- {% if step > 0 %}
- {% for dep in roles %}
- {% if not dep.disable_upgrade_deployment|default(false) %}
+ {%- if step > 0 %}
+ {%- for dep in enabled_roles %}
- {{dep.name}}Upgrade_Step{{step -1}}
- {% endif %}
- {% endfor %}
- {% else %}
- {% for dep in roles %}
+ {%- endfor %}
+ {%- else %}
+ {%- for dep in enabled_roles %}
- {{dep.name}}UpgradeBatch_Step{{batch_upgrade_steps_max -1}}
- {% endfor %}
- {% endif %}
+ {%- endfor %}
+ {%- endif %}
properties:
name: {{role.name}}Upgrade_Step{{step}}
servers: {get_param: [servers, {{role.name}}]}
@@ -127,9 +129,8 @@ resources:
input_values:
role: {{role.name}}
update_identifier: {get_param: UpdateIdentifier}
- {% endif %}
- {% endfor %}
-{% endfor %}
+ {%- endfor %}
+{%- endfor %}
# Post upgrade deployment steps for all roles
# This runs the normal configuration (e.g puppet) steps unless upgrade