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

compute.yaml
overcloud-resource-registry-puppet.yaml
overcloud-resource-registry.yaml
puppet/compute-puppet.yaml

index 81d275c..ee6d96e 100644 (file)
@@ -264,8 +264,27 @@ resources:
   NodeUserData:
     type: OS::TripleO::NodeUserData
 
+  InternalApiPort:
+    type: OS::TripleO::Compute::Ports::InternalApiPort
+    properties:
+      ControlPlaneIP: {get_attr: [NovaCompute, networks, ctlplane, 0]}
+
+  StoragePort:
+    type: OS::TripleO::Compute::Ports::StoragePort
+    properties:
+      ControlPlaneIP: {get_attr: [NovaCompute, networks, ctlplane, 0]}
+
+  TenantPort:
+    type: OS::TripleO::Compute::Ports::TenantPort
+    properties:
+      ControlPlaneIP: {get_attr: [NovaCompute, networks, ctlplane, 0]}
+
   NetworkConfig:
     type: OS::TripleO::Compute::Net::SoftwareConfig
+    properties:
+      InternalApiIpSubnet: {get_attr: [InternalApiPort, ip_subnet]}
+      StorageIpSubnet: {get_attr: [StoragePort, ip_subnet]}
+      TenantIpSubnet: {get_attr: [TenantPort, ip_subnet]}
 
   NetworkDeployment:
     type: OS::TripleO::SoftwareDeployment
@@ -419,6 +438,15 @@ outputs:
   ip_address:
     description: IP address of the server in the ctlplane network
     value: {get_attr: [NovaCompute, 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]}
+  tenant_ip_address:
+    description: IP address of the server in the tenant network
+    value: {get_attr: [TenantPort, ip_address]}
   hostname:
     description: Hostname of the server
     value: {get_attr: [NovaCompute, name]}
index b26c617..432ddc4 100644 (file)
@@ -40,5 +40,10 @@ resource_registry:
   OS::TripleO::Controller::Ports::StorageMgmtPort: network/ports/noop.yaml
   OS::TripleO::Controller::Ports::TenantPort: network/ports/noop.yaml
 
+  # Port assignments for the compute role
+  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
+
 parameter_defaults:
   EnablePackageInstall: false
index 367d627..28e8022 100644 (file)
@@ -37,3 +37,8 @@ resource_registry:
   OS::TripleO::Controller::Ports::StoragePort: network/ports/noop.yaml
   OS::TripleO::Controller::Ports::StorageMgmtPort: network/ports/noop.yaml
   OS::TripleO::Controller::Ports::TenantPort: network/ports/noop.yaml
+
+  # Port assignments for the compute role
+  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
index b9106e6..cd11b89 100644 (file)
@@ -267,8 +267,27 @@ resources:
   NodeUserData:
     type: OS::TripleO::NodeUserData
 
+  InternalApiPort:
+    type: OS::TripleO::Compute::Ports::InternalApiPort
+    properties:
+      ControlPlaneIP: {get_attr: [NovaCompute, networks, ctlplane, 0]}
+
+  StoragePort:
+    type: OS::TripleO::Compute::Ports::StoragePort
+    properties:
+      ControlPlaneIP: {get_attr: [NovaCompute, networks, ctlplane, 0]}
+
+  TenantPort:
+    type: OS::TripleO::Compute::Ports::TenantPort
+    properties:
+      ControlPlaneIP: {get_attr: [NovaCompute, networks, ctlplane, 0]}
+
   NetworkConfig:
     type: OS::TripleO::Compute::Net::SoftwareConfig
+    properties:
+      InternalApiIpSubnet: {get_attr: [InternalApiPort, ip_subnet]}
+      StorageIpSubnet: {get_attr: [StoragePort, ip_subnet]}
+      TenantIpSubnet: {get_attr: [TenantPort, ip_subnet]}
 
   NetworkDeployment:
     type: OS::TripleO::SoftwareDeployment
@@ -431,6 +450,15 @@ outputs:
   ip_address:
     description: IP address of the server in the ctlplane network
     value: {get_attr: [NovaCompute, 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]}
+  tenant_ip_address:
+    description: IP address of the server in the tenant network
+    value: {get_attr: [TenantPort, ip_address]}
   hostname:
     description: Hostname of the server
     value: {get_attr: [NovaCompute, name]}