X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=puppet%2Fall-nodes-config.yaml;h=c764d4efc38d28d461d4d758baff51687640e56a;hb=dfe74b211267cde7a1da4e1fe9430127eda234c6;hp=7aa29b240b58127d6b271e1dd56e49cfbc3cb1dc;hpb=4488b0fdf809413cdd0e6deb92de879224cda383;p=apex-tripleo-heat-templates.git diff --git a/puppet/all-nodes-config.yaml b/puppet/all-nodes-config.yaml index 7aa29b24..c764d4ef 100644 --- a/puppet/all-nodes-config.yaml +++ b/puppet/all-nodes-config.yaml @@ -2,6 +2,16 @@ heat_template_version: 2016-10-14 description: 'All Nodes Config for Puppet' parameters: + cloud_name_external: + type: string + cloud_name_internal_api: + type: string + cloud_name_storage: + type: string + cloud_name_storage_mgmt: + type: string + cloud_name_ctlplane: + type: string hosts: type: comma_delimited_list # FIXME(shardy) this can be comma_delimited_list when @@ -24,6 +34,9 @@ parameters: type: comma_delimited_list NetVipMap: type: json + RedisVirtualIP: + type: string + default: '' ServiceNetMap: type: json DeployIdentifier: @@ -77,6 +90,33 @@ resources: for_each: SERVICE: str_split: [',', {get_param: enabled_services}] + # Dynamically generate per-service network data + # This works as follows (outer->inner functions) + # yaql - filters services where no mapping exists in ServiceNetMap + # map_replace: substitute e.g heat_api_network with network name from ServiceNetMap + # map_merge/repeat: generate a per-service mapping + - 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(isString($[1]) and not $[1].endsWith("_network"))) + data: + map: + map_replace: + - map_merge: + repeat: + template: + SERVICE_network: SERVICE_network + for_each: + SERVICE: + str_split: [',', {get_param: enabled_services}] + - values: {get_param: ServiceNetMap} + # Keystone doesn't provide separate entries for the public + # and admin endpoints, so we need to add them here manually + # like we do in the vip-config below + - keystone_admin_api_network: {get_param: [ServiceNetMap, keystone_admin_api_network]} + keystone_public_api_network: {get_param: [ServiceNetMap, keystone_public_api_network]} # provides a mapping of service_name_ips to a list of IPs - {get_param: service_ips} - {get_param: service_node_names} @@ -153,6 +193,7 @@ resources: internal_api_virtual_ip: {get_param: [NetVipMap, internal_api]} storage_virtual_ip: {get_param: [NetVipMap, storage]} storage_mgmt_virtual_ip: {get_param: [NetVipMap, storage_mgmt]} + redis_vip: {get_param: RedisVirtualIP} # public_virtual_ip and controller_virtual_ip are needed in # both HAproxy & keepalived. tripleo::haproxy::public_virtual_ip: {get_param: [NetVipMap, external]} @@ -162,7 +203,13 @@ resources: tripleo::keepalived::internal_api_virtual_ip: {get_param: [NetVipMap, internal_api]} tripleo::keepalived::storage_virtual_ip: {get_param: [NetVipMap, storage]} tripleo::keepalived::storage_mgmt_virtual_ip: {get_param: [NetVipMap, storage_mgmt]} + tripleo::keepalived::redis_virtual_ip: {get_param: RedisVirtualIP} tripleo::redis_notification::haproxy_monitor_ip: {get_param: [NetVipMap, ctlplane]} + cloud_name_external: {get_param: cloud_name_external} + cloud_name_internal_api: {get_param: cloud_name_internal_api} + cloud_name_storage: {get_param: cloud_name_storage} + cloud_name_storage_mgmt: {get_param: cloud_name_storage_mgmt} + cloud_name_ctlplane: {get_param: cloud_name_ctlplane} outputs: config_id: