summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Prince <dprince@redhat.com>2015-05-27 09:52:56 -0400
committerDan Prince <dprince@redhat.com>2015-06-03 08:58:13 -0400
commit17028aa9c21faa00cc5abb0070f13ebc5b5c67aa (patch)
treeb1d5d754e23856ce9d4d5a0e1199b9ce2203a902
parentd413eb63f3d317c56b24282223f12dfacc0f9ae3 (diff)
Make all-nodes Ip networks configurable
This patch adds a new NetIpListMap abstraction which we can use to make the all-nodes-config IP list network assignments configurable. Ip address lists for all overcloud services which require IPs were added to all-nodes-config so that puppet manifests can be directly supplied the correct network list for each service. Change-Id: I209f2b4f97a4bb78648c54813dad8615770bcf1a
-rw-r--r--all-nodes-config.yaml34
-rw-r--r--network/ports/net_ip_list_map.yaml30
-rw-r--r--network/ports/net_ip_map.yaml2
-rw-r--r--overcloud-resource-registry-puppet.yaml1
-rw-r--r--overcloud-resource-registry.yaml1
-rw-r--r--overcloud-without-mergepy.yaml26
-rw-r--r--puppet/all-nodes-config.yaml171
-rw-r--r--puppet/manifests/overcloud_controller.pp7
-rw-r--r--puppet/manifests/overcloud_controller_pacemaker.pp6
9 files changed, 260 insertions, 18 deletions
diff --git a/all-nodes-config.yaml b/all-nodes-config.yaml
index 9687dafc..3f0bd61c 100644
--- a/all-nodes-config.yaml
+++ b/all-nodes-config.yaml
@@ -16,6 +16,40 @@ parameters:
type: comma_delimited_list
controller_names:
type: comma_delimited_list
+ rabbit_node_ips:
+ type: comma_delimited_list
+ mongo_node_ips:
+ type: comma_delimited_list
+ redis_node_ips:
+ type: comma_delimited_list
+ memcache_node_ips:
+ type: comma_delimited_list
+ mysql_node_ips:
+ type: comma_delimited_list
+ horizon_node_ips:
+ type: comma_delimited_list
+ heat_api_node_ips:
+ type: comma_delimited_list
+ swift_proxy_node_ips:
+ type: comma_delimited_list
+ ceilometer_api_node_ips:
+ type: comma_delimited_list
+ nova_api_node_ips:
+ type: comma_delimited_list
+ nova_metadata_node_ips:
+ type: comma_delimited_list
+ glance_api_node_ips:
+ type: comma_delimited_list
+ glance_registry_node_ips:
+ type: comma_delimited_list
+ cinder_api_node_ips:
+ type: comma_delimited_list
+ neutron_api_node_ips:
+ type: comma_delimited_list
+ keystone_public_api_node_ips:
+ type: comma_delimited_list
+ keystone_admin_api_node_ips:
+ type: comma_delimited_list
resources:
diff --git a/network/ports/net_ip_list_map.yaml b/network/ports/net_ip_list_map.yaml
new file mode 100644
index 00000000..54614ead
--- /dev/null
+++ b/network/ports/net_ip_list_map.yaml
@@ -0,0 +1,30 @@
+heat_template_version: 2015-04-30
+
+parameters:
+ ExternalIpList:
+ default: []
+ type: comma_delimited_list
+ InternalApiIpList:
+ default: []
+ type: comma_delimited_list
+ StorageIpList:
+ default: []
+ type: comma_delimited_list
+ StorageMgmtIpList:
+ default: []
+ type: comma_delimited_list
+ TenantIpList:
+ default: []
+ type: comma_delimited_list
+
+outputs:
+ net_ip_map:
+ description: >
+ A Hash containing a mapping of network names to assigned lists
+ of IP addresses.
+ value:
+ external: {get_param: ExternalIpList}
+ internal_api: {get_param: InternalApiIpList}
+ storage: {get_param: StorageIpList}
+ storage_mgmt: {get_param: StorageMgmtIpList}
+ tenant: {get_param: TenantIpList}
diff --git a/network/ports/net_ip_map.yaml b/network/ports/net_ip_map.yaml
index b7138b25..edc4060f 100644
--- a/network/ports/net_ip_map.yaml
+++ b/network/ports/net_ip_map.yaml
@@ -1,4 +1,4 @@
-heat_template_version: 2014-10-16
+heat_template_version: 2015-04-30
parameters:
ExternalIp:
diff --git a/overcloud-resource-registry-puppet.yaml b/overcloud-resource-registry-puppet.yaml
index e2a54088..f2f1eee4 100644
--- a/overcloud-resource-registry-puppet.yaml
+++ b/overcloud-resource-registry-puppet.yaml
@@ -34,6 +34,7 @@ resource_registry:
OS::TripleO::Network::Tenant: network/noop.yaml
OS::TripleO::Network::Ports::NetIpMap: network/ports/net_ip_map.yaml
+ OS::TripleO::Network::Ports::NetIpListMap: network/ports/net_ip_list_map.yaml
# Port assignments for the controller role
OS::TripleO::Controller::Ports::ExternalPort: network/ports/noop.yaml
diff --git a/overcloud-resource-registry.yaml b/overcloud-resource-registry.yaml
index df67bf13..b385c64a 100644
--- a/overcloud-resource-registry.yaml
+++ b/overcloud-resource-registry.yaml
@@ -32,6 +32,7 @@ resource_registry:
OS::TripleO::Network::Tenant: network/noop.yaml
OS::TripleO::Network::Ports::NetIpMap: network/ports/net_ip_map.yaml
+ OS::TripleO::Network::Ports::NetIpListMap: network/ports/net_ip_list_map.yaml
# Port assignments for the controller role
OS::TripleO::Controller::Ports::ExternalPort: network/ports/noop.yaml
diff --git a/overcloud-without-mergepy.yaml b/overcloud-without-mergepy.yaml
index 6c79d97e..899d6838 100644
--- a/overcloud-without-mergepy.yaml
+++ b/overcloud-without-mergepy.yaml
@@ -779,6 +779,15 @@ resources:
Flavor: {get_param: OvercloudCephStorageFlavor}
NtpServer: {get_param: NtpServer}
+ ControllerIpListMap:
+ type: OS::TripleO::Network::Ports::NetIpListMap
+ properties:
+ ExternalIpList: {get_attr: [Controller, external_ip_address]}
+ InternalApiIpList: {get_attr: [Controller, internal_api_ip_address]}
+ StorageIpList: {get_attr: [Controller, storage_ip_address]}
+ StorageMgmtIpList: {get_attr: [Controller, storage_mgmt_ip_address]}
+ TenantIpList: {get_attr: [Controller, tenant_ip_address]}
+
allNodesConfig:
type: OS::TripleO::AllNodes::SoftwareConfig
properties:
@@ -789,6 +798,23 @@ resources:
object_storage_hosts: {get_attr: [ObjectStorage, hosts_entry]}
ceph_storage_hosts: {get_attr: [CephStorage, hosts_entry]}
controller_names: {get_attr: [Controller, hostname]}
+ rabbit_node_ips: {get_attr: [ControllerIpListMap, net_ip_map, {get_param: [ServiceNetMap, RabbitMqNetwork]}]}
+ mongo_node_ips: {get_attr: [ControllerIpListMap, net_ip_map, {get_param: [ServiceNetMap, MongoDbNetwork]}]}
+ redis_node_ips: {get_attr: [ControllerIpListMap, net_ip_map, {get_param: [ServiceNetMap, RedisNetwork]}]}
+ memcache_node_ips: {get_attr: [ControllerIpListMap, net_ip_map, {get_param: [ServiceNetMap, MemcachedNetwork]}]}
+ mysql_node_ips: {get_attr: [ControllerIpListMap, net_ip_map, {get_param: [ServiceNetMap, MysqlNetwork]}]}
+ horizon_node_ips: {get_attr: [ControllerIpListMap, net_ip_map, {get_param: [ServiceNetMap, HorizonNetwork]}]}
+ heat_api_node_ips: {get_attr: [ControllerIpListMap, net_ip_map, {get_param: [ServiceNetMap, HeatApiNetwork]}]}
+ swift_proxy_node_ips: {get_attr: [ControllerIpListMap, net_ip_map, {get_param: [ServiceNetMap, SwiftProxyNetwork]}]}
+ ceilometer_api_node_ips: {get_attr: [ControllerIpListMap, net_ip_map, {get_param: [ServiceNetMap, CeilometerApiNetwork]}]}
+ nova_api_node_ips: {get_attr: [ControllerIpListMap, net_ip_map, {get_param: [ServiceNetMap, NovaApiNetwork]}]}
+ nova_metadata_node_ips: {get_attr: [ControllerIpListMap, net_ip_map, {get_param: [ServiceNetMap, NovaMetadataNetwork]}]}
+ glance_api_node_ips: {get_attr: [ControllerIpListMap, net_ip_map, {get_param: [ServiceNetMap, GlanceApiNetwork]}]}
+ glance_registry_node_ips: {get_attr: [ControllerIpListMap, net_ip_map, {get_param: [ServiceNetMap, GlanceRegistryNetwork]}]}
+ cinder_api_node_ips: {get_attr: [ControllerIpListMap, net_ip_map, {get_param: [ServiceNetMap, CinderApiNetwork]}]}
+ neutron_api_node_ips: {get_attr: [ControllerIpListMap, net_ip_map, {get_param: [ServiceNetMap, NeutronApiNetwork]}]}
+ keystone_public_api_node_ips: {get_attr: [ControllerIpListMap, net_ip_map, {get_param: [ServiceNetMap, KeystonePublicApiNetwork]}]}
+ keystone_admin_api_node_ips: {get_attr: [ControllerIpListMap, net_ip_map, {get_param: [ServiceNetMap, KeystoneAdminApiNetwork]}]}
MysqlRootPassword:
type: OS::Heat::RandomString
diff --git a/puppet/all-nodes-config.yaml b/puppet/all-nodes-config.yaml
index 963835e9..c50d6820 100644
--- a/puppet/all-nodes-config.yaml
+++ b/puppet/all-nodes-config.yaml
@@ -16,6 +16,40 @@ parameters:
type: comma_delimited_list
controller_names:
type: comma_delimited_list
+ rabbit_node_ips:
+ type: comma_delimited_list
+ mongo_node_ips:
+ type: comma_delimited_list
+ redis_node_ips:
+ type: comma_delimited_list
+ memcache_node_ips:
+ type: comma_delimited_list
+ mysql_node_ips:
+ type: comma_delimited_list
+ horizon_node_ips:
+ type: comma_delimited_list
+ heat_api_node_ips:
+ type: comma_delimited_list
+ swift_proxy_node_ips:
+ type: comma_delimited_list
+ ceilometer_api_node_ips:
+ type: comma_delimited_list
+ nova_api_node_ips:
+ type: comma_delimited_list
+ nova_metadata_node_ips:
+ type: comma_delimited_list
+ glance_api_node_ips:
+ type: comma_delimited_list
+ glance_registry_node_ips:
+ type: comma_delimited_list
+ cinder_api_node_ips:
+ type: comma_delimited_list
+ neutron_api_node_ips:
+ type: comma_delimited_list
+ keystone_public_api_node_ips:
+ type: comma_delimited_list
+ keystone_admin_api_node_ips:
+ type: comma_delimited_list
resources:
@@ -65,19 +99,136 @@ resources:
SERVERS_LIST:
list_join:
- "','"
- - {get_param: controller_ips}
+ - {get_param: rabbit_node_ips}
mongo_node_ips:
- list_join:
- - ','
- - {get_param: controller_ips}
+ str_replace:
+ template: "['SERVERS_LIST']"
+ params:
+ SERVERS_LIST:
+ list_join:
+ - "','"
+ - {get_param: mongo_node_ips}
redis_node_ips:
- list_join:
- - ','
- - {get_param: controller_ips}
+ str_replace:
+ template: "['SERVERS_LIST']"
+ params:
+ SERVERS_LIST:
+ list_join:
+ - "','"
+ - {get_param: redis_node_ips}
memcache_node_ips:
- list_join:
- - ','
- - {get_param: controller_ips}
+ str_replace:
+ template: "['SERVERS_LIST']"
+ params:
+ SERVERS_LIST:
+ list_join:
+ - "','"
+ - {get_param: memcache_node_ips}
+ mysql_node_ips:
+ str_replace:
+ template: "['SERVERS_LIST']"
+ params:
+ SERVERS_LIST:
+ list_join:
+ - "','"
+ - {get_param: mysql_node_ips}
+ horizon_node_ips:
+ str_replace:
+ template: "['SERVERS_LIST']"
+ params:
+ SERVERS_LIST:
+ list_join:
+ - "','"
+ - {get_param: horizon_node_ips}
+ heat_api_node_ips:
+ str_replace:
+ template: "['SERVERS_LIST']"
+ params:
+ SERVERS_LIST:
+ list_join:
+ - "','"
+ - {get_param: heat_api_node_ips}
+ swift_proxy_node_ips:
+ str_replace:
+ template: "['SERVERS_LIST']"
+ params:
+ SERVERS_LIST:
+ list_join:
+ - "','"
+ - {get_param: swift_proxy_node_ips}
+ ceilometer_api_node_ips:
+ str_replace:
+ template: "['SERVERS_LIST']"
+ params:
+ SERVERS_LIST:
+ list_join:
+ - "','"
+ - {get_param: ceilometer_api_node_ips}
+ nova_api_node_ips:
+ str_replace:
+ template: "['SERVERS_LIST']"
+ params:
+ SERVERS_LIST:
+ list_join:
+ - "','"
+ - {get_param: nova_api_node_ips}
+ nova_metadata_node_ips:
+ str_replace:
+ template: "['SERVERS_LIST']"
+ params:
+ SERVERS_LIST:
+ list_join:
+ - "','"
+ - {get_param: nova_metadata_node_ips}
+ glance_api_node_ips:
+ str_replace:
+ template: "['SERVERS_LIST']"
+ params:
+ SERVERS_LIST:
+ list_join:
+ - "','"
+ - {get_param: glance_api_node_ips}
+ glance_registry_node_ips:
+ str_replace:
+ template: "['SERVERS_LIST']"
+ params:
+ SERVERS_LIST:
+ list_join:
+ - "','"
+ - {get_param: glance_registry_node_ips}
+ cinder_api_node_ips:
+ str_replace:
+ template: "['SERVERS_LIST']"
+ params:
+ SERVERS_LIST:
+ list_join:
+ - "','"
+ - {get_param: cinder_api_node_ips}
+ neutron_api_node_ips:
+ str_replace:
+ template: "['SERVERS_LIST']"
+ params:
+ SERVERS_LIST:
+ list_join:
+ - "','"
+ - {get_param: neutron_api_node_ips}
+ keystone_public_api_node_ips:
+ str_replace:
+ template: "['SERVERS_LIST']"
+ params:
+ SERVERS_LIST:
+ list_join:
+ - "','"
+ - {get_param: keystone_public_api_node_ips}
+ keystone_admin_api_node_ips:
+ str_replace:
+ template: "['SERVERS_LIST']"
+ params:
+ SERVERS_LIST:
+ list_join:
+ - "','"
+ - {get_param: keystone_admin_api_node_ips}
+
# NOTE(gfidente): interpolation with %{} in the
# hieradata file can't be used as it returns string
ceilometer::rabbit_hosts: *rabbit_nodes_array
diff --git a/puppet/manifests/overcloud_controller.pp b/puppet/manifests/overcloud_controller.pp
index ac765321..9316ae14 100644
--- a/puppet/manifests/overcloud_controller.pp
+++ b/puppet/manifests/overcloud_controller.pp
@@ -48,8 +48,7 @@ if hiera('step') >= 2 {
include ::mongodb::globals
include ::mongodb::server
- $mongo_node_ips = split(hiera('mongo_node_ips'), ',')
- $mongo_node_ips_with_port = suffix($mongo_node_ips, ':27017')
+ $mongo_node_ips_with_port = suffix(hiera('mongo_node_ips'), ':27017')
$mongo_node_string = join($mongo_node_ips_with_port, ',')
$mongodb_replset = hiera('mongodb::server::replset')
@@ -62,7 +61,7 @@ if hiera('step') >= 2 {
}
# Redis
- $redis_node_ips = split(hiera('redis_node_ips'), ',')
+ $redis_node_ips = hiera('redis_node_ips')
$redis_master_hostname = downcase(hiera('bootstrap_nodeid'))
if $redis_master_hostname == $::hostname {
@@ -418,7 +417,7 @@ if hiera('step') >= 3 {
# Horizon
$vhost_params = { add_listen => false }
class { 'horizon':
- cache_server_ip => split(hiera('memcache_node_ips', '127.0.0.1'), ','),
+ cache_server_ip => hiera('memcache_node_ips', '127.0.0.1'),
vhost_extra_params => $vhost_params,
}
diff --git a/puppet/manifests/overcloud_controller_pacemaker.pp b/puppet/manifests/overcloud_controller_pacemaker.pp
index ba25162a..e30cda82 100644
--- a/puppet/manifests/overcloud_controller_pacemaker.pp
+++ b/puppet/manifests/overcloud_controller_pacemaker.pp
@@ -192,7 +192,7 @@ if hiera('step') >= 2 {
}
# NOTE (spredzy) : The replset can only be run
# once all the nodes have joined the cluster.
- $mongo_node_ips = split(hiera('mongo_node_ips'), ',')
+ $mongo_node_ips = hiera('mongo_node_ips')
$mongo_node_ips_with_port = suffix($mongo_node_ips, ':27017')
$mongo_node_string = join($mongo_node_ips_with_port, ',')
$mongodb_replset = hiera('mongodb::server::replset')
@@ -222,7 +222,7 @@ if hiera('step') >= 2 {
}
# Redis
- $redis_node_ips = split(hiera('redis_node_ips'), ',')
+ $redis_node_ips = hiera('redis_node_ips')
$redis_master_hostname = downcase(hiera('bootstrap_nodeid'))
if $redis_master_hostname == $::hostname {
@@ -675,7 +675,7 @@ if hiera('step') >= 3 {
# Horizon
$vhost_params = { add_listen => false }
class { 'horizon':
- cache_server_ip => split(hiera('memcache_node_ips', '127.0.0.1'), ','),
+ cache_server_ip => hiera('memcache_node_ips', '127.0.0.1'),
vhost_extra_params => $vhost_params,
}