Enable predictable IPs on non-controllers
authorBen Nemec <bnemec@redhat.com>
Wed, 9 Mar 2016 16:41:03 +0000 (10:41 -0600)
committerBen Nemec <bnemec@redhat.com>
Wed, 9 Mar 2016 19:25:02 +0000 (13:25 -0600)
For the external loadbalancer work, we added the ability to specify
fixed ips for controller nodes on all network isolation networks.
In order to allow users full control over the placement and ip
addresses of deployed nodes, we need to be able to do the same thing
for the other node types.

Change-Id: I3ea91768b2ea3a40287f2f3cdb823c23533cf290

environments/ips-from-pool-all.yaml [new file with mode: 0644]
overcloud.yaml
puppet/ceph-storage.yaml
puppet/cinder-storage.yaml
puppet/compute.yaml
puppet/swift-storage.yaml

diff --git a/environments/ips-from-pool-all.yaml b/environments/ips-from-pool-all.yaml
new file mode 100644 (file)
index 0000000..f660d50
--- /dev/null
@@ -0,0 +1,75 @@
+# Environment file demonstrating how to pre-assign IPs to all node types
+resource_registry:
+  OS::TripleO::Controller::Ports::ExternalPort: ../network/ports/external_from_pool.yaml
+  OS::TripleO::Controller::Ports::InternalApiPort: ../network/ports/internal_api_from_pool.yaml
+  OS::TripleO::Controller::Ports::StoragePort: ../network/ports/storage_from_pool.yaml
+  OS::TripleO::Controller::Ports::StorageMgmtPort: ../network/ports/storage_mgmt_from_pool.yaml
+  OS::TripleO::Controller::Ports::TenantPort: ../network/ports/tenant_from_pool.yaml
+
+  OS::TripleO::Compute::Ports::ExternalPort: ../network/ports/noop.yaml
+  OS::TripleO::Compute::Ports::InternalApiPort: ../network/ports/internal_api_from_pool.yaml
+  OS::TripleO::Compute::Ports::StoragePort: ../network/ports/storage_from_pool.yaml
+  OS::TripleO::Compute::Ports::StorageMgmtPort: ../network/ports/noop.yaml
+  OS::TripleO::Compute::Ports::TenantPort: ../network/ports/tenant_from_pool.yaml
+
+  OS::TripleO::CephStorage::Ports::ExternalPort: ../network/ports/noop.yaml
+  OS::TripleO::CephStorage::Ports::InternalApiPort: ../network/ports/noop.yaml
+  OS::TripleO::CephStorage::Ports::StoragePort: ../network/ports/storage_from_pool.yaml
+  OS::TripleO::CephStorage::Ports::StorageMgmtPort: ../network/ports/storage_mgmt_from_pool.yaml
+  OS::TripleO::CephStorage::Ports::TenantPort: ../network/ports/noop.yaml
+
+  OS::TripleO::SwiftStorage::Ports::ExternalPort: ../network/ports/noop.yaml
+  OS::TripleO::SwiftStorage::Ports::InternalApiPort: ../network/ports/internal_api_from_pool.yaml
+  OS::TripleO::SwiftStorage::Ports::StoragePort: ../network/ports/storage_from_pool.yaml
+  OS::TripleO::SwiftStorage::Ports::StorageMgmtPort: ../network/ports/storage_mgmt_from_pool.yaml
+  OS::TripleO::SwiftStorage::Ports::TenantPort: ../network/ports/noop.yaml
+
+  OS::TripleO::BlockStorage::Ports::ExternalPort: ../network/ports/noop.yaml
+  OS::TripleO::BlockStorage::Ports::InternalApiPort: ../network/ports/internal_api_from_pool.yaml
+  OS::TripleO::BlockStorage::Ports::StoragePort: ../network/ports/storage_from_pool.yaml
+  OS::TripleO::BlockStorage::Ports::StorageMgmtPort: ../network/ports/storage_mgmt_from_pool.yaml
+  OS::TripleO::BlockStorage::Ports::TenantPort: ../network/ports/noop.yaml
+
+parameter_defaults:
+  ControllerIPs:
+    # Each controller will get an IP from the lists below, first controller, first IP
+    external:
+    - 10.0.0.251
+    internal_api:
+    - 172.16.2.251
+    storage:
+    - 172.16.1.251
+    storage_mgmt:
+    - 172.16.3.251
+    tenant:
+    - 172.16.0.251
+  NovaComputeIPs:
+    # Each compute will get an IP from the lists below, first compute, first IP
+    internal_api:
+    - 172.16.2.252
+    storage:
+    - 172.16.1.252
+    tenant:
+    - 172.16.0.252
+  CephStorageIPs:
+    # Each ceph node will get an IP from the lists below, first node, first IP
+    storage:
+    - 172.16.1.253
+    storage_mgmt:
+    - 172.16.3.253
+  SwiftStorageIPs:
+    # Each swift node will get an IP from the lists below, first node, first IP
+    internal_api:
+    - 172.16.2.254
+    storage:
+    - 172.16.1.254
+    storage_mgmt:
+    - 172.16.3.254
+  BlockStorageIPs:
+    # Each cinder node will get an IP from the lists below, first node, first IP
+    internal_api:
+    - 172.16.2.250
+    storage:
+    - 172.16.1.250
+    storage_mgmt:
+    - 172.16.3.250
index 343b1bc..e74dce8 100644 (file)
@@ -1102,6 +1102,7 @@ resources:
           CloudDomain: {get_param: CloudDomain}
           ServerMetadata: {get_param: ServerMetadata}
           SchedulerHints: {get_param: NovaComputeSchedulerHints}
+          NodeIndex: '%index%'
 
   BlockStorage:
     type: OS::Heat::ResourceGroup
@@ -1143,6 +1144,7 @@ resources:
           CloudDomain: {get_param: CloudDomain}
           ServerMetadata: {get_param: ServerMetadata}
           SchedulerHints: {get_param: BlockStorageSchedulerHints}
+          NodeIndex: '%index%'
 
   ObjectStorage:
     type: OS::Heat::ResourceGroup
@@ -1175,6 +1177,7 @@ resources:
           CloudDomain: {get_param: CloudDomain}
           ServerMetadata: {get_param: ServerMetadata}
           SchedulerHints: {get_param: ObjectStorageSchedulerHints}
+          NodeIndex: '%index%'
 
   CephStorage:
     type: OS::Heat::ResourceGroup
@@ -1202,6 +1205,7 @@ resources:
           CloudDomain: {get_param: CloudDomain}
           ServerMetadata: {get_param: ServerMetadata}
           SchedulerHints: {get_param: CephStorageSchedulerHints}
+          NodeIndex: '%index%'
 
   ControllerIpListMap:
     type: OS::TripleO::Network::Ports::NetIpListMap
index 88120b9..d298892 100644 (file)
@@ -62,6 +62,9 @@ parameters:
     description: |
       Role specific additional hiera configuration to inject into the cluster.
     type: json
+  CephStorageIPs:
+    default: {}
+    type: json
   NetworkDeploymentActions:
     type: comma_delimited_list
     description: >
@@ -90,6 +93,9 @@ parameters:
     type: json
     description: Optional scheduler hints to pass to nova
     default: {}
+  NodeIndex:
+    type: number
+    default: 0
 
 resources:
   CephStorage:
@@ -135,31 +141,43 @@ resources:
     type: OS::TripleO::CephStorage::Ports::ExternalPort
     properties:
       ControlPlaneIP: {get_attr: [CephStorage, networks, ctlplane, 0]}
+      IPPool: {get_param: CephStorageIPs}
+      NodeIndex: {get_param: NodeIndex}
 
   InternalApiPort:
     type: OS::TripleO::CephStorage::Ports::InternalApiPort
     properties:
       ControlPlaneIP: {get_attr: [CephStorage, networks, ctlplane, 0]}
+      IPPool: {get_param: CephStorageIPs}
+      NodeIndex: {get_param: NodeIndex}
 
   StoragePort:
     type: OS::TripleO::CephStorage::Ports::StoragePort
     properties:
       ControlPlaneIP: {get_attr: [CephStorage, networks, ctlplane, 0]}
+      IPPool: {get_param: CephStorageIPs}
+      NodeIndex: {get_param: NodeIndex}
 
   StorageMgmtPort:
     type: OS::TripleO::CephStorage::Ports::StorageMgmtPort
     properties:
       ControlPlaneIP: {get_attr: [CephStorage, networks, ctlplane, 0]}
+      IPPool: {get_param: CephStorageIPs}
+      NodeIndex: {get_param: NodeIndex}
 
   TenantPort:
     type: OS::TripleO::CephStorage::Ports::TenantPort
     properties:
       ControlPlaneIP: {get_attr: [CephStorage, networks, ctlplane, 0]}
+      IPPool: {get_param: CephStorageIPs}
+      NodeIndex: {get_param: NodeIndex}
 
   ManagementPort:
     type: OS::TripleO::CephStorage::Ports::ManagementPort
     properties:
       ControlPlaneIP: {get_attr: [CephStorage, networks, ctlplane, 0]}
+      IPPool: {get_param: CephStorageIPs}
+      NodeIndex: {get_param: NodeIndex}
 
   NetworkConfig:
     type: OS::TripleO::CephStorage::Net::SoftwareConfig
index 09c4d3e..a302b79 100644 (file)
@@ -38,6 +38,9 @@ parameters:
     description: |
       Role specific additional hiera configuration to inject into the cluster.
     type: json
+  BlockStorageIPs:
+    default: {}
+    type: json
   Flavor:
     description: Flavor for block storage nodes to request when deploying.
     type: string
@@ -141,6 +144,9 @@ parameters:
     type: json
     description: Optional scheduler hints to pass to nova
     default: {}
+  NodeIndex:
+    type: number
+    default: 0
 
 
 resources:
@@ -187,31 +193,43 @@ resources:
     type: OS::TripleO::BlockStorage::Ports::ExternalPort
     properties:
       ControlPlaneIP: {get_attr: [BlockStorage, networks, ctlplane, 0]}
+      IPPool: {get_param: BlockStorageIPs}
+      NodeIndex: {get_param: NodeIndex}
 
   InternalApiPort:
     type: OS::TripleO::BlockStorage::Ports::InternalApiPort
     properties:
       ControlPlaneIP: {get_attr: [BlockStorage, networks, ctlplane, 0]}
+      IPPool: {get_param: BlockStorageIPs}
+      NodeIndex: {get_param: NodeIndex}
 
   StoragePort:
     type: OS::TripleO::BlockStorage::Ports::StoragePort
     properties:
       ControlPlaneIP: {get_attr: [BlockStorage, networks, ctlplane, 0]}
+      IPPool: {get_param: BlockStorageIPs}
+      NodeIndex: {get_param: NodeIndex}
 
   StorageMgmtPort:
     type: OS::TripleO::BlockStorage::Ports::StorageMgmtPort
     properties:
       ControlPlaneIP: {get_attr: [BlockStorage, networks, ctlplane, 0]}
+      IPPool: {get_param: BlockStorageIPs}
+      NodeIndex: {get_param: NodeIndex}
 
   TenantPort:
     type: OS::TripleO::BlockStorage::Ports::TenantPort
     properties:
       ControlPlaneIP: {get_attr: [BlockStorage, networks, ctlplane, 0]}
+      IPPool: {get_param: BlockStorageIPs}
+      NodeIndex: {get_param: NodeIndex}
 
   ManagementPort:
     type: OS::TripleO::BlockStorage::Ports::ManagementPort
     properties:
       ControlPlaneIP: {get_attr: [BlockStorage, networks, ctlplane, 0]}
+      IPPool: {get_param: BlockStorageIPs}
+      NodeIndex: {get_param: NodeIndex}
 
   NetworkConfig:
     type: OS::TripleO::BlockStorage::Net::SoftwareConfig
index 58ca71e..a447c90 100644 (file)
@@ -195,6 +195,9 @@ parameters:
     default: 'dvr_snat'
     description: Agent mode for the neutron-l3-agent on the controller hosts
     type: string
+  NodeIndex:
+    type: number
+    default: 0
   NovaApiHost:
     type: string
     default: ''  # Has to be here because of the ignored empty value bug
@@ -207,6 +210,9 @@ parameters:
       NovaCompute specific configuration to inject into the cluster. Same
       structure as ExtraConfig.
     type: json
+  NovaComputeIPs:
+    default: {}
+    type: json
   NovaComputeLibvirtType:
     type: string
     default: kvm
@@ -378,31 +384,43 @@ resources:
     type: OS::TripleO::Compute::Ports::ExternalPort
     properties:
       ControlPlaneIP: {get_attr: [NovaCompute, networks, ctlplane, 0]}
+      IPPool: {get_param: NovaComputeIPs}
+      NodeIndex: {get_param: NodeIndex}
 
   InternalApiPort:
     type: OS::TripleO::Compute::Ports::InternalApiPort
     properties:
       ControlPlaneIP: {get_attr: [NovaCompute, networks, ctlplane, 0]}
+      IPPool: {get_param: NovaComputeIPs}
+      NodeIndex: {get_param: NodeIndex}
 
   StoragePort:
     type: OS::TripleO::Compute::Ports::StoragePort
     properties:
       ControlPlaneIP: {get_attr: [NovaCompute, networks, ctlplane, 0]}
+      IPPool: {get_param: NovaComputeIPs}
+      NodeIndex: {get_param: NodeIndex}
 
   StorageMgmtPort:
     type: OS::TripleO::Compute::Ports::StorageMgmtPort
     properties:
       ControlPlaneIP: {get_attr: [NovaCompute, networks, ctlplane, 0]}
+      IPPool: {get_param: NovaComputeIPs}
+      NodeIndex: {get_param: NodeIndex}
 
   TenantPort:
     type: OS::TripleO::Compute::Ports::TenantPort
     properties:
       ControlPlaneIP: {get_attr: [NovaCompute, networks, ctlplane, 0]}
+      IPPool: {get_param: NovaComputeIPs}
+      NodeIndex: {get_param: NodeIndex}
 
   ManagementPort:
     type: OS::TripleO::Compute::Ports::ManagementPort
     properties:
       ControlPlaneIP: {get_attr: [NovaCompute, networks, ctlplane, 0]}
+      IPPool: {get_param: NovaComputeIPs}
+      NodeIndex: {get_param: NodeIndex}
 
   NetIpMap:
     type: OS::TripleO::Network::Ports::NetIpMap
index 3b04be8..c26aca7 100644 (file)
@@ -83,6 +83,9 @@ parameters:
     description: |
       Role specific additional hiera configuration to inject into the cluster.
     type: json
+  SwiftStorageIPs:
+    default: {}
+    type: json
   NetworkDeploymentActions:
     type: comma_delimited_list
     description: >
@@ -111,6 +114,9 @@ parameters:
     type: json
     description: Optional scheduler hints to pass to nova
     default: {}
+  NodeIndex:
+    type: number
+    default: 0
 
 resources:
 
@@ -156,31 +162,43 @@ resources:
     type: OS::TripleO::SwiftStorage::Ports::ExternalPort
     properties:
       ControlPlaneIP: {get_attr: [SwiftStorage, networks, ctlplane, 0]}
+      IPPool: {get_param: SwiftStorageIPs}
+      NodeIndex: {get_param: NodeIndex}
 
   InternalApiPort:
     type: OS::TripleO::SwiftStorage::Ports::InternalApiPort
     properties:
       ControlPlaneIP: {get_attr: [SwiftStorage, networks, ctlplane, 0]}
+      IPPool: {get_param: SwiftStorageIPs}
+      NodeIndex: {get_param: NodeIndex}
 
   StoragePort:
     type: OS::TripleO::SwiftStorage::Ports::StoragePort
     properties:
       ControlPlaneIP: {get_attr: [SwiftStorage, networks, ctlplane, 0]}
+      IPPool: {get_param: SwiftStorageIPs}
+      NodeIndex: {get_param: NodeIndex}
 
   StorageMgmtPort:
     type: OS::TripleO::SwiftStorage::Ports::StorageMgmtPort
     properties:
       ControlPlaneIP: {get_attr: [SwiftStorage, networks, ctlplane, 0]}
+      IPPool: {get_param: SwiftStorageIPs}
+      NodeIndex: {get_param: NodeIndex}
 
   TenantPort:
     type: OS::TripleO::SwiftStorage::Ports::TenantPort
     properties:
       ControlPlaneIP: {get_attr: [SwiftStorage, networks, ctlplane, 0]}
+      IPPool: {get_param: SwiftStorageIPs}
+      NodeIndex: {get_param: NodeIndex}
 
   ManagementPort:
     type: OS::TripleO::SwiftStorage::Ports::ManagementPort
     properties:
       ControlPlaneIP: {get_attr: [SwiftStorage, networks, ctlplane, 0]}
+      IPPool: {get_param: SwiftStorageIPs}
+      NodeIndex: {get_param: NodeIndex}
 
   NetworkConfig:
     type: OS::TripleO::ObjectStorage::Net::SoftwareConfig