Merge "Set swift replicas = min(device_count, replicas)"
[apex-tripleo-heat-templates.git] / network / config / multiple-nics / compute.yaml
1 heat_template_version: 2015-04-30
2
3 description: >
4   Software Config to drive os-net-config to configure multiple interfaces
5   for the 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 subnet CIDR 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: json
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: interface
69               name: nic1
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                   default: true
85                   next_hop: {get_param: ControlPlaneDefaultRoute}
86             -
87               type: interface
88               name: nic2
89               use_dhcp: false
90               addresses:
91                 -
92                   ip_netmask: {get_param: StorageIpSubnet}
93             -
94               type: interface
95               name: nic4
96               use_dhcp: false
97               addresses:
98                 -
99                   ip_netmask: {get_param: InternalApiIpSubnet}
100             -
101               # Create a bridge which can also be used for VLAN-mode bridge mapping
102               type: ovs_bridge
103               name: br-tenant
104               use_dhcp: false
105               addresses:
106                 -
107                   ip_netmask: {get_param: TenantIpSubnet}
108               members:
109                 -
110                   type: interface
111                   name: nic5
112                   use_dhcp: false
113                   # force the MAC address of the bridge to this interface
114                   primary: true
115
116 outputs:
117   OS::stack_id:
118     description: The OsNetConfigImpl resource.
119     value: {get_resource: OsNetConfigImpl}