Add isolated network ports to ceph roles
authorDan Prince <dprince@redhat.com>
Wed, 6 May 2015 20:16:17 +0000 (16:16 -0400)
committerDan Prince <dprince@redhat.com>
Tue, 26 May 2015 12:50:44 +0000 (08:50 -0400)
This patch updates the ceph roles so that
they can optionally make use of isolated network
ports on the storage and storage management 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: I35cb8e7812202f8a7bc0379067bf33d483cd2aec

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

index ecb47f2..aa957e6 100644 (file)
@@ -45,8 +45,21 @@ resources:
   NodeUserData:
     type: OS::TripleO::NodeUserData
 
+  StoragePort:
+    type: OS::TripleO::CephStorage::Ports::StoragePort
+    properties:
+      ControlPlaneIP: {get_attr: [CephStorage, networks, ctlplane, 0]}
+
+  StorageMgmtPort:
+    type: OS::TripleO::CephStorage::Ports::StorageMgmtPort
+    properties:
+      ControlPlaneIP: {get_attr: [CephStorage, networks, ctlplane, 0]}
+
   NetworkConfig:
     type: OS::TripleO::CephStorage::Net::SoftwareConfig
+    properties:
+      StorageIpSubnet: {get_attr: [StoragePort, ip_subnet]}
+      StorageMgmtIpSubnet: {get_attr: [StorageMgmtPort, ip_subnet]}
 
   NetworkDeployment:
     type: OS::TripleO::SoftwareDeployment
@@ -118,3 +131,9 @@ outputs:
         params:
           IP: {get_attr: [CephStorage, networks, ctlplane, 0]}
           HOST: {get_attr: [CephStorage, name]}
+  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 432ddc4..cf7d17c 100644 (file)
@@ -45,5 +45,9 @@ resource_registry:
   OS::TripleO::Compute::Ports::StoragePort: network/ports/noop.yaml
   OS::TripleO::Compute::Ports::TenantPort: network/ports/noop.yaml
 
+  # 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
+
 parameter_defaults:
   EnablePackageInstall: false
index 28e8022..a916378 100644 (file)
@@ -42,3 +42,7 @@ resource_registry:
   OS::TripleO::Compute::Ports::InternalApiPort: network/ports/noop.yaml
   OS::TripleO::Compute::Ports::StoragePort: network/ports/noop.yaml
   OS::TripleO::Compute::Ports::TenantPort: network/ports/noop.yaml
+
+  # 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
index e3d623f..49346cd 100644 (file)
@@ -45,8 +45,21 @@ resources:
   NodeUserData:
     type: OS::TripleO::NodeUserData
 
+  StoragePort:
+    type: OS::TripleO::CephStorage::Ports::StoragePort
+    properties:
+      ControlPlaneIP: {get_attr: [CephStorage, networks, ctlplane, 0]}
+
+  StorageMgmtPort:
+    type: OS::TripleO::CephStorage::Ports::StorageMgmtPort
+    properties:
+      ControlPlaneIP: {get_attr: [CephStorage, networks, ctlplane, 0]}
+
   NetworkConfig:
     type: OS::TripleO::CephStorage::Net::SoftwareConfig
+    properties:
+      StorageIpSubnet: {get_attr: [StoragePort, ip_subnet]}
+      StorageMgmtIpSubnet: {get_attr: [StorageMgmtPort, ip_subnet]}
 
   NetworkDeployment:
     type: OS::TripleO::SoftwareDeployment
@@ -102,3 +115,9 @@ outputs:
     description: Heat resource handle for the ceph storage server
     value:
       {get_resource: CephStorage}
+  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]}