Allow 'ctlplane' to be used within Net IP Maps
authorDan Prince <dprince@redhat.com>
Thu, 23 Jul 2015 20:20:56 +0000 (16:20 -0400)
committerDan Prince <dprince@redhat.com>
Sat, 5 Sep 2015 00:16:47 +0000 (00:16 +0000)
When using network isolation you might want to selective
move one of the services back to the default ctlplane network
by simply using the ServiceNetMap parameter. This patch
adds ctlplane to the output parameters for both
the net_ip_map and net_ip_list_map nested stacks so that
this is possible.

As part of this patch we also split out the NetIpSubnetMap
into its own unique nested stack so that the Heat input
parameters for this stack are more clearly named.

Change-Id: Iaa2dcaebeac896404e87ec0c635688b2a59a9e0f

network/ports/net_ip_list_map.yaml
network/ports/net_ip_map.yaml
network/ports/net_ip_subnet_map.yaml [new file with mode: 0644]
overcloud-resource-registry-puppet.yaml
overcloud-resource-registry.yaml
overcloud-without-mergepy.yaml
puppet/ceph-storage-puppet.yaml
puppet/cinder-storage-puppet.yaml
puppet/compute-puppet.yaml
puppet/controller-puppet.yaml
puppet/swift-storage-puppet.yaml

index 54614ea..257d3f9 100644 (file)
@@ -1,6 +1,9 @@
 heat_template_version: 2015-04-30
 
 parameters:
+  ControlPlaneIpList:
+    default: []
+    type: comma_delimited_list
   ExternalIpList:
     default: []
     type: comma_delimited_list
@@ -23,6 +26,7 @@ outputs:
       A Hash containing a mapping of network names to assigned lists
       of IP addresses.
     value:
+      ctlplane: {get_param: ControlPlaneIpList}
       external: {get_param: ExternalIpList}
       internal_api: {get_param: InternalApiIpList}
       storage: {get_param: StorageIpList}
index edc4060..7aaed16 100644 (file)
@@ -1,6 +1,9 @@
 heat_template_version: 2015-04-30
 
 parameters:
+  ControlPlaneIp:
+    default: ''
+    type: string
   ExternalIp:
     default: ''
     type: string
@@ -23,6 +26,7 @@ outputs:
       A Hash containing a mapping of network names to assigned IPs
       for a specific machine.
     value:
+      ctlplane: {get_param: ControlPlaneIp}
       external: {get_param: ExternalIp}
       internal_api: {get_param: InternalApiIp}
       storage: {get_param: StorageIp}
diff --git a/network/ports/net_ip_subnet_map.yaml b/network/ports/net_ip_subnet_map.yaml
new file mode 100644 (file)
index 0000000..cf59adb
--- /dev/null
@@ -0,0 +1,43 @@
+heat_template_version: 2015-04-30
+
+parameters:
+  ControlPlaneIp:
+    default: ''
+    type: string
+  ExternalIpSubnet:
+    default: ''
+    type: string
+  InternalApiIpSubnet:
+    default: ''
+    type: string
+  StorageIpSubnet:
+    default: ''
+    type: string
+  StorageMgmtIpSubnet:
+    default: ''
+    type: string
+  TenantIpSubnet:
+    default: ''
+    type: string
+  ControlPlaneSubnetCidr: # Override this via parameter_defaults
+    default: '24'
+    description: The subnet CIDR of the control plane network.
+    type: string
+
+outputs:
+  net_ip_subnet_map:
+    description: >
+      A Hash containing a mapping of network names to assigned
+      IP/subnet mappings.
+    value:
+      ctlplane:
+        list_join:
+          - ''
+          - - {get_param: ControlPlaneIp}
+            - '/'
+            - {get_param: ControlPlaneSubnetCidr}
+      external: {get_param: ExternalIpSubnet}
+      internal_api: {get_param: InternalApiIpSubnet}
+      storage: {get_param: StorageIpSubnet}
+      storage_mgmt: {get_param: StorageMgmtIpSubnet}
+      tenant: {get_param: TenantIpSubnet}
index 523e447..ba1b6f7 100644 (file)
@@ -44,6 +44,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::NetIpSubnetMap: network/ports/net_ip_subnet_map.yaml
   OS::TripleO::Network::Ports::NetIpListMap: network/ports/net_ip_list_map.yaml
 
   # Port assignments for the controller role
index 78607b5..094b331 100644 (file)
@@ -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::NetIpSubnetMap: network/ports/net_ip_subnet_map.yaml
   OS::TripleO::Network::Ports::NetIpListMap: network/ports/net_ip_list_map.yaml
 
   # Port assignments for the controller role
index 6a9c8af..cdfe61d 100644 (file)
@@ -984,6 +984,7 @@ resources:
   ControllerIpListMap:
     type: OS::TripleO::Network::Ports::NetIpListMap
     properties:
+      ControlPlaneIpList: {get_attr: [Controller, ip_address]}
       ExternalIpList: {get_attr: [Controller, external_ip_address]}
       InternalApiIpList: {get_attr: [Controller, internal_api_ip_address]}
       StorageIpList: {get_attr: [Controller, storage_ip_address]}
@@ -1090,6 +1091,7 @@ resources:
   VipMap:
     type: OS::TripleO::Network::Ports::NetIpMap
     properties:
+      ControlPlaneIp: {get_attr: [ControlVirtualIP, fixed_ips, 0, ip_address]}
       ExternalIp: {get_attr: [PublicVirtualIP, ip_address]}
       InternalApiIp: {get_attr: [InternalApiVirtualIP, ip_address]}
       StorageIp: {get_attr: [StorageVirtualIP, ip_address]}
index fcf4259..6a1ed50 100644 (file)
@@ -91,14 +91,16 @@ resources:
   NetIpMap:
     type: OS::TripleO::Network::Ports::NetIpMap
     properties:
+      ControlPlaneIp: {get_attr: [CephStorage, networks, ctlplane, 0]}
       StorageIp: {get_attr: [StoragePort, ip_address]}
       StorageMgmtIp: {get_attr: [StorageMgmtPort, ip_address]}
 
   NetIpSubnetMap:
-    type: OS::TripleO::Network::Ports::NetIpMap
+    type: OS::TripleO::Network::Ports::NetIpSubnetMap
     properties:
-      StorageIp: {get_attr: [StoragePort, ip_subnet]}
-      StorageMgmtIp: {get_attr: [StorageMgmtPort, ip_subnet]}
+      ControlPlaneIp: {get_attr: [CephStorage, networks, ctlplane, 0]}
+      StorageIpSubnet: {get_attr: [StoragePort, ip_subnet]}
+      StorageMgmtIpSubnet: {get_attr: [StorageMgmtPort, ip_subnet]}
 
   NetworkDeployment:
     type: OS::TripleO::SoftwareDeployment
@@ -119,8 +121,8 @@ resources:
             params:
               server: {get_param: NtpServer}
         enable_package_install: {get_param: EnablePackageInstall}
-        ceph_cluster_network: {get_attr: [NetIpSubnetMap, net_ip_map, {get_param: [ServiceNetMap, CephClusterNetwork]}]}
-        ceph_public_network: {get_attr: [NetIpSubnetMap, net_ip_map, {get_param: [ServiceNetMap, CephPublicNetwork]}]}
+        ceph_cluster_network: {get_attr: [NetIpSubnetMap, net_ip_subnet_map, {get_param: [ServiceNetMap, CephClusterNetwork]}]}
+        ceph_public_network: {get_attr: [NetIpSubnetMap, net_ip_subnet_map, {get_param: [ServiceNetMap, CephPublicNetwork]}]}
 
   CephStorageConfig:
     type: OS::Heat::StructuredConfig
index 091d1f1..df6ec34 100644 (file)
@@ -151,6 +151,7 @@ resources:
   NetIpMap:
     type: OS::TripleO::Network::Ports::NetIpMap
     properties:
+      ControlPlaneIp: {get_attr: [BlockStorage, networks, ctlplane, 0]}
       InternalApiIp: {get_attr: [InternalApiPort, ip_address]}
       StorageIp: {get_attr: [StoragePort, ip_address]}
       StorageMgmtIp: {get_attr: [StorageMgmtPort, ip_address]}
index 7966fd4..3d5c934 100644 (file)
@@ -284,6 +284,7 @@ resources:
   NetIpMap:
     type: OS::TripleO::Network::Ports::NetIpMap
     properties:
+      ControlPlaneIp: {get_attr: [NovaCompute, networks, ctlplane, 0]}
       InternalApiIp: {get_attr: [InternalApiPort, ip_address]}
       StorageIp: {get_attr: [StoragePort, ip_address]}
       TenantIp: {get_attr: [TenantPort, ip_address]}
index 296388a..b59bcfc 100644 (file)
@@ -562,6 +562,7 @@ resources:
   NetIpMap:
     type: OS::TripleO::Network::Ports::NetIpMap
     properties:
+      ControlPlaneIp: {get_attr: [Controller, networks, ctlplane, 0]}
       ExternalIp: {get_attr: [ExternalPort, ip_address]}
       InternalApiIp: {get_attr: [InternalApiPort, ip_address]}
       StorageIp: {get_attr: [StoragePort, ip_address]}
@@ -569,13 +570,14 @@ resources:
       TenantIp: {get_attr: [TenantPort, ip_address]}
 
   NetIpSubnetMap:
-    type: OS::TripleO::Network::Ports::NetIpMap
+    type: OS::TripleO::Network::Ports::NetIpSubnetMap
     properties:
-      ExternalIp: {get_attr: [ExternalPort, ip_subnet]}
-      InternalApiIp: {get_attr: [InternalApiPort, ip_subnet]}
-      StorageIp: {get_attr: [StoragePort, ip_subnet]}
-      StorageMgmtIp: {get_attr: [StorageMgmtPort, ip_subnet]}
-      TenantIp: {get_attr: [TenantPort, ip_subnet]}
+      ControlPlaneIp: {get_attr: [Controller, networks, ctlplane, 0]}
+      ExternalIpSubnet: {get_attr: [ExternalPort, ip_subnet]}
+      InternalApiIpSubnet: {get_attr: [InternalApiPort, ip_subnet]}
+      StorageIpSubnet: {get_attr: [StoragePort, ip_subnet]}
+      StorageMgmtIpSubnet: {get_attr: [StorageMgmtPort, ip_subnet]}
+      TenantIpSubnet: {get_attr: [TenantPort, ip_subnet]}
 
   NetworkConfig:
     type: OS::TripleO::Controller::Net::SoftwareConfig
@@ -861,8 +863,8 @@ resources:
         memcached_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, MemcachedNetwork]}]}
         mysql_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, MysqlNetwork]}]}
         mysql_virtual_ip: {get_param: MysqlVirtualIP}
-        ceph_cluster_network: {get_attr: [NetIpSubnetMap, net_ip_map, {get_param: [ServiceNetMap, CephClusterNetwork]}]}
-        ceph_public_network: {get_attr: [NetIpSubnetMap, net_ip_map, {get_param: [ServiceNetMap, CephPublicNetwork]}]}
+        ceph_cluster_network: {get_attr: [NetIpSubnetMap, net_ip_subnet_map, {get_param: [ServiceNetMap, CephClusterNetwork]}]}
+        ceph_public_network: {get_attr: [NetIpSubnetMap, net_ip_subnet_map, {get_param: [ServiceNetMap, CephPublicNetwork]}]}
         ceph_public_ip: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, CephPublicNetwork]}]}
 
   # Map heat metadata into hiera datafiles
index b357942..edec104 100644 (file)
@@ -120,6 +120,7 @@ resources:
   NetIpMap:
     type: OS::TripleO::Network::Ports::NetIpMap
     properties:
+      ControlPlaneIp: {get_attr: [SwiftStorage, networks, ctlplane, 0]}
       InternalApiIp: {get_attr: [InternalApiPort, ip_address]}
       StorageIp: {get_attr: [StoragePort, ip_address]}
       StorageMgmtIp: {get_attr: [StorageMgmtPort, ip_address]}