Merge "Retain existing ComputeHostnameFormat when upgrading older envs"
[apex-tripleo-heat-templates.git] / net-config-static-bridge-with-external-dhcp.yaml
1 heat_template_version: 2015-04-30
2
3 description: >
4   Software Config to drive os-net-config for a simple bridge configured
5   with a static IP address for the ctlplane network.
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   ManagementIpSubnet:
33     default: ''
34     description: IP address/subnet on the management network
35     type: string
36   ControlPlaneSubnetCidr: # Override this via parameter_defaults
37     default: '24'
38     description: The subnet CIDR of the control plane network.
39     type: string
40   ControlPlaneDefaultRoute: # Override this via parameter_defaults
41     description: The default route of the control plane network.
42     type: string
43   DnsServers: # Override this via parameter_defaults
44     default: []
45     description: A list of DNS servers (2 max for some implementations) that will be added to resolv.conf.
46     type: comma_delimited_list
47   EC2MetadataIp: # Override this via parameter_defaults
48     description: The IP address of the EC2 metadata server.
49     type: string
50
51 resources:
52   OsNetConfigImpl:
53     type: OS::Heat::StructuredConfig
54     properties:
55       group: os-apply-config
56       config:
57         os_net_config:
58           network_config:
59             -
60               type: ovs_bridge
61               name: {get_input: bridge_name}
62               use_dhcp: true
63               members:
64                 -
65                   type: interface
66                   name: {get_input: interface_name}
67                   # force the MAC address of the bridge to this interface
68                   primary: true
69             -
70               type: interface
71               # would like to do the following, but can't b/c of:
72               # https://bugs.launchpad.net/heat/+bug/1344284
73               # name:
74               # list_join:
75               #   - '/'
76               #   - - {get_input: bridge_name}
77               #   - ':0'
78               # So, just hardcode to br-ex:0 for now, br-ex is hardcoded in
79               # controller.yaml anyway.
80               name: br-ex:0
81               addresses:
82                 -
83                   ip_netmask:
84                     list_join:
85                       - '/'
86                       - - {get_param: ControlPlaneIp}
87                         - {get_param: ControlPlaneSubnetCidr}
88               routes:
89                 -
90                   ip_netmask: 169.254.169.254/32
91                   next_hop: {get_param: EC2MetadataIp}
92                 -
93                   default: true
94                   next_hop: {get_param: ControlPlaneDefaultRoute}
95
96 outputs:
97   OS::stack_id:
98     description: The OsNetConfigImpl resource.
99     value: {get_resource: OsNetConfigImpl}