Merge "Add SERVICE_bootstrap_node_ip values to allNodesConfig"
This commit is contained in:
commit
2485978bee
@ -164,3 +164,26 @@ outputs:
|
|||||||
SERVICE_short_bootstrap_node_name: {get_param: ServiceHostnameList}
|
SERVICE_short_bootstrap_node_name: {get_param: ServiceHostnameList}
|
||||||
for_each:
|
for_each:
|
||||||
SERVICE: {get_attr: [EnabledServicesValue, value]}
|
SERVICE: {get_attr: [EnabledServicesValue, value]}
|
||||||
|
service_bootstrap_ips:
|
||||||
|
description: >
|
||||||
|
Map of enabled services to a list of their IP addresses
|
||||||
|
Used for bootstrap purposes
|
||||||
|
value:
|
||||||
|
yaql:
|
||||||
|
# This filters any entries where the value hasn't been substituted for
|
||||||
|
# a list, e.g it's still $service_network. This happens when there is
|
||||||
|
# no network defined for the service in the ServiceNetMap, which is OK
|
||||||
|
# as not all services have to be bound to a network, so we filter them
|
||||||
|
expression: dict($.data.map.items().where(not isString($[1])))
|
||||||
|
data:
|
||||||
|
map:
|
||||||
|
map_replace:
|
||||||
|
- map_replace:
|
||||||
|
- map_merge:
|
||||||
|
repeat:
|
||||||
|
template:
|
||||||
|
SERVICE_bootstrap_node_ip: SERVICE_network
|
||||||
|
for_each:
|
||||||
|
SERVICE: {get_attr: [EnabledServicesValue, value]}
|
||||||
|
- values: {get_param: ServiceNetMap}
|
||||||
|
- values: {get_attr: [NetIpMapValue, value]}
|
||||||
|
@ -513,10 +513,6 @@ resources:
|
|||||||
yaql:
|
yaql:
|
||||||
expression: coalesce($.data, []).first(null)
|
expression: coalesce($.data, []).first(null)
|
||||||
data: {get_attr: [{{role.name}}, hostname]}
|
data: {get_attr: [{{role.name}}, hostname]}
|
||||||
bootstrap_nodeid_ip:
|
|
||||||
yaql:
|
|
||||||
expression: coalesce($.data, []).first(null)
|
|
||||||
data: {get_attr: [{{role.name}}, ip_address]}
|
|
||||||
|
|
||||||
{{role.name}}AllNodesValidationDeployment:
|
{{role.name}}AllNodesValidationDeployment:
|
||||||
type: OS::Heat::StructuredDeployments
|
type: OS::Heat::StructuredDeployments
|
||||||
@ -735,6 +731,14 @@ resources:
|
|||||||
l:
|
l:
|
||||||
{% for role in roles %}
|
{% for role in roles %}
|
||||||
- {get_attr: [{{role.name}}IpListMap, short_service_bootstrap_hostnames]}
|
- {get_attr: [{{role.name}}IpListMap, short_service_bootstrap_hostnames]}
|
||||||
|
{% endfor %}
|
||||||
|
service_bootstrap_node_ip:
|
||||||
|
yaql:
|
||||||
|
expression: dict($.data.l.where($ != null).selectMany($.items()).groupBy($[0], $[1]).select([$[0], $[1].flatten().first()]))
|
||||||
|
data:
|
||||||
|
l:
|
||||||
|
{% for role in roles %}
|
||||||
|
- {get_attr: [{{role.name}}IpListMap, service_bootstrap_ips]}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
NetVipMap: {get_attr: [VipMap, net_ip_map]}
|
NetVipMap: {get_attr: [VipMap, net_ip_map]}
|
||||||
RedisVirtualIP: {get_attr: [RedisVirtualIP, ip_address]}
|
RedisVirtualIP: {get_attr: [RedisVirtualIP, ip_address]}
|
||||||
|
@ -20,6 +20,8 @@ parameters:
|
|||||||
type: json
|
type: json
|
||||||
short_service_bootstrap_node:
|
short_service_bootstrap_node:
|
||||||
type: json
|
type: json
|
||||||
|
service_bootstrap_node_ip:
|
||||||
|
type: json
|
||||||
controller_names:
|
controller_names:
|
||||||
type: comma_delimited_list
|
type: comma_delimited_list
|
||||||
cellv2_discovery_hosts:
|
cellv2_discovery_hosts:
|
||||||
@ -131,6 +133,7 @@ resources:
|
|||||||
- {get_param: service_node_names}
|
- {get_param: service_node_names}
|
||||||
- {get_param: short_service_node_names}
|
- {get_param: short_service_node_names}
|
||||||
- {get_param: short_service_bootstrap_node}
|
- {get_param: short_service_bootstrap_node}
|
||||||
|
- {get_param: service_bootstrap_node_ip}
|
||||||
- controller_node_ips:
|
- controller_node_ips:
|
||||||
list_join:
|
list_join:
|
||||||
- ','
|
- ','
|
||||||
@ -156,7 +159,6 @@ resources:
|
|||||||
datafiles:
|
datafiles:
|
||||||
bootstrap_node:
|
bootstrap_node:
|
||||||
bootstrap_nodeid: {get_input: bootstrap_nodeid}
|
bootstrap_nodeid: {get_input: bootstrap_nodeid}
|
||||||
bootstrap_nodeid_ip: {get_input: bootstrap_nodeid_ip}
|
|
||||||
all_nodes: {get_attr: [allNodesConfigValue, value]}
|
all_nodes: {get_attr: [allNodesConfigValue, value]}
|
||||||
vip_data:
|
vip_data:
|
||||||
map_merge:
|
map_merge:
|
||||||
|
@ -81,7 +81,7 @@ outputs:
|
|||||||
$NETWORK: {get_param: [ServiceNetMap, RedisNetwork]}
|
$NETWORK: {get_param: [ServiceNetMap, RedisNetwork]}
|
||||||
redis::port: 6379
|
redis::port: 6379
|
||||||
redis::sentinel::master_name: "%{hiera('redis_short_bootstrap_node_name')}"
|
redis::sentinel::master_name: "%{hiera('redis_short_bootstrap_node_name')}"
|
||||||
redis::sentinel::redis_host: "%{hiera('bootstrap_nodeid_ip')}"
|
redis::sentinel::redis_host: "%{hiera('redis_bootstrap_node_ip')}"
|
||||||
redis::sentinel::notification_script: '/usr/local/bin/redis-notifications.sh'
|
redis::sentinel::notification_script: '/usr/local/bin/redis-notifications.sh'
|
||||||
redis::sentinel::sentinel_bind:
|
redis::sentinel::sentinel_bind:
|
||||||
if:
|
if:
|
||||||
|
@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
upgrade:
|
||||||
|
- |
|
||||||
|
The hiera bootstrap_nodeid_ip key has been replaced with per-service
|
||||||
|
SERVICE_bootstrap_node_ip where SERVICE is the service_name from the
|
||||||
|
composable service templates. If any out-of-tree services use this
|
||||||
|
key they will need to adjust to the new interface on upgrade.
|
Loading…
Reference in New Issue
Block a user