1 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
2 .. http://creativecommons.org/licenses/by/4.0
3 .. Copyright 2017 AT&T Intellectual Property. All rights reserved.
9 ONAP Heat Orchestration Templates: Overview
10 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
12 ONAP supports a modular Heat Orchestration Template design pattern,
13 referred to as *VNF Modularity.*
15 ONAP VNF Modularity Overview
16 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
18 With VNF Modularity, a single VNF may be composed from one or more Heat
19 Orchestration Templates, each of which represents a subset of the
20 overall VNF. These component parts are referred to as “\ *VNF
21 Modules*\ ”. During orchestration, these modules are deployed
22 incrementally to create the complete VNF.
24 A modular Heat Orchestration Template can be either one of the following
31 3. Cinder Volume Module
33 :need:`R-37028` - The VNF **MUST** be composed of one "base" module.
40 The VNF **MAY** have zero to many "incremental" modules.
42 :need:`R-20974` - The VNF **MUST** deploy the base module first, prior to
43 the incremental modules.
45 ONAP also supports the concept of an optional, independently deployed
46 Cinder volume via a separate Heat Orchestration Templates, referred to
47 as a Cinder Volume Module. This allows the volume to persist after a
48 Virtual Machine (VM) (i.e., OS::Nova::Server) is deleted, allowing the
49 volume to be reused on another instance (e.g., during a failover
52 :need:`R-11200` - The VNF **MUST** keep the scope of a Cinder volume module,
53 when it exists, to be 1:1 with the VNF Base Module or Incremental Module.
55 :need:`R-38474` - The VNF **MUST** have a corresponding environment file for a
58 :need:`R-81725` - The VNF **MUST** have a corresponding environment file for an
61 :need:`R-53433` - The VNF **MUST** have a corresponding environment file for a
64 These concepts will be described in more detail throughout the document.
65 This overview is provided to set the stage and help clarify the concepts
66 that will be introduced.
69 ^^^^^^^^^^^^^^^^^^^^^^
71 ONAP supports a modular Heat Orchestration Template design pattern,
72 referred to as *VNF Modularity.* With this approach, a single VNF may be
73 composed from one or more Heat Orchestration Templates, each of which
74 represents a subset of the overall VNF. These component parts are
75 referred to as “\ *VNF Modules*\ ”. During orchestration, these modules
76 are deployed incrementally to create the complete VNF.
78 A modular Heat Orchestration Template can be either one of the following
85 3. Cinder Volume Module
87 A VNF must be composed of one “base” module and may be composed of zero
88 to many “incremental” modules. The base module must be deployed first,
89 prior to the incremental modules.
91 ONAP also supports the concept of an optional, independently deployed
92 Cinder volume via a separate Heat Orchestration Templates, referred to
93 as a Cinder Volume Module. This allows the volume to persist after a VM
94 (i.e., OS::Nova::Server) is deleted, allowing the volume to be reused on
95 another instance (e.g., during a failover activity).
97 The scope of a Cinder volume module, when it exists, must be 1:1 with a
98 Base module or Incremental Module.
100 A Base Module must have a corresponding environment file.
102 An Incremental Module must have a corresponding environment file.
104 A Cinder Volume Module must have a corresponding environment file.
106 A VNF module (base, incremental, cinder) may support nested templates.
108 A shared Heat Orchestration Template resource must be defined in the
109 base module. A shared resource is a resource that that will be
110 referenced by another resource that is defined in the Base Module and/or
111 one or more incremental modules.
113 When the shared resource needs to be referenced by a resource in an
114 incremental module, the UUID of the shared resource must be exposed by
115 declaring an ONAP Base Module Output Parameter.
117 Note that a Cinder volume is *not* a shared resource. A volume template
118 must correspond 1:1 with a base module or incremental module.
120 An example of a shared resource is the resource
121 OS::Neutron::SecurityGroup. Security groups are sets of IP filter rules
122 that are applied to a VNF’s networking. The resource OS::Neutron::Port
123 has a property security\_groups which provides the security groups
124 associated with port. The value of parameter(s) associated with this
125 property must be the UUIDs of the resource(s)
126 OS::Neutron::SecurityGroup.
128 *Note:* A Cinder volume is *not* considered a shared resource. A volume
129 template must correspond 1:1 with a base template or add-on module
132 Suggested Patterns for Modular VNFs
133 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
135 There are numerous variations of VNF modularity. Below are two suggested
138 **Option 1: Modules per VNFC type**
140 a. Base module contains only the shared resources.
142 b. Group all VMs (e.g., VNFCs) of a given type (i.e. {vm-type}) into its
143 own incremental module. That is, the VNF has an incremental module
146 c. For a given {vm-type} incremental module, the VNF may have
148 i. One incremental module used for both initial turn up and re-used
149 for scaling. This approach is used when the number of VMs
150 instantiated will be the same for initial deployment and scaling.
152 ii. Two incremental modules, where one is used for initial turn up
153 and one is used for scaling. This approach is used when the
154 number of VMs instantiated will be different for initial
155 deployment and scaling.
157 **Option 2: Base VNF with Incremental Growth Modules**
159 a. Base module contains a complete initial VNF instance
161 b. Incremental modules for incremental scaling units
163 i. May contain VMs of multiple types in logical scaling combinations
165 ii. May be separated by VM type for multi-dimensional scaling
167 With no growth units, Option 2 is equivalent to the “One Heat Template
170 Note that modularization of VNFs is not required. A single Heat
171 Orchestration Template (a base module) may still define a complete VNF,
172 which might be appropriate for smaller VNFs that do not have any scaling
178 There are some rules to follow when building modular VNF templates:
180 1. All VNFs must have one Base VNF Module (template) that must be the
181 first one deployed. The base template:
183 a. Must include all shared resources (e.g., private networks, server
184 groups, security groups)
186 b. Must expose all shared resources (by UUID) as “outputs” in its
187 associated Heat template (i.e., ONAP Base Module Output
190 c. May include initial set of VMs
192 d. May be operational as a stand-alone “minimum” configuration of the
195 2. VNFs may have one or more incremental modules which:
197 a. Defines additional resources that can be added to an existing VNF
199 b. Must be complete Heat templates
201 i. i.e. not snippets to be incorporated into some larger template
203 c. Should define logical growth-units or sub-components of an overall
206 d. On creation, receives appropriate Base Module outputs as
209 i. Provides access to all shared resources (by UUID)
211 ii. must not be dependent on other Add-On VNF Modules
213 e. Multiple instances of an incremental Module may be added to the
214 same VNF (e.g., incrementally grow a VNF by a fixed “add-on”
217 3. Each VNF Module (base or incremental) may have (optional) an
218 associated Cinder Volume Module (see Cinder Volume Templates)
220 a. Volume modules must correspond 1:1 with a base module or
223 b. A Cinder volume may be embedded within the base module or
224 incremental module if persistence is not required
226 4. Shared resource UUIDs are passed between the base module and
227 incremental modules via Heat Outputs Parameters (i.e., Base Module
230 a. The output parameter name in the base must match the parameter
231 name in the add-on module
233 VNF Modularity Examples
234 ^^^^^^^^^^^^^^^^^^^^^^^
236 *Example: Base Module creates SecurityGroup*
238 A VNF has a base module, named base.yaml, that defines a
239 OS::Neutron::SecurityGroup. The security group will be referenced by an
240 OS::Neutron::Port resource in an incremental module, named
241 INCREMENTAL\_MODULE.yaml. The base module defines a parameter in the out
242 section named dns\_sec\_grp\_id. dns\_sec\_grp\_id is defined as a
243 parameter in the incremental module. ONAP captures the UUID value of
244 dns\_sec\_grp\_id from the base module output statement and provides the
245 value to the incremental module.
247 Note that the example below is not a complete Heat Orchestration
248 Template. The {network-role} has been defined as oam to represent an oam
249 network and the {vm-type} has been defined as dns.
260 type: OS::Neutron::SecurityGroup
262 description: vDNS security group
265 template: VNF_NAME_sec_grp_DNS
267 VMF_NAME: {get_param: vnf_name}
274 description: UUID of DNS Resource SecurityGroup
275 value: { get_resource: DNS_SECURITY_GROUP }
278 INCREMENTAL\_MODULE.yaml
285 description: security group UUID
290 type: OS::Neutron::Port
294 template: VNF_NAME_dns_oam_port
296 VNF_NAME: {get_param: vnf_name}
297 network: { get_param: oam_net_name }
298 fixed_ips: [{ "ip_address": { get_param: dns_oam_ip_0 }}]
299 security_groups: [{ get_param: dns_sec_grp_id }]
302 *Examples: Base Module creates an internal network*
304 A VNF has a base module, named base\_module.yaml, that creates an
305 internal network. An incremental module, named incremental\_module.yaml,
306 will create a VM that will connect to the internal network. The base
307 module defines a parameter in the out section named int\_oam\_net\_id.
308 int\_oam\_net\_id is defined as a parameter in the incremental module.
309 ONAP captures the UUID value of int\_oam\_net\_id from the base module
310 output statement and provides the value to the incremental module.
312 Note that the example below is not a complete Heat Orchestration
313 Template. The {network-role} has been defined as oam to represent an oam
314 network and the {vm-type} has been defined as lb for load balancer.
320 heat_template_version: 2013-05-23
324 type: OS::Neutron::Network
330 value: {get_resource: int_oam_network }
337 heat_template_version: 2013-05-23
342 description: ID of shared private network from Base template
345 description: name for the add-on VM instance
349 type: OS::Nova::Server
351 name: {get_param: lb_name_0}
353 - port: { get_resource: lb_port }
357 type: OS::Neutron::Port
359 network_id: { get_param: int_oam_net_id }