Update the clamp url
[integration.git] / docs / docs_scaleout.rst
1 .. _docs_scaleout:
2
3 VF Module Scale Out Use Case
4 ----------------------------
5
6 Source files
7 ~~~~~~~~~~~~
8 - Heat templates directory: https://git.onap.org/demo/tree/heat/vLB_CDS?h=elalto
9
10 Additional files
11 ~~~~~~~~~~~~~~~~
12 - TOSCA model template: https://git.onap.org/integration/tree/docs/files/scaleout/service-Vloadbalancercds-template.yml
13 - Naming policy script: https://git.onap.org/integration/tree/docs/files/scaleout/push_naming_policy.sh
14
15 Description
16 ~~~~~~~~~~~
17 The scale out use case uses a VNF composed of three virtual functions. A traffic generator (vPacketGen), a load balancer (vLB), and a DNS (vDNS). Communication between the vPacketGen and the vLB, and the vLB and the vDNS occurs via two separate private networks. In addition, all virtual functions have an interface to the ONAP OAM private network, as shown in the topology below.
18
19 .. figure:: files/scaleout/topology.png
20    :align: center
21
22 The vPacketGen issues DNS lookup queries that reach the DNS server via the vLB. vDNS replies reach the packet generator via the vLB as well. The vLB reports the average amount of traffic per vDNS instances over a given time interval (e.g. 10 seconds) to the DCAE collector via the ONAP OAM private network.
23
24 To run the use case, make sure that the security group in OpenStack has ingress/egress entries for protocol 47 (GRE). Users can test the VNF by running DNS queries from the vPakcketGen:
25
26 ::
27
28   dig @vLoadBalancer_IP host1.dnsdemo.onap.org
29
30 The output below means that the vLB has been set up correctly, has forwarded the DNS queries to a vDNS instance, and the vPacketGen has received the vDNS reply message.
31
32 ::
33
34     ; <<>> DiG 9.10.3-P4-Ubuntu <<>> @192.168.9.111 host1.dnsdemo.onap.org
35     ; (1 server found)
36     ;; global options: +cmd
37     ;; Got answer:
38     ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 31892
39     ;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 2
40     ;; WARNING: recursion requested but not available
41
42     ;; OPT PSEUDOSECTION:
43     ; EDNS: version: 0, flags:; udp: 4096
44     ;; QUESTION SECTION:
45     ;host1.dnsdemo.onap.org.            IN      A
46
47     ;; ANSWER SECTION:
48     host1.dnsdemo.onap.org.     604800  IN      A       10.0.100.101
49
50     ;; AUTHORITY SECTION:
51     dnsdemo.onap.org.   604800  IN      NS      dnsdemo.onap.org.
52
53     ;; ADDITIONAL SECTION:
54     dnsdemo.onap.org.   604800  IN      A       10.0.100.100
55
56     ;; Query time: 0 msec
57     ;; SERVER: 192.168.9.111#53(192.168.9.111)
58     ;; WHEN: Fri Nov 10 17:39:12 UTC 2017
59     ;; MSG SIZE  rcvd: 97
60
61
62 The Scale Out Use Case
63 ~~~~~~~~~~~~~~~~~~~~~~
64 The Scale Out use case shows how users/network operators can add Virtual Network Function Components (VNFCs) as part of a VF Module that has been instantiated in the Service model, in order to increase capacity of the network. ONAP Frankfurt release supports scale out with manual trigger by directly calling SO APIs and closed-loop-enabled automation from Policy. For Frankfurt, the APPC controller is used to demonstrate post-scaling VNF reconfiguration operations. APPC can handle different VNF types, not only the VNF described in this document.
65
66 The figure below shows all the interactions that take place during scale out operations.
67
68 .. figure:: files/scaleout/scaleout.png
69    :align: center
70
71 There are four different message flows:
72   - Gray: This communication happens internally to the VNF and it is described in the section above.
73   - Green: Scale out with manual trigger.
74   - Red: Closed-loop enabled scale out.
75   - Black: Orchestration and VNF lifecycle management (LCM) operations.
76
77 The numbers in the figure represent the sequence of steps within a given flow. Note that interactions between the components in the picture and AAI, SDNC, and DMaaP are not shown for clarity's sake.
78
79 Scale out with manual trigger (green flow) and closed-loop-enabled scale out (red flow) are mutually exclusive. When the manual trigger is used, VID directly triggers the appropriate workflow in SO (step 1 of the green flow in the figure above). See Section 4 for more details.
80
81 When closed-loop enabled scale out is used, Policy triggers the SO workflow. The closed loop starts with the vLB periodically reporting telemetry about traffic patterns to the VES collector in DCAE (step 1 of the red flow). When the amount of traffic exceeds a given threshold (which the user defines during closed loop creation in CLAMP - see Section 1-4), DCAE notifies Policy (step 2), which in turn triggers the appropriate action. For this use case, the action is contacting SO to augment resource capacity in the network (step 3).
82
83 At high level, once SO receives a call for scale out actions, it first creates a new VF module (step 1 of the black flow), then calls APPC to trigger some LCM actions (step 2). APPC runs VNF health check and configuration scale out as part of LCM actions (step 3). At this time, the VNF health check only reports the health status of the vLB, while the configuration scale out operation adds a new vDNS instance to the vLB internal state. As a result of configuration scale out, the vLB opens a connection towards the new vDNS instance.
84
85 At deeper level, the SO workflow works as depicted below:
86
87 .. figure:: files/scaleout/so-blocks.png
88    :align: center
89
90 SO first contacts APPC to run VNF health check and proceeds on to the next block of the workflow only if the vLB is healthy (not shown in the previous figure for simplicity's sake). Then, SO assigns resources, instantiates, and activates the new VF module. Finally, SO calls APPC again for configuration scale out and VNF health check. The VNF health check at the end of the workflow validates that the vLB health status hasn't been negatively affected by the scale out operation.
91
92 PART 1 - Service Definition and Onboarding
93 ------------------------------------------
94 This use-case requires operations on several ONAP components to perform service definition and onboarding.
95
96
97 1-1 VNF Configuration Modeling and Upload with CDS
98 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
99 Since Dublin, the scale out use case integrates with the Controller Design Studio (CDS) ONAP component to automate the generation of cloud configuration at VNF instantiation time. The user interested in running the use case only with manual preload can skip this section and start from Section 1-2. The description of the use case with manual preload is provided in Section5.
100
101 Users can model this configuration at VNF design time and onboard the blueprint to CDS via the CDS GUI. The blueprint includes naming policies and network configuration details (e.g. IP address families, network names, etc.) that CDS will use during VNF instantiation to generate resource names and assign network configuration to VMs through the cloud orchestrator.
102
103 Please look at the CDS documentation for details about how to create configuration models, blueprints, and use the CDS tool: https://wiki.onap.org/display/DW/Modeling+Concepts. For running the use case, users can use the standard model package that CDS provides out of the box, which can be found here: https://wiki.onap.org/pages/viewpage.action?pageId=64007442
104
105
106 1-2 VNF Onboarding and Service Creation with SDC
107 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
108 Once the configuration blueprint is uploaded to CDS, users can define and onboard a service using SDC. SDC requires users to onboard a VNF descriptor that contains the definition of all the resources (private networks, compute nodes, keys, etc.) with their parameters that compose a VNF. The VNF used to demonstrate the scale out use case supports Heat templates as VNF descriptor, and hence requires OpenStack as cloud layer. Users can use the Heat templates linked at the top of the page to create a zip file that can be uploaded to SDC during service creation. To create a zip file, the user must be in the same folder that contains the Heat templates and the Manifest file that describes the content of the package. To create a zip file from command line, type:
109 ::
110
111     zip ../vLB.zip *
112
113 For a complete description of service design and creation, please refer to the SDC documentation.
114
115 During the creation of the service in SDC, there are a few extra steps that need to be executed to make the VNF ready for scale out. These require users to login to the SDC Portal as service designer user (username: cs0008, password: demo123456!).
116
117 After importing the Vendor Software Package (VSP), as described in the SDC wiki page, users need to set property values in the Property Assignment window, as shown below:
118
119 .. figure:: files/scaleout/9.png
120    :align: center
121
122 These properties include parameters in the Heat template (which will be overridden by CDS and then don't need to be changed) and other parameters that describe the VNF type or are used to link the service to the configuration in the CDS package.
123
124 Users can search for parameter names starting with "nf" to assign values that describe the VNF type, such as nf_type, nf_function, and nf_role. Users are free to choose the values they like. Users should also set "skip_post_instantiation" to "TRUE", as for Dublin CDS is not used for post-instantiation configuration.
125
126 .. figure:: files/scaleout/10.png
127    :align: center
128
129 For CDS parameters, users can search for names starting with "sdnc". These parameters have to match the configuration blueprint in CDS. To use the standard blueprint shipped with CDS, please set the parameters as below. For further details, please refer to the CDS documentation.
130
131 .. figure:: files/scaleout/11.png
132    :align: center
133
134
135 After importing the VSP, users need to onboard the DCAE blueprint used to design closed loops in CLAMP. This step is only required for users that want to run closed loop; users interested in manual scale out only can skip the remainder of the section. Note that since Frankfurt users are not required to upload a Policy model from SDC, as Policy models are now managed by the Policy Engine.
136
137 To upload a DCAE blueprint, from the "Composition" tab in the service menu, select the artifact icon on the right, as shown below:
138
139 .. figure:: files/scaleout/1.png
140    :align: center
141
142 Upload the DCAE blueprint linked at the top of the page using the pop-up window.
143
144 .. figure:: files/scaleout/2.png
145    :align: center
146
147 The blueprint will appear in the artifacts section on the right.
148
149 .. figure:: files/scaleout/3.png
150    :align: center
151
152 Finally, users need to provide the maximum number of VNF instances that ONAP is allowed to create as part of the scale out use case by setting up deployment properties.
153
154 .. figure:: files/scaleout/7.png
155    :align: center
156
157 This VNF only supports scaling the vDNS, so users should select the vDNS module from the right panel and then click the "max_vf_module_instance" link. The maximum number of VNF instances to scale can be set to an arbitrary number higher than zero.
158
159 .. figure:: files/scaleout/8.png
160    :align: center
161
162 At this point, users can complete the service creation in SDC by testing, accepting, and distributing the Service Models as described in the SDC user manual.
163
164
165
166 1-3 Deploy Naming Policy
167 ~~~~~~~~~~~~~~~~~~~~~~~~
168 This step is only required if CDS is used.
169
170 In order to instantiate the VNF using CDS features, users need to deploy the naming policy that CDS uses for resource name generation to the Policy Engine. User can copy and run the script at the top of the page from any ONAP pod, for example Robot or Drools. The script uses the Policy endpoint defined in the Kubernetes domain, so the execution has to be triggered from some pod in the Kubernetes space.
171
172 ::
173
174     kubectl exec -it dev-policy-drools-0
175     ./push_naming_policy.sh
176
177
178 1-4 Closed Loop Design with CLAMP
179 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
180 This step is only required if closed loop is used.
181
182 Once the service model is distributed, users can design the closed loop from CLAMP, using the GUI at https://clamp.api.simpledemo.onap.org:30258
183
184 Use the "Loop Instance" link to create a closed loop using a distributed model.
185
186 .. figure:: files/scaleout/clamp/1.png
187    :align: center
188
189 Select the distributed service model.
190
191 .. figure:: files/scaleout/clamp/2.png
192    :align: center
193
194 The closed loop main page for TCA microservices is shown below.
195
196 .. figure:: files/scaleout/clamp/3.png
197    :align: center
198
199 Click on the TCA box to create a configuration policy. From the pop-up window, users need to click "Add" to create a new policy and fill it in with specific information, as shown below.
200
201 .. figure:: files/scaleout/clamp/4.png
202    :align: center
203
204 For this use case, the control loop schema type is "VM", while the event name has to match the event name reported in the VNF telemetry, which is "vLoadBalancer".
205
206 Once the policy item has been created, users can define a threshold that will be used at runtime to evaluate telemetry reported by the vLB. When the specified threshold is crossed, DCAE generates an ONSET event that will tell Policy Engine which closed loop to activate.
207
208 .. figure:: files/scaleout/clamp/5.png
209    :align: center
210
211 Since Frankfurt, users are required to define the PDP group for the configuration policy, as shown in the figure below.
212
213 .. figure:: files/scaleout/clamp/6.png
214    :align: center
215
216 After the configuration policy is created, users need to create the operational policy, which the Policy Engine uses to determine which actions and parameters should be used during closed loop. From the "Loop Instance" tab, users can select "Modify" to add a new Policy Model of type Drools:
217
218 .. figure:: files/scaleout/clamp/7.png
219    :align: center
220
221 Users are required to provide basic closed loop information, like ID, timeout, and trigger, as shown in the example below. The trigger name, in particular, must match the name of the root operational policy created during the next step.
222
223 .. figure:: files/scaleout/clamp/8.png
224    :align: center
225
226 To create a new operational policy, users can use the "Add" button below, and fill up the fields in the CLAMP GUI as shown in the example below, making sure that the "id" matches the "trigger" field defined before:
227
228 .. figure:: files/scaleout/clamp/9.png
229    :align: center
230
231 During creation of the operational policy, the user should select "VF Module Create" recipe and "SO" actor. The payload section is a JSON object like below:
232
233 ::
234
235     {"requestParameters":"{\"usePreload\":true,\"userParams\":[]}",
236    "configurationParameters":"[{\"ip-addr\":\"$.vf-module-topology.vf-module-parameters.param[16]\",\"oam-ip-addr\":\"$.vf-module-topology.vf-module-parameters.param[30]\"}]"}
237
238 Users can use the "Edit JSON" button to upload the payload.
239
240 .. figure:: files/scaleout/clamp/10.png
241    :align: center
242
243 The Policy Engine passes the payload to SO, which will then use it during VF module instantiation to resolve configuration parameters. The JSON path
244
245 ::
246
247     "ip-addr":"$.vf-module-topology.vf-module-parameters.param[16].value"
248
249 indicates that resolution for parameter "ip-addr" is available at "$.vf-module-topology.vf-module-parameters.param[16].value" in the JSON object linked by the VF module self-link in AAI. See section 1-7 for an example of how to determine the right path to configuration parameters.
250
251 The "targetType" tab allows users to select the target type for the closed loop. For this use case, the user should select VF module as target type, as we are scaling a VF module. Please select the vDNS module as target resource ID.
252
253 .. figure:: files/scaleout/clamp/11.png
254    :align: center
255
256 As with configuration policy, users need to assign the PDP group to the operational policy.
257
258 .. figure:: files/scaleout/clamp/12.png
259    :align: center
260
261 For what regards guard policies, either "Frequency Limiter", or "MinMax", or both can be used for the scale out use case. They can be added using the "Modify" item in the "Loop Instance" tab.
262
263 .. figure:: files/scaleout/clamp/13.png
264    :align: center
265
266 The example below shows the definition of a "Frequency Limiter" guard policy. Note that some optional fields, such as id and time interval, should be added to the policy using the "Object Properties" button:
267
268 .. figure:: files/scaleout/clamp/14.png
269    :align: center
270
271 The user needs to manually insert id, actor, and operation so as to match the same fields defined in the operational policy.
272
273 .. figure:: files/scaleout/clamp/15.png
274    :align: center
275
276 Once the operational policy design is completed, users can submit and then deploy the closed loop clicking the "Submit" and "Deploy" buttons from the "Loop Operations" tab, as shown below.
277
278 .. figure:: files/scaleout/clamp/16.png
279    :align: center
280
281 At this point, the closed loop is deployed to Policy Engine and DCAE, and a new microservice will be deployed to the DCAE platform.
282
283
284 1-5 Creating a VNF Template with CDT
285 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
286 Before running scale out use case, the users need to create a VNF template using the Controller Design Tool (CDT), a design-time tool that allows users to create and on-board VNF templates into APPC. The template describes which control operation can be executed against the VNF (e.g. scale out, health check, modify configuration, etc.), the protocols that the VNF supports, port numbers, VNF APIs, and credentials for authentication. Being VNF agnostic, APPC uses these templates to "learn" about specific VNFs and the supported operations.
287 CDT requires two input:
288
289 1) the list of parameters that APPC will receive (ip-addr, oam-ip-addr, enabled in the example above);
290
291 2) the VNF API that APPC will use to reconfigure the VNF.
292
293 Below is an example of the parameters file (yaml format), which we call parameters.yaml:
294 ::
295
296     version: V1
297     vnf-parameter-list:
298     - name: ip-addr
299       type: null
300       description: null
301       required: "true"
302       default: null
303       source: Manual
304       rule-type: null
305       request-keys: null
306       response-keys: null
307     - name: oam-ip-addr
308       type: null
309       description: null
310       required: "true"
311       default: null
312       source: Manual
313       rule-type: null
314       request-keys: null
315       response-keys: null
316     - name: enabled
317       type: null
318       description: null
319       required: "false"
320       default: null
321       source: Manual
322       rule-type: null
323       request-keys: null
324       response-keys: null
325
326 Here is an example of API for the vLB VNF used for this use case. We name the file after the vnf-type contained in SDNC (i.e. Vloadbalancerms..vdns..module-3):
327 ::
328
329     <vlb-business-vnf-onap-plugin xmlns="urn:opendaylight:params:xml:ns:yang:vlb-business-vnf-onap-plugin">
330         <vdns-instances>
331             <vdns-instance>
332                 <ip-addr>${ip-addr}</ip-addr>
333                 <oam-ip-addr>${oam-ip-addr}</oam-ip-addr>
334                 <enabled>true</enabled>
335             </vdns-instance>
336         </vdns-instances>
337     </vlb-business-vnf-onap-plugin>
338
339 To create the VNF template in CDT, the following steps are required:
340
341 - Connect to the CDT GUI: http://ANY_K8S_IP:30289
342 - Click "My VNF" Tab. Create your user ID, if necessary
343 - Click "Create new VNF" entering the VNF type as reported in VID or AAI, e.g. vLoadBalancerMS/vLoadBalancerMS 0
344 - Select "ConfigScaleOut" action
345 - Create a new template identifier using the VNF type name in service model as template name, e.g. Vloadbalancerms..vdns..module-3
346 - Select protocol (Netconf-XML), VNF username (admin), and VNF port number (2831 for NETCONF)
347 - Click "Parameter Definition" Tab and upload the parameters (.yaml) file
348 - Click "Template Tab" and upload API template (.yaml) file
349 - Click "Reference Data" Tab
350 - Click "Save All to APPC"
351
352 For health check operation, we just need to specify the protocol, the port number and username of the VNF (REST, 8183, and "admin" respectively, in the case of vLB/vDNS) and the API. For the vLB/vDNS, the API is:
353 ::
354
355   restconf/operational/health-vnf-onap-plugin:health-vnf-onap-plugin-state/health-check
356
357 Note that we don't need to create a VNF template for health check, so the "Template" flag can be set to "N". Again, the user has to click "Save All to APPC" to update the APPC database.
358 At this time, CDT doesn't allow users to provide VNF password from the GUI. To update the VNF password we need to log into the APPC Maria DB container and change the password manually:
359 ::
360
361   mysql -u sdnctl -p (type "gamma" when password is prompted)
362   use sdnctl;
363   UPDATE DEVICE_AUTHENTICATION SET PASSWORD='admin' WHERE
364   VNF_TYPE='vLoadBalancerMS/vLoadBalancerMS 0'; (use your VNF type)
365
366
367 1-6 Setting the Controller Type in SO Database
368 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
369 Users need to specify which controller to use for the scale out use case. For Dublin, the supported controller is APPC. Users need to create an association between the controller and the VNF type in the SO database.
370
371 To do so:
372
373 - Connect to one of the replicas of the MariaDB database
374 - Type
375
376 ::
377
378     mysql -ucataloguser -pcatalog123
379
380 - Use catalogdb databalse
381
382 ::
383
384     use catalogdb;
385
386 - Create an association between APPC and the VNF type, for example:
387
388 ::
389
390     INSERT INTO controller_selection_reference (`VNF_TYPE`, `CONTROLLER_NAME`, `ACTION_CATEGORY`) VALUES ('<VNF Type>', 'APPC', 'ConfigScaleOut');
391     INSERT INTO controller_selection_reference (`VNF_TYPE`, `CONTROLLER_NAME`, `ACTION_CATEGORY`) VALUES ('<VNF Type>', 'APPC', 'HealthCheck');
392
393 SO has a default entry for VNF type "vLoadBalancerMS/vLoadBalancerMS 0"
394
395
396 1-7 Determining VNF reconfiguration parameters
397 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
398 The post scale out VNF reconfiguration is VNF-independent but the parameters used for VNF reconfiguration depend on the specific use case. For example, the vLB-vDNS-vPacketGenerator VNF described in this documentation use the vLB as "anchor" point. The vLB maintains the state of the VNF, which, for this use case is the list of active vDNS instances. After creating a new vDNS instance, the vLB needs to know the IP addresses (of the internal private network and management network) of the new vDNS. The reconfiguration action is executed by APPC, which receives those IP addresses from SO during the scale out workflow execution. Note that different VNFs may have different reconfiguration actions. A parameter resolution is expressed as JSON path to the SDNC VF module topology parameter array. For each reconfiguration parameter, the user has to specify the array location that contains the corresponding value (IP address in the specific case). For example, the "configurationParameters" section of the input request to SO during scale out with manual trigger (see Section 4) contains the resolution path to "ip-addr" and "oam-ip-addr" parameters used by the VNF.
399
400 ::
401
402     "configurationParameters": [
403             {
404                 "ip-addr": "$.vf-module-topology.vf-module-parameters.param[16].value",
405                 "oam-ip-addr": "$.vf-module-topology.vf-module-parameters.param[30].value"
406             }
407     ]
408
409 The same resolution path needs to be provided for the closed-loop enabled use case during the closed loop design phase in CLAMP (see Section 1-4). The reconfiguration parameters and their resolution path will be pushed to the Policy Engine during closed loop deployment. Policy will eventually push them to SO during closed loop execution.
410
411 Users can determine the correct location by querying the SDNC topology object. The URL can be obtained from AAI following these steps:
412
413 1) Retrieve the list of VNF instances in AAI using the following link:
414
415 ::
416
417     curl -k -X GET \
418   https://<Any_K8S_Node_IP_Address>:30233/aai/v16/network/generic-vnfs \
419   -H 'Accept: application/json' \
420   -H 'Authorization: Basic QUFJOkFBSQ==' \
421   -H 'Content-Type: application/json' \
422   -H 'X-FromAppId: AAI' \
423   -H 'X-TransactionId: get_aai_subscr'
424
425 2) From the returned JSON object, search for the generic VNF object related to the VNF of interest (for example by using the VNF name defined during VNF instantiation). Then, select the "vnf-id" value to build a request to AAI to list all the VF modules of that VNF:
426
427 ::
428
429     curl -k -X GET \
430   https://<Any_K8S_Node_IP_Address>:30233/aai/v16/network/generic-vnfs/generic-vnf/0e905228-c719-489a-9bcc-4470f3254e87/vf-modules \
431   -H 'Accept: application/json' \
432   -H 'Authorization: Basic QUFJOkFBSQ==' \
433   -H 'Content-Type: application/json' \
434   -H 'X-FromAppId: AAI' \
435   -H 'X-TransactionId: get_aai_subscr'
436
437 3) From the returned list of VF modules, select the "selflink" URL of the VF module type that is target of the scaling action. This object refers to an existing instance of that VF module type, which could have been created either as part of regular VNF instantiation process or scaling action. The selflink points to the topology of that VF module instance in SDNC. A new instance of this VF module type will have a topology of the same form, just different parameter values. As such, the existing topology pointed by the selflink in AAI can be used to determine the resolution path to configuration parameters for future instantiation of that VF module type.
438
439 The selflink has the following structure:
440
441 ::
442
443     restconf/config/GENERIC-RESOURCE-API:services/service/4545562a-cbe3-409a-8227-0b863f5bc34e/service-data/vnfs/vnf/0e905228-c719-489a-9bcc-4470f3254e87/vnf-data/vf-modules/vf-module/793df714-106e-40a6-a28a-746b65f9e247/vf-module-data/vf-module-topology/
444
445 The complete URL to access the VF module topology in SDNC becomes:
446
447 ::
448
449     http://<Any_K8S_Node_IP_Address>:30202/restconf/config/GENERIC-RESOURCE-API:services/service/4545562a-cbe3-409a-8227-0b863f5bc34e/service-data/vnfs/vnf/0e905228-c719-489a-9bcc-4470f3254e87/vnf-data/vf-modules/vf-module/793df714-106e-40a6-a28a-746b65f9e247/vf-module-data/vf-module-topology/
450
451 See below an example of VF module topology. It can be stored in SDNC either using CDS (see Section 2) or manual preload (see Section 5).
452
453 ::
454
455     {
456     "vf-module-topology": {
457         "onap-model-information": {
458             "model-name": "VlbCds..vdns..module-3",
459             "model-invariant-uuid": "b985f371-4c59-45f7-b53e-36f970946469",
460             "model-version": "1",
461             "model-customization-uuid": "613b6877-0231-4ca4-90e4-4aa3374674ef",
462             "model-uuid": "739e4a32-f744-47be-9208-5dcf15772306"
463         },
464         "vf-module-parameters": {
465             "param": [
466                 {
467                     "name": "vfc_customization_uuid",
468                     "value": "770af15f-564d-438c-ba3e-6df318c2b1fe",
469                     "resource-resolution-data": {
470                         "capability-name": "RA Resolved",
471                         "status": "SUCCESS"
472                     }
473                 },
474                 {
475                     "name": "key_name",
476                     "value": "${key_name}",
477                     "resource-resolution-data": {
478                         "capability-name": "RA Resolved",
479                         "status": "SUCCESS"
480                     }
481                 },
482                 {
483                     "name": "vdns_flavor_name",
484                     "value": "m1.medium",
485                     "resource-resolution-data": {
486                         "capability-name": "RA Resolved",
487                         "status": "SUCCESS"
488                     }
489                 },
490                 {
491                     "name": "cloud_env",
492                     "value": "openstack",
493                     "resource-resolution-data": {
494                         "capability-name": "RA Resolved",
495                         "status": "SUCCESS"
496                     }
497                 },
498                 {
499                     "name": "vnfc-model-customization-uuid",
500                     "value": "770af15f-564d-438c-ba3e-6df318c2b1fe",
501                     "resource-resolution-data": {
502                         "capability-name": "RA Resolved",
503                         "status": "SUCCESS"
504                     }
505                 },
506                 {
507                     "name": "vf-module-name",
508                     "value": "RegionOne_ONAP-NF_20191010T013003141Z_vdns_Expansion_003",
509                     "resource-resolution-data": {
510                         "capability-name": "generate-name",
511                         "resource-key": [
512                             {
513                                 "name": "VF_MODULE_LABEL",
514                                 "value": "vdns"
515                             },
516                             {
517                                 "name": "resource-name",
518                                 "value": "vf-module-name"
519                             },
520                             {
521                                 "name": "resource-value",
522                                 "value": "${vf-module-name}"
523                             },
524                             {
525                                 "name": "naming-type",
526                                 "value": "VF-MODULE"
527                             },
528                             {
529                                 "name": "VNF_NAME",
530                                 "value": "RegionOne_ONAP-NF_20191010T013003141Z"
531                             },
532                             {
533                                 "name": "external-key",
534                                 "value": "793df714-106e-40a6-a28a-746b65f9e247_vf-module-name"
535                             },
536                             {
537                                 "name": "policy-instance-name",
538                                 "value": "SDNC_Policy.Config_MS_ONAP_VNF_NAMING_TIMESTAMP"
539                             },
540                             {
541                                 "name": "VF_MODULE_TYPE",
542                                 "value": "Expansion"
543                             }
544                         ],
545                         "status": "SUCCESS"
546                     }
547                 },
548                 {
549                     "name": "vnfc-model-version",
550                     "value": "1.0",
551                     "resource-resolution-data": {
552                         "capability-name": "RA Resolved",
553                         "status": "SUCCESS"
554                     }
555                 },
556                 {
557                     "name": "pktgen_private_net_cidr",
558                     "value": "${pktgen_private_net_cidr}",
559                     "resource-resolution-data": {
560                         "capability-name": "RA Resolved",
561                         "status": "SUCCESS"
562                     }
563                 },
564                 {
565                     "name": "vnf_model_customization_uuid",
566                     "value": "c7be2fca-9a5c-4364-8c32-801e64f90ccd",
567                     "resource-resolution-data": {
568                         "capability-name": "RA Resolved",
569                         "status": "SUCCESS"
570                     }
571                 },
572                 {
573                     "name": "service-instance-id",
574                     "value": "4545562a-cbe3-409a-8227-0b863f5bc34e",
575                     "resource-resolution-data": {
576                         "capability-name": "RA Resolved",
577                         "status": "SUCCESS"
578                     }
579                 },
580                 {
581                     "name": "vlb_private_net_cidr",
582                     "value": "192.168.10.0/24",
583                     "resource-resolution-data": {
584                         "capability-name": "RA Resolved",
585                         "status": "SUCCESS"
586                     }
587                 },
588                 {
589                     "name": "install_script_version",
590                     "value": "1.5.0-SNAPSHOT",
591                     "resource-resolution-data": {
592                         "capability-name": "RA Resolved",
593                         "status": "SUCCESS"
594                     }
595                 },
596                 {
597                     "name": "vlb_int_private_ip_0",
598                     "value": "192.168.10.50",
599                     "resource-resolution-data": {
600                         "capability-name": "RA Resolved",
601                         "status": "SUCCESS"
602                     }
603                 },
604                 {
605                     "name": "vnfc-model-invariant-uuid",
606                     "value": "49e70b6f-87e7-4f68-b1ec-958e68c7cbf5",
607                     "resource-resolution-data": {
608                         "capability-name": "RA Resolved",
609                         "status": "SUCCESS"
610                     }
611                 },
612                 {
613                     "name": "pub_key",
614                     "value": "${pub_key}",
615                     "resource-resolution-data": {
616                         "capability-name": "RA Resolved",
617                         "status": "SUCCESS"
618                     }
619                 },
620                 {
621                     "name": "onap_private_net_cidr",
622                     "value": "10.0.0.0/8",
623                     "resource-resolution-data": {
624                         "capability-name": "RA Resolved",
625                         "status": "SUCCESS"
626                     }
627                 },
628                 {
629                     "name": "vdns_int_private_ip_0",
630                     "value": "192.168.10.54",
631                     "resource-resolution-data": {
632                         "capability-name": "netbox-ip-assign",
633                         "resource-key": [
634                             {
635                                 "name": "external_key",
636                                 "value": "0e905228-c719-489a-9bcc-4470f3254e87-vdns_int_private_ip_0"
637                             },
638                             {
639                                 "name": "vnf-id",
640                                 "value": "0e905228-c719-489a-9bcc-4470f3254e87"
641                             },
642                             {
643                                 "name": "service-instance-id",
644                                 "value": "4545562a-cbe3-409a-8227-0b863f5bc34e"
645                             },
646                             {
647                                 "name": "prefix-id",
648                                 "value": "2"
649                             }
650                         ],
651                         "status": "SUCCESS"
652                     }
653                 },
654                 {
655                     "name": "vnf_id",
656                     "value": "0e905228-c719-489a-9bcc-4470f3254e87",
657                     "resource-resolution-data": {
658                         "capability-name": "RA Resolved",
659                         "status": "SUCCESS"
660                     }
661                 },
662                 {
663                     "name": "nfc-naming-code",
664                     "value": "vdns",
665                     "resource-resolution-data": {
666                         "capability-name": "RA Resolved",
667                         "status": "SUCCESS"
668                     }
669                 },
670                 {
671                     "name": "onap_private_subnet_id",
672                     "value": "oam_network_qXyY",
673                     "resource-resolution-data": {
674                         "capability-name": "RA Resolved",
675                         "status": "SUCCESS"
676                     }
677                 },
678                 {
679                     "name": "vf_module_customization_uuid",
680                     "value": "613b6877-0231-4ca4-90e4-4aa3374674ef",
681                     "resource-resolution-data": {
682                         "capability-name": "RA Resolved",
683                         "status": "SUCCESS"
684                     }
685                 },
686                 {
687                     "name": "vf_module_type",
688                     "value": "Expansion",
689                     "resource-resolution-data": {
690                         "capability-name": "RA Resolved",
691                         "status": "SUCCESS"
692                     }
693                 },
694                 {
695                     "name": "vlb_onap_private_ip_0",
696                     "value": "10.0.101.32",
697                     "resource-resolution-data": {
698                         "capability-name": "RA Resolved",
699                         "status": "SUCCESS"
700                     }
701                 },
702                 {
703                     "name": "vf_module_id",
704                     "value": "793df714-106e-40a6-a28a-746b65f9e247",
705                     "resource-resolution-data": {
706                         "capability-name": "RA Resolved",
707                         "status": "SUCCESS"
708                     }
709                 },
710                 {
711                     "name": "vdns_name_0",
712                     "value": "RegionOne_ONAP-NF_20191010T013003141Z_vdns_003",
713                     "resource-resolution-data": {
714                         "capability-name": "generate-name",
715                         "resource-key": [
716                             {
717                                 "name": "resource-name",
718                                 "value": "vdns_name_0"
719                             },
720                             {
721                                 "name": "resource-value",
722                                 "value": "${vdns_name_0}"
723                             },
724                             {
725                                 "name": "naming-type",
726                                 "value": "VNFC"
727                             },
728                             {
729                                 "name": "VNF_NAME",
730                                 "value": "RegionOne_ONAP-NF_20191010T013003141Z"
731                             },
732                             {
733                                 "name": "external-key",
734                                 "value": "793df714-106e-40a6-a28a-746b65f9e247_vdns_name_0"
735                             },
736                             {
737                                 "name": "policy-instance-name",
738                                 "value": "SDNC_Policy.Config_MS_ONAP_VNF_NAMING_TIMESTAMP"
739                             },
740                             {
741                                 "name": "NFC_NAMING_CODE",
742                                 "value": "vdns"
743                             }
744                         ],
745                         "status": "SUCCESS"
746                     }
747                 },
748                 {
749                     "name": "vm-type",
750                     "value": "vdns",
751                     "resource-resolution-data": {
752                         "capability-name": "RA Resolved",
753                         "status": "SUCCESS"
754                     }
755                 },
756                 {
757                     "name": "vlb_int_pktgen_private_ip_0",
758                     "value": "192.168.20.35",
759                     "resource-resolution-data": {
760                         "capability-name": "RA Resolved",
761                         "status": "SUCCESS"
762                     }
763                 },
764                 {
765                     "name": "onap_private_net_id",
766                     "value": "oam_network_qXyY",
767                     "resource-resolution-data": {
768                         "capability-name": "RA Resolved",
769                         "status": "SUCCESS"
770                     }
771                 },
772                 {
773                     "name": "nb_api_version",
774                     "value": "1.2.0",
775                     "resource-resolution-data": {
776                         "capability-name": "RA Resolved",
777                         "status": "SUCCESS"
778                     }
779                 },
780                 {
781                     "name": "vdns_image_name",
782                     "value": "${image_name}",
783                     "resource-resolution-data": {
784                         "capability-name": "RA Resolved",
785                         "status": "SUCCESS"
786                     }
787                 },
788                 {
789                     "name": "vdns_onap_private_ip_0",
790                     "value": "10.0.101.35",
791                     "resource-resolution-data": {
792                         "capability-name": "netbox-ip-assign",
793                         "resource-key": [
794                             {
795                                 "name": "external_key",
796                                 "value": "0e905228-c719-489a-9bcc-4470f3254e87-vdns_onap_private_ip_0"
797                             },
798                             {
799                                 "name": "vnf-id",
800                                 "value": "0e905228-c719-489a-9bcc-4470f3254e87"
801                             },
802                             {
803                                 "name": "service-instance-id",
804                                 "value": "4545562a-cbe3-409a-8227-0b863f5bc34e"
805                             },
806                             {
807                                 "name": "prefix-id",
808                                 "value": "3"
809                             }
810                         ],
811                         "status": "SUCCESS"
812                     }
813                 },
814                 {
815                     "name": "aai-vf-module-put",
816                     "value": "SUCCESS",
817                     "resource-resolution-data": {
818                         "capability-name": "aai-vf-module-put",
819                         "resource-key": [
820                             {
821                                 "name": "vf-module",
822                                 "value": "vf-module"
823                             }
824                         ],
825                         "status": "SUCCESS"
826                     }
827                 },
828                 {
829                     "name": "aic-cloud-region",
830                     "value": "${aic-cloud-region}",
831                     "resource-resolution-data": {
832                         "capability-name": "RA Resolved",
833                         "status": "SUCCESS"
834                     }
835                 },
836                 {
837                     "name": "nfc-function",
838                     "value": "${nf-role}",
839                     "resource-resolution-data": {
840                         "capability-name": "RA Resolved",
841                         "status": "SUCCESS"
842                     }
843                 },
844                 {
845                     "name": "sec_group",
846                     "value": "onap_sg_qXyY",
847                     "resource-resolution-data": {
848                         "capability-name": "RA Resolved",
849                         "status": "SUCCESS"
850                     }
851                 },
852                 {
853                     "name": "vnf_name",
854                     "value": "RegionOne_ONAP-NF_20191010T013003141Z",
855                     "resource-resolution-data": {
856                         "capability-name": "RA Resolved",
857                         "status": "SUCCESS"
858                     }
859                 },
860                 {
861                     "name": "nexus_artifact_repo",
862                     "value": "https://nexus.onap.org",
863                     "resource-resolution-data": {
864                         "capability-name": "RA Resolved",
865                         "status": "SUCCESS"
866                     }
867                 },
868                 {
869                     "name": "public_net_id",
870                     "value": "external",
871                     "resource-resolution-data": {
872                         "capability-name": "RA Resolved",
873                         "status": "SUCCESS"
874                     }
875                 }
876             ]
877         },
878         "tenant": "41d6d38489bd40b09ea8a6b6b852dcbd",
879         "sdnc-generated-cloud-resources": true,
880         "vf-module-topology-identifier": {
881             "vf-module-id": "793df714-106e-40a6-a28a-746b65f9e247",
882             "vf-module-name": "vfModuleName",
883             "vf-module-type": "VlbCds..vdns..module-3"
884         },
885         "aic-cloud-region": "RegionOne"
886     }}
887
888 Search for the reconfiguration parameters in the vf-module-topology.vf-module-parameters.param array. The user should count (starting from 0, as in most programming languages) the number of array elements to determine the exact location of the parameters of interest. For the VNF described in this documentation, the parameters of interest are "vdns_int_private_ip_0" and "vdns_onap_private_ip_0", which correspond to "ip-addr" and "onap-ip-addr" in the scale out request, respectively. As the user can see by counting the number of array locations (starting from 0), "vdns_int_private_ip_0" and "vdns_onap_private_ip_0" are stored at locations 16 and 30, respectively. As such, the complete resolution path to reconfiguration parameters for the VNF described in this documentation is:
889
890 ::
891
892     [{"ip-addr":"$.vf-module-topology.vf-module-parameters.param[16].value","oam-ip-addr":"$.vf-module-topology.vf-module-parameters.param[30].value"}]
893
894 In future releases, we plan to leverage CDS to model post scaling VNF reconfiguration, so as to remove the dependency from JSON paths and simplify the overall process.
895
896
897 PART 2 - Scale Out Use Case Instantiation
898 -----------------------------------------
899 This step is only required if CDS is used.
900
901 GET information from SDC catalogdb
902
903 ::
904
905   curl -X GET \
906     'https://{{k8s}}:30204/sdc/v1/catalog/services' \
907     -H 'Authorization: Basic dmlkOktwOGJKNFNYc3pNMFdYbGhhazNlSGxjc2UyZ0F3ODR2YW9HR21KdlV5MlU=' \
908     -H 'X-ECOMP-InstanceID: VID' \
909     -H 'cache-control: no-cache'
910
911
912 In the response you should find values for:
913
914 * service-uuid
915 * service-invariantUUID
916 * service-name
917
918
919 GET informations from SO catalogdb.
920
921 ::
922
923   curl -X GET \
924     'http://{{k8s}}:30744/ecomp/mso/catalog/v2/serviceVnfs?serviceModelName={{service-name}}' \
925     -H 'Authorization: Basic YnBlbDpwYXNzd29yZDEk' \
926     -H 'cache-control: no-cache'
927
928
929 In the response you should find values for:
930
931 * vnf-modelinfo-modelname
932 * vnf-modelinfo-modeluuid
933 * vnf-modelinfo-modelinvariantuuid
934 * vnf-modelinfo-modelcustomizationuuid
935 * vnf-modelinfo-modelinstancename
936 * vnf-vfmodule-0-modelinfo-modelname
937 * vnf-vfmodule-0-modelinfo-modeluuid
938 * vnf-vfmodule-0-modelinfo-modelinvariantuuid
939 * vnf-vfmodule-0-modelinfo-modelcustomizationuuid
940 * vnf-vfmodule-1-modelinfo-modelname
941 * vnf-vfmodule-1-modelinfo-modeluuid
942 * vnf-vfmodule-1-modelinfo-modelinvariantuuid
943 * vnf-vfmodule-1-modelinfo-modelcustomizationuuid
944 * vnf-vfmodule-2-modelinfo-modelname
945 * vnf-vfmodule-2-modelinfo-modeluuid
946 * vnf-vfmodule-2-modelinfo-modelinvariantuuid
947 * vnf-vfmodule-2-modelinfo-modelcustomizationuuid
948 * vnf-vfmodule-3-modelinfo-modelname
949 * vnf-vfmodule-3-modelinfo-modeluuid
950 * vnf-vfmodule-3-modelinfo-modelinvariantuuid
951 * vnf-vfmodule-3-modelinfo-modelcustomizationuuid
952
953
954 Note : all those informations are also available in the TOSCA service template in the SDC
955
956 You need after:
957
958 * the SSH public key value that will allow you to connect to the VM.
959 * the cloudSite name and TenantId where to deploy the service
960 * the name of the security group that will be used in the tenant for your service
961 * the name of the network that will be used to connect your VM
962 * the name of your OpenStack image
963 * the name of your OpenStack VM flavor
964
965 We supposed here that we are using some already declared informations:
966
967 * customer named "Demonstration"
968 * subscriptionServiceType named "vLB"
969 * projectName named "Project-Demonstration"
970 * owningEntityName named "OE-Demonstration"
971 * platformName named "test"
972 * lineOfBusinessName named "someValue"
973
974 Having all those information, you are now able to build the SO Macro request
975 that will instantiate Service, VNF, VF modules and Heat stacks:
976
977 ::
978
979   curl -X POST \
980   'http://{{k8s}}:30277/onap/so/infra/serviceInstantiation/v7/serviceInstances' \
981   -H 'Content-Type: application/json' \
982   -H 'cache-control: no-cache' \
983   -d '{
984    "requestDetails":{
985       "subscriberInfo":{
986          "globalSubscriberId":"Demonstration"
987       },
988       "requestInfo":{
989          "suppressRollback":false,
990          "productFamilyId":"a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
991          "requestorId":"adt",
992          "instanceName":"{{cds-instance-name}}",
993          "source":"VID"
994       },
995       "cloudConfiguration":{
996          "lcpCloudRegionId":"RegionOne",
997          "tenantId":"41d6d38489bd40b09ea8a6b6b852dcbd",
998          "cloudOwner":"CloudOwner"
999       },
1000       "requestParameters":{
1001          "subscriptionServiceType":"vLB",
1002          "userParams":[
1003             {
1004                "Homing_Solution":"none"
1005             },
1006             {
1007                "service":{
1008                   "instanceParams":[
1009
1010                   ],
1011                   "instanceName":"{{cds-instance-name}}",
1012                   "resources":{
1013                      "vnfs":[
1014                         {
1015                            "modelInfo":{
1016                               "modelName":"{{vnf-modelinfo-modelname}}",
1017                               "modelVersionId":"{{vnf-modelinfo-modeluuid}}",
1018                               "modelInvariantUuid":"{{vnf-modelinfo-modelinvariantuuid}}",
1019                               "modelVersion":"1.0",
1020                               "modelCustomizationId":"{{vnf-modelinfo-modelcustomizationuuid}}",
1021                               "modelInstanceName":"{{vnf-modelinfo-modelinstancename}}"
1022                            },
1023                            "cloudConfiguration":{
1024                               "lcpCloudRegionId":"RegionOne",
1025                               "tenantId":"41d6d38489bd40b09ea8a6b6b852dcbd"
1026                            },
1027                            "platform":{
1028                               "platformName":"test"
1029                            },
1030                            "lineOfBusiness":{
1031                               "lineOfBusinessName":"LOB-Demonstration"
1032                            },
1033                            "productFamilyId":"a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
1034                            "instanceName":"{{vnf-modelinfo-modelinstancename}}",
1035                            "instanceParams":[
1036                               {
1037                                  "onap_private_net_id":"oam_network_qXyY",
1038                                  "dcae_collector_ip":"10.12.5.214",
1039                                  "onap_private_subnet_id":"oam_network_qXyY",
1040                                  "pub_key":"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDKXDgoo3+WOqcUG8/5uUbk81+yczgwC4Y8ywTmuQqbNxlY1oQ0YxdMUqUnhitSXs5S/yRuAVOYHwGg2mCs20oAINrP+mxBI544AMIb9itPjCtgqtE2EWo6MmnFGbHB4Sx3XioE7F4VPsh7japsIwzOjbrQe+Mua1TGQ5d4nfEOQaaglXLLPFfuc7WbhbJbK6Q7rHqZfRcOwAMXgDoBqlyqKeiKwnumddo2RyNT8ljYmvB6buz7KnMinzo7qB0uktVT05FH9Rg0CTWH5norlG5qXgP2aukL0gk1ph8iAt7uYLf1ktp+LJI2gaF6L0/qli9EmVCSLr1uJ38Q8CBflhkh",
1041                                  "sec_group":"onap_sg_qXyY",
1042                                  "install_script_version":"1.5.0",
1043                                  "demo_artifacts_version":"1.5.0",
1044                                  "cloud_env":"openstack",
1045                                  "flavor_name":"m1.medium",
1046                                  "public_net_id":"external",
1047                                  "image_name":"ubuntu-16-04-cloud-amd64"
1048                               }
1049                            ],
1050                            "vfModules":[
1051                               {
1052                                  "modelInfo":{
1053                                     "modelName":"{{vnf-vfmodule-0-modelinfo-modelname}}",
1054                                     "modelVersionId":"{{vnf-vfmodule-0-modelinfo-modeluuid}}",
1055                                     "modelInvariantUuid":"{{vnf-vfmodule-0-modelinfo-modelinvariantuuid}}",
1056                                     "modelVersion":"1",
1057                                     "modelCustomizationId":"{{vnf-vfmodule-0-modelinfo-modelcustomizationuuid}}"
1058                                  },
1059                                  "instanceName":"{{vnf-vfmodule-0-modelinfo-modelname}}",
1060                                  "instanceParams":[
1061                                     {
1062                                        "sec_group":"onap_sg_imAd",
1063                                        "public_net_id":"external"
1064                                     }
1065                                  ]
1066                               },
1067                               {
1068                                  "modelInfo":{
1069                                     "modelName":"{{vnf-vfmodule-1-modelinfo-modelname}}",
1070                                     "modelVersionId":"{{vnf-vfmodule-1-modelinfo-modeluuid}}",
1071                                     "modelInvariantUuid":"{{vnf-vfmodule-1-modelinfo-modelinvariantuuid}}",
1072                                     "modelVersion":"1",
1073                                     "modelCustomizationId":"{{vnf-vfmodule-1-modelinfo-modelcustomizationuuid}}"
1074                                  },
1075                                  "instanceName":"{{vnf-vfmodule-1-modelinfo-modelname}}",
1076                                  "instanceParams":[
1077                                     {
1078                                        "sec_group":"onap_sg_imAd",
1079                                        "public_net_id":"external"
1080                                     }
1081                                  ]
1082                               },
1083                               {
1084                                  "modelInfo":{
1085                                     "modelName":"{{vnf-vfmodule-2-modelinfo-modelname}}",
1086                                     "modelVersionId":"{{vnf-vfmodule-2-modelinfo-modeluuid}}",
1087                                     "modelInvariantUuid":"{{vnf-vfmodule-2-modelinfo-modelinvariantuuid}}",
1088                                     "modelVersion":"1",
1089                                     "modelCustomizationId":"{{vnf-vfmodule-2-modelinfo-modelcustomizationuuid}}"
1090                                  },
1091                                  "instanceName":"{{vnf-vfmodule-2-modelinfo-modelname}}",
1092                                  "instanceParams":[
1093                                     {
1094                                        "sec_group":"onap_sg_imAd",
1095                                        "public_net_id":"external"
1096                                     }
1097                                  ]
1098                               },
1099                               {
1100                                  "modelInfo":{
1101                                     "modelName":"{{vnf-vfmodule-3-modelinfo-modelname}}",
1102                                     "modelVersionId":"{{vnf-vfmodule-3-modelinfo-modeluuid}}",
1103                                     "modelInvariantUuid":"{{vnf-vfmodule-3-modelinfo-modelinvariantuuid}}",
1104                                     "modelVersion":"1",
1105                                     "modelCustomizationId":"{{vnf-vfmodule-3-modelinfo-modelcustomizationuuid}}"
1106                                  },
1107                                  "instanceName":"{{vnf-vfmodule-3-modelinfo-modelname}}",
1108                                  "instanceParams":[
1109                                     {
1110                                        "sec_group":"onap_sg_imAd",
1111                                        "public_net_id":"external"
1112                                     }
1113                                  ]
1114                               }
1115                            ]
1116                         }
1117                      ]
1118                   },
1119                   "modelInfo":{
1120                      "modelVersion":"1.0",
1121                      "modelVersionId":"{{service-uuid}}",
1122                      "modelInvariantId":"{{service-invariantUUID}}",
1123                      "modelName":"{{service-name}}",
1124                      "modelType":"service"
1125                   }
1126                }
1127             }
1128          ],
1129          "aLaCarte":false
1130       },
1131       "project":{
1132          "projectName":"Project-Demonstration"
1133       },
1134       "owningEntity":{
1135         "owningEntityId":"6f6c49d0-8a8c-4704-9174-321bcc526cc0",
1136         "owningEntityName":"OE-Demonstration"
1137       },
1138       "modelInfo":{
1139         "modelVersion":"1.0",
1140         "modelVersionId":"{{service-uuid}}",
1141         "modelInvariantId":"{{service-invariantUUID}}",
1142         "modelName":"{{service-name}}",
1143         "modelType":"service"}}}'
1144
1145 Note that the "dcae_collector_ip" parameter has to contain the IP address of one of the Kubernetes cluster nodes, 10.12.5.214 in the example above. In the response to the Macro request, the user will obtain a requestId that will be usefulto follow the instantiation request status in the ONAP SO:
1146
1147 ::
1148
1149   curl -X GET \
1150     'http://{{k8s}}:30086/infraActiveRequests/{{requestid}}' \
1151     -H 'cache-control: no-cache'
1152
1153
1154
1155
1156
1157 PART 3 - Post Instantiation Operations
1158 --------------------------------------
1159
1160 3-1 Post Instantiation VNF configuration
1161 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1162 CDS executes post-instantiation VNF configuration if the "skip-post-instantiation" flag in the SDC service model is set to false, which is the default behavior. Manual post-instantiation configuration is necessary if the "skip-post-instantiation" flag in the service model is set to true or if the VNF is instantiated using the preload approach, which doesn't include CDS. Regardless, this step is NOT required during scale out operations, as VNF reconfiguration will be triggered by SO and executed by APPC.
1163
1164 If VNF post instantiation is executed manually, in order to change the state of the vLB the users should run the following REST call, replacing the IP addresses in the VNF endpoint and JSON object to match the private IP addresses of their vDNS instance:
1165
1166 ::
1167
1168   curl -X PUT \
1169   http://10.12.5.78:8183/restconf/config/vlb-business-vnf-onap-plugin:vlb-business-vnf-onap-plugin/vdns-instances/vdns-instance/192.168.10.59 \
1170   -H 'Accept: application/json' \
1171   -H 'Content-Type: application/json' \
1172   -H 'Postman-Token: a708b064-adb1-4804-89a7-ee604f5fe76f' \
1173   -H 'cache-control: no-cache' \
1174   -d '{
1175     "vdns-instance": [
1176         {
1177             "ip-addr": "192.168.10.59",
1178             "oam-ip-addr": "10.0.101.49",
1179             "enabled": true
1180         }
1181     ]
1182   }'
1183
1184 At this point, the VNF is fully set up.
1185
1186
1187 3-2 Updating AAI with VNF resources
1188 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1189 To allow automated scale out via closed loop, the users need to inventory the VNF resources in AAI. This is done by running the heatbridge python script in /root/oom/kubernetes/robot in the Rancher VM in the Kubernetes cluster:
1190
1191 ::
1192
1193     ./demo-k8s.sh onap heatbridge <vLB stack_name in OpenStack> <service_instance_id> vLB vlb_onap_private_ip_0
1194
1195 Note that "vlb_onap_private_ip_0" used in the heatbridge call is the actual parameter name, not its value (e.g. the actual IP address). Heatbridge is needed for control loops because DCAE and Policy runs queries against AAI using vServer names as key.
1196
1197
1198 PART 4 - Triggering Scale Out Manually
1199 --------------------------------------
1200
1201 For scale out with manual trigger, VID is not supported at this time. Users can run the use case by directly calling SO APIs:
1202
1203 ::
1204
1205   curl -X POST \
1206   http://<Any_K8S_Node_IP_Address>:30277/onap/so/infra/serviceInstantiation/v7/serviceInstances/7d3ca782-c486-44b3-9fe5-39f322d8ee80/vnfs/9d33cf2d-d6aa-4b9e-a311-460a6be5a7de/vfModules/scaleOut \
1207   -H 'Accept: application/json' \
1208   -H 'Authorization: Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA==' \
1209   -H 'Cache-Control: no-cache' \
1210   -H 'Connection: keep-alive' \
1211   -H 'Content-Type: application/json' \
1212   -H 'Postman-Token: 12f2601a-4eb2-402c-a51a-f29502359501,9befda68-b2c9-4e7a-90ca-1be9c24ef664' \
1213   -H 'User-Agent: PostmanRuntime/7.15.0' \
1214   -H 'accept-encoding: gzip, deflate' \
1215   -H 'cache-control: no-cache' \
1216   -H 'content-length: 2422' \
1217   -H 'cookie: JSESSIONID=B3BA24216367F9D39E3DF5E8CBA4BC64' \
1218   -b JSESSIONID=B3BA24216367F9D39E3DF5E8CBA4BC64 \
1219   -d '{
1220     "requestDetails": {
1221         "modelInfo": {
1222             "modelCustomizationName": "VdnsloadbalancerCds..vdns..module-3",
1223             "modelCustomizationId": "ded42059-2f35-42d4-848b-16e1ab1ad197",
1224             "modelInvariantId": "2815d321-c6b4-4f21-b7f7-fa5adf8ed7d9",
1225             "modelVersionId": "524e34ed-9789-453e-ab73-8eff30eafef3",
1226             "modelName": "VdnsloadbalancerCds..vdns..module-3",
1227             "modelType": "vfModule",
1228             "modelVersion": "1"
1229         },
1230         "cloudConfiguration": {
1231             "lcpCloudRegionId": "RegionOne",
1232             "tenantId": "d570c718cbc545029f40e50b75eb13df",
1233             "cloudOwner": "CloudOwner"
1234         },
1235         "requestInfo": {
1236             "instanceName": "vDNS-VM-02",
1237             "source": "VID",
1238             "suppressRollback": false,
1239             "requestorId": "demo"
1240         },
1241         "requestParameters": {
1242             "userParams": []
1243         },
1244         "relatedInstanceList": [
1245             {
1246                 "relatedInstance": {
1247                     "instanceId": "7d3ca782-c486-44b3-9fe5-39f322d8ee80",
1248                     "modelInfo": {
1249                         "modelType": "service",
1250                         "modelInvariantId": "dfabdcae-cf50-4801-9885-9a3a9cc07e6f",
1251                         "modelVersionId": "ee55b537-7be5-4377-93c1-5d92931b6a78",
1252                         "modelName": "vLoadBalancerCDS",
1253                         "modelVersion": "1.0"
1254                     }
1255                 }
1256             },
1257             {
1258                 "relatedInstance": {
1259                     "instanceId": "9d33cf2d-d6aa-4b9e-a311-460a6be5a7de",
1260                     "modelInfo": {
1261                         "modelType": "vnf",
1262                         "modelInvariantId": "a77f9280-5c02-46cd-b1fc-855975db9df9",
1263                         "modelVersionId": "ff0e99ce-a521-44b5-b11b-da7e07ac83fc",
1264                         "modelName": "vLoadBalancerCDS",
1265                         "modelVersion": "1.0",
1266                         "modelCustomizationId": "b8b8a25d-19de-4581-bb63-f2dc8c0d79a7"
1267                     }
1268                 }
1269             }
1270         ],
1271         "configurationParameters": [
1272             {
1273                 "ip-addr": "$.vf-module-topology.vf-module-parameters.param[17].value",
1274                 "oam-ip-addr": "$.vf-module-topology.vf-module-parameters.param[31].value"
1275             }
1276         ]
1277     }
1278   }'
1279
1280
1281 To fill in the JSON object, users need to download the Service Model TOSCA template from the SDC Portal using one of the standard SDC users (for example user: cs0008, password: demo123456!). After logging to SDC, the user should select from the catalog the vLB service that they created, click the "TOSCA Artifacts" link on the left, and finally the download button on the right, as shown in the figure below:
1282
1283 .. figure:: files/scaleout/tosca_template_fig.png
1284    :align: center
1285
1286 For the example described below, users can refer to the TOSCA template linked at the top of the page. The template contains all the model (invariant/version/customization) IDs of service, VNF, and VF modules that the input request to SO needs.
1287
1288 The values of modelInvariantId, modelVersionId, and modelName in the relatedInstance item identified by "modelType": "service" in the JSON request to SO have to match invariantUUID, UUID, and name, respectively, in the TOSCA template:
1289 ::
1290
1291             {
1292                 "relatedInstance": {
1293                     "instanceId": "7d3ca782-c486-44b3-9fe5-39f322d8ee80",
1294                     "modelInfo": {
1295                         "modelType": "service",
1296                         "modelInvariantId": "dfabdcae-cf50-4801-9885-9a3a9cc07e6f",
1297                         "modelVersionId": "ee55b537-7be5-4377-93c1-5d92931b6a78",
1298                         "modelName": "vLoadBalancerCDS",
1299                         "modelVersion": "1.0"
1300                     }
1301                 }
1302             }
1303
1304 .. figure:: files/scaleout/service.png
1305    :align: center
1306
1307
1308 The values of modelInvariantId, modelVersionId, modelName, and modelVersion in the relatedInstance item identified by "modelType": "vnf" in the JSON request to SO have to match invariantUUID, UUID, name, and version, respectively, in the TOSCA template:
1309
1310 ::
1311
1312             {
1313                 "relatedInstance": {
1314                     "instanceId": "9d33cf2d-d6aa-4b9e-a311-460a6be5a7de",
1315                     "modelInfo": {
1316                         "modelType": "vnf",
1317                         "modelInvariantId": "a77f9280-5c02-46cd-b1fc-855975db9df9",
1318                         "modelVersionId": "ff0e99ce-a521-44b5-b11b-da7e07ac83fc",
1319                         "modelName": "vLoadBalancerCDS",
1320                         "modelVersion": "1.0",
1321                         "modelCustomizationId": "b8b8a25d-19de-4581-bb63-f2dc8c0d79a7"
1322                     }
1323                 }
1324             }
1325
1326 .. figure:: files/scaleout/vnf.png
1327    :align: center
1328
1329
1330 The modelCustomizationId, modelInvariantId, modelVersionId, modelName, and modelVersion in the modelInfo item identified by "modelType": "vfModule" in the JSON request to SO have to match vfModuleModelCustomizationUUID, vfModuleModelInvariantUUID, vfModuleModelUUID, vfModuleModelName, and vfModuleModelVersion, respectively, in the TOSCA template. The modelCustomizationName parameter in the SO object can be set as the modelName parameter in the same JSON object:
1331
1332 ::
1333
1334         "modelInfo": {
1335             "modelCustomizationName": "Vloadbalancercds..vdns..module-3",
1336             "modelCustomizationId": "ded42059-2f35-42d4-848b-16e1ab1ad197",
1337             "modelInvariantId": "2815d321-c6b4-4f21-b7f7-fa5adf8ed7d9",
1338             "modelVersionId": "524e34ed-9789-453e-ab73-8eff30eafef3",
1339             "modelName": "Vloadbalancercds..vdns..module-3",
1340             "modelType": "vfModule",
1341             "modelVersion": "1"
1342         }
1343
1344 The vLB-vDNS-vPacketGenerator VNF that we use to describe the scale out use case supports the scaling of the vDNS VF module only. As such, in the TOSCA template users should refer to the section identified by "vfModuleModelName": "Vloadbalancercds..vdns..module-3", as highlighted below:
1345
1346 .. figure:: files/scaleout/service.png
1347    :align: center
1348
1349
1350 Note that both Service and VNF related instances have a field called "instanceId" that represent the Service and VNF instance ID, respectively. These IDs are assigned at Service and VNF instantiation time and can be retrieved from AAI, querying for generic VNF objects:
1351
1352 ::
1353
1354     curl -k -X GET \
1355   https://<Any_K8S_Node_IP_Address>:30233/aai/v16/network/generic-vnfs \
1356   -H 'Accept: application/json' \
1357   -H 'Authorization: Basic QUFJOkFBSQ==' \
1358   -H 'Content-Type: application/json' \
1359   -H 'X-FromAppId: AAI' \
1360   -H 'X-TransactionId: get_aai_subscr'
1361
1362 From the list of VNFs reported by AAI, search for the name of the VNF that was previously instantiated, for example "vLB_VNF_01" in the example below:
1363
1364 ::
1365
1366         {
1367             "vnf-id": "9d33cf2d-d6aa-4b9e-a311-460a6be5a7de",
1368             "vnf-name": "vLB_VNF_01",
1369             "vnf-type": "vLoadBalancer/vLoadBalancer 0",
1370             "prov-status": "ACTIVE",
1371             "equipment-role": "",
1372             "orchestration-status": "Active",
1373             "ipv4-oam-address": "10.0.220.10",
1374             "in-maint": true,
1375             "is-closed-loop-disabled": false,
1376             "resource-version": "1565817789379",
1377             "model-invariant-id": "a77f9280-5c02-46cd-b1fc-855975db9df9",
1378             "model-version-id": "ff0e99ce-a521-44b5-b11b-da7e07ac83fc",
1379             "model-customization-id": "b8b8a25d-19de-4581-bb63-f2dc8c0d79a7",
1380             "selflink": "restconf/config/GENERIC-RESOURCE-API:services/service/7d3ca782-c486-44b3-9fe5-39f322d8ee80/service-data/vnfs/vnf/9d33cf2d-d6aa-4b9e-a311-460a6be5a7de/vnf-data/vnf-topology/",
1381             "relationship-list": {
1382                 "relationship": [
1383                     {
1384                         "related-to": "service-instance",
1385                         "relationship-label": "org.onap.relationships.inventory.ComposedOf",
1386                         "related-link": "/aai/v16/business/customers/customer/Demonstration/service-subscriptions/service-subscription/vRAR/service-instances/service-instance/7d3ca782-c486-44b3-9fe5-39f322d8ee80",
1387                         "relationship-data": [
1388                             {
1389                                 "relationship-key": "customer.global-customer-id",
1390                                 "relationship-value": "Demonstration"
1391                             },
1392                             {
1393                                 "relationship-key": "service-subscription.service-type",
1394                                 "relationship-value": "vLB"
1395                             },
1396                             {
1397                                 "relationship-key": "service-instance.service-instance-id",
1398                                 "relationship-value": "7d3ca782-c486-44b3-9fe5-39f322d8ee80"
1399                             }
1400                         ],
1401                         "related-to-property": [
1402                             {
1403                                 "property-key": "service-instance.service-instance-name",
1404                                 "property-value": "vLB-Service-0814-1"
1405                             }
1406                         ]
1407                     }
1408                     ...
1409          }
1410
1411 To identify the VNF ID, look for the "vnf-id" parameter at the top of the JSON object, while to determine the Service ID, look for the "relationship-value" parameter corresponding to the "relationship-key": "service-instance.service-instance-id" item in the "relationship-data" list. In the example above, the Service instance ID is 7d3ca782-c486-44b3-9fe5-39f322d8ee80, while the VNF ID is 9d33cf2d-d6aa-4b9e-a311-460a6be5a7de.
1412
1413 These IDs are also used in the URL request to SO:
1414
1415 ::
1416
1417     http://<Any_K8S_Node_IP_Address>:30277/onap/so/infra/serviceInstantiation/v7/serviceInstances/7d3ca782-c486-44b3-9fe5-39f322d8ee80/vnfs/9d33cf2d-d6aa-4b9e-a311-460a6be5a7de/vfModules/scaleOut
1418
1419
1420 Finally, the "configurationParameters" section in the JSON request to SO contains the parameters that will be used to reconfigure the VNF after scaling. Please see Section 1-7 for an in-depth description of how to set the parameters correctly.
1421
1422 ::
1423
1424     "configurationParameters": [
1425             {
1426                 "ip-addr": "$.vf-module-topology.vf-module-parameters.param[16].value",
1427                 "oam-ip-addr": "$.vf-module-topology.vf-module-parameters.param[30].value"
1428             }
1429     ]
1430
1431
1432 PART 5 - Running the Scale Out Use Case with Configuration Preload
1433 ------------------------------------------------------------------
1434
1435 While CDS can be used to model and automate the generation of cloud configuration for VNF instantiation, the manual preload approach is still supported for scale out with manual trigger (no closed loop). Note that preload operations must be executed before VF modules are created or scaled, as the instantiation process will use the preload to determine the VF module configuration.
1436
1437 The procedure is similar to one described above, with some minor changes:
1438
1439 1) **Service Design and Creation**: The heat template used to create a vendor software product in SDC is the same. However, during property assignment (Section 1-2) "sdnc_artifact_name", "sdnc_model_version", "sdnc_model_name" **must be** left blank, as they are used for CDS only.
1440
1441 2) As closed loop with preload is not supported for scale out, DCAE blueprint and Policy onboarding (Section 1-2), deployment of naming policy (Section 1-3), and closed loop design and deployment from CLAMP (Section 1-4) are not necessary.
1442
1443 3) **Creation of VNF template with CDT** works as described in Section 1-5.
1444
1445 4) **Controller type selection** in SO works as described in Section 1-6.
1446
1447 5) **VNF instantiation from VID**: users can use VID to create the service, the VNF, and instantiate the VF modules. In the VID main page, users should select GR API (this should be the default option).
1448
1449 .. figure:: files/scaleout/vid.png
1450    :align: center
1451
1452 Based on the Heat template structure, there are four VF modules:
1453
1454   * module-0: base module that contains resources, such as internal private networks and public key, shared across the VNF elements
1455   * module-1: vLB resource descriptor
1456   * module-2: vPacketGen resource descriptor
1457   * module-3: vDNS resource descriptor
1458
1459 These VF modules have to be installed in the following order, so as to satisfy heat dependencies: module-0, module-1, module-2, module-3. The parameters defined in the Heat environment files can be overridden by loading cloud configuration to SDNC before the VF modules are instantiated. See example of preloads below. They need to be customized based on the OpenStack cloud and execution environment in which the VF modules are going to be instantiated.
1460
1461 Module-0 Preload
1462 ~~~~~~~~~~~~~~~~
1463
1464 ::
1465
1466     curl -X POST \
1467   http://<Any_K8S_Node_IP_Address>:30202/restconf/operations/GENERIC-RESOURCE-API:preload-vf-module-topology-operation \
1468   -H 'Content-Type: application/json' \
1469   -H 'Postman-Token: 0a7abc62-9d8f-4f63-8b05-db7cc4c3e28b' \
1470   -H 'cache-control: no-cache' \
1471   -d '{
1472     "input": {
1473         "preload-vf-module-topology-information": {
1474             "vf-module-topology": {
1475                 "vf-module-topology-identifier": {
1476                     "vf-module-name": "vNetworks-0211-1"
1477                 },
1478                 "vf-module-parameters": {
1479                     "param": [
1480                         {
1481                             "name": "vlb_private_net_id",
1482                             "value": "vLBMS_zdfw1lb01_private_ms"
1483                         },
1484                         {
1485                             "name": "pktgen_private_net_id",
1486                             "value": "vLBMS_zdfw1pktgen01_private_ms"
1487                         },
1488                         {
1489                             "name": "vlb_private_net_cidr",
1490                             "value": "192.168.10.0/24"
1491                         },
1492                         {
1493                             "name": "pktgen_private_net_cidr",
1494                             "value": "192.168.9.0/24"
1495                         },
1496                         {
1497                             "name": "vlb_0_int_pktgen_private_port_0_mac",
1498                             "value": "fa:16:3e:00:01:10"
1499                         },
1500                         {
1501                             "name": "vpg_0_int_pktgen_private_port_0_mac",
1502                             "value": "fa:16:3e:00:01:20"
1503                         },
1504                         {
1505                             "name": "vnf_id",
1506                             "value": "vLoadBalancerMS"
1507                         },
1508                         {
1509                             "name": "vnf_name",
1510                             "value": "vLBMS"
1511                         },
1512                         {
1513                             "name": "key_name",
1514                             "value": "vlb_key"
1515                         },
1516                         {
1517                             "name": "pub_key",
1518                             "value": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDQXYJYYi3/OUZXUiCYWdtc7K0m5C0dJKVxPG0eI8EWZrEHYdfYe6WoTSDJCww+1qlBSpA5ac/Ba4Wn9vh+lR1vtUKkyIC/nrYb90ReUd385Glkgzrfh5HdR5y5S2cL/Frh86lAn9r6b3iWTJD8wBwXFyoe1S2nMTOIuG4RPNvfmyCTYVh8XTCCE8HPvh3xv2r4egawG1P4Q4UDwk+hDBXThY2KS8M5/8EMyxHV0ImpLbpYCTBA6KYDIRtqmgS6iKyy8v2D1aSY5mc9J0T5t9S2Gv+VZQNWQDDKNFnxqYaAo1uEoq/i1q63XC5AD3ckXb2VT6dp23BQMdDfbHyUWfJN"
1519                         }
1520                     ]
1521                 }
1522             },
1523             "vnf-topology-identifier-structure": {
1524                 "vnf-name": "vLoadBalancer-Vnf-0211-1",
1525                 "vnf-type": "vLoadBalancer/vLoadBalancer 0"
1526             },
1527             "vnf-resource-assignments": {
1528                 "availability-zones": {
1529                     "availability-zone": [
1530                         "nova"
1531                     ],
1532                     "max-count": 1
1533                 },
1534                 "vnf-networks": {
1535                     "vnf-network": []
1536                 }
1537             }
1538         },
1539         "request-information": {
1540             "request-id": "robot12",
1541             "order-version": "1",
1542             "notification-url": "openecomp.org",
1543             "order-number": "1",
1544             "request-action": "PreloadVfModuleRequest"
1545         },
1546         "sdnc-request-header": {
1547             "svc-request-id": "robot12",
1548             "svc-notification-url": "http://openecomp.org:8080/adapters/rest/SDNCNotify",
1549             "svc-action": "reserve"
1550         }
1551     }
1552   }'
1553
1554
1555 Module-1 Preload
1556 ~~~~~~~~~~~~~~~~
1557
1558 ::
1559
1560     curl -X POST \
1561   http://<Any_K8S_Node_IP_Address>:30202/restconf/operations/GENERIC-RESOURCE-API:preload-vf-module-topology-operation \
1562   -H 'Content-Type: application/json' \
1563   -H 'Postman-Token: 662914ac-29fc-414d-8823-1691fb2c718a' \
1564   -H 'cache-control: no-cache' \
1565   -d '{
1566     "input": {
1567         "preload-vf-module-topology-information": {
1568             "vf-module-topology": {
1569                 "vf-module-topology-identifier": {
1570                     "vf-module-name": "vLoadBalancer-0211-1"
1571                 },
1572                 "vf-module-parameters": {
1573                     "param": [
1574                         {
1575                             "name": "vlb_image_name",
1576                             "value": "ubuntu-16-04-cloud-amd64"
1577                         },
1578                         {
1579                             "name": "vlb_flavor_name",
1580                             "value": "m1.medium"
1581                         },
1582                         {
1583                             "name": "public_net_id",
1584                             "value": "public"
1585                         },
1586                         {
1587                             "name": "int_private_net_id",
1588                             "value": "vLBMS_zdfw1lb01_private_ms"
1589                         },
1590                         {
1591                             "name": "int_private_subnet_id",
1592                             "value": "vLBMS_zdfw1lb01_private_sub_ms"
1593                         },
1594                         {
1595                             "name": "int_pktgen_private_net_id",
1596                             "value": "vLBMS_zdfw1pktgen01_private_ms"
1597                         },
1598                         {
1599                             "name": "int_pktgen_private_subnet_id",
1600                             "value": "vLBMS_zdfw1pktgen01_private_sub_ms"
1601                         },
1602                         {
1603                             "name": "onap_private_net_id",
1604                             "value": "oam_onap_vnf_test"
1605                         },
1606                         {
1607                             "name": "onap_private_subnet_id",
1608                             "value": "oam_onap_vnf_test"
1609                         },
1610                         {
1611                             "name": "vlb_private_net_cidr",
1612                             "value": "192.168.10.0/24"
1613                         },
1614                         {
1615                             "name": "pktgen_private_net_cidr",
1616                             "value": "192.168.9.0/24"
1617                         },
1618                         {
1619                             "name": "onap_private_net_cidr",
1620                             "value": "10.0.0.0/16"
1621                         },
1622                         {
1623                             "name": "vlb_int_private_ip_0",
1624                             "value": "192.168.10.111"
1625                         },
1626                         {
1627                             "name": "vlb_onap_private_ip_0",
1628                             "value": "10.0.150.1"
1629                         },
1630                         {
1631                             "name": "vlb_int_pktgen_private_ip_0",
1632                             "value": "192.168.9.111"
1633                         },
1634                         {
1635                             "name": "vdns_int_private_ip_0",
1636                             "value": "192.168.10.211"
1637                         },
1638                         {
1639                             "name": "vdns_onap_private_ip_0",
1640                             "value": "10.0.150.3"
1641                         },
1642                         {
1643                             "name": "vpg_int_pktgen_private_ip_0",
1644                             "value": "192.168.9.110"
1645                         },
1646                         {
1647                             "name": "vpg_onap_private_ip_0",
1648                             "value": "10.0.150.2"
1649                         },
1650                         {
1651                             "name": "vlb_name_0",
1652                             "value": "vlb-0211-1"
1653                         },
1654                         {
1655                             "name": "vlb_0_mac_address",
1656                             "value": "fa:16:3e:00:01:10"
1657                         },
1658                         {
1659                             "name": "vpg_0_mac_address",
1660                             "value": "fa:16:3e:00:01:20"
1661                         },
1662                         {
1663                             "name": "vip",
1664                             "value": "192.168.9.112"
1665                         },
1666                         {
1667                             "name": "gre_ipaddr",
1668                             "value": "192.168.10.112"
1669                         },
1670                         {
1671                             "name": "vnf_id",
1672                             "value": "vLoadBalancerMS"
1673                         },
1674                         {
1675                             "name": "vf_module_id",
1676                             "value": "vLoadBalancerMS"
1677                         },
1678                         {
1679                             "name": "vnf_name",
1680                             "value": "vLBMS"
1681                         },
1682                         {
1683                             "name": "dcae_collector_ip",
1684                             "value": "10.12.5.20"
1685                         },
1686                         {
1687                             "name": "dcae_collector_port",
1688                             "value": "30235"
1689                         },
1690                         {
1691                             "name": "demo_artifacts_version",
1692                             "value": "1.6.0-SNAPSHOT"
1693                         },
1694                         {
1695                             "name": "install_script_version",
1696                             "value": "1.6.0-SNAPSHOT"
1697                         },
1698                         {
1699                             "name": "nb_api_version",
1700                             "value": "1.2.0"
1701                         },
1702                         {
1703                             "name": "keypair",
1704                             "value": "vlb_key"
1705                         },
1706                         {
1707                             "name": "cloud_env",
1708                             "value": "openstack"
1709                         },
1710                         {
1711                             "name": "nexus_artifact_repo",
1712                             "value": "https://nexus.onap.org"
1713                         },
1714                         {
1715                             "name": "sec_group",
1716                             "value": "default"
1717                         }
1718                     ]
1719                 }
1720             },
1721             "vnf-topology-identifier-structure": {
1722                 "vnf-name": "vLoadBalancer-Vnf-0211-1",
1723                 "vnf-type": "vLoadBalancer/vLoadBalancer 0"
1724             },
1725             "vnf-resource-assignments": {
1726                 "availability-zones": {
1727                     "availability-zone": [
1728                         "nova"
1729                     ],
1730                     "max-count": 1
1731                 },
1732                 "vnf-networks": {
1733                     "vnf-network": []
1734                 }
1735             }
1736         },
1737         "request-information": {
1738             "request-id": "robot12",
1739             "order-version": "1",
1740             "notification-url": "openecomp.org",
1741             "order-number": "1",
1742             "request-action": "PreloadVfModuleRequest"
1743         },
1744         "sdnc-request-header": {
1745             "svc-request-id": "robot12",
1746             "svc-notification-url": "http://openecomp.org:8080/adapters/rest/SDNCNotify",
1747             "svc-action": "reserve"
1748         }
1749     }
1750   }'
1751
1752
1753 Module-2 Preload
1754 ~~~~~~~~~~~~~~~~
1755 ::
1756
1757
1758     curl -X POST \
1759   http://<Any_K8S_Node_IP_Address>:30202/restconf/operations/GENERIC-RESOURCE-API:preload-vf-module-topology-operation \
1760   -H 'Content-Type: application/json' \
1761   -H 'Postman-Token: 5f2490b3-6e4a-4512-9a0d-0aa6f6fa0ea8' \
1762   -H 'cache-control: no-cache' \
1763   -d '{
1764     "input": {
1765         "preload-vf-module-topology-information": {
1766             "vf-module-topology": {
1767                 "vf-module-topology-identifier": {
1768                     "vf-module-name": "vPacketGen-0211-1"
1769                 },
1770                 "vf-module-parameters": {
1771                     "param": [
1772                         {
1773                             "name": "vpg_image_name",
1774                             "value": "ubuntu-16-04-cloud-amd64"
1775                         },
1776                         {
1777                             "name": "vpg_flavor_name",
1778                             "value": "m1.medium"
1779                         },
1780                         {
1781                             "name": "public_net_id",
1782                             "value": "public"
1783                         },
1784                         {
1785                             "name": "int_pktgen_private_net_id",
1786                             "value": "vLBMS_zdfw1pktgen01_private_ms"
1787                         },
1788                         {
1789                             "name": "int_pktgen_private_subnet_id",
1790                             "value": "vLBMS_zdfw1pktgen01_private_sub_ms"
1791                         },
1792                         {
1793                             "name": "onap_private_net_id",
1794                             "value": "oam_onap_vnf_test"
1795                         },
1796                         {
1797                             "name": "onap_private_subnet_id",
1798                             "value": "oam_onap_vnf_test"
1799                         },
1800                         {
1801                             "name": "pktgen_private_net_cidr",
1802                             "value": "192.168.9.0/24"
1803                         },
1804                         {
1805                             "name": "onap_private_net_cidr",
1806                             "value": "10.0.0.0/16"
1807                         },
1808                         {
1809                             "name": "vlb_int_pktgen_private_ip_0",
1810                             "value": "192.168.9.111"
1811                         },
1812                         {
1813                             "name": "vpg_int_pktgen_private_ip_0",
1814                             "value": "192.168.9.110"
1815                         },
1816                         {
1817                             "name": "vpg_onap_private_ip_0",
1818                             "value": "10.0.150.2"
1819                         },
1820                         {
1821                             "name": "vpg_name_0",
1822                             "value": "vpg-0211-1"
1823                         },
1824                         {
1825                             "name": "vlb_0_mac_address",
1826                             "value": "fa:16:3e:00:01:10"
1827                         },
1828                         {
1829                             "name": "vpg_0_mac_address",
1830                             "value": "fa:16:3e:00:01:20"
1831                         },
1832                         {
1833                             "name": "pg_int",
1834                             "value": "192.168.9.109"
1835                         },
1836                         {
1837                             "name": "vnf_id",
1838                             "value": "vLoadBalancerMS"
1839                         },
1840                         {
1841                             "name": "vf_module_id",
1842                             "value": "vLoadBalancerMS"
1843                         },
1844                         {
1845                             "name": "vnf_name",
1846                             "value": "vLBMS"
1847                         },
1848                         {
1849                             "name": "demo_artifacts_version",
1850                             "value": "1.6.0-SNAPSHOT"
1851                         },
1852                         {
1853                             "name": "install_script_version",
1854                             "value": "1.6.0-SNAPSHOT"
1855                         },
1856                         {
1857                             "name": "nb_api_version",
1858                             "value": "1.2.0"
1859                         },
1860                         {
1861                             "name": "keypair",
1862                             "value": "vlb_key"
1863                         },
1864                         {
1865                             "name": "cloud_env",
1866                             "value": "openstack"
1867                         },
1868                         {
1869                             "name": "nexus_artifact_repo",
1870                             "value": "https://nexus.onap.org"
1871                         },
1872                         {
1873                             "name": "sec_group",
1874                             "value": "default"
1875                         }
1876                     ]
1877                 }
1878             },
1879             "vnf-topology-identifier-structure": {
1880                 "vnf-name": "vLoadBalancer-Vnf-0211-1",
1881                 "vnf-type": "vLoadBalancer/vLoadBalancer 0"
1882             },
1883             "vnf-resource-assignments": {
1884                 "availability-zones": {
1885                     "availability-zone": [
1886                         "nova"
1887                     ],
1888                     "max-count": 1
1889                 },
1890                 "vnf-networks": {
1891                     "vnf-network": []
1892                 }
1893             }
1894         },
1895         "request-information": {
1896             "request-id": "robot12",
1897             "order-version": "1",
1898             "notification-url": "openecomp.org",
1899             "order-number": "1",
1900             "request-action": "PreloadVfModuleRequest"
1901         },
1902         "sdnc-request-header": {
1903             "svc-request-id": "robot12",
1904             "svc-notification-url": "http://openecomp.org:8080/adapters/rest/SDNCNotify",
1905             "svc-action": "reserve"
1906         }
1907     }
1908  }'
1909
1910
1911 Module-3 Preload
1912 ~~~~~~~~~~~~~~~~
1913
1914 ::
1915
1916     curl -X POST \
1917   http://<Any_K8S_Node_IP_Address>:30202/restconf/operations/GENERIC-RESOURCE-API:preload-vf-module-topology-operation \
1918   -H 'Content-Type: application/json' \
1919   -H 'Postman-Token: fd0a4706-f955-490a-875e-08ddd8fe002e' \
1920   -H 'cache-control: no-cache' \
1921   -d '{
1922     "input": {
1923         "preload-vf-module-topology-information": {
1924             "vf-module-topology": {
1925                 "vf-module-topology-identifier": {
1926                     "vf-module-name": "vDNS-0125-1"
1927                 },
1928                 "vf-module-parameters": {
1929                     "param": [
1930                         {
1931                             "name": "vdns_image_name",
1932                             "value": "ubuntu-16-04-cloud-amd64"
1933                         },
1934                         {
1935                             "name": "vdns_flavor_name",
1936                             "value": "m1.medium"
1937                         },
1938                         {
1939                             "name": "public_net_id",
1940                             "value": "public"
1941                         },
1942                         {
1943                             "name": "int_private_net_id",
1944                             "value": "vLBMS_zdfw1lb01_private"
1945                         },
1946                         {
1947                             "name": "int_private_subnet_id",
1948                             "value": "vLBMS_zdfw1lb01_private_sub_ms"
1949                         },
1950                         {
1951                             "name": "onap_private_net_id",
1952                             "value": "oam_onap_vnf_test"
1953                         },
1954                         {
1955                             "name": "onap_private_subnet_id",
1956                             "value": "oam_onap_vnf_test"
1957                         },
1958                         {
1959                             "name": "vlb_private_net_cidr",
1960                             "value": "192.168.10.0/24"
1961                         },
1962                         {
1963                             "name": "onap_private_net_cidr",
1964                             "value": "10.0.0.0/16"
1965                         },
1966                         {
1967                             "name": "vlb_int_private_ip_0",
1968                             "value": "192.168.10.111"
1969                         },
1970                         {
1971                             "name": "vlb_onap_private_ip_0",
1972                             "value": "10.0.150.1"
1973                         },
1974                         {
1975                             "name": "vlb_int_pktgen_private_ip_0",
1976                             "value": "192.168.9.111"
1977                         },
1978                         {
1979                             "name": "vdns_int_private_ip_0",
1980                             "value": "192.168.10.212"
1981                         },
1982                         {
1983                             "name": "vdns_onap_private_ip_0",
1984                             "value": "10.0.150.4"
1985                         },
1986                         {
1987                             "name": "vdns_name_0",
1988                             "value": "vdns-0211-1"
1989                         },
1990                         {
1991                             "name": "vnf_id",
1992                             "value": "vLoadBalancerMS"
1993                         },
1994                         {
1995                             "name": "vf_module_id",
1996                             "value": "vLoadBalancerMS"
1997                         },
1998                         {
1999                             "name": "vnf_name",
2000                             "value": "vLBMS"
2001                         },
2002                         {
2003                             "name": "install_script_version",
2004                             "value": "1.6.0-SNAPSHOT"
2005                         },
2006                         {
2007                             "name": "nb_api_version",
2008                             "value": "1.2.0"
2009                         },
2010                         {
2011                             "name": "keypair",
2012                             "value": "vlb_key"
2013                         },
2014                         {
2015                             "name": "cloud_env",
2016                             "value": "openstack"
2017                         },
2018                         {
2019                             "name": "sec_group",
2020                             "value": "default"
2021                         },
2022                         {
2023                             "name": "nexus_artifact_repo",
2024                             "value": "https://nexus.onap.org"
2025                         }
2026                     ]
2027                 }
2028             },
2029             "vnf-topology-identifier-structure": {
2030                 "vnf-name": "vLoadBalancer-Vnf-0125-1",
2031                 "vnf-type": "vLoadBalancer/vLoadBalancer 0"
2032             },
2033             "vnf-resource-assignments": {
2034                 "availability-zones": {
2035                     "availability-zone": [
2036                         "nova"
2037                     ],
2038                     "max-count": 1
2039                 },
2040                 "vnf-networks": {
2041                     "vnf-network": []
2042                 }
2043             }
2044         },
2045         "request-information": {
2046             "request-id": "robot12",
2047             "order-version": "1",
2048             "notification-url": "openecomp.org",
2049             "order-number": "1",
2050             "request-action": "PreloadVfModuleRequest"
2051         },
2052         "sdnc-request-header": {
2053             "svc-request-id": "robot12",
2054             "svc-notification-url": "http://openecomp.org:8080/adapters/rest/SDNCNotify",
2055             "svc-action": "reserve"
2056         }
2057     }
2058  }'
2059
2060 The Heat environment files already set many parameters used for VF module instantiation. Those parameters can be reused in the SDNC preload too, while placeholders like "PUT THE IP ADDRESS HERE" or "PUT THE PUBLIC KEY HERE" must be overridden.
2061
2062 To instantiate VF modules, please refer to this wiki page: https://wiki.onap.org/display/DW/Tutorial+vIMS%3A+VID+Instantiate+the+VNF using vLB as ServiceType.
2063
2064 6) **Post Instantiation Actions**: Please refer to Sections 3-1 for vLB configuration and Section 3-2 for resource orchestration with heatbridge.
2065
2066 7) **Triggering Scale Out Manually**: Please refer to Section 4 to trigger scale out manually with direct API call to SO.
2067
2068
2069 PART 6 - Known Issues and Resolutions
2070 -------------------------------------
2071 1) When running closed loop-enabled scale out, the closed loop designed in CLAMP conflicts with the default closed loop defined for the old vLB/vDNS use case
2072
2073 Resolution: Change TCA configuration for the old vLB/vDNS use case
2074
2075 - Connect to Consul: http://ANY_K8S_IP:30270 and click on "Key/Value" → "dcae-tca-analytics"
2076 - Change "eventName" in the vLB default policy to something different, for example "vLB" instead of the default value "vLoadBalancer"
2077 - Change "subscriberConsumerGroup" in the TCA configuration to something different, for example "OpenDCAE-c13" instead of the default value "OpenDCAE-c12"
2078 - Click "UPDATE" to upload the new TCA configuration