[SDC-29] Amdocs OnBoard 1707 initial commit.
[sdc.git] / openecomp-be / lib / openecomp-sdc-translator-lib / openecomp-sdc-translator-core / src / test / resources / mock / services / heattotosca / subInterfaceToInterfaceConnection / vTSBC_AIC / inputfiles / base_perimeta_deployment_create.yaml
1 # Heat template which intstantiates a Perimeta SSC and up to 10 Perimeta
2 # RTP MSCs and up to 10 Perimeta MSRP MSCs.  Currently all instances are
3 # HA although standalone MSCs may be supported in future.
4 #
5 # This Heat template commissions, partners and configures the Perimeta SSC and
6 # MSCs with basic configuration defined by ssc_a_template.json,
7 # msc_a_template.json and mmc_a_template.json.  These can be modified
8 # as required to obtain the required Perimeta configuration.
9 #
10 # This template puts the Perimeta configuration in place using userdata
11 # injected via OpenStack's ConfigDrive mechanism.
12 #
13 # This template sets up anti-affinity using server group anti-affinity and
14 # optionally availability zone anti-affinity.
15 #
16 # This template will work with any version of Perimeta software from 3.9.20.
17 #
18 # Pre-requisites are:
19 # - existing networks as follows
20 #     - network for management traffic
21 #     - network for HA traffic
22 #     - network for core/trusted service traffic
23 #     - network for access/untrusted service traffic
24 # - pre-loaded Perimeta image
25 # - suitable flavor to use for Perimeta SSC
26 # - suitable flavor to use for Perimeta RTP MSCs
27 # - suitable flavor to use for Perimeta MSRP MSCs
28 # - suitable keypair to use for Perimeta
29 #
30 # Virtual IP address and fixed IP addresses to use for the Perimeta instances
31 # must be provided as parameters.
32 #
33 # Template requires Juno or above and has been tested on Kilo.  Note that in
34 # some deployments, Heat template validation will fail but actually creating
35 # a stack using the template will succeed.   This is due to problems with
36 # Heat validating nested templates.
37 #
38 heat_template_version: 2014-10-16
39
40 description: >
41   HOT template to instantiate a Perimeta SSC plus MxRTP MSCs plus NxMSRP MSCs
42
43 parameters:
44   # General VNF parameters
45   vnf_id:
46     type: string
47     description: ID of VNF
48
49   vf_module_id:
50     type: string
51     description: Unique ID for this VF Module instance
52
53   availability_zone_0:
54     type: string
55     description: Availability zone for A instances.
56   availability_zone_1:
57     type: string
58     description: Availability zone for B instances.
59   perimeta_keypair:
60     type: string
61     description: Keypair to use for accessing these Perimeta instances
62     constraints:
63     - custom_constraint: nova.keypair
64   ntp_server_ip_addrs:
65     type: string
66     description: NTP server IPv4 addresses, separated by commas.  These must be accessible from the management network
67     constraints:
68     - allowed_pattern: "((?:\\d{1,3}\\.){3}\\d{1,3},)*((?:\\d{1,3}\\.){3}\\d{1,3})"
69       description: ntp_server_ip_addrs must be a comma separated list of IPv4 addresses (with no spaces)
70   perimeta_param_server_group:
71     type: string
72     description: UUID of server group to set anti-affinity policy for Perimeta instance.  Only used when doing healing.
73
74   # Management network parameters
75   mgmt_net_id:
76     type: string
77     description: Management network ID
78     constraints:
79     - custom_constraint: neutron.network
80   mgmt_net_plen:
81     type: number
82     description: Management network prefix length
83     constraints:
84     - range: { min: 0, max: 32 }
85       description: mgmt_net_plen must be between 0 and 32
86   mgmt_net_default_gateway:
87     type: string
88     description: Default gateway for management network
89   mgmt_net_sec_groups:
90     type: comma_delimited_list
91     description: Management network security groups
92
93   # Internal high availability network parameters
94   int_ha_net_id:
95     type: string
96     description: Internal HA network ID
97     constraints:
98     - custom_constraint: neutron.network
99   int_ha_net_plen:
100     type: number
101     description: Intermal HA network prefix length.
102     constraints:
103     - range: { min: 0, max: 32 }
104       description: int_ha_net_plen must be between 0 and 32
105   int_ha_net_sec_groups:
106     type: comma_delimited_list
107     description: Security groups associated with internal HA network
108
109   # Trusted/core network parameters
110   trusted_net_id:
111     type: string
112     description: Network ID of trusted/core network.
113     constraints:
114     - custom_constraint: neutron.network
115   trusted_net_sec_groups:
116     type: comma_delimited_list
117     description: Security groups associated with trusted/core network
118
119   # Untrusted/access network parameters
120   untrusted_net_id:
121     type: string
122     description: Network ID of untrusted/access network.
123     constraints:
124     - custom_constraint: neutron.network
125   untrusted_net_sec_groups:
126     type: comma_delimited_list
127     description: Security groups associated with untrusted/access network
128   untrusted_num_vlans:
129     type: number
130     description: Number of VLANs to connect to on the untrusted/access network
131   untrusted_vlan_ids:
132     type: comma_delimited_list
133     description: List of VLAN IDs to use on the untrusted/access network
134   untrusted_vlan_networks:
135     type: comma_delimited_list
136     description: List of Contrail VLAN networks to use on the untrusted/access network.   The order and number of these must match the VLAN ID list
137
138   # Unused network parameters
139   #
140   # This is used for connecting the unused 4th SSC service interface.
141   unused_port_net_id:
142     type: string
143     description: Unused network ID
144     constraints:
145     - custom_constraint: neutron.network
146
147   # SSC parameters
148   ssc_flavor_name:
149     type: string
150     description: Flavor to use for creating SSC VM instance
151     constraints:
152     - custom_constraint: nova.flavor
153   ssc_image_name:
154     type: string
155     description: Glance image to use for launching SSC Perimeta instances.
156     constraints:
157     - custom_constraint: glance.image
158   ssc_a_name_0:
159     type: string
160     description: Name of VM A of SSC
161     constraints:
162     - allowed_pattern: '[a-zA-Z0-9][a-zA-Z0-9-]{0,31}$'
163       description: VM A name must be 32 characters or less and a valid hostname.  Only alphanumeric characters plus hyphen are allowed.
164   ssc_b_name_0:
165     type: string
166     description: Name of VM B of SSC
167     constraints:
168     - allowed_pattern: '[a-zA-Z0-9][a-zA-Z0-9-]{0,31}$'
169       description: VM B name must be 32 characters or less and a valid hostname.  Only alphanumeric characters plus hyphen are allowed.
170   ssc_system_name_0:
171     type: string
172     description: System name of SSC
173     constraints:
174     - allowed_pattern: '[a-zA-Z0-9][a-zA-Z0-9-]{0,31}$'
175       description: System name must be 32 characters or less and a valid hostname.  Only alphanumeric characters plus hyphen are allowed.
176
177   # SSC IP addresses on management network
178   ssc_mgmt_vip_0:
179     type: string
180     description: Management virtual IP address to use for SSC.  Only required when predefining VIPs.
181   ssc_a_mgmt_ip_0:
182     type: string
183     description: Management fixed IP address to use for SSC A.  Only required when predefining fixed IPs.
184   ssc_b_mgmt_ip_0:
185     type: string
186     description: Management fixed IP address to use for SSC B.  Only required when predefining fixed IPs.
187
188   # SSC IP addresses on internal HA network
189   ssc_a_int_ha_ip_0:
190     type: string
191     description: HA fixed IP address to use for SSC A.  Only required when predefining fixed IPs.
192   ssc_b_int_ha_ip_0:
193     type: string
194     description: HA fixed IP address to use for SSC B.  Only required when predefining fixed IPs.
195
196   # SSC IP addresses on trusted/core network
197   ssc_trusted_vip_0:
198     type: string
199     description: Virtual IPv4 address on trusted/core network for SSC.
200   ssc_a_trusted_ip_0:
201     type: string
202     description: Fixed IPv4 address on trusted/core network for SSC A. Only required when predefining fixed IPs.
203   ssc_b_trusted_ip_0:
204     type: string
205     description: Fixed IPv4 address on trusted/core network for SSC B. Only required when predefining fixed IPs.
206
207   # SSC IP addresses on untrusted/access network
208   ssc_untrusted_vip_0:
209     type: string
210     description: Virtual IPv4 address on untrusted/access network for SSC. Only required when predefining virtual IPs.
211   ssc_untrusted_v6_vip_0:
212     type: string
213     description: Virtual IPv6 address on untrusted/access network for SSC. Only required when predefining virtual IPs.
214   ssc_a_untrusted_ip_0:
215     type: string
216     description: Fixed IPv4 address on untrusted/access network for SSC A. Only required when predefining fixed IPs.
217   ssc_a_untrusted_v6_ip_0:
218     type: string
219     description: Fixed IPv6 address on untrusted/access network for SSC A. Only required when predefining fixed IPs.
220   ssc_b_untrusted_ip_0:
221     type: string
222     description: Fixed IPv4 address on untrusted/access network for SSC B. Only required when predefining fixed IPs.
223   ssc_b_untrusted_v6_ip_0:
224     type: string
225     description: Fixed IPv6 address on untrusted/access network for SSC B. Only required when predefining fixed IPs.
226
227   # SSC IP addresses on management/Rf network
228   ssc_rf_vip_0:
229     type: string
230     description: Virtual IPv4 address on management/Rf network for SSC. Only required when predefining virtual IPs.
231   ssc_a_rf_ip_0:
232     type: string
233     description: Fixed IPv4 address on management/Rf network for SSC A. Only required when predefining fixed IPs.
234   ssc_b_rf_ip_0:
235     type: string
236     description: Fixed IPv4 address on management/Rf network for SSC B. Only required when predefining fixed IPs.
237
238   # RTP MSC parameters
239   rtp_msc_count:
240     type: number
241     description: Count of required RTP MSCs
242   rtp_msc_flavor_name:
243     type: string
244     description: Flavor to use for creating RTP MSC VM instances
245     constraints:
246     - custom_constraint: nova.flavor
247   rtp_msc_image_name:
248     type: string
249     description: Glance image to use for launching RTP MSC Perimeta instances.
250     constraints:
251     - custom_constraint: glance.image
252   rtp_msc_a_names:
253     type: comma_delimited_list
254     description: List of names of RTP MSC VM A instances
255   rtp_msc_b_names:
256     type: comma_delimited_list
257     description: List of names of RTP MSC VM B instances
258   rtp_msc_system_names:
259     type: comma_delimited_list
260     description: List of system names of RTP MSC instances
261
262   # RTP MSC IP addresses on management network
263   rtp_msc_mgmt_vips:
264     type: comma_delimited_list
265     description: Management virtual IP addresses to use for RTP MSC instances. There must be at least as many as the number of RTP MSCs.
266   rtp_msc_a_mgmt_ips:
267     type: comma_delimited_list
268     description: Management fixed IP addresses to use for RTP MSC A instances. There must be at least as many as the number of RTP MSCs.
269   rtp_msc_b_mgmt_ips:
270     type: comma_delimited_list
271     description: Management fixed IP addresses to use for RTP MSC B instances. There must be at least as many as the number of RTP MSCs.
272
273   # RTP MSC IP addresses on internal HA network
274   rtp_msc_a_int_ha_ips:
275     type: comma_delimited_list
276     description: HA fixed IP addresses to use for RTP MSC A instances. There must be at least as many as the number of RTP MSCs.
277   rtp_msc_b_int_ha_ips:
278     type: comma_delimited_list
279     description: HA fixed IP addresses to use for RTP MSC B instances. There must be at least as many as the number of RTP MSCs.
280
281   # RTP MSC IP addresses on trusted/core network
282   rtp_msc_trusted_vips:
283     type: comma_delimited_list
284     description: Virtual IPv4 addresses on trusted/core network for RTP MSC instances. There must be at least as many as the number of RTP MSCs.
285   rtp_msc_a_trusted_ips:
286     type: comma_delimited_list
287     description: Fixed IPv4 addresses on trusted/core network for RTP MSC A instances. There must be at least as many as the number of RTP MSCs.
288   rtp_msc_b_trusted_ips:
289     type: comma_delimited_list
290     description: Fixed IPv4 address on trusted/core network for RTP MSC B instances. There must be at least as many as the number of RTP MSCs.
291
292   # RTP MSC IP addresses on untrusted/access network
293   rtp_msc_untrusted_vips:
294     type: comma_delimited_list
295     description: Virtual IPv4 address on untrusted/access network for RTP MSC instances. There must be at least as many as the number of RTP MSCs.
296   rtp_msc_untrusted_v6_vips:
297     type: comma_delimited_list
298     description: Virtual IPv6 address on untrusted/access network for RTP MSC instances. There must be at least as many as the number of RTP MSCs.
299   rtp_msc_a_untrusted_ips:
300     type: comma_delimited_list
301     description: Fixed IPv4 address on untrusted/access network for RTP MSC A instances. There must be at least as many as the number of RTP MSCs.
302   rtp_msc_a_untrusted_v6_ips:
303     type: comma_delimited_list
304     description: Fixed IPv6 address on untrusted/access network for RTP MSC A instances. There must be at least as many as the number of RTP MSCs.
305   rtp_msc_b_untrusted_ips:
306     type: comma_delimited_list
307     description: Fixed IPv4 address on untrusted/access network for RTP MSC B instances. There must be at least as many as the number of RTP MSCs.
308   rtp_msc_b_untrusted_v6_ips:
309     type: comma_delimited_list
310     description: Fixed IPv6 address on untrusted/access network for RTP MSC B instances. There must be at least as many as the number of RTP MSCs.
311
312 resources:
313
314   # Perimeta SSC
315   perimeta_ssc:
316     type: perimeta_ha_swmu.yaml
317     properties:
318       vnf_id: { get_param: vnf_id }
319       vm_role: 'ssc'
320       vf_module_id: { get_param: vf_module_id }
321       system_names: [{ get_param: ssc_system_name_0 }]
322       vm_a_names: [{ get_param: ssc_a_name_0 }]
323       vm_b_names: [{ get_param: ssc_b_name_0 }]
324       perimeta_instance_index: 0
325       perimeta_image_name: { get_param: ssc_image_name }
326       perimeta_flavor_name: { get_param: ssc_flavor_name }
327       perimeta_keypair: { get_param: perimeta_keypair }
328       availability_zone_0: { get_param: availability_zone_0 }
329       availability_zone_1: { get_param: availability_zone_1 }
330       mgmt_net_id: { get_param: mgmt_net_id }
331       mgmt_net_plen: { get_param: mgmt_net_plen }
332       mgmt_net_default_gateway: { get_param: mgmt_net_default_gateway }
333       mgmt_vips: [{ get_param: ssc_mgmt_vip_0 }]
334       mgmt_a_ips: [{ get_param: ssc_a_mgmt_ip_0 }]
335       mgmt_b_ips: [{ get_param: ssc_b_mgmt_ip_0 }]
336       mgmt_sec_groups: { get_param: mgmt_net_sec_groups }
337       ha_net_id: { get_param: int_ha_net_id }
338       ha_network_plen: { get_param: int_ha_net_plen }
339       ha_a_ips: [{ get_param: ssc_a_int_ha_ip_0 }]
340       ha_b_ips: [{ get_param: ssc_b_int_ha_ip_0 }]
341       ha_sec_groups: { get_param: int_ha_net_sec_groups }
342       trusted_net_id: { get_param: trusted_net_id }
343       trusted_vips: [{ get_param: ssc_trusted_vip_0 }]
344       trusted_a_ips: [{ get_param: ssc_a_trusted_ip_0 }]
345       trusted_b_ips: [{ get_param: ssc_b_trusted_ip_0 }]
346       trusted_sec_groups: { get_param: trusted_net_sec_groups }
347       untrusted_net_id: { get_param: untrusted_net_id }
348       untrusted_vips: [{ get_param: ssc_untrusted_vip_0 }]
349       untrusted_v6_vips: [{ get_param: ssc_untrusted_v6_vip_0 }]
350       untrusted_a_ips: [{ get_param: ssc_a_untrusted_ip_0 }]
351       untrusted_a_v6_ips: [{ get_param: ssc_a_untrusted_v6_ip_0 }]
352       untrusted_b_ips: [{ get_param: ssc_b_untrusted_ip_0 }]
353       untrusted_b_v6_ips: [{ get_param: ssc_b_untrusted_v6_ip_0 }]
354       untrusted_sec_groups: { get_param: untrusted_net_sec_groups }
355       untrusted_num_vlans: { get_param: untrusted_num_vlans }
356       untrusted_vlan_ids: { get_param: untrusted_vlan_ids }
357       untrusted_vlan_networks: { get_param: untrusted_vlan_networks }
358       serv3_net_id: { get_param: mgmt_net_id }
359       serv3_vips: [{ get_param: ssc_rf_vip_0 }]
360       serv3_a_ips: [{ get_param: ssc_a_rf_ip_0 }]
361       serv3_b_ips: [{ get_param: ssc_b_rf_ip_0 }]
362       serv3_sec_groups: { get_param: mgmt_net_sec_groups }
363       unused_net_id: { get_param: unused_port_net_id }
364       perimeta_param_server_group: { get_param: perimeta_param_server_group }
365       perimeta_config:
366         str_replace:
367           template: {get_file: ssc_a_template.json}
368           params:
369                 $NTP_SERVER_IP_ADDRS: { get_param: ntp_server_ip_addrs }
370                 $COMPLETION_PARAMS: ''
371
372   # Perimeta RTP MSCs.
373   perimeta_rtp_mscs:
374     type: OS::Heat::ResourceGroup
375     properties:
376       count: { get_param: rtp_msc_count }
377       resource_def:
378         type: perimeta_ha_sw.yaml
379         properties:
380           vnf_id: { get_param: vnf_id }
381           vm_role: 'rtp_msc'
382           vf_module_id: { get_param: vf_module_id }
383           system_names: { get_param: rtp_msc_system_names }
384           vm_a_names: { get_param: rtp_msc_a_names }
385           vm_b_names: { get_param: rtp_msc_b_names }
386           perimeta_instance_index: "%index%"
387           perimeta_image_name: { get_param: rtp_msc_image_name }
388           perimeta_flavor_name: { get_param: rtp_msc_flavor_name }
389           perimeta_keypair: { get_param: perimeta_keypair }
390           availability_zone_0: { get_param: availability_zone_0 }
391           availability_zone_1: { get_param: availability_zone_1 }
392           mgmt_net_id: { get_param: mgmt_net_id }
393           mgmt_net_plen: { get_param: mgmt_net_plen }
394           mgmt_net_default_gateway: { get_param: mgmt_net_default_gateway }
395           mgmt_vips: { get_param: rtp_msc_mgmt_vips }
396           mgmt_a_ips: { get_param: rtp_msc_a_mgmt_ips }
397           mgmt_b_ips: { get_param: rtp_msc_b_mgmt_ips }
398           mgmt_sec_groups: { get_param: mgmt_net_sec_groups }
399           ha_net_id: { get_param: int_ha_net_id }
400           ha_network_plen: { get_param: int_ha_net_plen }
401           ha_a_ips: { get_param: rtp_msc_a_int_ha_ips }
402           ha_b_ips: { get_param: rtp_msc_b_int_ha_ips }
403           ha_sec_groups: { get_param: int_ha_net_sec_groups }
404           trusted_net_id: { get_param: trusted_net_id }
405           trusted_vips: { get_param: rtp_msc_trusted_vips }
406           trusted_a_ips: { get_param: rtp_msc_a_trusted_ips }
407           trusted_b_ips: { get_param: rtp_msc_b_trusted_ips }
408           trusted_sec_groups: { get_param: trusted_net_sec_groups }
409           untrusted_net_id: { get_param: untrusted_net_id }
410           untrusted_vips: { get_param: rtp_msc_untrusted_vips }
411           untrusted_v6_vips: { get_param: rtp_msc_untrusted_v6_vips }
412           untrusted_a_ips: { get_param: rtp_msc_a_untrusted_ips }
413           untrusted_a_v6_ips: { get_param: rtp_msc_a_untrusted_v6_ips }
414           untrusted_b_ips: { get_param: rtp_msc_b_untrusted_ips }
415           untrusted_b_v6_ips: { get_param: rtp_msc_b_untrusted_v6_ips }
416           untrusted_sec_groups: { get_param: untrusted_net_sec_groups }
417           untrusted_num_vlans: { get_param: untrusted_num_vlans }
418           untrusted_vlan_ids: { get_param: untrusted_vlan_ids }
419           untrusted_vlan_networks: { get_param: untrusted_vlan_networks }
420           perimeta_param_server_group: { get_param: perimeta_param_server_group }
421           perimeta_config:
422             str_replace:
423               template: {get_file: msc_a_template.json}
424               params:
425                 $NTP_SERVER_IP_ADDRS: { get_param: ntp_server_ip_addrs }
426                 $COMPLETION_PARAMS: ''
427
428
429 outputs:
430
431   ssc_server_group:
432     description: Server group for SSC pair
433     value: { get_attr: [ perimeta_ssc, server_group_used ] }
434
435   rtp_msc_server_groups:
436     description: Server groups for RTP MSC pairs
437     value: { get_attr: [ perimeta_rtp_mscs, server_group_used ] }
438
439
440   msw_template_version:
441     description: Version of the heat templates used to instantiate the VMs
442     value: "4.0.1 - 2016-10-28"