Add isolated network ports to swift roles
authorDan Prince <dprince@redhat.com>
Thu, 7 May 2015 01:04:22 +0000 (21:04 -0400)
committerDan Prince <dprince@redhat.com>
Tue, 26 May 2015 12:50:44 +0000 (08:50 -0400)
This patch updates the swift roles so that
they can optionally make use of isolated network
ports on the storage, storage management, and internal API
networks.

 -Multiple networks are created based upon settings in the heat
  resource registry. These nets will either use the noop network (the
  control plane pass-thru default) or create a custom Neutron port on
  each of the configured networks.

 -The ipaddress/subnet of each network is passed passed into the
  NetworkConfig resource which drives os-net-config. This allows the
  deployer to define a custom network template for static IPs, etc
  on each of the networks.

 -The ipaddress is exposed as an output parameter. By exposing
  the individual addresses as outputs we allow Heat to construct
  collections of ports for various services.

Change-Id: I9984404331705f6ce569fb54a38b2838a8142faa

overcloud-resource-registry-puppet.yaml
overcloud-resource-registry.yaml
puppet/swift-storage-puppet.yaml
swift-storage.yaml

index cf7d17c..f4a59b5 100644 (file)
@@ -49,5 +49,10 @@ resource_registry:
   OS::TripleO::CephStorage::Ports::StoragePort: network/ports/noop.yaml
   OS::TripleO::CephStorage::Ports::StorageMgmtPort: network/ports/noop.yaml
 
+  # Port assignments for the swift storage role
+  OS::TripleO::SwiftStorage::Ports::InternalApiPort: network/ports/noop.yaml
+  OS::TripleO::SwiftStorage::Ports::StoragePort: network/ports/noop.yaml
+  OS::TripleO::SwiftStorage::Ports::StorageMgmtPort: network/ports/noop.yaml
+
 parameter_defaults:
   EnablePackageInstall: false
index a916378..6029795 100644 (file)
@@ -46,3 +46,8 @@ resource_registry:
   # Port assignments for the ceph storage role
   OS::TripleO::CephStorage::Ports::StoragePort: network/ports/noop.yaml
   OS::TripleO::CephStorage::Ports::StorageMgmtPort: network/ports/noop.yaml
+
+  # Port assignments for the swift storage role
+  OS::TripleO::SwiftStorage::Ports::InternalApiPort: network/ports/noop.yaml
+  OS::TripleO::SwiftStorage::Ports::StoragePort: network/ports/noop.yaml
+  OS::TripleO::SwiftStorage::Ports::StorageMgmtPort: network/ports/noop.yaml
index b1c4f23..1332822 100644 (file)
@@ -68,8 +68,27 @@ resources:
   NodeUserData:
     type: OS::TripleO::NodeUserData
 
+  InternalApiPort:
+    type: OS::TripleO::SwiftStorage::Ports::InternalApiPort
+    properties:
+      ControlPlaneIP: {get_attr: [SwiftStorage, networks, ctlplane, 0]}
+
+  StoragePort:
+    type: OS::TripleO::SwiftStorage::Ports::StoragePort
+    properties:
+      ControlPlaneIP: {get_attr: [SwiftStorage, networks, ctlplane, 0]}
+
+  StorageMgmtPort:
+    type: OS::TripleO::SwiftStorage::Ports::StorageMgmtPort
+    properties:
+      ControlPlaneIP: {get_attr: [SwiftStorage, networks, ctlplane, 0]}
+
   NetworkConfig:
     type: OS::TripleO::ObjectStorage::Net::SoftwareConfig
+    properties:
+      InternalApiIpSubnet: {get_attr: [InternalApiPort, ip_subnet]}
+      StorageIpSubnet: {get_attr: [StoragePort, ip_subnet]}
+      StorageMgmtIpSubnet: {get_attr: [StorageMgmtPort, ip_subnet]}
 
   NetworkDeployment:
     type: OS::TripleO::SoftwareDeployment
@@ -151,3 +170,12 @@ outputs:
         template: 'r1z1-IP:%PORT%/d1'
         params:
           IP: {get_attr: [SwiftStorage, networks, ctlplane, 0]}
+  internal_api_ip_address:
+    description: IP address of the server in the internal_api network
+    value: {get_attr: [InternalApiPort, ip_address]}
+  storage_ip_address:
+    description: IP address of the server in the storage network
+    value: {get_attr: [StoragePort, ip_address]}
+  storage_mgmt_ip_address:
+    description: IP address of the server in the storage_mgmt network
+    value: {get_attr: [StorageMgmtPort, ip_address]}
index ea28864..0b9cf3b 100644 (file)
@@ -116,8 +116,27 @@ resources:
   NodeUserData:
     type: OS::TripleO::NodeUserData
 
+  InternalApiPort:
+    type: OS::TripleO::SwiftStorage::Ports::InternalApiPort
+    properties:
+      ControlPlaneIP: {get_attr: [SwiftStorage, networks, ctlplane, 0]}
+
+  StoragePort:
+    type: OS::TripleO::SwiftStorage::Ports::StoragePort
+    properties:
+      ControlPlaneIP: {get_attr: [SwiftStorage, networks, ctlplane, 0]}
+
+  StorageMgmtPort:
+    type: OS::TripleO::SwiftStorage::Ports::StorageMgmtPort
+    properties:
+      ControlPlaneIP: {get_attr: [SwiftStorage, networks, ctlplane, 0]}
+
   NetworkConfig:
     type: OS::TripleO::ObjectStorage::Net::SoftwareConfig
+    properties:
+      InternalApiIpSubnet: {get_attr: [InternalApiPort, ip_subnet]}
+      StorageIpSubnet: {get_attr: [StoragePort, ip_subnet]}
+      StorageMgmtIpSubnet: {get_attr: [StorageMgmtPort, ip_subnet]}
 
   NetworkDeployment:
     type: OS::TripleO::SoftwareDeployment
@@ -160,3 +179,12 @@ outputs:
         template: 'r1z1-IP:%PORT%/d1'
         params:
           IP: {get_attr: [SwiftStorage, networks, ctlplane, 0]}
+  internal_api_ip_address:
+    description: IP address of the server in the internal_api network
+    value: {get_attr: [InternalApiPort, ip_address]}
+  storage_ip_address:
+    description: IP address of the server in the storage network
+    value: {get_attr: [StoragePort, ip_address]}
+  storage_mgmt_ip_address:
+    description: IP address of the server in the storage_mgmt network
+    value: {get_attr: [StorageMgmtPort, ip_address]}