87af02d673
Where the role has disabled upgrades, we need to skip both the ansible and puppet steps. To do this we refactor the post.j2.yaml so that it can be included in the upgrade template with an adjusted list of roles. Note this requires https://review.openstack.org/#/c/425220/ - this change will be required for local testing of this patch (run mistral-db-mange populate after updating tripleo-common and restart the mistral services, or update your repos and re-run openstack undercloud install). Partially-Implements: blueprint overcloud-upgrades-per-service Change-Id: Ie7d0fa6fef3528bd93e6cde076b964ea8de3185a
89 lines
2.7 KiB
Django/Jinja
89 lines
2.7 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: {get_param: [role_data, {{role.name}}, step_config]}
|
|
|
|
{% if role.name == 'Controller' %}
|
|
ControllerPrePuppet:
|
|
type: OS::TripleO::Tasks::ControllerPrePuppet
|
|
properties:
|
|
servers: {get_param: [servers, Controller]}
|
|
input_values:
|
|
update_identifier: {get_param: DeployIdentifier}
|
|
{% endif %}
|
|
|
|
# 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 %}
|
|
|
|
{{role.name}}PostConfig:
|
|
type: OS::TripleO::Tasks::{{role.name}}PostConfig
|
|
depends_on:
|
|
{% for dep in roles %}
|
|
- {{dep.name}}Deployment_Step5
|
|
{% endfor %}
|
|
properties:
|
|
servers: {get_param: servers}
|
|
input_values:
|
|
update_identifier: {get_param: DeployIdentifier}
|
|
|
|
# Note, this should come last, so use depends_on to ensure
|
|
# this is created after any other resources.
|
|
{{role.name}}ExtraConfigPost:
|
|
depends_on:
|
|
{% for dep in roles %}
|
|
- {{dep.name}}PostConfig
|
|
{% endfor %}
|
|
type: OS::TripleO::NodeExtraConfigPost
|
|
properties:
|
|
servers: {get_param: [servers, {{role.name}}]}
|
|
|
|
{% if role.name == 'Controller' %}
|
|
ControllerPostPuppet:
|
|
depends_on:
|
|
- ControllerExtraConfigPost
|
|
type: OS::TripleO::Tasks::ControllerPostPuppet
|
|
properties:
|
|
servers: {get_param: [servers, Controller]}
|
|
input_values:
|
|
update_identifier: {get_param: DeployIdentifier}
|
|
{% endif %}
|
|
{% endfor %}
|