Handles {controller,NovaCompute}ExtraConfig deprecation in ovecloud.j2
We missed to parse and merge {controller,NovaCompute}ExtraConfig data in change [1]. Also fixes whitespaces handling in docker-steps.j2 and puppet-steps.j2 previously updated by [2]. 1. Id37de5864138edd5476c097a8a1f0763faeaf768 2. I36a642fbc2076ad9e4a10ffc56d6d16f3ed6f27a Change-Id: Ia9983bc991eb79e479855993c1c8819ddfb52e38
This commit is contained in:
parent
8b81b363fd
commit
68e582323e
@ -49,13 +49,13 @@ conditions:
|
||||
{% for step in range(1, deploy_steps_max) %}
|
||||
WorkflowTasks_Step{{step}}_Enabled:
|
||||
or:
|
||||
{% for role in roles %}
|
||||
{%- for role in roles %}
|
||||
- not:
|
||||
equals:
|
||||
- get_param: [role_data, {{role.name}}, service_workflow_tasks, step{{step}}]
|
||||
- ''
|
||||
- False
|
||||
{% endfor %}
|
||||
{%- endfor %}
|
||||
{% endfor %}
|
||||
|
||||
resources:
|
||||
@ -97,16 +97,16 @@ resources:
|
||||
type: OS::Mistral::Workflow
|
||||
condition: WorkflowTasks_Step{{step}}_Enabled
|
||||
depends_on:
|
||||
{% if step == 1 %}
|
||||
{% for dep in roles %}
|
||||
{%- if step == 1 %}
|
||||
{%- for dep in roles %}
|
||||
- {{dep.name}}PreConfig
|
||||
- {{dep.name}}ArtifactsDeploy
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
{% for dep in roles %}
|
||||
{%- endfor %}
|
||||
{%- else %}
|
||||
{%- for dep in roles %}
|
||||
- {{dep.name}}Deployment_Step{{step -1}}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{%- endfor %}
|
||||
{%- endif %}
|
||||
properties:
|
||||
name: {list_join: [".", ["tripleo", {get_param: stack_name}, "workflowtasks", "step{{step}}"]]}
|
||||
type: direct
|
||||
@ -114,9 +114,9 @@ resources:
|
||||
yaql:
|
||||
expression: $.data.where($ != '').select($.get('step{{step}}')).where($ != null).flatten()
|
||||
data:
|
||||
{% for role in roles %}
|
||||
{%- for role in roles %}
|
||||
- get_param: [role_data, {{role.name}}, service_workflow_tasks]
|
||||
{% endfor %}
|
||||
{%- endfor %}
|
||||
|
||||
WorkflowTasks_Step{{step}}_Execution:
|
||||
type: OS::Mistral::ExternalResource
|
||||
@ -130,18 +130,18 @@ resources:
|
||||
env:
|
||||
service_ips: { get_param: ctlplane_service_ips }
|
||||
role_merged_configs:
|
||||
{% for r in roles %}
|
||||
{%- for r in roles %}
|
||||
{{r.name}}: {get_param: [role_data, {{r.name}}, merged_config_settings]}
|
||||
{% endfor %}
|
||||
{%- endfor %}
|
||||
UPDATE:
|
||||
workflow: { get_resource: WorkflowTasks_Step{{step}} }
|
||||
params:
|
||||
env:
|
||||
service_ips: { get_param: ctlplane_service_ips }
|
||||
role_merged_configs:
|
||||
{% for r in roles %}
|
||||
{%- for r in roles %}
|
||||
{{r.name}}: {get_param: [role_data, {{r.name}}, merged_config_settings]}
|
||||
{% endfor %}
|
||||
{%- endfor %}
|
||||
always_update: true
|
||||
# END service_workflow_tasks handling
|
||||
{% endfor %}
|
||||
@ -270,7 +270,6 @@ resources:
|
||||
update_identifier: {get_param: DeployIdentifier}
|
||||
|
||||
{% for step in range(1, deploy_steps_max) %}
|
||||
|
||||
{{role.name}}Deployment_Step{{step}}:
|
||||
type: OS::Heat::StructuredDeploymentGroup
|
||||
depends_on:
|
||||
@ -280,16 +279,16 @@ resources:
|
||||
# WorkflowTasks_StepX resource and can be remove
|
||||
# if https://bugs.launchpad.net/heat/+bug/1700569
|
||||
# is fixed.
|
||||
{% if step == 1 %}
|
||||
{% for dep in roles %}
|
||||
{%- if step == 1 %}
|
||||
{%- for dep in roles %}
|
||||
- {{dep.name}}PreConfig
|
||||
- {{dep.name}}ArtifactsDeploy
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
{% for dep in roles %}
|
||||
{%- endfor %}
|
||||
{%- else %}
|
||||
{%- for dep in roles %}
|
||||
- {{dep.name}}Deployment_Step{{step -1}}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{%- endfor %}
|
||||
{%- endif %}
|
||||
properties:
|
||||
name: {{role.name}}Deployment_Step{{step}}
|
||||
servers: {get_param: [servers, {{role.name}}]}
|
||||
@ -300,7 +299,6 @@ resources:
|
||||
update_identifier: {get_param: DeployIdentifier}
|
||||
bootstrap_server_id: {get_param: [servers, {{primary_role_name}}, '0']}
|
||||
docker_puppet_debug: {get_param: DockerPuppetDebug}
|
||||
|
||||
{% endfor %}
|
||||
# END CONFIG STEPS
|
||||
|
||||
@ -309,9 +307,9 @@ resources:
|
||||
# after all the previous deployment steps.
|
||||
{{role.name}}ExtraConfigPost:
|
||||
depends_on:
|
||||
{% for dep in roles %}
|
||||
{%- for dep in roles %}
|
||||
- {{dep.name}}Deployment_Step5
|
||||
{% endfor %}
|
||||
{%- endfor %}
|
||||
type: OS::TripleO::NodeExtraConfigPost
|
||||
properties:
|
||||
servers: {get_param: [servers, {{role.name}}]}
|
||||
@ -322,9 +320,9 @@ resources:
|
||||
{{role.name}}PostConfig:
|
||||
type: OS::TripleO::Tasks::{{role.name}}PostConfig
|
||||
depends_on:
|
||||
{% for dep in roles %}
|
||||
{%- for dep in roles %}
|
||||
- {{dep.name}}ExtraConfigPost
|
||||
{% endfor %}
|
||||
{%- endfor %}
|
||||
properties:
|
||||
servers: {get_param: servers}
|
||||
input_values:
|
||||
|
@ -60,13 +60,23 @@ parameters:
|
||||
description: |
|
||||
Additional hiera configuration to inject into the cluster.
|
||||
type: json
|
||||
{% for role in roles %}
|
||||
{%- for role in roles %}
|
||||
{{role.name}}ExtraConfig:
|
||||
default: {}
|
||||
description: |
|
||||
Role specific additional hiera configuration to inject into the cluster.
|
||||
type: json
|
||||
{% endfor %}
|
||||
{%- endfor %}
|
||||
controllerExtraConfig:
|
||||
default: {}
|
||||
description: |
|
||||
DEPRECATED use ControllerExtraConfig instead
|
||||
type: json
|
||||
NovaComputeExtraConfig:
|
||||
default: {}
|
||||
description: |
|
||||
DEPRECATED use ComputeExtraConfig instead
|
||||
type: json
|
||||
InternalApiVirtualFixedIPs:
|
||||
default: []
|
||||
description: >
|
||||
@ -166,7 +176,6 @@ parameters:
|
||||
{% else %}
|
||||
default: "%stackname%-{{role.name.lower()}}-%index%"
|
||||
{% endif %}
|
||||
|
||||
{{role.name}}RemovalPolicies:
|
||||
default: []
|
||||
type: json
|
||||
@ -215,6 +224,13 @@ parameters:
|
||||
description: >
|
||||
List of server hostnames to blacklist from any triggered deployments.
|
||||
|
||||
parameter_groups:
|
||||
- label: deprecated
|
||||
description: Do not use deprecated params, they will be removed.
|
||||
parameters:
|
||||
- controllerExtraConfig
|
||||
- NovaComputeExtraConfig
|
||||
|
||||
conditions:
|
||||
add_vips_to_etc_hosts: {equals : [{get_param: AddVipsToEtcHosts}, True]}
|
||||
|
||||
@ -373,7 +389,17 @@ resources:
|
||||
map_merge:
|
||||
- get_attr: [{{role.name}}ServiceConfigSettings, value]
|
||||
- get_param: ExtraConfig
|
||||
{%- if role.name == 'Controller' %}
|
||||
- map_merge:
|
||||
- get_param: controllerExtraConfig
|
||||
- get_param: {{role.name}}ExtraConfig
|
||||
{%- elif role.name == 'Compute' %}
|
||||
- map_merge:
|
||||
- get_param: NovaComputeExtraConfig
|
||||
- get_param: {{role.name}}ExtraConfig
|
||||
{%- else %}
|
||||
- get_param: {{role.name}}ExtraConfig
|
||||
{%- endif %}
|
||||
|
||||
# Filter any null/None service_names which may be present due to mapping
|
||||
# of services to OS::Heat::None
|
||||
|
@ -1,16 +1,15 @@
|
||||
{% set deploy_steps_max = 6 %}
|
||||
|
||||
conditions:
|
||||
{% for step in range(1, deploy_steps_max) %}
|
||||
WorkflowTasks_Step{{step}}_Enabled:
|
||||
or:
|
||||
{% for role in roles %}
|
||||
{%- for role in roles %}
|
||||
- not:
|
||||
equals:
|
||||
- get_param: [role_data, {{role.name}}, service_workflow_tasks, step{{step}}]
|
||||
- ''
|
||||
- False
|
||||
{% endfor %}
|
||||
{%- endfor %}
|
||||
{% endfor %}
|
||||
|
||||
resources:
|
||||
@ -50,16 +49,16 @@ resources:
|
||||
# WorkflowTasks_StepX resource and can be remove
|
||||
# if https://bugs.launchpad.net/heat/+bug/1700569
|
||||
# is fixed.
|
||||
{% if step == 1 %}
|
||||
{% for dep in roles %}
|
||||
{%- if step == 1 %}
|
||||
{%- for dep in roles %}
|
||||
- {{dep.name}}PreConfig
|
||||
- {{dep.name}}ArtifactsDeploy
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
{% for dep in roles %}
|
||||
{%- endfor %}
|
||||
{%- else %}
|
||||
{%- for dep in roles %}
|
||||
- {{dep.name}}Deployment_Step{{step -1}}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{%- endfor %}
|
||||
{%- endif %}
|
||||
properties:
|
||||
name: {{role.name}}Deployment_Step{{step}}
|
||||
servers: {get_param: [servers, {{role.name}}]}
|
||||
@ -74,9 +73,9 @@ resources:
|
||||
# after all the previous deployment steps.
|
||||
{{role.name}}ExtraConfigPost:
|
||||
depends_on:
|
||||
{% for dep in roles %}
|
||||
{%- for dep in roles %}
|
||||
- {{dep.name}}Deployment_Step5
|
||||
{% endfor %}
|
||||
{%- endfor %}
|
||||
type: OS::TripleO::NodeExtraConfigPost
|
||||
properties:
|
||||
servers: {get_param: [servers, {{role.name}}]}
|
||||
@ -87,9 +86,9 @@ resources:
|
||||
{{role.name}}PostConfig:
|
||||
type: OS::TripleO::Tasks::{{role.name}}PostConfig
|
||||
depends_on:
|
||||
{% for dep in roles %}
|
||||
{%- for dep in roles %}
|
||||
- {{dep.name}}ExtraConfigPost
|
||||
{% endfor %}
|
||||
{%- endfor %}
|
||||
properties:
|
||||
servers: {get_param: servers}
|
||||
input_values:
|
||||
@ -104,16 +103,16 @@ resources:
|
||||
type: OS::Mistral::Workflow
|
||||
condition: WorkflowTasks_Step{{step}}_Enabled
|
||||
depends_on:
|
||||
{% if step == 1 %}
|
||||
{% for dep in roles %}
|
||||
{%- if step == 1 %}
|
||||
{%- for dep in roles %}
|
||||
- {{dep.name}}PreConfig
|
||||
- {{dep.name}}ArtifactsDeploy
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
{% for dep in roles %}
|
||||
{%- endfor %}
|
||||
{%- else %}
|
||||
{%- for dep in roles %}
|
||||
- {{dep.name}}Deployment_Step{{step -1}}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{%- endfor %}
|
||||
{%- endif %}
|
||||
properties:
|
||||
name: {list_join: [".", ["tripleo", {get_param: stack_name}, "workflowtasks", "step{{step}}"]]}
|
||||
type: direct
|
||||
@ -121,9 +120,9 @@ resources:
|
||||
yaql:
|
||||
expression: $.data.where($ != '').select($.get('step{{step}}')).where($ != null).flatten()
|
||||
data:
|
||||
{% for role in roles %}
|
||||
{%- for role in roles %}
|
||||
- get_param: [role_data, {{role.name}}, service_workflow_tasks]
|
||||
{% endfor %}
|
||||
{%- endfor %}
|
||||
|
||||
WorkflowTasks_Step{{step}}_Execution:
|
||||
type: OS::Mistral::ExternalResource
|
||||
@ -137,18 +136,18 @@ resources:
|
||||
env:
|
||||
service_ips: { get_param: ctlplane_service_ips }
|
||||
role_merged_configs:
|
||||
{% for r in roles %}
|
||||
{%- for r in roles %}
|
||||
{{r.name}}: {get_param: [role_data, {{r.name}}, merged_config_settings]}
|
||||
{% endfor %}
|
||||
{%- endfor %}
|
||||
UPDATE:
|
||||
workflow: { get_resource: WorkflowTasks_Step{{step}} }
|
||||
params:
|
||||
env:
|
||||
service_ips: { get_param: ctlplane_service_ips }
|
||||
role_merged_configs:
|
||||
{% for r in roles %}
|
||||
{%- for r in roles %}
|
||||
{{r.name}}: {get_param: [role_data, {{r.name}}, merged_config_settings]}
|
||||
{% endfor %}
|
||||
{%- endfor %}
|
||||
always_update: true
|
||||
{% endfor %}
|
||||
# END service_workflow_tasks handling
|
||||
|
Loading…
Reference in New Issue
Block a user