Generate composable service node_names lists
authorSteven Hardy <shardy@redhat.com>
Fri, 12 Aug 2016 16:44:24 +0000 (17:44 +0100)
committerEmilien Macchi <emilien@redhat.com>
Fri, 2 Sep 2016 13:00:49 +0000 (13:00 +0000)
Some puppet interfaces require a comma separated list of hostnames
where a service is running, so generate it in a similar way to th
service ips.

Change-Id: Icdf5d993d089dc94035194bdbd52299fcbc793be
Partially-Implements: blueprint custom-roles

network/ports/net_ip_list_map.yaml
overcloud.yaml
puppet/all-nodes-config.yaml

index 36f3358..430158a 100644 (file)
@@ -28,6 +28,9 @@ parameters:
   ServiceNetMap:
     default: {}
     type: json
+  ServiceHostnameList:
+    default: []
+    type: comma_delimited_list
 
 outputs:
   net_ip_map:
@@ -71,3 +74,13 @@ outputs:
                   storage_mgmt: {get_param: StorageMgmtIpList}
                   tenant: {get_param: TenantIpList}
                   management: {get_param: ManagementIpList}
+  service_hostnames:
+    description: >
+      Map of enabled services to a list of hostnames where they're running
+    value:
+      map_merge:
+        repeat:
+          template:
+            SERVICE_node_names: {get_param: ServiceHostnameList}
+          for_each:
+              SERVICE: {get_param: EnabledServices}
index a85c57c..7b47382 100644 (file)
@@ -598,6 +598,7 @@ resources:
       ManagementIpList: {get_attr: [Controller, management_ip_address]}
       EnabledServices: {get_attr: [ControllerServiceChain, role_data, service_names]}
       ServiceNetMap: {get_attr: [ServiceNetMap, service_net_map_lower]}
+      ServiceHostnameList: {get_attr: [Controller, hostname]}
 
   allNodesConfig:
     type: OS::TripleO::AllNodes::SoftwareConfig
@@ -629,12 +630,12 @@ resources:
       controller_ips: {get_attr: [Controller, ip_address]}
       controller_names: {get_attr: [Controller, hostname]}
       service_ips: {get_attr: [ControllerIpListMap, service_ips]}
+      service_node_names: {get_attr: [ControllerIpListMap, service_hostnames]}
       # FIXME(shardy): These require further work to move into service_ips
       rabbit_node_ips: {get_attr: [ControllerIpListMap, net_ip_map, {get_attr: [ServiceNetMap, service_net_map, RabbitmqNetwork]}]}
       memcache_node_ips: {get_attr: [ControllerIpListMap, net_ip_map, {get_attr: [ServiceNetMap, service_net_map, MemcachedNetwork]}]}
       keystone_public_api_node_ips: {get_attr: [ControllerIpListMap, net_ip_map, {get_attr: [ServiceNetMap, service_net_map, KeystonePublicApiNetwork]}]}
       keystone_admin_api_node_ips: {get_attr: [ControllerIpListMap, net_ip_map, {get_attr: [ServiceNetMap, service_net_map, KeystoneAdminApiNetwork]}]}
-      ceph_mon_node_names: {get_attr: [Controller, hostname]}
       DeployIdentifier: {get_param: DeployIdentifier}
       UpdateIdentifier: {get_param: UpdateIdentifier}
 
index a43e964..17b72d4 100644 (file)
@@ -12,6 +12,8 @@ parameters:
     type: comma_delimited_list
   service_ips:
     type: json
+  service_node_names:
+    type: json
   controller_names:
     type: comma_delimited_list
   rabbit_node_ips:
@@ -22,8 +24,6 @@ parameters:
     type: comma_delimited_list
   keystone_admin_api_node_ips:
     type: comma_delimited_list
-  ceph_mon_node_names:
-    type: comma_delimited_list
   DeployIdentifier:
     type: string
     description: >
@@ -76,6 +76,7 @@ resources:
                             str_split: [',', {get_param: enabled_services}]
                   # provides a mapping of service_name_ips to a list of IPs
                   - {get_param: service_ips}
+                  - {get_param: service_node_names}
                   - controller_node_ips:
                       list_join:
                       - ','
@@ -84,10 +85,6 @@ resources:
                       list_join:
                       - ','
                       - {get_param: controller_names}
-                    galera_node_names:
-                      list_join:
-                      - ','
-                      - {get_param: controller_names}
                     rabbitmq_node_ips: &rabbit_nodes_array
                       str_replace:
                         template: "['SERVERS_LIST']"
@@ -120,10 +117,6 @@ resources:
                             list_join:
                             - "','"
                             - {get_param: keystone_admin_api_node_ips}
-                    tripleo::profile::base::ceph::ceph_mon_initial_members:
-                      list_join:
-                      - ','
-                      - {get_param: ceph_mon_node_names}
                     # NOTE(gfidente): interpolation with %{} in the
                     # hieradata file can't be used as it returns string
                     ceilometer::rabbit_hosts: *rabbit_nodes_array