aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docker/docker-steps.j28
-rw-r--r--network/ports/net_ip_list_map.yaml14
-rw-r--r--overcloud.j2.yaml12
-rw-r--r--puppet/post.j2.yaml2
-rw-r--r--puppet/puppet-steps.j26
5 files changed, 42 insertions, 0 deletions
diff --git a/docker/docker-steps.j2 b/docker/docker-steps.j2
index b3359b1..8377202 100644
--- a/docker/docker-steps.j2
+++ b/docker/docker-steps.j2
@@ -38,6 +38,8 @@ parameters:
description: Mapping of service endpoint -> protocol. Typically set
via parameter_defaults in the resource registry.
type: json
+ ctlplane_service_ips:
+ type: json
conditions:
{% for step in range(1, deploy_steps_max) %}
@@ -119,8 +121,14 @@ resources:
actions:
CREATE:
workflow: { get_resource: WorkflowTasks_Step{{step}} }
+ params:
+ env:
+ service_ips: { get_param: ctlplane_service_ips }
UPDATE:
workflow: { get_resource: WorkflowTasks_Step{{step}} }
+ params:
+ env:
+ service_ips: { get_param: ctlplane_service_ips }
always_update: true
# END service_workflow_tasks handling
{% endfor %}
diff --git a/network/ports/net_ip_list_map.yaml b/network/ports/net_ip_list_map.yaml
index c3734af..a9111ed 100644
--- a/network/ports/net_ip_list_map.yaml
+++ b/network/ports/net_ip_list_map.yaml
@@ -133,6 +133,20 @@ outputs:
SERVICE: {get_attr: [EnabledServicesValue, value]}
- values: {get_param: ServiceNetMap}
- values: {get_attr: [NetIpMapValue, value]}
+ ctlplane_service_ips:
+ description: >
+ Map of enabled services to a list of their ctlplane IP addresses
+ value:
+ yaql:
+ expression: dict($.data.map.items().where(len($[1]) > 0))
+ data:
+ map:
+ map_merge:
+ repeat:
+ template:
+ SERVICE_ctlplane_node_ips: {get_param: ControlPlaneIpList}
+ for_each:
+ SERVICE: {get_attr: [EnabledServicesValue, value]}
service_hostnames:
description: >
Map of enabled services to a list of hostnames where they're running
diff --git a/overcloud.j2.yaml b/overcloud.j2.yaml
index dfb1b9d..1848e09 100644
--- a/overcloud.j2.yaml
+++ b/overcloud.j2.yaml
@@ -737,6 +737,18 @@ resources:
{% endfor %}
stack_name: {get_param: 'OS::stack_name'}
EndpointMap: {get_attr: [EndpointMap, endpoint_map]}
+ ctlplane_service_ips:
+ # Note (shardy) this somewhat complex yaql may be replaced
+ # with a map_deep_merge function in ocata. It merges the
+ # list of maps, but appends to colliding lists when a service
+ # is deployed on more than one role
+ yaql:
+ expression: dict($.data.l.where($ != null).selectMany($.items()).groupBy($[0], $[1], [$[0], $[1].flatten()]))
+ data:
+ l:
+{% for role in roles %}
+ - {get_attr: [{{role.name}}IpListMap, ctlplane_service_ips]}
+{% endfor %}
role_data:
{% for role in roles %}
{{role.name}}: {get_attr: [{{role.name}}ServiceChainRoleData, value]}
diff --git a/puppet/post.j2.yaml b/puppet/post.j2.yaml
index 370ffa8..67e1ecf 100644
--- a/puppet/post.j2.yaml
+++ b/puppet/post.j2.yaml
@@ -25,5 +25,7 @@ parameters:
description: >
Setting this to a unique value will re-run any deployment tasks which
perform configuration on a Heat stack-update.
+ ctlplane_service_ips:
+ type: json
{% include 'puppet-steps.j2' %}
diff --git a/puppet/puppet-steps.j2 b/puppet/puppet-steps.j2
index cc681fd..82c6171 100644
--- a/puppet/puppet-steps.j2
+++ b/puppet/puppet-steps.j2
@@ -133,8 +133,14 @@ resources:
actions:
CREATE:
workflow: { get_resource: WorkflowTasks_Step{{step}} }
+ params:
+ env:
+ service_ips: { get_param: ctlplane_service_ips }
UPDATE:
workflow: { get_resource: WorkflowTasks_Step{{step}} }
+ params:
+ env:
+ service_ips: { get_param: ctlplane_service_ips }
always_update: true
{% endfor %}
# END service_workflow_tasks handling