Add isolated network ports to block storage roles
authorDan Prince <dprince@redhat.com>
Thu, 7 May 2015 01:14:01 +0000 (21:14 -0400)
committerDan Prince <dprince@redhat.com>
Tue, 26 May 2015 12:50:44 +0000 (08:50 -0400)
This patch updates the cinder block storage 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: I4e18cd4763455f815a8f8b82c93a598c99cc3842

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

index dfbd520..b0f227b 100644 (file)
@@ -111,8 +111,27 @@ resources:
   NodeUserData:
     type: OS::TripleO::NodeUserData
 
+  InternalApiPort:
+    type: OS::TripleO::BlockStorage::Ports::InternalApiPort
+    properties:
+      ControlPlaneIP: {get_attr: [BlockStorage, networks, ctlplane, 0]}
+
+  StoragePort:
+    type: OS::TripleO::BlockStorage::Ports::StoragePort
+    properties:
+      ControlPlaneIP: {get_attr: [BlockStorage, networks, ctlplane, 0]}
+
+  StorageMgmtPort:
+    type: OS::TripleO::BlockStorage::Ports::StorageMgmtPort
+    properties:
+      ControlPlaneIP: {get_attr: [BlockStorage, networks, ctlplane, 0]}
+
   NetworkConfig:
     type: OS::TripleO::BlockStorage::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
@@ -163,3 +182,12 @@ outputs:
         params:
           IP: {get_attr: [BlockStorage, networks, ctlplane, 0]}
           HOST: {get_attr: [BlockStorage, name]}
+  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 f4a59b5..fabfb0f 100644 (file)
@@ -54,5 +54,10 @@ resource_registry:
   OS::TripleO::SwiftStorage::Ports::StoragePort: network/ports/noop.yaml
   OS::TripleO::SwiftStorage::Ports::StorageMgmtPort: network/ports/noop.yaml
 
+  # Port assignments for the block storage role
+  OS::TripleO::BlockStorage::Ports::InternalApiPort: network/ports/noop.yaml
+  OS::TripleO::BlockStorage::Ports::StoragePort: network/ports/noop.yaml
+  OS::TripleO::BlockStorage::Ports::StorageMgmtPort: network/ports/noop.yaml
+
 parameter_defaults:
   EnablePackageInstall: false
index 6029795..905f808 100644 (file)
@@ -51,3 +51,8 @@ resource_registry:
   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
+
+  # Port assignments for the block storage role
+  OS::TripleO::BlockStorage::Ports::InternalApiPort: network/ports/noop.yaml
+  OS::TripleO::BlockStorage::Ports::StoragePort: network/ports/noop.yaml
+  OS::TripleO::BlockStorage::Ports::StorageMgmtPort: network/ports/noop.yaml
index e373c92..cf483db 100644 (file)
@@ -123,8 +123,27 @@ resources:
   NodeUserData:
     type: OS::TripleO::NodeUserData
 
+  InternalApiPort:
+    type: OS::TripleO::BlockStorage::Ports::InternalApiPort
+    properties:
+      ControlPlaneIP: {get_attr: [BlockStorage, networks, ctlplane, 0]}
+
+  StoragePort:
+    type: OS::TripleO::BlockStorage::Ports::StoragePort
+    properties:
+      ControlPlaneIP: {get_attr: [BlockStorage, networks, ctlplane, 0]}
+
+  StorageMgmtPort:
+    type: OS::TripleO::BlockStorage::Ports::StorageMgmtPort
+    properties:
+      ControlPlaneIP: {get_attr: [BlockStorage, networks, ctlplane, 0]}
+
   NetworkConfig:
     type: OS::TripleO::BlockStorage::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
@@ -209,3 +228,12 @@ outputs:
     description: Heat resource handle for the block storage server
     value:
       {get_resource: BlockStorage}
+  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]}