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