b071897d701575fda5631ff5ee36fdd2f3ba5a6e
[sdc.git] /
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_index:
243     type: number
244     description: Index of RTP MSC to create/heal.
245   rtp_msc_flavor_name:
246     type: string
247     description: Flavor to use for creating RTP MSC VM instances
248     constraints:
249     - custom_constraint: nova.flavor
250   rtp_msc_image_name:
251     type: string
252     description: Glance image to use for launching RTP MSC Perimeta instances.
253     constraints:
254     - custom_constraint: glance.image
255   rtp_msc_a_names:
256     type: comma_delimited_list
257     description: List of names of RTP MSC VM A instances
258   rtp_msc_b_names:
259     type: comma_delimited_list
260     description: List of names of RTP MSC VM B instances
261   rtp_msc_system_names:
262     type: comma_delimited_list
263     description: List of system names of RTP MSC instances
264
265   # RTP MSC IP addresses on management network
266   rtp_msc_mgmt_vips:
267     type: comma_delimited_list
268     description: Management virtual IP addresses to use for RTP MSC instances. There must be at least as many as the number of RTP MSCs.
269   rtp_msc_a_mgmt_ips:
270     type: comma_delimited_list
271     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.
272   rtp_msc_b_mgmt_ips:
273     type: comma_delimited_list
274     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.
275
276   # RTP MSC IP addresses on internal HA network
277   rtp_msc_a_int_ha_ips:
278     type: comma_delimited_list
279     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.
280   rtp_msc_b_int_ha_ips:
281     type: comma_delimited_list
282     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.
283
284   # RTP MSC IP addresses on trusted/core network
285   rtp_msc_trusted_vips:
286     type: comma_delimited_list
287     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.
288   rtp_msc_a_trusted_ips:
289     type: comma_delimited_list
290     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.
291   rtp_msc_b_trusted_ips:
292     type: comma_delimited_list
293     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.
294
295   # RTP MSC IP addresses on untrusted/access network
296   rtp_msc_untrusted_vips:
297     type: comma_delimited_list
298     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.
299   rtp_msc_untrusted_v6_vips:
300     type: comma_delimited_list
301     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.
302   rtp_msc_a_untrusted_ips:
303     type: comma_delimited_list
304     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.
305   rtp_msc_a_untrusted_v6_ips:
306     type: comma_delimited_list
307     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.
308   rtp_msc_b_untrusted_ips:
309     type: comma_delimited_list
310     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.
311   rtp_msc_b_untrusted_v6_ips:
312     type: comma_delimited_list
313     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.
314
315 resources:
316
317
318   # Perimeta RTP MSCs.
319   perimeta_rtp_mscs:
320         type: perimeta_ha_sw_b.yaml
321         properties:
322           vnf_id: { get_param: vnf_id }
323           vm_role: 'rtp_msc'
324           vf_module_id: { get_param: vf_module_id }
325           system_names: { get_param: rtp_msc_system_names }
326           vm_a_names: { get_param: rtp_msc_a_names }
327           vm_b_names: { get_param: rtp_msc_b_names }
328           perimeta_instance_index: { get_param: rtp_msc_index }
329           perimeta_image_name: { get_param: rtp_msc_image_name }
330           perimeta_flavor_name: { get_param: rtp_msc_flavor_name }
331           perimeta_keypair: { get_param: perimeta_keypair }
332           availability_zone_0: { get_param: availability_zone_0 }
333           availability_zone_1: { get_param: availability_zone_1 }
334           mgmt_net_id: { get_param: mgmt_net_id }
335           mgmt_net_plen: { get_param: mgmt_net_plen }
336           mgmt_net_default_gateway: { get_param: mgmt_net_default_gateway }
337           mgmt_vips: { get_param: rtp_msc_mgmt_vips }
338           mgmt_a_ips: { get_param: rtp_msc_a_mgmt_ips }
339           mgmt_b_ips: { get_param: rtp_msc_b_mgmt_ips }
340           mgmt_sec_groups: { get_param: mgmt_net_sec_groups }
341           ha_net_id: { get_param: int_ha_net_id }
342           ha_network_plen: { get_param: int_ha_net_plen }
343           ha_a_ips: { get_param: rtp_msc_a_int_ha_ips }
344           ha_b_ips: { get_param: rtp_msc_b_int_ha_ips }
345           ha_sec_groups: { get_param: int_ha_net_sec_groups }
346           trusted_net_id: { get_param: trusted_net_id }
347           trusted_vips: { get_param: rtp_msc_trusted_vips }
348           trusted_a_ips: { get_param: rtp_msc_a_trusted_ips }
349           trusted_b_ips: { get_param: rtp_msc_b_trusted_ips }
350           trusted_sec_groups: { get_param: trusted_net_sec_groups }
351           untrusted_net_id: { get_param: untrusted_net_id }
352           untrusted_vips: { get_param: rtp_msc_untrusted_vips }
353           untrusted_v6_vips: { get_param: rtp_msc_untrusted_v6_vips }
354           untrusted_a_ips: { get_param: rtp_msc_a_untrusted_ips }
355           untrusted_a_v6_ips: { get_param: rtp_msc_a_untrusted_v6_ips }
356           untrusted_b_ips: { get_param: rtp_msc_b_untrusted_ips }
357           untrusted_b_v6_ips: { get_param: rtp_msc_b_untrusted_v6_ips }
358           untrusted_sec_groups: { get_param: untrusted_net_sec_groups }
359           untrusted_num_vlans: { get_param: untrusted_num_vlans }
360           untrusted_vlan_ids: { get_param: untrusted_vlan_ids }
361           untrusted_vlan_networks: { get_param: untrusted_vlan_networks }
362           perimeta_param_server_group: { get_param: perimeta_param_server_group }
363           perimeta_config:
364             str_replace:
365               template: {get_file: msc_a_template.json}
366               params:
367                 $NTP_SERVER_IP_ADDRS: { get_param: ntp_server_ip_addrs }
368                 $COMPLETION_PARAMS: ''
369
370
371 outputs:
372
373
374   rtp_msc_server_groups:
375     description: Server groups for RTP MSC pairs
376     value: { get_attr: [ perimeta_rtp_mscs, server_group_used ] }
377
378
379   msw_template_version:
380     description: Version of the heat templates used to instantiate the VMs
381     value: "4.0.1 - 2016-10-28"