Merge "Rename tox env to pep8"
[apex-tripleo-heat-templates.git] / network / config / single-nic-linux-bridge-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   InternalApiNetworkVlanID:
33     default: 20
34     description: Vlan ID for the internal_api network traffic.
35     type: number
36   StorageNetworkVlanID:
37     default: 30
38     description: Vlan ID for the storage network traffic.
39     type: number
40   TenantNetworkVlanID:
41     default: 50
42     description: Vlan ID for the tenant network traffic.
43     type: number
44   ControlPlaneSubnetCidr: # Override this via parameter_defaults
45     default: '24'
46     description: The subnet CIDR of the control plane network.
47     type: string
48   ControlPlaneDefaultRoute: # Override this via parameter_defaults
49     description: The default route of the control plane network.
50     type: string
51   DnsServers: # Override this via parameter_defaults
52     default: []
53     description: A list of DNS servers (2 max for some implementations) that will be added to resolv.conf.
54     type: comma_delimited_list
55   EC2MetadataIp: # Override this via parameter_defaults
56     description: The IP address of the EC2 metadata server.
57     type: string
58
59 resources:
60   OsNetConfigImpl:
61     type: OS::Heat::StructuredConfig
62     properties:
63       group: os-apply-config
64       config:
65         os_net_config:
66           network_config:
67             -
68               type: linux_bridge
69               name: {get_input: bridge_name}
70               use_dhcp: false
71               dns_servers: {get_param: DnsServers}
72               addresses:
73                 -
74                   ip_netmask:
75                     list_join:
76                       - '/'
77                       - - {get_param: ControlPlaneIp}
78                         - {get_param: ControlPlaneSubnetCidr}
79               routes:
80                 -
81                   ip_netmask: 169.254.169.254/32
82                   next_hop: {get_param: EC2MetadataIp}
83                 -
84                   ip_netmask: 0.0.0.0/0
85                   default: true
86                   next_hop: {get_param: ControlPlaneDefaultRoute}
87               members:
88                 -
89                   type: interface
90                   name: {get_input: interface_name}
91                   # force the MAC address of the bridge to this interface
92                   primary: true
93             -
94               type: vlan
95               vlan_id: {get_param: InternalApiNetworkVlanID}
96               device: {get_input: bridge_name}
97               addresses:
98                 -
99                   ip_netmask: {get_param: InternalApiIpSubnet}
100             -
101               type: vlan
102               vlan_id: {get_param: StorageNetworkVlanID}
103               device: {get_input: bridge_name}
104               addresses:
105                 -
106                   ip_netmask: {get_param: StorageIpSubnet}
107             -
108               type: vlan
109               vlan_id: {get_param: TenantNetworkVlanID}
110               device: {get_input: bridge_name}
111               addresses:
112                 -
113                   ip_netmask: {get_param: TenantIpSubnet}
114
115 outputs:
116   OS::stack_id:
117     description: The OsNetConfigImpl resource.
118     value: {get_resource: OsNetConfigImpl}