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