Bump template version for all templates to "ocata"
[apex-tripleo-heat-templates.git] / network / config / multiple-nics / compute-dvr.yaml
1 heat_template_version: ocata
2 description: >
3   Software Config to drive os-net-config to configure multiple interfaces for the
4   compute role with external bridge for DVR.
5 parameters:
6   ControlPlaneIp:
7     default: ''
8     description: IP address/subnet on the ctlplane network
9     type: string
10   ExternalIpSubnet:
11     default: ''
12     description: IP address/subnet on the external network
13     type: string
14   InternalApiIpSubnet:
15     default: ''
16     description: IP address/subnet on the internal API network
17     type: string
18   StorageIpSubnet:
19     default: ''
20     description: IP address/subnet on the storage network
21     type: string
22   StorageMgmtIpSubnet:
23     default: ''
24     description: IP address/subnet on the storage mgmt network
25     type: string
26   TenantIpSubnet:
27     default: ''
28     description: IP address/subnet on the tenant network
29     type: string
30   ManagementIpSubnet: # Only populated when including environments/network-management.yaml
31     default: ''
32     description: IP address/subnet on the management network
33     type: string
34   ExternalNetworkVlanID:
35     default: 10
36     description: Vlan ID for the external network traffic.
37     type: number
38   InternalApiNetworkVlanID:
39     default: 20
40     description: Vlan ID for the internal_api network traffic.
41     type: number
42   StorageNetworkVlanID:
43     default: 30
44     description: Vlan ID for the storage network traffic.
45     type: number
46   StorageMgmtNetworkVlanID:
47     default: 40
48     description: Vlan ID for the storage mgmt network traffic.
49     type: number
50   TenantNetworkVlanID:
51     default: 50
52     description: Vlan ID for the tenant network traffic.
53     type: number
54   ManagementNetworkVlanID:
55     default: 60
56     description: Vlan ID for the management network traffic.
57     type: number
58   ControlPlaneSubnetCidr: # Override this via parameter_defaults
59     default: '24'
60     description: The subnet CIDR of the control plane network.
61     type: string
62   ControlPlaneDefaultRoute: # Override this via parameter_defaults
63     description: The default route of the control plane network.
64     type: string
65   ExternalInterfaceDefaultRoute: # Not used by default in this template
66     default: 10.0.0.1
67     description: The default route of the external network.
68     type: string
69   ManagementInterfaceDefaultRoute: # Commented out by default in this template
70     default: unset
71     description: The default route of the management network.
72     type: string
73   DnsServers: # Override this via parameter_defaults
74     default: []
75     description: A list of DNS servers (2 max for some implementations) that will be added to resolv.conf.
76     type: comma_delimited_list
77   EC2MetadataIp: # Override this via parameter_defaults
78     description: The IP address of the EC2 metadata server.
79     type: string
80 resources:
81   OsNetConfigImpl:
82     type: OS::Heat::SoftwareConfig
83     properties:
84       group: script
85       config:
86         str_replace:
87           template:
88             get_file: ../../scripts/run-os-net-config.sh
89           params:
90             $network_config:
91               network_config:
92               - type: interface
93                 name: nic1
94                 use_dhcp: false
95                 dns_servers:
96                   get_param: DnsServers
97                 addresses:
98                 - ip_netmask:
99                     list_join:
100                     - /
101                     - - get_param: ControlPlaneIp
102                       - get_param: ControlPlaneSubnetCidr
103                 routes:
104                 - ip_netmask: 169.254.169.254/32
105                   next_hop:
106                     get_param: EC2MetadataIp
107                 - default: true
108                   next_hop:
109                     get_param: ControlPlaneDefaultRoute
110               - type: interface
111                 name: nic2
112                 use_dhcp: false
113                 addresses:
114                 - ip_netmask:
115                     get_param: StorageIpSubnet
116               - type: interface
117                 name: nic4
118                 use_dhcp: false
119                 addresses:
120                 - ip_netmask:
121                     get_param: InternalApiIpSubnet
122               - type: ovs_bridge
123                 name: br-tenant
124                 use_dhcp: false
125                 addresses:
126                 - ip_netmask:
127                     get_param: TenantIpSubnet
128                 members:
129                 - type: interface
130                   name: nic5
131                   use_dhcp: false
132                   primary: true
133               # External bridge for DVR (no IP address required)
134               - type: ovs_bridge
135                 name: bridge_name
136                 dns_servers:
137                   get_param: DnsServers
138                 use_dhcp: false
139                 members:
140                 - type: interface
141                   name: nic6
142                   primary: true
143             # Uncomment when including environments/network-management.yaml
144             # If setting default route on the Management interface, comment
145             # out the default route on the Control Plane.
146             #-
147             #  type: interface
148             #  name: nic7
149             #  use_dhcp: false
150             #  addresses:
151             #    -
152             #      ip_netmask: {get_param: ManagementIpSubnet}
153             #  routes:
154             #    -
155             #      default: true
156             #      next_hop: {get_param: ManagementInterfaceDefaultRoute}
157 outputs:
158   OS::stack_id:
159     description: The OsNetConfigImpl resource.
160     value:
161       get_resource: OsNetConfigImpl
162