summaryrefslogtreecommitdiffstats
path: root/network
diff options
context:
space:
mode:
authorDan Prince <dprince@redhat.com>2015-04-27 10:46:28 -0400
committerDan Prince <dprince@redhat.com>2015-05-06 21:20:24 -0400
commit00efb796cd3d63ecbf903c058f7647b77e6bd693 (patch)
tree482019d5ea3c28c1d4ab3b479154ad8aa82364f0 /network
parent92377361c76a612457cc147a0608d94db430a771 (diff)
Create split out neutron networks via Heat.
This patch adds a new abstraction for network creation within Heat. This (optional) set of templates may be disabled if you wish to create Neutron networks for the undercloud via Heat templates... instead of using os-cloud-config JSON to do so. Creating networks with Heat has the benefit of being parameter driven so that users can quickly enable networks using the resource registry and parameters. There are 5 networks to start with which are roughly modeled around networks an Overcloud user might want to use to isolate their traffic. The intent is to make these opt-in and configurable for end users. The networks.yaml template can be used to create all of the networks using parameters in the resource registry. Change-Id: I5f2b3356378eb263d90d428cc83c7f5b141957e1
Diffstat (limited to 'network')
-rw-r--r--network/external.yaml58
-rw-r--r--network/internal_api.yaml57
-rw-r--r--network/networks.yaml20
-rw-r--r--network/noop.yaml3
-rw-r--r--network/storage.yaml57
-rw-r--r--network/storage_mgmt.yaml57
-rw-r--r--network/tenant.yaml57
7 files changed, 309 insertions, 0 deletions
diff --git a/network/external.yaml b/network/external.yaml
new file mode 100644
index 00000000..29b10324
--- /dev/null
+++ b/network/external.yaml
@@ -0,0 +1,58 @@
+heat_template_version: 2014-10-16
+
+description: >
+ External network. Public traffic, Neutron l3router for floating IPs/SNAT, etc.
+
+parameters:
+ # the defaults here work for static IP assignment (IPAM) only
+ ExternalNetCidr:
+ default: '10.0.0.0/24'
+ description: Cidr for the external network.
+ type: string
+ ExternalNetValueSpecs:
+ default: {'provider:physical_network': 'external', 'provider:network_type': 'flat'}
+ description: Value specs for the external network.
+ type: string
+ ExternalNetAdminStateUp:
+ default: false
+ description: This admin state of of the network.
+ type: boolean
+ ExternalNetEnableDHCP:
+ default: false
+ description: Whether to enable DHCP on the associated subnet.
+ type: boolean
+ ExternalNetShared:
+ default: false
+ description: Whether this network is shared across all tenants.
+ type: boolean
+ ExternalNetName:
+ default: external
+ description: The name of the external network.
+ type: string
+ ExternalSubnetName:
+ default: external_subnet
+ description: The name of the external subnet in Neutron.
+ type: string
+
+
+resources:
+ ExternalNetwork:
+ type: OS::Neutron::Net
+ properties:
+ admin_state_up: {get_param: ExternalNetAdminStateUp}
+ name: {get_param: ExternalNetName}
+ shared: {get_param: ExternalNetShared}
+ value_specs: {get_param: ExternalNetValueSpecs}
+
+ ExternalSubnet:
+ type: OS::Neutron::Subnet
+ properties:
+ cidr: {get_param: ExternalNetCidr}
+ enable_dhcp: {get_param: ExternalNetEnableDHCP}
+ name: {get_param: ExternalSubnetName}
+ network: {get_resource: ExternalNetwork}
+
+outputs:
+ OS::stack_id:
+ description: Neutron external network
+ value: {get_resource: ExternalNetwork}
diff --git a/network/internal_api.yaml b/network/internal_api.yaml
new file mode 100644
index 00000000..dfaa9e3b
--- /dev/null
+++ b/network/internal_api.yaml
@@ -0,0 +1,57 @@
+heat_template_version: 2014-10-16
+
+description: >
+ Internal API network. Used for most APIs, Database, RPC.
+
+parameters:
+ # the defaults here work for static IP assignment (IPAM) only
+ InternalApiNetCidr:
+ default: '172.16.2.0/24'
+ description: Cidr for the internal API network.
+ type: string
+ InternalApiNetValueSpecs:
+ default: {'provider:physical_network': 'internal_api', 'provider:network_type': 'flat'}
+ description: Value specs for the internal API network.
+ type: string
+ InternalApiNetAdminStateUp:
+ default: false
+ description: This admin state of of the network.
+ type: boolean
+ InternalApiNetEnableDHCP:
+ default: false
+ description: Whether to enable DHCP on the associated subnet.
+ type: boolean
+ InternalApiNetShared:
+ default: false
+ description: Whether this network is shared across all tenants.
+ type: boolean
+ InternalApiNetName:
+ default: internal_api
+ description: The name of the internal API network.
+ type: string
+ InternalApiSubnetName:
+ default: internal_api_subnet
+ description: The name of the internal API subnet in Neutron.
+ type: string
+
+resources:
+ InternalApiNetwork:
+ type: OS::Neutron::Net
+ properties:
+ admin_state_up: {get_param: InternalApiNetAdminStateUp}
+ name: {get_param: InternalApiNetName}
+ shared: {get_param: InternalApiNetShared}
+ value_specs: {get_param: InternalApiNetValueSpecs}
+
+ InternalApiSubnet:
+ type: OS::Neutron::Subnet
+ properties:
+ cidr: {get_param: InternalApiNetCidr}
+ enable_dhcp: {get_param: InternalApiNetEnableDHCP}
+ name: {get_param: InternalApiSubnetName}
+ network: {get_resource: InternalApiNetwork}
+
+outputs:
+ OS::stack_id:
+ description: Neutron internal network
+ value: {get_resource: InternalApiNetwork}
diff --git a/network/networks.yaml b/network/networks.yaml
new file mode 100644
index 00000000..7d36707d
--- /dev/null
+++ b/network/networks.yaml
@@ -0,0 +1,20 @@
+heat_template_version: 2014-10-16
+
+description: Create networks to split out Overcloud traffic
+
+resources:
+
+ ExternalNetwork:
+ type: OS::TripleO::Network::External
+
+ InternalNetwork:
+ type: OS::TripleO::Network::InternalApi
+
+ StorageMgmtNetwork:
+ type: OS::TripleO::Network::StorageMgmt
+
+ StorageNetwork:
+ type: OS::TripleO::Network::Storage
+
+ TenantNetwork:
+ type: OS::TripleO::Network::Tenant
diff --git a/network/noop.yaml b/network/noop.yaml
new file mode 100644
index 00000000..6f02db4d
--- /dev/null
+++ b/network/noop.yaml
@@ -0,0 +1,3 @@
+heat_template_version: 2014-10-16
+
+description: A stack which creates no network(s).
diff --git a/network/storage.yaml b/network/storage.yaml
new file mode 100644
index 00000000..a015465c
--- /dev/null
+++ b/network/storage.yaml
@@ -0,0 +1,57 @@
+heat_template_version: 2014-10-16
+
+description: >
+ Storage network.
+
+parameters:
+ # the defaults here work for static IP assignment (IPAM) only
+ StorageNetCidr:
+ default: '172.16.1.0/24'
+ description: Cidr for the storage network.
+ type: string
+ StorageNetValueSpecs:
+ default: {'provider:physical_network': 'storage', 'provider:network_type': 'flat'}
+ description: Value specs for the storage network.
+ type: string
+ StorageNetAdminStateUp:
+ default: false
+ description: This admin state of of the network.
+ type: boolean
+ StorageNetEnableDHCP:
+ default: false
+ description: Whether to enable DHCP on the associated subnet.
+ type: boolean
+ StorageNetShared:
+ default: false
+ description: Whether this network is shared across all tenants.
+ type: boolean
+ StorageNetName:
+ default: storage
+ description: The name of the storage network.
+ type: string
+ StorageSubnetName:
+ default: storage_subnet
+ description: The name of the storage subnet in Neutron.
+ type: string
+
+resources:
+ StorageNetwork:
+ type: OS::Neutron::Net
+ properties:
+ admin_state_up: {get_param: StorageNetAdminStateUp}
+ name: {get_param: StorageNetName}
+ shared: {get_param: StorageNetShared}
+ value_specs: {get_param: StorageNetValueSpecs}
+
+ StorageSubnet:
+ type: OS::Neutron::Subnet
+ properties:
+ cidr: {get_param: StorageNetCidr}
+ enable_dhcp: {get_param: StorageNetEnableDHCP}
+ name: {get_param: StorageSubnetName}
+ network: {get_resource: StorageNetwork}
+
+outputs:
+ OS::stack_id:
+ description: Neutron storage network
+ value: {get_resource: StorageNetwork}
diff --git a/network/storage_mgmt.yaml b/network/storage_mgmt.yaml
new file mode 100644
index 00000000..c4c61905
--- /dev/null
+++ b/network/storage_mgmt.yaml
@@ -0,0 +1,57 @@
+heat_template_version: 2014-10-16
+
+description: >
+ Storage management network. Storage replication, etc.
+
+parameters:
+ # the defaults here work for static IP assignment (IPAM) only
+ StorageMgmtNetCidr:
+ default: '172.16.3.0/24'
+ description: Cidr for the storage management network.
+ type: string
+ StorageMgmtNetValueSpecs:
+ default: {'provider:physical_network': 'storage_mgmt', 'provider:network_type': 'flat'}
+ description: Value specs for the storage_mgmt network.
+ type: string
+ StorageMgmtNetAdminStateUp:
+ default: false
+ description: This admin state of of the network.
+ type: boolean
+ StorageMgmtNetEnableDHCP:
+ default: false
+ description: Whether to enable DHCP on the associated subnet.
+ type: boolean
+ StorageMgmtNetShared:
+ default: false
+ description: Whether this network is shared across all tenants.
+ type: boolean
+ StorageMgmtNetName:
+ default: storage_mgmt
+ description: The name of the Storage management network.
+ type: string
+ StorageMgmtSubnetName:
+ default: storage_mgmt_subnet
+ description: The name of the Storage management subnet in Neutron.
+ type: string
+
+resources:
+ StorageMgmtNetwork:
+ type: OS::Neutron::Net
+ properties:
+ admin_state_up: {get_param: StorageMgmtNetAdminStateUp}
+ name: {get_param: StorageMgmtNetName}
+ shared: {get_param: StorageMgmtNetShared}
+ value_specs: {get_param: StorageMgmtNetValueSpecs}
+
+ StorageMgmtSubnet:
+ type: OS::Neutron::Subnet
+ properties:
+ cidr: {get_param: StorageMgmtNetCidr}
+ enable_dhcp: {get_param: StorageMgmtNetEnableDHCP}
+ name: {get_param: StorageMgmtSubnetName}
+ network: {get_resource: StorageMgmtNetwork}
+
+outputs:
+ OS::stack_id:
+ description: Neutron storage management network
+ value: {get_resource: StorageMgmtNetwork}
diff --git a/network/tenant.yaml b/network/tenant.yaml
new file mode 100644
index 00000000..55a1f53d
--- /dev/null
+++ b/network/tenant.yaml
@@ -0,0 +1,57 @@
+heat_template_version: 2014-10-16
+
+description: >
+ Tenant network.
+
+parameters:
+ # the defaults here work for static IP assignment (IPAM) only
+ TenantNetCidr:
+ default: '172.16.0.0/24'
+ description: Cidr for the tenant network.
+ type: string
+ TenantNetValueSpecs:
+ default: {'provider:physical_network': 'tenant', 'provider:network_type': 'flat'}
+ description: Value specs for the tenant network.
+ type: string
+ TenantNetAdminStateUp:
+ default: false
+ description: This admin state of of the network.
+ type: boolean
+ TenantNetEnableDHCP:
+ default: false
+ description: Whether to enable DHCP on the associated subnet.
+ type: boolean
+ TenantNetShared:
+ default: false
+ description: Whether this network is shared across all tenants.
+ type: boolean
+ TenantNetName:
+ default: tenant
+ description: The name of the tenant network.
+ type: string
+ TenantSubnetName:
+ default: tenant_subnet
+ description: The name of the tenant subnet in Neutron.
+ type: string
+
+resources:
+ TenantNetwork:
+ type: OS::Neutron::Net
+ properties:
+ admin_state_up: {get_param: TenantNetAdminStateUp}
+ name: {get_param: TenantNetName}
+ shared: {get_param: TenantNetShared}
+ value_specs: {get_param: TenantNetValueSpecs}
+
+ TenantSubnet:
+ type: OS::Neutron::Subnet
+ properties:
+ cidr: {get_param: TenantNetCidr}
+ enable_dhcp: {get_param: TenantNetEnableDHCP}
+ name: {get_param: TenantSubnetName}
+ network: {get_resource: TenantNetwork}
+
+outputs:
+ OS::stack_id:
+ description: Neutron tenant network
+ value: {get_resource: TenantNetwork}