summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.openstack.org>2018-12-14 22:38:31 +0000
committerGerrit Code Review <review@openstack.org>2018-12-14 22:38:31 +0000
commit707cfc90c627849ef5bc7c7e31cbb6211d11f3d1 (patch)
tree4facca20b2275a57a9ed0121bb44bc9617fca9e5
parent1a4ee4ee0efb9834880672df6966476634a4aadb (diff)
parenteb3efe713335eda22cc58ca8f18cd7d209a16ac6 (diff)
Merge "Remove deploy steps on empty roles"
-rw-r--r--common/deploy-steps.j217
-rw-r--r--overcloud.j2.yaml3
2 files changed, 20 insertions, 0 deletions
diff --git a/common/deploy-steps.j2 b/common/deploy-steps.j2
index 33bb276..e5a68e8 100644
--- a/common/deploy-steps.j2
+++ b/common/deploy-steps.j2
@@ -107,6 +107,12 @@ parameters:
107 type: string 107 type: string
108 description: The python interpreter to use for python and ansible actions 108 description: The python interpreter to use for python and ansible actions
109 default: /usr/bin/python 109 default: /usr/bin/python
110{% for role in enabled_roles %}
111 {{role.name}}Count:
112 description: Number of {{role.name}} nodes to deploy
113 type: number
114 default: {{role.CountDefault|default(0)}}
115{% endfor %}
110 116
111conditions: 117conditions:
112{% for step in range(1, deploy_steps_max) %} 118{% for step in range(1, deploy_steps_max) %}
@@ -120,6 +126,13 @@ conditions:
120 - False 126 - False
121 {%- endfor %} 127 {%- endfor %}
122{% endfor %} 128{% endfor %}
129{% for role in enabled_roles %}
130 {{role.name}}NonZero:
131 not:
132 equals:
133 - {get_param: {{role.name}}Count}
134 - 0
135{% endfor %}
123 136
124resources: 137resources:
125 138
@@ -304,6 +317,7 @@ resources:
304 317
305 {{role.name}}ArtifactsDeploy: 318 {{role.name}}ArtifactsDeploy:
306 type: OS::Heat::StructuredDeploymentGroup 319 type: OS::Heat::StructuredDeploymentGroup
320 condition: {{role.name}}NonZero
307 properties: 321 properties:
308 name: {{role.name}}ArtifactsDeploy 322 name: {{role.name}}ArtifactsDeploy
309 servers: {get_param: [servers, {{role.name}}]} 323 servers: {get_param: [servers, {{role.name}}]}
@@ -317,6 +331,7 @@ resources:
317 {% for step in range(1, deploy_steps_max) %} 331 {% for step in range(1, deploy_steps_max) %}
318 {{role.name}}Deployment_Step{{step}}: 332 {{role.name}}Deployment_Step{{step}}:
319 type: OS::TripleO::DeploymentSteps 333 type: OS::TripleO::DeploymentSteps
334 condition: {{role.name}}NonZero
320 depends_on: 335 depends_on:
321 - WorkflowTasks_Step{{step}}_Execution 336 - WorkflowTasks_Step{{step}}_Execution
322 # TODO(gfidente): the following if/else condition 337 # TODO(gfidente): the following if/else condition
@@ -363,6 +378,7 @@ resources:
363 # Ensure that all {{role.name}}ExtraConfigPost steps are executed 378 # Ensure that all {{role.name}}ExtraConfigPost steps are executed
364 # after all the previous deployment steps. 379 # after all the previous deployment steps.
365 {{role.name}}ExtraConfigPost: 380 {{role.name}}ExtraConfigPost:
381 condition: {{role.name}}NonZero
366 depends_on: 382 depends_on:
367 {%- for dep in enabled_roles %} 383 {%- for dep in enabled_roles %}
368 - {{dep.name}}Deployment_Step{{deploy_steps_max - 1}} 384 - {{dep.name}}Deployment_Step{{deploy_steps_max - 1}}
@@ -375,6 +391,7 @@ resources:
375 # quiescing all services, i.e. in the Controller case, 391 # quiescing all services, i.e. in the Controller case,
376 # we should run a full service reload. 392 # we should run a full service reload.
377 {{role.name}}PostConfig: 393 {{role.name}}PostConfig:
394 condition: {{role.name}}NonZero
378 type: OS::TripleO::Tasks::{{role.name}}PostConfig 395 type: OS::TripleO::Tasks::{{role.name}}PostConfig
379 depends_on: 396 depends_on:
380 {%- for dep in enabled_roles %} 397 {%- for dep in enabled_roles %}
diff --git a/overcloud.j2.yaml b/overcloud.j2.yaml
index 1710e43..ca38be9 100644
--- a/overcloud.j2.yaml
+++ b/overcloud.j2.yaml
@@ -970,6 +970,9 @@ resources:
970 blacklisted_ip_addresses: {get_attr: [BlacklistedIpAddresses, value]} 970 blacklisted_ip_addresses: {get_attr: [BlacklistedIpAddresses, value]}
971 blacklisted_hostnames: {get_attr: [BlacklistedHostnames, value]} 971 blacklisted_hostnames: {get_attr: [BlacklistedHostnames, value]}
972 ssh_known_hosts_hostnames: {get_attr: [SshKnownHostsHostnames, value]} 972 ssh_known_hosts_hostnames: {get_attr: [SshKnownHostsHostnames, value]}
973{% for role in roles %}
974 {{role.name}}Count: {get_param: {{role.name}}Count}
975{% endfor %}
973 976
974 ServerOsCollectConfigData: 977 ServerOsCollectConfigData:
975 type: OS::Heat::Value 978 type: OS::Heat::Value