Appendix B. Custom NIC template
The following is a template to get you started with the configuring the network interface templates for spine leaf networking. Note that the resources section is incomplete and requires your interface definitions.
heat_template_version: queens
parameters:
# Supernets
StorageSupernet:
type: string
StorageMgmtSupernet:
type: string
InternalApiSupernet:
type: string
TenantSupernet:
type: string
ExternalSupernet:
type: string
# Default Routes
ControlPlane0DefaultRoute:
type: string
ControlPlane1DefaultRoute:
type: string
ControlPlane2DefaultRoute:
type: string
Storage0InterfaceDefaultRoute:
type: string
Storage1InterfaceDefaultRoute:
type: string
Storage2InterfaceDefaultRoute:
type: string
StorageMgmt0InterfaceDefaultRoute:
type: string
StorageMgmt1InterfaceDefaultRoute:
type: string
StorageMgmt2InterfaceDefaultRoute:
type: string
InternalApi0InterfaceDefaultRoute:
type: string
InternalApi1InterfaceDefaultRoute:
type: string
InternalApi2InterfaceDefaultRoute:
type: string
Tenant0InterfaceDefaultRoute:
type: string
Tenant1InterfaceDefaultRoute:
type: string
Tenant2InterfaceDefaultRoute:
type: string
ExternalInterfaceDefaultRoute:
type: string
# IP subnets
Storage0IpSubnet:
type: string
Storage1IpSubnet:
type: string
Storage2IpSubnet:
type: string
StorageMgmt0IpSubnet:
type: string
StorageMgmt1IpSubnet:
type: string
StorageMgmt2IpSubnet:
type: string
InternalApi0IpSubnet:
type: string
InternalApi1IpSubnet:
type: string
InternalApi2IpSubnet:
type: string
Tenant0IpSubnet:
type: string
Tenant1IpSubnet:
type: string
Tenant2IpSubnet:
type: string
ExternalIpSubnet:
type: string
ManagementIpSubnet:
type: string
# VLAN IDs
Storage0NetworkVlanID:
type: number
Storage1NetworkVlanID:
type: number
Storage2NetworkVlanID:
type: number
StorageMgmt0NetworkVlanID:
type: number
StorageMgmt1NetworkVlanID:
type: number
StorageMgmt2NetworkVlanID:
type: number
InternalApi0NetworkVlanID:
type: number
InternalApi1NetworkVlanID:
type: number
InternalApi1NetworkVlanID:
type: number
Tenant0NetworkVlanID:
type: number
Tenant1NetworkVlanID:
type: number
Tenant2NetworkVlanID:
type: number
ExternalNetworkVlanID:
type: number
ManagementNetworkVlanID:
type: number
# Subnet CIDR
ControlPlane0SubnetCidr:
type: string
ControlPlane1SubnetCidr:
type: string
ControlPlane1SubnetCidr:
type: string
ControlPlaneIp:
type: string
DnsServers:
type: comma_delimited_list
resources:
OsNetConfigImpl:
type: OS::Heat::SoftwareConfig
properties:
group: script
config:
str_replace:
template:
get_file: /usr/share/openstack-tripleo-heat-templates/network/scripts/run-os-net-config.sh
params:
$network_config:
network_config:
[NETWORK CONFIG HERE]
outputs:
OS::stack_id:
description: The OsNetConfigImpl resource.
value:
get_resource: OsNetConfigImpl
heat_template_version: queens
parameters:
# Supernets
StorageSupernet:
type: string
StorageMgmtSupernet:
type: string
InternalApiSupernet:
type: string
TenantSupernet:
type: string
ExternalSupernet:
type: string
# Default Routes
ControlPlane0DefaultRoute:
type: string
ControlPlane1DefaultRoute:
type: string
ControlPlane2DefaultRoute:
type: string
Storage0InterfaceDefaultRoute:
type: string
Storage1InterfaceDefaultRoute:
type: string
Storage2InterfaceDefaultRoute:
type: string
StorageMgmt0InterfaceDefaultRoute:
type: string
StorageMgmt1InterfaceDefaultRoute:
type: string
StorageMgmt2InterfaceDefaultRoute:
type: string
InternalApi0InterfaceDefaultRoute:
type: string
InternalApi1InterfaceDefaultRoute:
type: string
InternalApi2InterfaceDefaultRoute:
type: string
Tenant0InterfaceDefaultRoute:
type: string
Tenant1InterfaceDefaultRoute:
type: string
Tenant2InterfaceDefaultRoute:
type: string
ExternalInterfaceDefaultRoute:
type: string
# IP subnets
Storage0IpSubnet:
type: string
Storage1IpSubnet:
type: string
Storage2IpSubnet:
type: string
StorageMgmt0IpSubnet:
type: string
StorageMgmt1IpSubnet:
type: string
StorageMgmt2IpSubnet:
type: string
InternalApi0IpSubnet:
type: string
InternalApi1IpSubnet:
type: string
InternalApi2IpSubnet:
type: string
Tenant0IpSubnet:
type: string
Tenant1IpSubnet:
type: string
Tenant2IpSubnet:
type: string
ExternalIpSubnet:
type: string
ManagementIpSubnet:
type: string
# VLAN IDs
Storage0NetworkVlanID:
type: number
Storage1NetworkVlanID:
type: number
Storage2NetworkVlanID:
type: number
StorageMgmt0NetworkVlanID:
type: number
StorageMgmt1NetworkVlanID:
type: number
StorageMgmt2NetworkVlanID:
type: number
InternalApi0NetworkVlanID:
type: number
InternalApi1NetworkVlanID:
type: number
InternalApi1NetworkVlanID:
type: number
Tenant0NetworkVlanID:
type: number
Tenant1NetworkVlanID:
type: number
Tenant2NetworkVlanID:
type: number
ExternalNetworkVlanID:
type: number
ManagementNetworkVlanID:
type: number
# Subnet CIDR
ControlPlane0SubnetCidr:
type: string
ControlPlane1SubnetCidr:
type: string
ControlPlane1SubnetCidr:
type: string
ControlPlaneIp:
type: string
DnsServers:
type: comma_delimited_list
resources:
OsNetConfigImpl:
type: OS::Heat::SoftwareConfig
properties:
group: script
config:
str_replace:
template:
get_file: /usr/share/openstack-tripleo-heat-templates/network/scripts/run-os-net-config.sh
params:
$network_config:
network_config:
[NETWORK CONFIG HERE]
outputs:
OS::stack_id:
description: The OsNetConfigImpl resource.
value:
get_resource: OsNetConfigImpl