cfbfdade7978032169e1c756370024a45303f663
[sdc.git] /
1 heat_template_version: 2015-04-30
2
3 parameters:
4
5 ###network names
6   int_oam_int_net_id:
7     type: string
8     description: Name of management network to be created
9   apps_int_net_id:
10     type: string
11     description: Name of mirror network to be created
12   gwaf_lb2_int_net_id:
13     type: string
14     description: Name of mirror network to be created
15
16 ###VM names####
17   LB2_name_0:
18     type: string
19     description: Name of the SVM
20   LB2_name_1:
21     type: string
22     description: Name of the SVM
23 #####General##########
24   lb_key_name:
25     type: string
26   LB2_flavor_name:
27     type: string
28     description: Flavor of the end VMs
29   LB2_image_name:
30     type: string
31     description: Name of the end VM LB_image_name
32   availability_zone_0:
33     type: string
34     description: availability zone
35   availability_zone_1:
36     type: string
37     description: availability zone
38 # aap_core
39   aap_core_ip_prefix:
40     type: string
41     description: ip_prefix for the ServiceInstance
42   aap_core_ip_prefix_len:
43     type: number
44     description: ip_prefix_len for the ServiceInstance
45   aap_core_ha_mode:
46     type: string
47     description: address_mode for the ServiceInstance
48   aap_core_mac:
49     type: string
50     description: mac for the VirtualMachineInterface
51 ####Ip addresses
52   lb_oam_int_ip_0:
53     type: string
54     description: lb ip
55   lb_apps_int_ip_0:
56     type: string
57     description:  lb ip 
58   gwaf_lb2_int_ip_0:
59     type: string
60     description:   lb ip
61   lb_oam_int_ip_1:
62     type: string
63     description:  lb ip
64   lb_apps_int_ip_1:
65     type: string
66     description:   lb ip
67   gwaf_lb2_int_ip_1:
68     type: string
69     description:   lb ip
70   vf_module_id:
71     type: string
72     description: Unique ID for this VF Module instance   
73   vnf_id:
74     type: string
75     description: Name of vOTA instance for ECOMP
76   gwaf_lb2_int_sec_group_id: 
77     type: string
78     description: sec group
79   apps_int_sec_group_id: 
80     type: string
81     description: sec group
82   int_oam_int_sec_group_id:
83     type: string
84     description: sec group
85 ####Health check#########
86   shc_enabled:
87     type: string
88     description: health check
89   shc_monitor_type:
90     type: string
91     description:  health check 
92   shc_delay:
93     type: string
94     description:  health check
95   shc_timeout:
96     type: string
97     description:  health check
98   shc_max_retries:
99     type: string
100     description:  health check
101   shc_url_path:
102     type: string
103     description:  health check
104 ###ECMP hashing#########
105   ecmp_hashing_include_fields_hashing_configured:
106     type: string
107     description:  health check
108   ecmp_hashing_include_fields_source_ip:
109     type: string
110     description:  health check
111   ecmp_hashing_include_fields_destination_port:
112     type: string
113     description:  health check
114   ecmp_hashing_include_fields_source_port:
115     type: string
116     description:  health check
117   ecmp_hashing_include_fields_destination_ip:
118     type: string
119     description:  health check
120   ecmp_hashing_include_fields_ip_protocol:
121     type: string
122     description:  health check
123
124 resources:
125
126   lb_0_int_oam_int_0_port:
127     type: OS::ContrailV2::VirtualMachineInterface
128     properties:
129       virtual_machine_interface_properties:
130         {
131           virtual_machine_interface_properties_service_interface_type: { get_param: int_oam_int_net_id },
132         }
133       virtual_network_refs: [{ get_param: int_oam_int_net_id }]
134       security_group_refs: [{ get_param: int_oam_int_sec_group_id}]
135
136   lb_0_apps_int_1_port:
137     type: OS::ContrailV2::VirtualMachineInterface
138     properties:
139       virtual_machine_interface_properties:
140         {
141           virtual_machine_interface_properties_service_interface_type: { get_param: apps_int_net_id },
142         }
143       virtual_network_refs: [{ get_param: apps_int_net_id }]
144       security_group_refs: [{ get_param: apps_int_sec_group_id }]
145
146   lb_0_gwaf_lb2_int_2_port:
147     type: OS::ContrailV2::VirtualMachineInterface
148     properties:
149       virtual_network_refs: [{ get_param: gwaf_lb2_int_net_id }]
150       service_health_check_refs: 
151         - get_resource: lb_gwaf_lb2_hc
152       ecmp_hashing_include_fields:
153         ecmp_hashing_include_fields_hashing_configured: { get_param: ecmp_hashing_include_fields_hashing_configured }
154         ecmp_hashing_include_fields_source_ip: { get_param: ecmp_hashing_include_fields_source_ip }
155         ecmp_hashing_include_fields_destination_port: { get_param: ecmp_hashing_include_fields_destination_port }
156         ecmp_hashing_include_fields_destination_ip: { get_param: ecmp_hashing_include_fields_destination_ip }
157         ecmp_hashing_include_fields_source_port: { get_param: ecmp_hashing_include_fields_source_port }
158         ecmp_hashing_include_fields_ip_protocol: { get_param: ecmp_hashing_include_fields_ip_protocol }
159       virtual_machine_interface_allowed_address_pairs:
160         {
161           virtual_machine_interface_allowed_address_pairs_allowed_address_pair:
162             [{
163               virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
164                 {
165                   virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: aap_core_ip_prefix },
166                   virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: { get_param: aap_core_ip_prefix_len },
167                 },
168               virtual_machine_interface_allowed_address_pairs_allowed_address_pair_mac: { get_param: aap_core_mac },
169               virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: { get_param: aap_core_ha_mode },
170             }],
171         }
172       security_group_refs: [{ get_param: gwaf_lb2_int_sec_group_id }]
173
174   lb_1_int_oam_int_0_port:
175     type: OS::ContrailV2::VirtualMachineInterface
176     properties:
177       virtual_machine_interface_properties:
178         {
179           virtual_machine_interface_properties_service_interface_type: { get_param: int_oam_int_net_id },
180         }
181       virtual_network_refs: [{ get_param: int_oam_int_net_id }]
182       security_group_refs: [{ get_param: int_oam_int_sec_group_id}]      
183
184   lb_1_apps_int_1_port:
185     type: OS::ContrailV2::VirtualMachineInterface
186     properties:
187       virtual_machine_interface_properties:
188         {
189           virtual_machine_interface_properties_service_interface_type: { get_param: apps_int_net_id },
190         }
191       virtual_network_refs: [{ get_param: apps_int_net_id }]
192       security_group_refs: [{ get_param: apps_int_sec_group_id }]
193
194   lb_1_gwaf_lb2_int_2_port:
195     type: OS::ContrailV2::VirtualMachineInterface
196     properties:
197       virtual_network_refs: [{ get_param: gwaf_lb2_int_net_id }]
198       service_health_check_refs: 
199         - get_resource: lb_gwaf_lb2_hc
200       ecmp_hashing_include_fields:
201         ecmp_hashing_include_fields_hashing_configured: { get_param: ecmp_hashing_include_fields_hashing_configured }
202         ecmp_hashing_include_fields_source_ip: { get_param: ecmp_hashing_include_fields_source_ip }
203         ecmp_hashing_include_fields_destination_port: { get_param: ecmp_hashing_include_fields_destination_port }
204         ecmp_hashing_include_fields_destination_ip: { get_param: ecmp_hashing_include_fields_destination_ip }
205         ecmp_hashing_include_fields_source_port: { get_param: ecmp_hashing_include_fields_source_port }
206         ecmp_hashing_include_fields_ip_protocol: { get_param: ecmp_hashing_include_fields_ip_protocol }
207       virtual_machine_interface_allowed_address_pairs:
208         {
209           virtual_machine_interface_allowed_address_pairs_allowed_address_pair:
210             [{
211               virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
212                 {
213                   virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: aap_core_ip_prefix },
214                   virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: { get_param: aap_core_ip_prefix_len },
215                 },
216               virtual_machine_interface_allowed_address_pairs_allowed_address_pair_mac: { get_param: aap_core_mac },
217               virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: { get_param: aap_core_ha_mode },
218             }],
219         }
220       security_group_refs: [{ get_param: gwaf_lb2_int_sec_group_id }]
221
222   lb_0_int_oam_int_0_ip:
223     type: OS::ContrailV2::InstanceIp
224     depends_on: [ lb_0_int_oam_int_0_port ]
225     properties:
226       virtual_machine_interface_refs: [{ get_resource: lb_0_int_oam_int_0_port }]
227       virtual_network_refs: [{ get_param: int_oam_int_net_id }]
228       instance_ip_address: { get_param:  lb_oam_int_ip_0 }
229
230
231   lb_0_apps_int_1_ip:
232     type: OS::ContrailV2::InstanceIp
233     depends_on: [ lb_0_apps_int_1_port ]
234     properties:
235       virtual_machine_interface_refs: [{ get_resource: lb_0_apps_int_1_port }]
236       virtual_network_refs: [{ get_param: apps_int_net_id }]
237       instance_ip_address: { get_param:  lb_apps_int_ip_0 }
238
239
240   lb_0_gwaf_lb2_int_2_ip:
241     type: OS::ContrailV2::InstanceIp
242     depends_on: [ lb_0_gwaf_lb2_int_2_port ]
243     properties:
244       virtual_machine_interface_refs: [{ get_resource: lb_0_gwaf_lb2_int_2_port }]
245       virtual_network_refs: [{ get_param: gwaf_lb2_int_net_id }]
246       instance_ip_address: { get_param:  gwaf_lb2_int_ip_0 }
247
248
249   lb_1_int_oam_int_0_ip:
250     type: OS::ContrailV2::InstanceIp
251     depends_on: [ lb_1_int_oam_int_0_port ]
252     properties:
253       virtual_machine_interface_refs: [{ get_resource: lb_1_int_oam_int_0_port }]
254       virtual_network_refs: [{ get_param: int_oam_int_net_id }]
255       instance_ip_address: { get_param:  lb_oam_int_ip_1 }
256
257
258   lb_1_apps_int_1_ip:
259     type: OS::ContrailV2::InstanceIp
260     depends_on: [ lb_1_apps_int_1_port ]
261     properties:
262       virtual_machine_interface_refs: [{ get_resource: lb_1_apps_int_1_port }]
263       virtual_network_refs: [{ get_param: apps_int_net_id }]
264       instance_ip_address: { get_param:  lb_apps_int_ip_1 }
265
266
267   lb_1_gwaf_lb2_int_2_ip:
268     type: OS::ContrailV2::InstanceIp
269     depends_on: [ lb_1_gwaf_lb2_int_2_port ]
270     properties:
271       virtual_machine_interface_refs: [{ get_resource: lb_1_gwaf_lb2_int_2_port }]
272       virtual_network_refs: [{ get_param: gwaf_lb2_int_net_id }]
273       instance_ip_address: { get_param:  gwaf_lb2_int_ip_1 }
274
275
276   lb_gwaf_lb2_hc:
277     type: OS::ContrailV2::ServiceHealthCheck
278     properties:
279       name: gwaf_lb2_hc_PING
280       service_health_check_properties:
281         service_health_check_properties_enabled: { get_param: shc_enabled }
282         service_health_check_properties_monitor_type: { get_param: shc_monitor_type }
283         service_health_check_properties_delay: { get_param: shc_delay }
284         service_health_check_properties_timeout: { get_param: shc_timeout }
285         service_health_check_properties_max_retries: { get_param: shc_max_retries }
286         service_health_check_properties_url_path: { get_param: shc_url_path }
287
288
289
290   LB2_0:
291     type: OS::Nova::Server
292     depends_on: [ lb_0_int_oam_int_0_ip, lb_0_apps_int_1_ip, lb_0_gwaf_lb2_int_2_ip ]
293     properties:
294       name: {get_param: LB2_name_0 }
295       image: { get_param:  LB2_image_name }
296       flavor: { get_param: LB2_flavor_name }
297       key_name: { get_param: lb_key_name }
298       availability_zone: { get_param: availability_zone_0 }
299       networks:
300         - port: { get_resource: lb_0_int_oam_int_0_port }
301         - port: { get_resource: lb_0_apps_int_1_port }
302         - port: { get_resource: lb_0_gwaf_lb2_int_2_port }
303       metadata:
304         vnf_id: { get_param: vnf_id }
305         vf_module_id:  { get_param: vf_module_id }
306       user_data:
307         str_replace:
308           template: |
309           params:
310             $lb_loopback: { get_param: LB2_image_name  }
311
312   LB2_1:
313     type: OS::Nova::Server
314     depends_on: [ lb_1_int_oam_int_0_ip, lb_1_apps_int_1_ip, lb_1_gwaf_lb2_int_2_ip ]
315     properties:
316       name: {get_param: LB2_name_1 }
317       image: { get_param:  LB2_image_name }
318       flavor: { get_param: LB2_flavor_name }
319       availability_zone: { get_param: availability_zone_1 }
320       key_name: { get_param: lb_key_name }
321       networks:
322         - port: { get_resource: lb_1_int_oam_int_0_port }
323         - port: { get_resource: lb_1_apps_int_1_port }
324         - port: { get_resource: lb_1_gwaf_lb2_int_2_port }
325       metadata:
326         vnf_id: { get_param: vnf_id }
327         vf_module_id:  { get_param: vf_module_id }
328       user_data:
329         str_replace:
330           template: |
331           params:
332             $lb_loopback: { get_param: LB2_image_name  }