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