Merge "Make *AdminStateUp parameters consistent"
[apex-tripleo-heat-templates.git] / network / config / bond-with-vlans / networker.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 a dedicated Neutron networker 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: bond_mode=active-backup
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     constraints:
39     - allowed_pattern: ^((?!balance.tcp).)*$
40       description: 'The balance-tcp bond mode is known to cause packet loss and
41         should not be used in BondInterfaceOvsOptions.
42         '
43   ExternalNetworkVlanID:
44     default: 10
45     description: Vlan ID for the external network traffic.
46     type: number
47   InternalApiNetworkVlanID:
48     default: 20
49     description: Vlan ID for the internal_api network traffic.
50     type: number
51   StorageNetworkVlanID:
52     default: 30
53     description: Vlan ID for the storage network traffic.
54     type: number
55   StorageMgmtNetworkVlanID:
56     default: 40
57     description: Vlan ID for the storage mgmt network traffic.
58     type: number
59   TenantNetworkVlanID:
60     default: 50
61     description: Vlan ID for the tenant network traffic.
62     type: number
63   ManagementNetworkVlanID:
64     default: 60
65     description: Vlan ID for the management network traffic.
66     type: number
67   ControlPlaneDefaultRoute: # Override this via parameter_defaults
68     description: The default route of the control plane network.
69     type: string
70   ExternalInterfaceDefaultRoute:
71     default: 10.0.0.1
72     description: default route for 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   ControlPlaneSubnetCidr: # Override this via parameter_defaults
79     default: '24'
80     description: The subnet CIDR of the control plane network.
81     type: string
82   DnsServers: # Override this via parameter_defaults
83     default: []
84     description: A list of DNS servers (2 max for some implementations) that will be added to resolv.conf.
85     type: comma_delimited_list
86   EC2MetadataIp: # Override this via parameter_defaults
87     description: The IP address of the EC2 metadata server.
88     type: string
89 resources:
90   OsNetConfigImpl:
91     type: OS::Heat::SoftwareConfig
92     properties:
93       group: script
94       config:
95         str_replace:
96           template:
97             get_file: ../../scripts/run-os-net-config.sh
98           params:
99             $network_config:
100               network_config:
101               - type: interface
102                 name: nic1
103                 use_dhcp: false
104                 addresses:
105                 - ip_netmask:
106                     list_join:
107                     - /
108                     - - get_param: ControlPlaneIp
109                       - get_param: ControlPlaneSubnetCidr
110                 routes:
111                 - ip_netmask: 169.254.169.254/32
112                   next_hop:
113                     get_param: EC2MetadataIp
114               - type: ovs_bridge
115                 name: bridge_name
116                 dns_servers:
117                   get_param: DnsServers
118                 members:
119                 - type: ovs_bond
120                   name: bond1
121                   ovs_options:
122                     get_param: BondInterfaceOvsOptions
123                   members:
124                   - type: interface
125                     name: nic2
126                     primary: true
127                   - type: interface
128                     name: nic3
129                 - type: vlan
130                   device: bond1
131                   vlan_id:
132                     get_param: ExternalNetworkVlanID
133                   addresses:
134                   - ip_netmask:
135                       get_param: ExternalIpSubnet
136                   routes:
137                   - default: true
138                     next_hop:
139                       get_param: ExternalInterfaceDefaultRoute
140                 - type: vlan
141                   device: bond1
142                   vlan_id:
143                     get_param: InternalApiNetworkVlanID
144                   addresses:
145                   - ip_netmask:
146                       get_param: InternalApiIpSubnet
147                 - type: vlan
148                   device: bond1
149                   vlan_id:
150                     get_param: TenantNetworkVlanID
151                   addresses:
152                   - ip_netmask:
153                       get_param: TenantIpSubnet
154                 # Uncomment when including environments/network-management.yaml
155                 # If setting default route on the Management interface, comment
156                 # out the default route on the External interface. This will
157                 # make the External API unreachable from remote subnets.
158                 #-
159                 #  type: vlan
160                 #  device: bond1
161                 #  vlan_id: {get_param: ManagementNetworkVlanID}
162                 #  addresses:
163                 #    -
164                 #      ip_netmask: {get_param: ManagementIpSubnet}
165                 #  routes:
166                 #    -
167                 #      default: true
168                 #      next_hop: {get_param: ManagementInterfaceDefaultRoute}
169 outputs:
170   OS::stack_id:
171     description: The OsNetConfigImpl resource.
172     value:
173       get_resource: OsNetConfigImpl
174