Merge "Make all-nodes Ip networks configurable"
[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   ExternalIpSubnet:
9     default: ''
10     description: IP address/subnet on the external network
11     type: string
12   InternalApiIpSubnet:
13     default: ''
14     description: IP address/subnet on the internal API network
15     type: string
16   StorageIpSubnet:
17     default: ''
18     description: IP address/subnet on the storage network
19     type: string
20   StorageMgmtIpSubnet:
21     default: ''
22     description: IP address/subnet on the storage mgmt network
23     type: string
24   TenantIpSubnet:
25     default: ''
26     description: IP address/subnet on the tenant network
27     type: string
28
29 resources:
30   OsNetConfigImpl:
31     type: OS::Heat::StructuredConfig
32     properties:
33       group: os-apply-config
34       config:
35         os_net_config:
36           network_config:
37             -
38               type: ovs_bridge
39               name: {get_input: bridge_name}
40               use_dhcp: true
41               members:
42                 -
43                   type: interface
44                   name: nic1
45                   ovs_options: vlan_mode=trunk trunks=10,20,30,40,50
46                   # force the MAC address of the bridge to this interface
47                   primary: true
48                 -
49                   type: vlan
50                   vlan_id: 20
51                   addresses:
52                   -
53                     ip_netmask: {get_param: InternalApiIpSubnet}
54                 -
55                   type: vlan
56                   vlan_id: 30
57                   addresses:
58                   -
59                     ip_netmask: {get_param: StorageIpSubnet}
60                 -
61                   type: vlan
62                   vlan_id: 50
63                   addresses:
64                   -
65                     ip_netmask: {get_param: TenantIpSubnet}
66
67 outputs:
68   OS::stack_id:
69     description: The OsNetConfigImpl resource.
70     value: {get_resource: OsNetConfigImpl}