Merge "Added a new composable service for enabling DPDK on compute nodes."
[apex-tripleo-heat-templates.git] / network / config / single-nic-vlans / compute.yaml
1 heat_template_version: 2015-04-30
2
3 description: >
4   Software Config to drive os-net-config to configure VLANs for the
5   compute role.
6
7 parameters:
8   ControlPlaneIp:
9     default: ''
10     description: IP address/subnet on the ctlplane network
11     type: string
12   ExternalIpSubnet:
13     default: ''
14     description: IP address/subnet on the external network
15     type: string
16   InternalApiIpSubnet:
17     default: ''
18     description: IP address/subnet on the internal API network
19     type: string
20   StorageIpSubnet:
21     default: ''
22     description: IP address/subnet on the storage network
23     type: string
24   StorageMgmtIpSubnet:
25     default: ''
26     description: IP address/subnet on the storage mgmt network
27     type: string
28   TenantIpSubnet:
29     default: ''
30     description: IP address/subnet on the tenant network
31     type: string
32   ManagementIpSubnet: # Only populated when including environments/network-management.yaml
33     default: ''
34     description: IP address/subnet on the management network
35     type: string
36   InternalApiNetworkVlanID:
37     default: 20
38     description: Vlan ID for the internal_api network traffic.
39     type: number
40   StorageNetworkVlanID:
41     default: 30
42     description: Vlan ID for the storage network traffic.
43     type: number
44   TenantNetworkVlanID:
45     default: 50
46     description: Vlan ID for the tenant network traffic.
47     type: number
48   ManagementNetworkVlanID:
49     default: 60
50     description: Vlan ID for the management network traffic.
51     type: number
52   ControlPlaneSubnetCidr: # Override this via parameter_defaults
53     default: '24'
54     description: The subnet CIDR of the control plane network.
55     type: string
56   ControlPlaneDefaultRoute: # Override this via parameter_defaults
57     description: The default route of the control plane network.
58     type: string
59   ExternalInterfaceDefaultRoute: # Not used by default in this template
60     default: '10.0.0.1'
61     description: The default route of the external network.
62     type: string
63   ManagementInterfaceDefaultRoute: # Commented out by default in this template
64     default: unset
65     description: The default route of the management network.
66     type: string
67   DnsServers: # Override this via parameter_defaults
68     default: []
69     description: A list of DNS servers (2 max for some implementations) that will be added to resolv.conf.
70     type: comma_delimited_list
71   EC2MetadataIp: # Override this via parameter_defaults
72     description: The IP address of the EC2 metadata server.
73     type: string
74
75 resources:
76   OsNetConfigImpl:
77     type: OS::Heat::StructuredConfig
78     properties:
79       group: os-apply-config
80       config:
81         os_net_config:
82           network_config:
83             -
84               type: ovs_bridge
85               name: {get_input: bridge_name}
86               use_dhcp: false
87               dns_servers: {get_param: DnsServers}
88               addresses:
89                 -
90                   ip_netmask:
91                     list_join:
92                       - '/'
93                       - - {get_param: ControlPlaneIp}
94                         - {get_param: ControlPlaneSubnetCidr}
95               routes:
96                 -
97                   ip_netmask: 169.254.169.254/32
98                   next_hop: {get_param: EC2MetadataIp}
99                 -
100                   default: true
101                   next_hop: {get_param: ControlPlaneDefaultRoute}
102               members:
103                 -
104                   type: interface
105                   name: nic1
106                   # force the MAC address of the bridge to this interface
107                   primary: true
108                 -
109                   type: vlan
110                   vlan_id: {get_param: InternalApiNetworkVlanID}
111                   addresses:
112                     -
113                       ip_netmask: {get_param: InternalApiIpSubnet}
114                 -
115                   type: vlan
116                   vlan_id: {get_param: StorageNetworkVlanID}
117                   addresses:
118                     -
119                       ip_netmask: {get_param: StorageIpSubnet}
120                 -
121                   type: vlan
122                   vlan_id: {get_param: TenantNetworkVlanID}
123                   addresses:
124                     -
125                       ip_netmask: {get_param: TenantIpSubnet}
126                 # Uncomment when including environments/network-management.yaml
127                 # If setting default route on the Management interface, comment
128                 # out the default route on the Control Plane.
129                 #-
130                 #  type: vlan
131                 #  vlan_id: {get_param: ManagementNetworkVlanID}
132                 #  addresses:
133                 #    -
134                 #      ip_netmask: {get_param: ManagementIpSubnet}
135                 #  routes:
136                 #    -
137                 #      default: true
138                 #      next_hop: {get_param: ManagementInterfaceDefaultRoute}
139
140 outputs:
141   OS::stack_id:
142     description: The OsNetConfigImpl resource.
143     value: {get_resource: OsNetConfigImpl}