Bump template version for all templates to "ocata"
[apex-tripleo-heat-templates.git] / network / config / bond-with-vlans / compute-dpdk.yaml
1 heat_template_version: ocata
2 description: >
3   Software Config to drive os-net-config with 2 bonded nics on a bridge with VLANs attached for the compute role.
4 parameters:
5   ControlPlaneIp:
6     default: ''
7     description: IP address/subnet on the ctlplane network
8     type: string
9   ExternalIpSubnet:
10     default: ''
11     description: IP address/subnet on the external network
12     type: string
13   InternalApiIpSubnet:
14     default: ''
15     description: IP address/subnet on the internal API network
16     type: string
17   StorageIpSubnet:
18     default: ''
19     description: IP address/subnet on the storage network
20     type: string
21   StorageMgmtIpSubnet:
22     default: ''
23     description: IP address/subnet on the storage mgmt network
24     type: string
25   TenantIpSubnet:
26     default: ''
27     description: IP address/subnet on the tenant network
28     type: string
29   ManagementIpSubnet: # Only populated when including environments/network-management.yaml
30     default: ''
31     description: IP address/subnet on the management network
32     type: string
33   BondInterfaceOvsOptions:
34     default: ''
35     description: The ovs_options string for the bond interface. Set things like lacp=active and/or bond_mode=balance-slb using
36       this option.
37     type: string
38   ExternalNetworkVlanID:
39     default: 10
40     description: Vlan ID for the external network traffic.
41     type: number
42   InternalApiNetworkVlanID:
43     default: 20
44     description: Vlan ID for the internal_api network traffic.
45     type: number
46   StorageNetworkVlanID:
47     default: 30
48     description: Vlan ID for the storage network traffic.
49     type: number
50   StorageMgmtNetworkVlanID:
51     default: 40
52     description: Vlan ID for the storage mgmt network traffic.
53     type: number
54   TenantNetworkVlanID:
55     default: 50
56     description: Vlan ID for the tenant network traffic.
57     type: number
58   ManagementNetworkVlanID:
59     default: 60
60     description: Vlan ID for the management network traffic.
61     type: number
62   ControlPlaneSubnetCidr: # Override this via parameter_defaults
63     default: '24'
64     description: The subnet CIDR of the control plane network.
65     type: string
66   ControlPlaneDefaultRoute: # Override this via parameter_defaults
67     description: The default route of the control plane network.
68     type: string
69   ExternalInterfaceDefaultRoute: # Not used by default in this template
70     default: 10.0.0.1
71     description: The default route of the external network.
72     type: string
73   ManagementInterfaceDefaultRoute: # Commented out by default in this template
74     default: unset
75     description: The default route of the management network.
76     type: string
77   DnsServers: # Override this via parameter_defaults
78     default: []
79     description: A list of DNS servers (2 max for some implementations) that will be added to resolv.conf.
80     type: comma_delimited_list
81   EC2MetadataIp: # Override this via parameter_defaults
82     description: The IP address of the EC2 metadata server.
83     type: string
84 resources:
85   OsNetConfigImpl:
86     type: OS::Heat::SoftwareConfig
87     properties:
88       group: script
89       config:
90         str_replace:
91           template:
92             get_file: ../../scripts/run-os-net-config.sh
93           params:
94             $network_config:
95               network_config:
96               - type: interface
97                 name: nic1
98                 use_dhcp: false
99                 dns_servers:
100                   get_param: DnsServers
101                 addresses:
102                 - ip_netmask:
103                     list_join:
104                     - /
105                     - - get_param: ControlPlaneIp
106                       - get_param: ControlPlaneSubnetCidr
107                 routes:
108                 - ip_netmask: 169.254.169.254/32
109                   next_hop:
110                     get_param: EC2MetadataIp
111                 - default: true
112                   next_hop:
113                     get_param: ControlPlaneDefaultRoute
114               - type: ovs_bridge
115                 name: bridge_name
116                 members:
117                 - type: ovs_bond
118                   name: bond1
119                   ovs_options:
120                     get_param: BondInterfaceOvsOptions
121                   members:
122                   - type: interface
123                     name: nic2
124                     primary: true
125                   - type: interface
126                     name: nic3
127                 - type: vlan
128                   device: bond1
129                   vlan_id:
130                     get_param: InternalApiNetworkVlanID
131                   addresses:
132                   - ip_netmask:
133                       get_param: InternalApiIpSubnet
134                 - type: vlan
135                   device: bond1
136                   vlan_id:
137                     get_param: StorageNetworkVlanID
138                   addresses:
139                   - ip_netmask:
140                       get_param: StorageIpSubnet
141                 - type: vlan
142                   device: bond1
143                   vlan_id:
144                     get_param: TenantNetworkVlanID
145                   addresses:
146                   - ip_netmask:
147                       get_param: TenantIpSubnet
148                 # Uncomment when including environments/network-management.yaml
149                 # If setting default route on the Management interface, comment
150                 # out the default route on the Control Plane.
151                 #-
152                 #  type: vlan
153                 #  device: bond1
154                 #  vlan_id: {get_param: ManagementNetworkVlanID}
155                 #  addresses:
156                 #    -
157                 #      ip_netmask: {get_param: ManagementIpSubnet}
158                 #  routes:
159                 #    -
160                 #      default: true
161                 #      next_hop: {get_param: ManagementInterfaceDefaultRoute}
162               - type: ovs_user_bridge
163                 name: br-link
164                 members:
165                 - type: ovs_dpdk_bond
166                   name: dpdkbond0
167                   members:
168                   - type: ovs_dpdk_port
169                     name: dpdk0
170                     members:
171                     - type: interface
172                       name: nic4
173                   - type: ovs_dpdk_port
174                     name: dpdk1
175                     members:
176                     - type: interface
177                       name: nic5
178 outputs:
179   OS::stack_id:
180     description: The OsNetConfigImpl resource.
181     value:
182       get_resource: OsNetConfigImpl
183