Updated Jakarta release notes for E2E Network Slicing use case
[integration.git] / docs / docs_scaleout.rst
1 .. _docs_scaleout:
2
3 :orphan:
4
5 VF Module Scale Out Use Case
6 ----------------------------
7
8 Source files
9 ~~~~~~~~~~~~
10 - Heat templates directory: https://git.onap.org/demo/tree/heat?h=guilin
11 - Heat templates directory (vLB_CDS use case): https://git.onap.org/demo/tree/heat/vLB_CDS?h=guilin
12
13 Additional files
14 ~~~~~~~~~~~~~~~~
15 - TOSCA model template: https://git.onap.org/integration/tree/docs/files/scaleout/service-Vloadbalancercds-template.yml
16 - Naming policy script: :download:`push_naming_poliy.sh <files/scaleout/push_naming_policy.sh>`
17 - Controller Blueprint Archive (to use with CDS) : https://git.onap.org/ccsdk/cds/tree/components/model-catalog/blueprint-model/service-blueprint/vLB_CDS_Kotlin?h=guilin
18 - TCA blueprint: :download:`guilin-tca.yaml <files/scaleout/latest-tca-guilin.yaml>`
19
20 Useful tool
21 ~~~~~~~~~~~
22 POSTMAN collection that can be used to simulate all inter process queries : https://www.getpostman.com/collections/878061d291f9efe55463
23 To be able to use this postman collection, you may need to expose some ports that are not exposed in OOM by default.
24 These commands may help for exposing the ports:
25
26 ::
27
28     kubectl port-forward service/cds-blueprints-processor-http --address 0.0.0.0 32749:8080 -n onap &
29     kubectl port-forward service/so-catalog-db-adapter --address 0.0.0.0 30845:8082 -n onap &
30     kubectl port-forward service/so-request-db-adapter --address 0.0.0.0 32223:8083 -n onap &
31
32 OOM Installation
33 ~~~~~~~~~~~~~~~~
34 Before doing the OOM installation, take care to the following steps:
35
36 Set the right Openstack values for Robot and SO
37 ===============================================
38
39 The config for robot must be set in an OOM override file before the OOM installation, this will initialize the robot framework & SO with all the required openstack info.
40 A section like that is required in that override file
41
42 ::
43
44     robot:
45       enabled: true
46       flavor: small
47       appcUsername: "appc@appc.onap.org"
48       appcPassword: "demo123456!"
49       openStackKeyStoneUrl: "http://10.12.25.2:5000"
50       openStackKeystoneAPIVersion: "v3"
51       openStackPublicNetId: "5771462c-9582-421c-b2dc-ee6a04ec9bde"
52       openStackTenantId: "c9ef9a6345b440b7a96d906a0f48c6b1"
53       openStackUserName: "openstack_user"
54       openStackUserDomain: "default"
55       openStackProjectName: "CLAMP"
56       ubuntu14Image: "trusty-server-cloudimg-amd64-disk1"
57       ubuntu16Image: "xenial-server-cloudimg-amd64-disk1"
58       openStackPrivateNetCidr: "10.0.0.0/16"
59       openStackPrivateNetId: "fd05c1ab-3f43-4f6f-8a8c-76aee04ef293"
60       openStackPrivateSubnetId: "fd05c1ab-3f43-4f6f-8a8c-76aee04ef293"
61       openStackSecurityGroup: "f05e9cbf-d40f-4d1f-9f91-d673ba591a3a"
62       openStackOamNetworkCidrPrefix: "10.0"
63       dcaeCollectorIp: "10.12.6.10"
64       vnfPubKey: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDKXDgoo3+WOqcUG8/5uUbk81+yczgwC4Y8ywTmuQqbNxlY1oQ0YxdMUqUnhitSXs5S/yRuAVOYHwGg2mCs20oAINrP+mxBI544AMIb9itPjCtgqtE2EWo6MmnFGbHB4Sx3XioE7F4VPsh7japsIwzOjbrQe+Mua1TGQ5d4nfEOQaaglXLLPFfuc7WbhbJbK6Q7rHqZfRcOwAMXgDoBqlyqKeiKwnumddo2RyNT8ljYmvB6buz7KnMinzo7qB0uktVT05FH9Rg0CTWH5norlG5qXgP2aukL0gk1ph8iAt7uYLf1ktp+LJI2gaF6L0/qli9EmVCSLr1uJ38Q8CBflhkh"
65       demoArtifactsVersion: "1.6.0"
66       demoArtifactsRepoUrl: "https://nexus.onap.org/content/repositories/releases"
67       scriptVersion: "1.6.0"
68       nfsIpAddress: "10.12.6.10"
69       config:
70         openStackEncryptedPasswordHere: "e10c86aa13e692020233d18f0ef6d527"
71         openStackSoEncryptedPassword: "1DD1B3B4477FBAFAFEA617C575639C6F09E95446B5AE1F46C72B8FD960219ABB0DBA997790FCBB12"
72     so:
73       enabled: true
74       so-catalog-db-adapter:
75         config:
76           openStackUserName: "opesntack_user"
77           openStackKeyStoneUrl: "http://10.12.25.2:5000/v3"
78           openStackEncryptedPasswordHere: "1DD1B3B4477FBAFAFEA617C575639C6F09E95446B5AE1F46C72B8FD960219ABB0DBA997790FCBB12"
79           openStackKeystoneVersion: "KEYSTONE_V3"
80
81 The values that must be changed according to your lab are all "openStack******" parameters +  dcaeCollectorIp + nfsIpAddress
82 To  know how to encrypt the openstack passwords, please look at the guide here:
83 https://docs.onap.org/projects/onap-oom/en/latest/oom_quickstart_guide.html
84
85 Initialize the Customer and Owning entities
86 ===========================================
87
88 The robot script can be helpful to initialize the customer and owning entity that
89 will be used later to instantiate the VNF (PART 2 - Scale Out Use Case Instantiation)
90
91 ::
92
93   In the oom_folder/kubernetes/robot/ execute the following command:
94   ./demo-k8s.sh onap init_customer
95
96 If this command is unsuccessful it means that the parameters provided to the OOM installation were not correct.
97
98 - Verify and Get the tenant/owning entity/cloud-regions defined in AAI by Robot script:
99   These values will be required by the POSTMAN collection when instantiating the Service/vnf ...
100
101 To get them some POSTMAN collection queries are useful to use:
102
103 - GET "AAI Owning Entities"
104 - GET "AAI Cloud-regions"
105 - GET "AAI Cloud-regions/tenant"
106
107 Description
108 ~~~~~~~~~~~
109
110 The scale out use case uses a VNF composed of three virtual functions. A traffic
111 generator (vPacketGen), a load balancer (vLB), and a DNS (vDNS). Communication
112 between the vPacketGen and the vLB, and the vLB and the vDNS occurs via two
113 separate private networks. In addition, all virtual functions have an interface
114 to the ONAP OAM private network, as shown in the topology below.
115
116 .. figure:: files/scaleout/topology.png
117    :align: center
118
119 The vPacketGen issues DNS lookup queries that reach the DNS server via the vLB.
120 vDNS replies reach the packet generator via the vLB as well. The vLB reports the
121 average amount of traffic per vDNS instances over a given time interval (e.g. 10
122 seconds) to the DCAE collector via the ONAP OAM private network.
123
124 To run the use case, make sure that the security group in OpenStack has
125 ingress/egress entries for protocol 47 (GRE). Users can test the VNF by running
126 DNS queries from the vPakcketGen:
127
128 ::
129
130   dig @vLoadBalancer_IP host1.dnsdemo.onap.org
131
132 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.
133
134 ::
135
136     ; <<>> DiG 9.10.3-P4-Ubuntu <<>> @192.168.9.111 host1.dnsdemo.onap.org
137     ; (1 server found)
138     ;; global options: +cmd
139     ;; Got answer:
140     ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 31892
141     ;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 2
142     ;; WARNING: recursion requested but not available
143
144     ;; OPT PSEUDOSECTION:
145     ; EDNS: version: 0, flags:; udp: 4096
146     ;; QUESTION SECTION:
147     ;host1.dnsdemo.onap.org.            IN      A
148
149     ;; ANSWER SECTION:
150     host1.dnsdemo.onap.org.     604800  IN      A       10.0.100.101
151
152     ;; AUTHORITY SECTION:
153     dnsdemo.onap.org.   604800  IN      NS      dnsdemo.onap.org.
154
155     ;; ADDITIONAL SECTION:
156     dnsdemo.onap.org.   604800  IN      A       10.0.100.100
157
158     ;; Query time: 0 msec
159     ;; SERVER: 192.168.9.111#53(192.168.9.111)
160     ;; WHEN: Fri Nov 10 17:39:12 UTC 2017
161     ;; MSG SIZE  rcvd: 97
162
163
164 The Scale Out Use Case
165 ~~~~~~~~~~~~~~~~~~~~~~
166
167 The Scale Out use case shows how users/network operators can add Virtual Network
168 Function Components (VNFCs) as part of a VF Module that has been instantiated in
169 the Service model, in order to increase capacity of the network. ONAP Frankfurt
170 release supports scale out with manual trigger by directly calling SO APIs and
171 closed-loop-enabled automation from Policy. For Frankfurt, the APPC controller is
172 used to demonstrate post-scaling VNF reconfiguration operations. APPC can handle
173 different VNF types, not only the VNF described in this document.
174
175 The figure below shows all the interactions that take place during scale out operations.
176
177 .. figure:: files/scaleout/scaleout.png
178    :align: center
179
180 There are four different message flows:
181   - Gray: This communication happens internally to the VNF and it is described in the section above.
182   - Green: Scale out with manual trigger.
183   - Red: Closed-loop enabled scale out.
184   - Black: Orchestration and VNF lifecycle management (LCM) operations.
185
186 The numbers in the figure represent the sequence of steps within a given flow.
187 Note that interactions between the components in the picture and AAI, SDNC, and
188 DMaaP are not shown for clarity's sake.
189
190 Scale out with manual trigger (green flow) and closed-loop-enabled scale out
191 (red flow) are mutually exclusive. When the manual trigger is used, VID directly
192 triggers the appropriate workflow in SO (step 1 of the green flow in the figure
193 above). See Section 4 for more details.
194
195 When closed-loop enabled scale out is used, Policy triggers the SO workflow.
196 The closed loop starts with the vLB periodically reporting telemetry about traffic
197 patterns to the VES collector in DCAE (step 1 of the red flow). When the amount
198 of traffic exceeds a given threshold (which the user defines during closed loop
199 creation in CLAMP - see Section 1-4), DCAE notifies Policy (step 2), which in turn
200 triggers the appropriate action. For this use case, the action is contacting SO to
201 augment resource capacity in the network (step 3).
202
203 At high level, once SO receives a call for scale out actions, it first creates a
204 new VF module (step 1 of the black flow), then calls APPC to trigger some LCM
205 actions (step 2). APPC runs VNF health check and configuration scale out as part
206 of LCM actions (step 3). At this time, the VNF health check only reports the
207 health status of the vLB, while the configuration scale out operation adds a new
208 vDNS instance to the vLB internal state. As a result of configuration scale out,
209 the vLB opens a connection towards the new vDNS instance.
210
211 At deeper level, the SO workflow works as depicted below:
212
213 .. figure:: files/scaleout/so-blocks.png
214    :align: center
215
216 SO first contacts APPC to run VNF health check and proceeds on to the next block
217 of the workflow only if the vLB is healthy (not shown in the previous figure for
218 simplicity's sake). Then, SO assigns resources, instantiates, and activates the
219 new VF module. Finally, SO calls APPC again for configuration scale out and VNF
220 health check. The VNF health check at the end of the workflow validates that the
221 vLB health status hasn't been negatively affected by the scale out operation.
222
223 PART 1 - Service Definition and Onboarding
224 ------------------------------------------
225
226 This use-case requires operations on several ONAP components to perform service definition and onboarding.
227
228 1-1 VNF Configuration Modeling and Upload with CDS (Recommended way)
229 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
230
231 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.
232
233 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.
234
235 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
236
237 ::
238
239   For the current use case you can also follow these steps (Do not use the SDC flow to deploy the CBA when importing a VSP, this is not going to work anymore since Guilin):
240   1. You must first bootstrap CDS by using the query in the POSTMAN collection query named POST "CDS Bootstrap"
241   2. You must upload the attached CBA by using the POSTMAN collection named POST "CDS Save without Validation", the CBA zip file can be attached in the POSTMAN query
242   Controller Blueprint Archive (to use with CDS) : https://git.onap.org/ccsdk/cds/tree/components/model-catalog/blueprint-model/service-blueprint/vLB_CDS_Kotlin?h=guilin
243   3. Create a zip file with the HEAT files located here:  https://git.onap.org/demo/tree/heat/vLB_CDS?h=guilin
244   4. Create the VSP & Service in the SDC onboarding and SDC Catalog + Distribute the service
245      To know the right values that must be set in the SDC Service properties assignment you must open the CBA zip and look at the TOSCA-Metadata/TOSCA.meta file
246       This file looks like that:
247           TOSCA-Meta-File-Version: 1.0.0
248           CSAR-Version: 1.0
249           Created-By: Seaudi, Abdelmuhaimen <abdelmuhaimen.seaudi@orange.com>
250           Entry-Definitions: Definitions/vLB_CDS.json
251           Template-Tags: vLB_CDS
252           Template-Name: vLB_CDS
253           Template-Version: 1.0.0
254           Template-Type: DEFAULT
255
256     - The sdnc_model_version is the Template-Version
257     - The sdnc_model_name is the Template-Name
258     - The sdnc_artifact_name is the prefix of the file you want to use in the Templates folder, in our CBA example it's vnf (that is supposed to reference the /Templates/vnf-mapping.json file)
259
260     Follow this guide for the VSP onboarding + service creation + properties assignment + distribution part (just skip the CBA attachment part as the CBA should have been pushed manually with the REST command): https://wiki.onap.org/pages/viewpage.action?pageId=64007442
261
262     Note that in case of issues with the AAI distribution, this may help : https://jira.onap.org/browse/AAI-1759
263
264 1-2 VNF Onboarding and Service Creation with SDC
265 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
266
267 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:
268 ::
269
270     zip ../vLB.zip *
271
272 For a complete description of service design and creation, please refer to the SDC documentation.
273
274 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!).
275
276 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:
277
278 .. figure:: files/scaleout/9.png
279    :align: center
280
281 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.
282
283 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.
284
285 .. figure:: files/scaleout/10.png
286    :align: center
287
288 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.
289
290 .. figure:: files/scaleout/11.png
291    :align: center
292
293
294 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.
295
296 To upload a DCAE blueprint, from the "Composition" tab in the service menu, select the artifact icon on the right, as shown below:
297
298 .. figure:: files/scaleout/1.png
299    :align: center
300
301 Upload the DCAE blueprint (choose the one depending on your ONAP release, as the orginal TCA was depecrated in Guilin a new one is available to use) linked at the top of the page using the pop-up window.
302
303 .. figure:: files/scaleout/2.png
304    :align: center
305
306 The blueprint will appear in the artifacts section on the right.
307
308 .. figure:: files/scaleout/3.png
309    :align: center
310
311 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.
312
313 .. figure:: files/scaleout/7.png
314    :align: center
315
316 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.
317
318 .. figure:: files/scaleout/8.png
319    :align: center
320
321 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.
322
323
324 1-3 Deploy Naming Policy
325 ~~~~~~~~~~~~~~~~~~~~~~~~
326
327 This step is only required if CDS is used.
328 Note that in Guilin, the default naming policy is already deployed in policy so this step is optional
329
330 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.
331
332 ::
333
334     kubectl exec -it dev-policy-drools-0
335     ./push_naming_policy.sh
336
337
338
339 1-4 Closed Loop Design with CLAMP
340 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
341
342 This step is only required if closed loop is used, for manual scaleout this section can be skipped.
343
344 Here are Json examples that can be copy pasted in each policy configuration by clicking on the button EDIT JSON, just replace the value "LOOP_test_vLB_CDS" by your loop ID:
345 For TCA config:
346 ::
347
348     {
349       "tca.policy": {
350         "domain": "measurementsForVfScaling",
351         "metricsPerEventName": [
352           {
353             "policyScope": "DCAE",
354             "thresholds": [
355               {
356                 "version": "1.0.2",
357                 "severity": "MAJOR",
358                 "thresholdValue": 200,
359                 "closedLoopEventStatus": "ONSET",
360                 "closedLoopControlName": "LOOP_test_vLB_CDS",
361                 "direction": "LESS_OR_EQUAL",
362                 "fieldPath": "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta"
363               }
364             ],
365             "eventName": "vLoadBalancer",
366             "policyVersion": "v0.0.1",
367             "controlLoopSchemaType": "VM",
368             "policyName": "DCAE.Config_tca-hi-lo"
369           }
370         ]
371       }
372     }
373
374 For Drools config:
375
376 ::
377
378     {
379       "abatement": false,
380       "operations": [
381         {
382           "failure_retries": "final_failure_retries",
383           "id": "policy-1-vfmodule-create",
384           "failure_timeout": "final_failure_timeout",
385           "failure": "final_failure",
386           "operation": {
387             "payload": {
388               "requestParameters": "{\"usePreload\":false,\"userParams\":[]}",
389               "configurationParameters": "[{\"ip-addr\":\"$.vf-module-topology.vf-module-parameters.param[16].value\",\"oam-ip-addr\":\"$.vf-module-topology.vf-module-parameters.param[30].value\"}]"
390             },
391             "target": {
392               "entityIds": {
393                 "resourceID": "Vlbcds..vdns..module-3",
394                 "modelInvariantId": "e95a2949-8ba5-433d-a88f-587a6244b4ea",
395                 "modelVersionId": "4a6ceddc-147e-471c-ae6f-907a0df76040",
396                 "modelName": "Vlbcds..vdns..module-3",
397                 "modelVersion": "1",
398                 "modelCustomizationId": "7806ed67-a826-4b0e-b474-9ca4fa052a10"
399               },
400               "targetType": "VFMODULE"
401             },
402             "actor": "SO",
403             "operation": "VF Module Create"
404           },
405           "failure_guard": "final_failure_guard",
406           "retries": 1,
407           "timeout": 300,
408           "failure_exception": "final_failure_exception",
409           "description": "test",
410           "success": "final_success"
411         }
412       ],
413       "trigger": "policy-1-vfmodule-create",
414       "timeout": 650,
415       "id": "LOOP_test_vLB_CDS"
416     }
417
418 For Frequency Limiter config:
419
420 ::
421
422     {
423       "id": "LOOP_test_vLB_CDS",
424       "actor": "SO",
425       "operation": "VF Module Create",
426       "limit": 1,
427       "timeWindow": 10,
428       "timeUnits": "minute"
429     }
430
431 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
432
433 Use the "Loop Instance" link to create a closed loop using a distributed model.
434
435 .. figure:: files/scaleout/clamp/1.png
436    :align: center
437
438 Select the distributed service model.
439
440 .. figure:: files/scaleout/clamp/2.png
441    :align: center
442
443 The closed loop main page for TCA microservices is shown below.
444
445 .. figure:: files/scaleout/clamp/3.png
446    :align: center
447
448 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.
449
450 .. figure:: files/scaleout/clamp/4.png
451    :align: center
452
453 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".
454
455 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.
456
457 .. figure:: files/scaleout/clamp/5.png
458    :align: center
459
460 Since Frankfurt, users are required to define the PDP group for the configuration policy, as shown in the figure below.
461
462 .. figure:: files/scaleout/clamp/6.png
463    :align: center
464
465 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:
466
467 .. figure:: files/scaleout/clamp/7.png
468    :align: center
469
470 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.
471
472 .. figure:: files/scaleout/clamp/8.png
473    :align: center
474
475 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:
476
477 .. figure:: files/scaleout/clamp/9.png
478    :align: center
479
480 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:
481
482 ::
483
484     {"requestParameters":"{\"usePreload\":true,\"userParams\":[]}",
485    "configurationParameters":"[{\"ip-addr\":\"$.vf-module-topology.vf-module-parameters.param[16]\",\"oam-ip-addr\":\"$.vf-module-topology.vf-module-parameters.param[30]\"}]"}
486
487 Users can use the "Edit JSON" button to upload the payload.
488
489 .. figure:: files/scaleout/clamp/10.png
490    :align: center
491
492 The Policy Engine passes the payload to SO, which will then use it during VF module instantiation to resolve configuration parameters. The JSON path
493
494 ::
495
496     "ip-addr":"$.vf-module-topology.vf-module-parameters.param[16].value"
497
498 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.
499
500 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.
501
502 .. figure:: files/scaleout/clamp/11.png
503    :align: center
504
505 As with configuration policy, users need to assign the PDP group to the operational policy.
506
507 .. figure:: files/scaleout/clamp/12.png
508    :align: center
509
510 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.
511
512 .. figure:: files/scaleout/clamp/13.png
513    :align: center
514
515 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:
516
517 .. figure:: files/scaleout/clamp/14.png
518    :align: center
519
520 The user needs to manually insert id, actor, and operation so as to match the same fields defined in the operational policy.
521
522 .. figure:: files/scaleout/clamp/15.png
523    :align: center
524
525 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.
526
527 .. figure:: files/scaleout/clamp/16.png
528    :align: center
529
530 At this point, the closed loop is deployed to Policy Engine and DCAE, and a new microservice will be deployed to the DCAE platform.
531
532
533 1-5 Creating a VNF Template with CDT
534 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
535
536 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.
537 CDT requires two input:
538
539 1) the list of parameters that APPC will receive (ip-addr, oam-ip-addr, enabled in the example above);
540
541 2) the VNF API that APPC will use to reconfigure the VNF.
542
543 Below is an example of the parameters file (yaml format), which we call parameters.yaml:
544 ::
545
546     version: V1
547     vnf-parameter-list:
548     - name: ip-addr
549       type: null
550       description: null
551       required: "true"
552       default: null
553       source: Manual
554       rule-type: null
555       request-keys: null
556       response-keys: null
557     - name: oam-ip-addr
558       type: null
559       description: null
560       required: "true"
561       default: null
562       source: Manual
563       rule-type: null
564       request-keys: null
565       response-keys: null
566     - name: enabled
567       type: null
568       description: null
569       required: "false"
570       default: null
571       source: Manual
572       rule-type: null
573       request-keys: null
574       response-keys: null
575
576 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):
577 ::
578
579     <vlb-business-vnf-onap-plugin xmlns="urn:opendaylight:params:xml:ns:yang:vlb-business-vnf-onap-plugin">
580         <vdns-instances>
581             <vdns-instance>
582                 <ip-addr>${ip-addr}</ip-addr>
583                 <oam-ip-addr>${oam-ip-addr}</oam-ip-addr>
584                 <enabled>true</enabled>
585             </vdns-instance>
586         </vdns-instances>
587     </vlb-business-vnf-onap-plugin>
588
589 To create the VNF template in CDT, the following steps are required:
590
591 - Connect to the CDT GUI: http://ANY_K8S_IP:30289
592 - Click "My VNF" Tab. Create your user ID, if necessary
593 - Click "Create new VNF" entering the VNF type as reported in VID or AAI, e.g. vLoadBalancerMS/vLoadBalancerMS 0
594 - Select "ConfigScaleOut" action
595 - Create a new template identifier using the VNF type name in service model as template name, e.g. Vloadbalancerms..vdns..module-3
596 - Select protocol (Netconf-XML), VNF username (admin), and VNF port number (2831 for NETCONF)
597 - Click "Parameter Definition" Tab and upload the parameters (.yaml) file
598 - Click "Template Tab" and upload API template (.yaml) file
599 - Click "Reference Data" Tab
600 - Click "Save All to APPC"
601
602 Note, if a user gets an error when saving to Appc (cannot connect to AppC network), he should open a browser to http://ANY_K8S_IP:30211 to accept AppC proxy certificate
603
604 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:
605 ::
606
607   restconf/operational/health-vnf-onap-plugin:health-vnf-onap-plugin-state/health-check
608
609 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.
610 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:
611 ::
612
613   mysql -u sdnctl -p (type "gamma" when password is prompted)
614   use sdnctl;
615   UPDATE DEVICE_AUTHENTICATION SET PASSWORD='admin' WHERE
616   VNF_TYPE='vLoadBalancerMS/vLoadBalancerMS 0'; (use your VNF type)
617
618
619 1-6 Setting the Controller Type in SO Database
620 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
621
622 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.
623
624 To do so:
625
626 - Connect to one of the replicas of the MariaDB database
627 - Type
628
629 ::
630
631     mysql -ucataloguser -pcatalog123
632
633 - Use catalogdb database
634
635 ::
636
637     use catalogdb;
638
639 - Create an association between APPC and the VNF type, for example:
640
641 ::
642
643     INSERT INTO controller_selection_reference (`VNF_TYPE`, `CONTROLLER_NAME`, `ACTION_CATEGORY`) VALUES ('<VNF Type>', 'APPC', 'ConfigScaleOut');
644     INSERT INTO controller_selection_reference (`VNF_TYPE`, `CONTROLLER_NAME`, `ACTION_CATEGORY`) VALUES ('<VNF Type>', 'APPC', 'HealthCheck');
645
646 SO has a default entry for VNF type "vLoadBalancerMS/vLoadBalancerMS 0"
647
648
649 1-7 Determining VNF reconfiguration parameters
650 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
651
652 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.
653
654 ::
655
656     "configurationParameters": [
657             {
658                 "ip-addr": "$.vf-module-topology.vf-module-parameters.param[16].value",
659                 "oam-ip-addr": "$.vf-module-topology.vf-module-parameters.param[30].value"
660             }
661     ]
662
663 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.
664
665 Users can determine the correct location by querying the SDNC topology object. The URL can be obtained from AAI following these steps:
666
667 1) Retrieve the list of VNF instances in AAI using the following link:
668
669 ::
670
671     curl -k -X GET \
672   https://<Any_K8S_Node_IP_Address>:30233/aai/v16/network/generic-vnfs \
673   -H 'Accept: application/json' \
674   -H 'Authorization: Basic QUFJOkFBSQ==' \
675   -H 'Content-Type: application/json' \
676   -H 'X-FromAppId: AAI' \
677   -H 'X-TransactionId: get_aai_subscr'
678
679 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:
680
681 ::
682
683     curl -k -X GET \
684   https://<Any_K8S_Node_IP_Address>:30233/aai/v16/network/generic-vnfs/generic-vnf/0e905228-c719-489a-9bcc-4470f3254e87/vf-modules \
685   -H 'Accept: application/json' \
686   -H 'Authorization: Basic QUFJOkFBSQ==' \
687   -H 'Content-Type: application/json' \
688   -H 'X-FromAppId: AAI' \
689   -H 'X-TransactionId: get_aai_subscr'
690
691 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.
692
693 The selflink has the following structure:
694
695 ::
696
697     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/
698
699 The complete URL to access the VF module topology in SDNC becomes:
700
701 ::
702
703     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/
704
705 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).
706
707 ::
708
709     {
710     "vf-module-topology": {
711         "onap-model-information": {
712             "model-name": "VlbCds..vdns..module-3",
713             "model-invariant-uuid": "b985f371-4c59-45f7-b53e-36f970946469",
714             "model-version": "1",
715             "model-customization-uuid": "613b6877-0231-4ca4-90e4-4aa3374674ef",
716             "model-uuid": "739e4a32-f744-47be-9208-5dcf15772306"
717         },
718         "vf-module-parameters": {
719             "param": [
720                 {
721                     "name": "vfc_customization_uuid",
722                     "value": "770af15f-564d-438c-ba3e-6df318c2b1fe",
723                     "resource-resolution-data": {
724                         "capability-name": "RA Resolved",
725                         "status": "SUCCESS"
726                     }
727                 },
728                 {
729                     "name": "key_name",
730                     "value": "${key_name}",
731                     "resource-resolution-data": {
732                         "capability-name": "RA Resolved",
733                         "status": "SUCCESS"
734                     }
735                 },
736                 {
737                     "name": "vdns_flavor_name",
738                     "value": "m1.medium",
739                     "resource-resolution-data": {
740                         "capability-name": "RA Resolved",
741                         "status": "SUCCESS"
742                     }
743                 },
744                 {
745                     "name": "cloud_env",
746                     "value": "openstack",
747                     "resource-resolution-data": {
748                         "capability-name": "RA Resolved",
749                         "status": "SUCCESS"
750                     }
751                 },
752                 {
753                     "name": "vnfc-model-customization-uuid",
754                     "value": "770af15f-564d-438c-ba3e-6df318c2b1fe",
755                     "resource-resolution-data": {
756                         "capability-name": "RA Resolved",
757                         "status": "SUCCESS"
758                     }
759                 },
760                 {
761                     "name": "vf-module-name",
762                     "value": "RegionOne_ONAP-NF_20191010T013003141Z_vdns_Expansion_003",
763                     "resource-resolution-data": {
764                         "capability-name": "generate-name",
765                         "resource-key": [
766                             {
767                                 "name": "VF_MODULE_LABEL",
768                                 "value": "vdns"
769                             },
770                             {
771                                 "name": "resource-name",
772                                 "value": "vf-module-name"
773                             },
774                             {
775                                 "name": "resource-value",
776                                 "value": "${vf-module-name}"
777                             },
778                             {
779                                 "name": "naming-type",
780                                 "value": "VF-MODULE"
781                             },
782                             {
783                                 "name": "VNF_NAME",
784                                 "value": "RegionOne_ONAP-NF_20191010T013003141Z"
785                             },
786                             {
787                                 "name": "external-key",
788                                 "value": "793df714-106e-40a6-a28a-746b65f9e247_vf-module-name"
789                             },
790                             {
791                                 "name": "policy-instance-name",
792                                 "value": "SDNC_Policy.Config_MS_ONAP_VNF_NAMING_TIMESTAMP"
793                             },
794                             {
795                                 "name": "VF_MODULE_TYPE",
796                                 "value": "Expansion"
797                             }
798                         ],
799                         "status": "SUCCESS"
800                     }
801                 },
802                 {
803                     "name": "vnfc-model-version",
804                     "value": "1.0",
805                     "resource-resolution-data": {
806                         "capability-name": "RA Resolved",
807                         "status": "SUCCESS"
808                     }
809                 },
810                 {
811                     "name": "pktgen_private_net_cidr",
812                     "value": "${pktgen_private_net_cidr}",
813                     "resource-resolution-data": {
814                         "capability-name": "RA Resolved",
815                         "status": "SUCCESS"
816                     }
817                 },
818                 {
819                     "name": "vnf_model_customization_uuid",
820                     "value": "c7be2fca-9a5c-4364-8c32-801e64f90ccd",
821                     "resource-resolution-data": {
822                         "capability-name": "RA Resolved",
823                         "status": "SUCCESS"
824                     }
825                 },
826                 {
827                     "name": "service-instance-id",
828                     "value": "4545562a-cbe3-409a-8227-0b863f5bc34e",
829                     "resource-resolution-data": {
830                         "capability-name": "RA Resolved",
831                         "status": "SUCCESS"
832                     }
833                 },
834                 {
835                     "name": "vlb_private_net_cidr",
836                     "value": "192.168.10.0/24",
837                     "resource-resolution-data": {
838                         "capability-name": "RA Resolved",
839                         "status": "SUCCESS"
840                     }
841                 },
842                 {
843                     "name": "install_script_version",
844                     "value": "1.5.0-SNAPSHOT",
845                     "resource-resolution-data": {
846                         "capability-name": "RA Resolved",
847                         "status": "SUCCESS"
848                     }
849                 },
850                 {
851                     "name": "vlb_int_private_ip_0",
852                     "value": "192.168.10.50",
853                     "resource-resolution-data": {
854                         "capability-name": "RA Resolved",
855                         "status": "SUCCESS"
856                     }
857                 },
858                 {
859                     "name": "vnfc-model-invariant-uuid",
860                     "value": "49e70b6f-87e7-4f68-b1ec-958e68c7cbf5",
861                     "resource-resolution-data": {
862                         "capability-name": "RA Resolved",
863                         "status": "SUCCESS"
864                     }
865                 },
866                 {
867                     "name": "pub_key",
868                     "value": "${pub_key}",
869                     "resource-resolution-data": {
870                         "capability-name": "RA Resolved",
871                         "status": "SUCCESS"
872                     }
873                 },
874                 {
875                     "name": "onap_private_net_cidr",
876                     "value": "10.0.0.0/8",
877                     "resource-resolution-data": {
878                         "capability-name": "RA Resolved",
879                         "status": "SUCCESS"
880                     }
881                 },
882                 {
883                     "name": "vdns_int_private_ip_0",
884                     "value": "192.168.10.54",
885                     "resource-resolution-data": {
886                         "capability-name": "netbox-ip-assign",
887                         "resource-key": [
888                             {
889                                 "name": "external_key",
890                                 "value": "0e905228-c719-489a-9bcc-4470f3254e87-vdns_int_private_ip_0"
891                             },
892                             {
893                                 "name": "vnf-id",
894                                 "value": "0e905228-c719-489a-9bcc-4470f3254e87"
895                             },
896                             {
897                                 "name": "service-instance-id",
898                                 "value": "4545562a-cbe3-409a-8227-0b863f5bc34e"
899                             },
900                             {
901                                 "name": "prefix-id",
902                                 "value": "2"
903                             }
904                         ],
905                         "status": "SUCCESS"
906                     }
907                 },
908                 {
909                     "name": "vnf_id",
910                     "value": "0e905228-c719-489a-9bcc-4470f3254e87",
911                     "resource-resolution-data": {
912                         "capability-name": "RA Resolved",
913                         "status": "SUCCESS"
914                     }
915                 },
916                 {
917                     "name": "nfc-naming-code",
918                     "value": "vdns",
919                     "resource-resolution-data": {
920                         "capability-name": "RA Resolved",
921                         "status": "SUCCESS"
922                     }
923                 },
924                 {
925                     "name": "onap_private_subnet_id",
926                     "value": "oam_network_qXyY",
927                     "resource-resolution-data": {
928                         "capability-name": "RA Resolved",
929                         "status": "SUCCESS"
930                     }
931                 },
932                 {
933                     "name": "vf_module_customization_uuid",
934                     "value": "613b6877-0231-4ca4-90e4-4aa3374674ef",
935                     "resource-resolution-data": {
936                         "capability-name": "RA Resolved",
937                         "status": "SUCCESS"
938                     }
939                 },
940                 {
941                     "name": "vf_module_type",
942                     "value": "Expansion",
943                     "resource-resolution-data": {
944                         "capability-name": "RA Resolved",
945                         "status": "SUCCESS"
946                     }
947                 },
948                 {
949                     "name": "vlb_onap_private_ip_0",
950                     "value": "10.0.101.32",
951                     "resource-resolution-data": {
952                         "capability-name": "RA Resolved",
953                         "status": "SUCCESS"
954                     }
955                 },
956                 {
957                     "name": "vf_module_id",
958                     "value": "793df714-106e-40a6-a28a-746b65f9e247",
959                     "resource-resolution-data": {
960                         "capability-name": "RA Resolved",
961                         "status": "SUCCESS"
962                     }
963                 },
964                 {
965                     "name": "vdns_name_0",
966                     "value": "RegionOne_ONAP-NF_20191010T013003141Z_vdns_003",
967                     "resource-resolution-data": {
968                         "capability-name": "generate-name",
969                         "resource-key": [
970                             {
971                                 "name": "resource-name",
972                                 "value": "vdns_name_0"
973                             },
974                             {
975                                 "name": "resource-value",
976                                 "value": "${vdns_name_0}"
977                             },
978                             {
979                                 "name": "naming-type",
980                                 "value": "VNFC"
981                             },
982                             {
983                                 "name": "VNF_NAME",
984                                 "value": "RegionOne_ONAP-NF_20191010T013003141Z"
985                             },
986                             {
987                                 "name": "external-key",
988                                 "value": "793df714-106e-40a6-a28a-746b65f9e247_vdns_name_0"
989                             },
990                             {
991                                 "name": "policy-instance-name",
992                                 "value": "SDNC_Policy.Config_MS_ONAP_VNF_NAMING_TIMESTAMP"
993                             },
994                             {
995                                 "name": "NFC_NAMING_CODE",
996                                 "value": "vdns"
997                             }
998                         ],
999                         "status": "SUCCESS"
1000                     }
1001                 },
1002                 {
1003                     "name": "vm-type",
1004                     "value": "vdns",
1005                     "resource-resolution-data": {
1006                         "capability-name": "RA Resolved",
1007                         "status": "SUCCESS"
1008                     }
1009                 },
1010                 {
1011                     "name": "vlb_int_pktgen_private_ip_0",
1012                     "value": "192.168.20.35",
1013                     "resource-resolution-data": {
1014                         "capability-name": "RA Resolved",
1015                         "status": "SUCCESS"
1016                     }
1017                 },
1018                 {
1019                     "name": "onap_private_net_id",
1020                     "value": "oam_network_qXyY",
1021                     "resource-resolution-data": {
1022                         "capability-name": "RA Resolved",
1023                         "status": "SUCCESS"
1024                     }
1025                 },
1026                 {
1027                     "name": "nb_api_version",
1028                     "value": "1.2.0",
1029                     "resource-resolution-data": {
1030                         "capability-name": "RA Resolved",
1031                         "status": "SUCCESS"
1032                     }
1033                 },
1034                 {
1035                     "name": "vdns_image_name",
1036                     "value": "${image_name}",
1037                     "resource-resolution-data": {
1038                         "capability-name": "RA Resolved",
1039                         "status": "SUCCESS"
1040                     }
1041                 },
1042                 {
1043                     "name": "vdns_onap_private_ip_0",
1044                     "value": "10.0.101.35",
1045                     "resource-resolution-data": {
1046                         "capability-name": "netbox-ip-assign",
1047                         "resource-key": [
1048                             {
1049                                 "name": "external_key",
1050                                 "value": "0e905228-c719-489a-9bcc-4470f3254e87-vdns_onap_private_ip_0"
1051                             },
1052                             {
1053                                 "name": "vnf-id",
1054                                 "value": "0e905228-c719-489a-9bcc-4470f3254e87"
1055                             },
1056                             {
1057                                 "name": "service-instance-id",
1058                                 "value": "4545562a-cbe3-409a-8227-0b863f5bc34e"
1059                             },
1060                             {
1061                                 "name": "prefix-id",
1062                                 "value": "3"
1063                             }
1064                         ],
1065                         "status": "SUCCESS"
1066                     }
1067                 },
1068                 {
1069                     "name": "aai-vf-module-put",
1070                     "value": "SUCCESS",
1071                     "resource-resolution-data": {
1072                         "capability-name": "aai-vf-module-put",
1073                         "resource-key": [
1074                             {
1075                                 "name": "vf-module",
1076                                 "value": "vf-module"
1077                             }
1078                         ],
1079                         "status": "SUCCESS"
1080                     }
1081                 },
1082                 {
1083                     "name": "aic-cloud-region",
1084                     "value": "${aic-cloud-region}",
1085                     "resource-resolution-data": {
1086                         "capability-name": "RA Resolved",
1087                         "status": "SUCCESS"
1088                     }
1089                 },
1090                 {
1091                     "name": "nfc-function",
1092                     "value": "${nf-role}",
1093                     "resource-resolution-data": {
1094                         "capability-name": "RA Resolved",
1095                         "status": "SUCCESS"
1096                     }
1097                 },
1098                 {
1099                     "name": "sec_group",
1100                     "value": "onap_sg_qXyY",
1101                     "resource-resolution-data": {
1102                         "capability-name": "RA Resolved",
1103                         "status": "SUCCESS"
1104                     }
1105                 },
1106                 {
1107                     "name": "vnf_name",
1108                     "value": "RegionOne_ONAP-NF_20191010T013003141Z",
1109                     "resource-resolution-data": {
1110                         "capability-name": "RA Resolved",
1111                         "status": "SUCCESS"
1112                     }
1113                 },
1114                 {
1115                     "name": "nexus_artifact_repo",
1116                     "value": "https://nexus.onap.org",
1117                     "resource-resolution-data": {
1118                         "capability-name": "RA Resolved",
1119                         "status": "SUCCESS"
1120                     }
1121                 },
1122                 {
1123                     "name": "public_net_id",
1124                     "value": "external",
1125                     "resource-resolution-data": {
1126                         "capability-name": "RA Resolved",
1127                         "status": "SUCCESS"
1128                     }
1129                 }
1130             ]
1131         },
1132         "tenant": "41d6d38489bd40b09ea8a6b6b852dcbd",
1133         "sdnc-generated-cloud-resources": true,
1134         "vf-module-topology-identifier": {
1135             "vf-module-id": "793df714-106e-40a6-a28a-746b65f9e247",
1136             "vf-module-name": "vfModuleName",
1137             "vf-module-type": "VlbCds..vdns..module-3"
1138         },
1139         "aic-cloud-region": "RegionOne"
1140     }}
1141
1142 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:
1143
1144 ::
1145
1146     [{"ip-addr":"$.vf-module-topology.vf-module-parameters.param[16].value","oam-ip-addr":"$.vf-module-topology.vf-module-parameters.param[30].value"}]
1147
1148 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.
1149
1150
1151 PART 2 - Scale Out Use Case Instantiation
1152 -----------------------------------------
1153
1154 Manual queries with POSTMAN
1155 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
1156
1157 This step is only required if CDS is used, otherwise you can use VID to instantiate the service and the VNF.
1158 Note that the POSTMAN collection linked at the top of this page, does provide some level of automatic scripting that will automatically get values between requests and provision the following queries
1159
1160 You must enter in the postman config different variables:
1161 - "k8s" -> The k8s loadBalancer cluster node
1162 - "cds-service-model" -> The SDC service name distributed
1163 - "cds-instance-name" -> A name of your choice for the vnf instance (This must be changed each time you launch the instantiation)
1164
1165 These useful requests are:
1166 CDS#1 - SDC Catalog Service -> This gets the Sdc service and provision some variables
1167 CDS#2 - SO Catalog DB Service VNFs - CDS -> This gets info in SO and provision some variables for the instantiation
1168 CDS#3 - SO Self-Serve Service Assign & Activate -> This starts the Service/vnf instantiation
1169 Open the body and replace the values like tenantId, Owning entity, region, and all the openstack values everywhere in the payload
1170
1171 Note that you may have to add "onap_private_net_cidr":"10.0.0.0/16" in the "instanceParams" array depending of your openstack network configuration.
1172
1173 CDS#4 - SO infra Active Request -> Used to get the status of the previous query
1174
1175 Manual queries without POSTMAN
1176 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1177
1178 GET information from SDC catalogdb
1179
1180 ::
1181
1182   curl -X GET \
1183     'https://{{k8s}}:30204/sdc/v1/catalog/services' \
1184     -H 'Authorization: Basic dmlkOktwOGJKNFNYc3pNMFdYbGhhazNlSGxjc2UyZ0F3ODR2YW9HR21KdlV5MlU=' \
1185     -H 'X-ECOMP-InstanceID: VID' \
1186     -H 'cache-control: no-cache'
1187
1188
1189 In the response you should find values for:
1190
1191 * service-uuid
1192 * service-invariantUUID
1193 * service-name
1194
1195
1196 GET informations from SO catalogdb.
1197
1198 ::
1199
1200   curl -X GET \
1201     'http://{{k8s}}:30744/ecomp/mso/catalog/v2/serviceVnfs?serviceModelName={{service-name}}' \
1202     -H 'Authorization: Basic YnBlbDpwYXNzd29yZDEk' \
1203     -H 'cache-control: no-cache'
1204
1205
1206 In the response you should find values for:
1207
1208 * vnf-modelinfo-modelname
1209 * vnf-modelinfo-modeluuid
1210 * vnf-modelinfo-modelinvariantuuid
1211 * vnf-modelinfo-modelcustomizationuuid
1212 * vnf-modelinfo-modelinstancename
1213 * vnf-vfmodule-0-modelinfo-modelname
1214 * vnf-vfmodule-0-modelinfo-modeluuid
1215 * vnf-vfmodule-0-modelinfo-modelinvariantuuid
1216 * vnf-vfmodule-0-modelinfo-modelcustomizationuuid
1217 * vnf-vfmodule-1-modelinfo-modelname
1218 * vnf-vfmodule-1-modelinfo-modeluuid
1219 * vnf-vfmodule-1-modelinfo-modelinvariantuuid
1220 * vnf-vfmodule-1-modelinfo-modelcustomizationuuid
1221 * vnf-vfmodule-2-modelinfo-modelname
1222 * vnf-vfmodule-2-modelinfo-modeluuid
1223 * vnf-vfmodule-2-modelinfo-modelinvariantuuid
1224 * vnf-vfmodule-2-modelinfo-modelcustomizationuuid
1225 * vnf-vfmodule-3-modelinfo-modelname
1226 * vnf-vfmodule-3-modelinfo-modeluuid
1227 * vnf-vfmodule-3-modelinfo-modelinvariantuuid
1228 * vnf-vfmodule-3-modelinfo-modelcustomizationuuid
1229
1230
1231 Note : all those informations are also available in the TOSCA service template in the SDC
1232
1233 You need after:
1234
1235 * the SSH public key value that will allow you to connect to the VM.
1236 * the cloudSite name and TenantId where to deploy the service
1237 * the name of the security group that will be used in the tenant for your service
1238 * the name of the network that will be used to connect your VM
1239 * the name of your OpenStack image
1240 * the name of your OpenStack VM flavor
1241
1242 We supposed here that we are using some already declared informations:
1243
1244 * customer named "Demonstration"
1245 * subscriptionServiceType named "vLB"
1246 * projectName named "Project-Demonstration"
1247 * owningEntityName named "OE-Demonstration"
1248 * platformName named "test"
1249 * lineOfBusinessName named "someValue"
1250
1251 Having all those information, you are now able to build the SO Macro request
1252 that will instantiate Service, VNF, VF modules and Heat stacks:
1253
1254 ::
1255
1256   curl -X POST \
1257   'http://{{k8s}}:30277/onap/so/infra/serviceInstantiation/v7/serviceInstances' \
1258   -H 'Content-Type: application/json' \
1259   -H 'cache-control: no-cache' \
1260   -d '{
1261    "requestDetails":{
1262       "subscriberInfo":{
1263          "globalSubscriberId":"Demonstration"
1264       },
1265       "requestInfo":{
1266          "suppressRollback":false,
1267          "productFamilyId":"a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
1268          "requestorId":"adt",
1269          "instanceName":"{{cds-instance-name}}",
1270          "source":"VID"
1271       },
1272       "cloudConfiguration":{
1273          "lcpCloudRegionId":"RegionOne",
1274          "tenantId":"41d6d38489bd40b09ea8a6b6b852dcbd",
1275          "cloudOwner":"CloudOwner"
1276       },
1277       "requestParameters":{
1278          "subscriptionServiceType":"vLB",
1279          "userParams":[
1280             {
1281                "Homing_Solution":"none"
1282             },
1283             {
1284                "service":{
1285                   "instanceParams":[
1286
1287                   ],
1288                   "instanceName":"{{cds-instance-name}}",
1289                   "resources":{
1290                      "vnfs":[
1291                         {
1292                            "modelInfo":{
1293                               "modelName":"{{vnf-modelinfo-modelname}}",
1294                               "modelVersionId":"{{vnf-modelinfo-modeluuid}}",
1295                               "modelInvariantUuid":"{{vnf-modelinfo-modelinvariantuuid}}",
1296                               "modelVersion":"1.0",
1297                               "modelCustomizationId":"{{vnf-modelinfo-modelcustomizationuuid}}",
1298                               "modelInstanceName":"{{vnf-modelinfo-modelinstancename}}"
1299                            },
1300                            "cloudConfiguration":{
1301                               "lcpCloudRegionId":"RegionOne",
1302                               "tenantId":"41d6d38489bd40b09ea8a6b6b852dcbd"
1303                            },
1304                            "platform":{
1305                               "platformName":"test"
1306                            },
1307                            "lineOfBusiness":{
1308                               "lineOfBusinessName":"LOB-Demonstration"
1309                            },
1310                            "productFamilyId":"a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
1311                            "instanceName":"{{vnf-modelinfo-modelinstancename}}",
1312                            "instanceParams":[
1313                               {
1314                                  "onap_private_net_id":"oam_network_qXyY",
1315                                  "dcae_collector_ip":"10.12.5.214",
1316                                  "onap_private_subnet_id":"oam_network_qXyY",
1317                                  "pub_key":"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDKXDgoo3+WOqcUG8/5uUbk81+yczgwC4Y8ywTmuQqbNxlY1oQ0YxdMUqUnhitSXs5S/yRuAVOYHwGg2mCs20oAINrP+mxBI544AMIb9itPjCtgqtE2EWo6MmnFGbHB4Sx3XioE7F4VPsh7japsIwzOjbrQe+Mua1TGQ5d4nfEOQaaglXLLPFfuc7WbhbJbK6Q7rHqZfRcOwAMXgDoBqlyqKeiKwnumddo2RyNT8ljYmvB6buz7KnMinzo7qB0uktVT05FH9Rg0CTWH5norlG5qXgP2aukL0gk1ph8iAt7uYLf1ktp+LJI2gaF6L0/qli9EmVCSLr1uJ38Q8CBflhkh",
1318                                  "sec_group":"onap_sg_qXyY",
1319                                  "install_script_version":"1.5.0",
1320                                  "demo_artifacts_version":"1.5.0",
1321                                  "cloud_env":"openstack",
1322                                  "flavor_name":"m1.medium",
1323                                  "public_net_id":"external",
1324                                  "image_name":"ubuntu-16-04-cloud-amd64"
1325                               }
1326                            ],
1327                            "vfModules":[
1328                               {
1329                                  "modelInfo":{
1330                                     "modelName":"{{vnf-vfmodule-0-modelinfo-modelname}}",
1331                                     "modelVersionId":"{{vnf-vfmodule-0-modelinfo-modeluuid}}",
1332                                     "modelInvariantUuid":"{{vnf-vfmodule-0-modelinfo-modelinvariantuuid}}",
1333                                     "modelVersion":"1",
1334                                     "modelCustomizationId":"{{vnf-vfmodule-0-modelinfo-modelcustomizationuuid}}"
1335                                  },
1336                                  "instanceName":"{{vnf-vfmodule-0-modelinfo-modelname}}",
1337                                  "instanceParams":[
1338                                     {
1339                                        "sec_group":"onap_sg_imAd",
1340                                        "public_net_id":"external"
1341                                     }
1342                                  ]
1343                               },
1344                               {
1345                                  "modelInfo":{
1346                                     "modelName":"{{vnf-vfmodule-1-modelinfo-modelname}}",
1347                                     "modelVersionId":"{{vnf-vfmodule-1-modelinfo-modeluuid}}",
1348                                     "modelInvariantUuid":"{{vnf-vfmodule-1-modelinfo-modelinvariantuuid}}",
1349                                     "modelVersion":"1",
1350                                     "modelCustomizationId":"{{vnf-vfmodule-1-modelinfo-modelcustomizationuuid}}"
1351                                  },
1352                                  "instanceName":"{{vnf-vfmodule-1-modelinfo-modelname}}",
1353                                  "instanceParams":[
1354                                     {
1355                                        "sec_group":"onap_sg_imAd",
1356                                        "public_net_id":"external"
1357                                     }
1358                                  ]
1359                               },
1360                               {
1361                                  "modelInfo":{
1362                                     "modelName":"{{vnf-vfmodule-2-modelinfo-modelname}}",
1363                                     "modelVersionId":"{{vnf-vfmodule-2-modelinfo-modeluuid}}",
1364                                     "modelInvariantUuid":"{{vnf-vfmodule-2-modelinfo-modelinvariantuuid}}",
1365                                     "modelVersion":"1",
1366                                     "modelCustomizationId":"{{vnf-vfmodule-2-modelinfo-modelcustomizationuuid}}"
1367                                  },
1368                                  "instanceName":"{{vnf-vfmodule-2-modelinfo-modelname}}",
1369                                  "instanceParams":[
1370                                     {
1371                                        "sec_group":"onap_sg_imAd",
1372                                        "public_net_id":"external"
1373                                     }
1374                                  ]
1375                               },
1376                               {
1377                                  "modelInfo":{
1378                                     "modelName":"{{vnf-vfmodule-3-modelinfo-modelname}}",
1379                                     "modelVersionId":"{{vnf-vfmodule-3-modelinfo-modeluuid}}",
1380                                     "modelInvariantUuid":"{{vnf-vfmodule-3-modelinfo-modelinvariantuuid}}",
1381                                     "modelVersion":"1",
1382                                     "modelCustomizationId":"{{vnf-vfmodule-3-modelinfo-modelcustomizationuuid}}"
1383                                  },
1384                                  "instanceName":"{{vnf-vfmodule-3-modelinfo-modelname}}",
1385                                  "instanceParams":[
1386                                     {
1387                                        "sec_group":"onap_sg_imAd",
1388                                        "public_net_id":"external"
1389                                     }
1390                                  ]
1391                               }
1392                            ]
1393                         }
1394                      ]
1395                   },
1396                   "modelInfo":{
1397                      "modelVersion":"1.0",
1398                      "modelVersionId":"{{service-uuid}}",
1399                      "modelInvariantId":"{{service-invariantUUID}}",
1400                      "modelName":"{{service-name}}",
1401                      "modelType":"service"
1402                   }
1403                }
1404             }
1405          ],
1406          "aLaCarte":false
1407       },
1408       "project":{
1409          "projectName":"Project-Demonstration"
1410       },
1411       "owningEntity":{
1412         "owningEntityId":"6f6c49d0-8a8c-4704-9174-321bcc526cc0",
1413         "owningEntityName":"OE-Demonstration"
1414       },
1415       "modelInfo":{
1416         "modelVersion":"1.0",
1417         "modelVersionId":"{{service-uuid}}",
1418         "modelInvariantId":"{{service-invariantUUID}}",
1419         "modelName":"{{service-name}}",
1420         "modelType":"service"}}}'
1421
1422 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:
1423
1424 ::
1425
1426   curl -X GET \
1427     'http://{{k8s}}:30086/infraActiveRequests/{{requestid}}' \
1428     -H 'cache-control: no-cache'
1429
1430
1431
1432
1433
1434 PART 3 - Post Instantiation Operations
1435 --------------------------------------
1436
1437 3-1 Post Instantiation VNF configuration
1438 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1439
1440 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.
1441
1442 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:
1443
1444 ::
1445
1446   curl -X PUT \
1447   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 \
1448   -H 'Accept: application/json' \
1449   -H 'Content-Type: application/json' \
1450   -H 'Postman-Token: a708b064-adb1-4804-89a7-ee604f5fe76f' \
1451   -H 'cache-control: no-cache' \
1452   -d '{
1453     "vdns-instance": [
1454         {
1455             "ip-addr": "192.168.10.59",
1456             "oam-ip-addr": "10.0.101.49",
1457             "enabled": true
1458         }
1459     ]
1460   }'
1461
1462 At this point, the VNF is fully set up.
1463
1464
1465 3-2 Updating AAI with VNF resources
1466 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1467
1468 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:
1469
1470 ::
1471
1472     ./demo-k8s.sh onap heatbridge <vLB stack_name in OpenStack> <service_instance_id> vLB vlb_onap_private_ip_0
1473
1474 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.
1475
1476
1477 PART 4 - Triggering Scale Out Manually
1478 --------------------------------------
1479
1480 For scale out with manual trigger, VID is not supported at this time.
1481
1482 Manual queries with POSTMAN
1483 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1484
1485 Note that the POSTMAN collection linked at the top of this page, does provide some level of automatic scripting that will automatically get values between requests and provision the following queries
1486
1487 You must enter in the postman config different variables:
1488 - "k8s" -> The k8s loadBalancer cluster node
1489 - "cds-service-model" -> The SDC service name distributed
1490 - "cds-instance-name" -> A name of your choice for the vnf instance (This must be changed each time you launch the instantiation)
1491
1492 CDS#5 - SO ScaleOut -> This will initiate a Scaleout manually
1493 CDS#7 - SO ScaleIn -> This will initiate a ScaleIn manually
1494
1495 Manual queries without POSTMAN
1496 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1497
1498 Users can run the use case by directly calling SO APIs:
1499
1500 ::
1501
1502   curl -X POST \
1503   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 \
1504   -H 'Accept: application/json' \
1505   -H 'Authorization: Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA==' \
1506   -H 'Cache-Control: no-cache' \
1507   -H 'Connection: keep-alive' \
1508   -H 'Content-Type: application/json' \
1509   -H 'Postman-Token: 12f2601a-4eb2-402c-a51a-f29502359501,9befda68-b2c9-4e7a-90ca-1be9c24ef664' \
1510   -H 'User-Agent: PostmanRuntime/7.15.0' \
1511   -H 'accept-encoding: gzip, deflate' \
1512   -H 'cache-control: no-cache' \
1513   -H 'content-length: 2422' \
1514   -H 'cookie: JSESSIONID=B3BA24216367F9D39E3DF5E8CBA4BC64' \
1515   -b JSESSIONID=B3BA24216367F9D39E3DF5E8CBA4BC64 \
1516   -d '{
1517     "requestDetails": {
1518         "modelInfo": {
1519             "modelCustomizationName": "VdnsloadbalancerCds..vdns..module-3",
1520             "modelCustomizationId": "ded42059-2f35-42d4-848b-16e1ab1ad197",
1521             "modelInvariantId": "2815d321-c6b4-4f21-b7f7-fa5adf8ed7d9",
1522             "modelVersionId": "524e34ed-9789-453e-ab73-8eff30eafef3",
1523             "modelName": "VdnsloadbalancerCds..vdns..module-3",
1524             "modelType": "vfModule",
1525             "modelVersion": "1"
1526         },
1527         "cloudConfiguration": {
1528             "lcpCloudRegionId": "RegionOne",
1529             "tenantId": "d570c718cbc545029f40e50b75eb13df",
1530             "cloudOwner": "CloudOwner"
1531         },
1532         "requestInfo": {
1533             "instanceName": "vDNS-VM-02",
1534             "source": "VID",
1535             "suppressRollback": false,
1536             "requestorId": "demo"
1537         },
1538         "requestParameters": {
1539             "userParams": []
1540         },
1541         "relatedInstanceList": [
1542             {
1543                 "relatedInstance": {
1544                     "instanceId": "7d3ca782-c486-44b3-9fe5-39f322d8ee80",
1545                     "modelInfo": {
1546                         "modelType": "service",
1547                         "modelInvariantId": "dfabdcae-cf50-4801-9885-9a3a9cc07e6f",
1548                         "modelVersionId": "ee55b537-7be5-4377-93c1-5d92931b6a78",
1549                         "modelName": "vLoadBalancerCDS",
1550                         "modelVersion": "1.0"
1551                     }
1552                 }
1553             },
1554             {
1555                 "relatedInstance": {
1556                     "instanceId": "9d33cf2d-d6aa-4b9e-a311-460a6be5a7de",
1557                     "modelInfo": {
1558                         "modelType": "vnf",
1559                         "modelInvariantId": "a77f9280-5c02-46cd-b1fc-855975db9df9",
1560                         "modelVersionId": "ff0e99ce-a521-44b5-b11b-da7e07ac83fc",
1561                         "modelName": "vLoadBalancerCDS",
1562                         "modelVersion": "1.0",
1563                         "modelCustomizationId": "b8b8a25d-19de-4581-bb63-f2dc8c0d79a7"
1564                     }
1565                 }
1566             }
1567         ],
1568         "configurationParameters": [
1569             {
1570                 "ip-addr": "$.vf-module-topology.vf-module-parameters.param[17].value",
1571                 "oam-ip-addr": "$.vf-module-topology.vf-module-parameters.param[31].value"
1572             }
1573         ]
1574     }
1575   }'
1576
1577
1578 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:
1579
1580 .. figure:: files/scaleout/tosca_template_fig.png
1581    :align: center
1582
1583 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.
1584
1585 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:
1586 ::
1587
1588             {
1589                 "relatedInstance": {
1590                     "instanceId": "7d3ca782-c486-44b3-9fe5-39f322d8ee80",
1591                     "modelInfo": {
1592                         "modelType": "service",
1593                         "modelInvariantId": "dfabdcae-cf50-4801-9885-9a3a9cc07e6f",
1594                         "modelVersionId": "ee55b537-7be5-4377-93c1-5d92931b6a78",
1595                         "modelName": "vLoadBalancerCDS",
1596                         "modelVersion": "1.0"
1597                     }
1598                 }
1599             }
1600
1601 .. figure:: files/scaleout/service.png
1602    :align: center
1603
1604
1605 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:
1606
1607 ::
1608
1609             {
1610                 "relatedInstance": {
1611                     "instanceId": "9d33cf2d-d6aa-4b9e-a311-460a6be5a7de",
1612                     "modelInfo": {
1613                         "modelType": "vnf",
1614                         "modelInvariantId": "a77f9280-5c02-46cd-b1fc-855975db9df9",
1615                         "modelVersionId": "ff0e99ce-a521-44b5-b11b-da7e07ac83fc",
1616                         "modelName": "vLoadBalancerCDS",
1617                         "modelVersion": "1.0",
1618                         "modelCustomizationId": "b8b8a25d-19de-4581-bb63-f2dc8c0d79a7"
1619                     }
1620                 }
1621             }
1622
1623 .. figure:: files/scaleout/vnf.png
1624    :align: center
1625
1626
1627 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:
1628
1629 ::
1630
1631         "modelInfo": {
1632             "modelCustomizationName": "Vloadbalancercds..vdns..module-3",
1633             "modelCustomizationId": "ded42059-2f35-42d4-848b-16e1ab1ad197",
1634             "modelInvariantId": "2815d321-c6b4-4f21-b7f7-fa5adf8ed7d9",
1635             "modelVersionId": "524e34ed-9789-453e-ab73-8eff30eafef3",
1636             "modelName": "Vloadbalancercds..vdns..module-3",
1637             "modelType": "vfModule",
1638             "modelVersion": "1"
1639         }
1640
1641 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:
1642
1643 .. figure:: files/scaleout/service.png
1644    :align: center
1645
1646
1647 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:
1648
1649 ::
1650
1651     curl -k -X GET \
1652   https://<Any_K8S_Node_IP_Address>:30233/aai/v16/network/generic-vnfs \
1653   -H 'Accept: application/json' \
1654   -H 'Authorization: Basic QUFJOkFBSQ==' \
1655   -H 'Content-Type: application/json' \
1656   -H 'X-FromAppId: AAI' \
1657   -H 'X-TransactionId: get_aai_subscr'
1658
1659 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:
1660
1661 ::
1662
1663         {
1664             "vnf-id": "9d33cf2d-d6aa-4b9e-a311-460a6be5a7de",
1665             "vnf-name": "vLB_VNF_01",
1666             "vnf-type": "vLoadBalancer/vLoadBalancer 0",
1667             "prov-status": "ACTIVE",
1668             "equipment-role": "",
1669             "orchestration-status": "Active",
1670             "ipv4-oam-address": "10.0.220.10",
1671             "in-maint": true,
1672             "is-closed-loop-disabled": false,
1673             "resource-version": "1565817789379",
1674             "model-invariant-id": "a77f9280-5c02-46cd-b1fc-855975db9df9",
1675             "model-version-id": "ff0e99ce-a521-44b5-b11b-da7e07ac83fc",
1676             "model-customization-id": "b8b8a25d-19de-4581-bb63-f2dc8c0d79a7",
1677             "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/",
1678             "relationship-list": {
1679                 "relationship": [
1680                     {
1681                         "related-to": "service-instance",
1682                         "relationship-label": "org.onap.relationships.inventory.ComposedOf",
1683                         "related-link": "/aai/v16/business/customers/customer/Demonstration/service-subscriptions/service-subscription/vRAR/service-instances/service-instance/7d3ca782-c486-44b3-9fe5-39f322d8ee80",
1684                         "relationship-data": [
1685                             {
1686                                 "relationship-key": "customer.global-customer-id",
1687                                 "relationship-value": "Demonstration"
1688                             },
1689                             {
1690                                 "relationship-key": "service-subscription.service-type",
1691                                 "relationship-value": "vLB"
1692                             },
1693                             {
1694                                 "relationship-key": "service-instance.service-instance-id",
1695                                 "relationship-value": "7d3ca782-c486-44b3-9fe5-39f322d8ee80"
1696                             }
1697                         ],
1698                         "related-to-property": [
1699                             {
1700                                 "property-key": "service-instance.service-instance-name",
1701                                 "property-value": "vLB-Service-0814-1"
1702                             }
1703                         ]
1704                     }
1705                     ...
1706          }
1707
1708 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.
1709
1710 These IDs are also used in the URL request to SO:
1711
1712 ::
1713
1714     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
1715
1716
1717 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.
1718
1719 ::
1720
1721     "configurationParameters": [
1722             {
1723                 "ip-addr": "$.vf-module-topology.vf-module-parameters.param[16].value",
1724                 "oam-ip-addr": "$.vf-module-topology.vf-module-parameters.param[30].value"
1725             }
1726     ]
1727
1728
1729 PART 5 - Running the Scale Out Use Case with Configuration Preload
1730 ------------------------------------------------------------------
1731
1732 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.
1733
1734 The procedure is similar to one described above, with some minor changes:
1735
1736 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.
1737
1738 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.
1739
1740 3) **Creation of VNF template with CDT** works as described in Section 1-5.
1741
1742 4) **Controller type selection** in SO works as described in Section 1-6.
1743
1744 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).
1745
1746 .. figure:: files/scaleout/vid.png
1747    :align: center
1748
1749 Based on the Heat template structure, there are four VF modules:
1750
1751   * module-0: base module that contains resources, such as internal private networks and public key, shared across the VNF elements
1752   * module-1: vLB resource descriptor
1753   * module-2: vPacketGen resource descriptor
1754   * module-3: vDNS resource descriptor
1755
1756 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.
1757
1758 Module-0 Preload
1759 ~~~~~~~~~~~~~~~~
1760
1761 ::
1762
1763     curl -X POST \
1764   http://<Any_K8S_Node_IP_Address>:30202/restconf/operations/GENERIC-RESOURCE-API:preload-vf-module-topology-operation \
1765   -H 'Content-Type: application/json' \
1766   -H 'Postman-Token: 0a7abc62-9d8f-4f63-8b05-db7cc4c3e28b' \
1767   -H 'cache-control: no-cache' \
1768   -d '{
1769     "input": {
1770         "preload-vf-module-topology-information": {
1771             "vf-module-topology": {
1772                 "vf-module-topology-identifier": {
1773                     "vf-module-name": "vNetworks-0211-1"
1774                 },
1775                 "vf-module-parameters": {
1776                     "param": [
1777                         {
1778                             "name": "vlb_private_net_id",
1779                             "value": "vLBMS_zdfw1lb01_private_ms"
1780                         },
1781                         {
1782                             "name": "pktgen_private_net_id",
1783                             "value": "vLBMS_zdfw1pktgen01_private_ms"
1784                         },
1785                         {
1786                             "name": "vlb_private_net_cidr",
1787                             "value": "192.168.10.0/24"
1788                         },
1789                         {
1790                             "name": "pktgen_private_net_cidr",
1791                             "value": "192.168.9.0/24"
1792                         },
1793                         {
1794                             "name": "vlb_0_int_pktgen_private_port_0_mac",
1795                             "value": "fa:16:3e:00:01:10"
1796                         },
1797                         {
1798                             "name": "vpg_0_int_pktgen_private_port_0_mac",
1799                             "value": "fa:16:3e:00:01:20"
1800                         },
1801                         {
1802                             "name": "vnf_id",
1803                             "value": "vLoadBalancerMS"
1804                         },
1805                         {
1806                             "name": "vnf_name",
1807                             "value": "vLBMS"
1808                         },
1809                         {
1810                             "name": "key_name",
1811                             "value": "vlb_key"
1812                         },
1813                         {
1814                             "name": "pub_key",
1815                             "value": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDQXYJYYi3/OUZXUiCYWdtc7K0m5C0dJKVxPG0eI8EWZrEHYdfYe6WoTSDJCww+1qlBSpA5ac/Ba4Wn9vh+lR1vtUKkyIC/nrYb90ReUd385Glkgzrfh5HdR5y5S2cL/Frh86lAn9r6b3iWTJD8wBwXFyoe1S2nMTOIuG4RPNvfmyCTYVh8XTCCE8HPvh3xv2r4egawG1P4Q4UDwk+hDBXThY2KS8M5/8EMyxHV0ImpLbpYCTBA6KYDIRtqmgS6iKyy8v2D1aSY5mc9J0T5t9S2Gv+VZQNWQDDKNFnxqYaAo1uEoq/i1q63XC5AD3ckXb2VT6dp23BQMdDfbHyUWfJN"
1816                         }
1817                     ]
1818                 }
1819             },
1820             "vnf-topology-identifier-structure": {
1821                 "vnf-name": "vLoadBalancer-Vnf-0211-1",
1822                 "vnf-type": "vLoadBalancer/vLoadBalancer 0"
1823             },
1824             "vnf-resource-assignments": {
1825                 "availability-zones": {
1826                     "availability-zone": [
1827                         "nova"
1828                     ],
1829                     "max-count": 1
1830                 },
1831                 "vnf-networks": {
1832                     "vnf-network": []
1833                 }
1834             }
1835         },
1836         "request-information": {
1837             "request-id": "robot12",
1838             "order-version": "1",
1839             "notification-url": "openecomp.org",
1840             "order-number": "1",
1841             "request-action": "PreloadVfModuleRequest"
1842         },
1843         "sdnc-request-header": {
1844             "svc-request-id": "robot12",
1845             "svc-notification-url": "http://openecomp.org:8080/adapters/rest/SDNCNotify",
1846             "svc-action": "reserve"
1847         }
1848     }
1849   }'
1850
1851
1852 Module-1 Preload
1853 ~~~~~~~~~~~~~~~~
1854
1855 ::
1856
1857     curl -X POST \
1858   http://<Any_K8S_Node_IP_Address>:30202/restconf/operations/GENERIC-RESOURCE-API:preload-vf-module-topology-operation \
1859   -H 'Content-Type: application/json' \
1860   -H 'Postman-Token: 662914ac-29fc-414d-8823-1691fb2c718a' \
1861   -H 'cache-control: no-cache' \
1862   -d '{
1863     "input": {
1864         "preload-vf-module-topology-information": {
1865             "vf-module-topology": {
1866                 "vf-module-topology-identifier": {
1867                     "vf-module-name": "vLoadBalancer-0211-1"
1868                 },
1869                 "vf-module-parameters": {
1870                     "param": [
1871                         {
1872                             "name": "vlb_image_name",
1873                             "value": "ubuntu-16-04-cloud-amd64"
1874                         },
1875                         {
1876                             "name": "vlb_flavor_name",
1877                             "value": "m1.medium"
1878                         },
1879                         {
1880                             "name": "public_net_id",
1881                             "value": "public"
1882                         },
1883                         {
1884                             "name": "int_private_net_id",
1885                             "value": "vLBMS_zdfw1lb01_private_ms"
1886                         },
1887                         {
1888                             "name": "int_private_subnet_id",
1889                             "value": "vLBMS_zdfw1lb01_private_sub_ms"
1890                         },
1891                         {
1892                             "name": "int_pktgen_private_net_id",
1893                             "value": "vLBMS_zdfw1pktgen01_private_ms"
1894                         },
1895                         {
1896                             "name": "int_pktgen_private_subnet_id",
1897                             "value": "vLBMS_zdfw1pktgen01_private_sub_ms"
1898                         },
1899                         {
1900                             "name": "onap_private_net_id",
1901                             "value": "oam_onap_vnf_test"
1902                         },
1903                         {
1904                             "name": "onap_private_subnet_id",
1905                             "value": "oam_onap_vnf_test"
1906                         },
1907                         {
1908                             "name": "vlb_private_net_cidr",
1909                             "value": "192.168.10.0/24"
1910                         },
1911                         {
1912                             "name": "pktgen_private_net_cidr",
1913                             "value": "192.168.9.0/24"
1914                         },
1915                         {
1916                             "name": "onap_private_net_cidr",
1917                             "value": "10.0.0.0/16"
1918                         },
1919                         {
1920                             "name": "vlb_int_private_ip_0",
1921                             "value": "192.168.10.111"
1922                         },
1923                         {
1924                             "name": "vlb_onap_private_ip_0",
1925                             "value": "10.0.150.1"
1926                         },
1927                         {
1928                             "name": "vlb_int_pktgen_private_ip_0",
1929                             "value": "192.168.9.111"
1930                         },
1931                         {
1932                             "name": "vdns_int_private_ip_0",
1933                             "value": "192.168.10.211"
1934                         },
1935                         {
1936                             "name": "vdns_onap_private_ip_0",
1937                             "value": "10.0.150.3"
1938                         },
1939                         {
1940                             "name": "vpg_int_pktgen_private_ip_0",
1941                             "value": "192.168.9.110"
1942                         },
1943                         {
1944                             "name": "vpg_onap_private_ip_0",
1945                             "value": "10.0.150.2"
1946                         },
1947                         {
1948                             "name": "vlb_name_0",
1949                             "value": "vlb-0211-1"
1950                         },
1951                         {
1952                             "name": "vlb_0_mac_address",
1953                             "value": "fa:16:3e:00:01:10"
1954                         },
1955                         {
1956                             "name": "vpg_0_mac_address",
1957                             "value": "fa:16:3e:00:01:20"
1958                         },
1959                         {
1960                             "name": "vip",
1961                             "value": "192.168.9.112"
1962                         },
1963                         {
1964                             "name": "gre_ipaddr",
1965                             "value": "192.168.10.112"
1966                         },
1967                         {
1968                             "name": "vnf_id",
1969                             "value": "vLoadBalancerMS"
1970                         },
1971                         {
1972                             "name": "vf_module_id",
1973                             "value": "vLoadBalancerMS"
1974                         },
1975                         {
1976                             "name": "vnf_name",
1977                             "value": "vLBMS"
1978                         },
1979                         {
1980                             "name": "dcae_collector_ip",
1981                             "value": "10.12.5.20"
1982                         },
1983                         {
1984                             "name": "dcae_collector_port",
1985                             "value": "30235"
1986                         },
1987                         {
1988                             "name": "demo_artifacts_version",
1989                             "value": "1.6.0-SNAPSHOT"
1990                         },
1991                         {
1992                             "name": "install_script_version",
1993                             "value": "1.6.0-SNAPSHOT"
1994                         },
1995                         {
1996                             "name": "nb_api_version",
1997                             "value": "1.2.0"
1998                         },
1999                         {
2000                             "name": "keypair",
2001                             "value": "vlb_key"
2002                         },
2003                         {
2004                             "name": "cloud_env",
2005                             "value": "openstack"
2006                         },
2007                         {
2008                             "name": "nexus_artifact_repo",
2009                             "value": "https://nexus.onap.org"
2010                         },
2011                         {
2012                             "name": "sec_group",
2013                             "value": "default"
2014                         }
2015                     ]
2016                 }
2017             },
2018             "vnf-topology-identifier-structure": {
2019                 "vnf-name": "vLoadBalancer-Vnf-0211-1",
2020                 "vnf-type": "vLoadBalancer/vLoadBalancer 0"
2021             },
2022             "vnf-resource-assignments": {
2023                 "availability-zones": {
2024                     "availability-zone": [
2025                         "nova"
2026                     ],
2027                     "max-count": 1
2028                 },
2029                 "vnf-networks": {
2030                     "vnf-network": []
2031                 }
2032             }
2033         },
2034         "request-information": {
2035             "request-id": "robot12",
2036             "order-version": "1",
2037             "notification-url": "openecomp.org",
2038             "order-number": "1",
2039             "request-action": "PreloadVfModuleRequest"
2040         },
2041         "sdnc-request-header": {
2042             "svc-request-id": "robot12",
2043             "svc-notification-url": "http://openecomp.org:8080/adapters/rest/SDNCNotify",
2044             "svc-action": "reserve"
2045         }
2046     }
2047   }'
2048
2049
2050 Module-2 Preload
2051 ~~~~~~~~~~~~~~~~
2052
2053 ::
2054
2055
2056     curl -X POST \
2057   http://<Any_K8S_Node_IP_Address>:30202/restconf/operations/GENERIC-RESOURCE-API:preload-vf-module-topology-operation \
2058   -H 'Content-Type: application/json' \
2059   -H 'Postman-Token: 5f2490b3-6e4a-4512-9a0d-0aa6f6fa0ea8' \
2060   -H 'cache-control: no-cache' \
2061   -d '{
2062     "input": {
2063         "preload-vf-module-topology-information": {
2064             "vf-module-topology": {
2065                 "vf-module-topology-identifier": {
2066                     "vf-module-name": "vPacketGen-0211-1"
2067                 },
2068                 "vf-module-parameters": {
2069                     "param": [
2070                         {
2071                             "name": "vpg_image_name",
2072                             "value": "ubuntu-16-04-cloud-amd64"
2073                         },
2074                         {
2075                             "name": "vpg_flavor_name",
2076                             "value": "m1.medium"
2077                         },
2078                         {
2079                             "name": "public_net_id",
2080                             "value": "public"
2081                         },
2082                         {
2083                             "name": "int_pktgen_private_net_id",
2084                             "value": "vLBMS_zdfw1pktgen01_private_ms"
2085                         },
2086                         {
2087                             "name": "int_pktgen_private_subnet_id",
2088                             "value": "vLBMS_zdfw1pktgen01_private_sub_ms"
2089                         },
2090                         {
2091                             "name": "onap_private_net_id",
2092                             "value": "oam_onap_vnf_test"
2093                         },
2094                         {
2095                             "name": "onap_private_subnet_id",
2096                             "value": "oam_onap_vnf_test"
2097                         },
2098                         {
2099                             "name": "pktgen_private_net_cidr",
2100                             "value": "192.168.9.0/24"
2101                         },
2102                         {
2103                             "name": "onap_private_net_cidr",
2104                             "value": "10.0.0.0/16"
2105                         },
2106                         {
2107                             "name": "vlb_int_pktgen_private_ip_0",
2108                             "value": "192.168.9.111"
2109                         },
2110                         {
2111                             "name": "vpg_int_pktgen_private_ip_0",
2112                             "value": "192.168.9.110"
2113                         },
2114                         {
2115                             "name": "vpg_onap_private_ip_0",
2116                             "value": "10.0.150.2"
2117                         },
2118                         {
2119                             "name": "vpg_name_0",
2120                             "value": "vpg-0211-1"
2121                         },
2122                         {
2123                             "name": "vlb_0_mac_address",
2124                             "value": "fa:16:3e:00:01:10"
2125                         },
2126                         {
2127                             "name": "vpg_0_mac_address",
2128                             "value": "fa:16:3e:00:01:20"
2129                         },
2130                         {
2131                             "name": "pg_int",
2132                             "value": "192.168.9.109"
2133                         },
2134                         {
2135                             "name": "vnf_id",
2136                             "value": "vLoadBalancerMS"
2137                         },
2138                         {
2139                             "name": "vf_module_id",
2140                             "value": "vLoadBalancerMS"
2141                         },
2142                         {
2143                             "name": "vnf_name",
2144                             "value": "vLBMS"
2145                         },
2146                         {
2147                             "name": "demo_artifacts_version",
2148                             "value": "1.6.0-SNAPSHOT"
2149                         },
2150                         {
2151                             "name": "install_script_version",
2152                             "value": "1.6.0-SNAPSHOT"
2153                         },
2154                         {
2155                             "name": "nb_api_version",
2156                             "value": "1.2.0"
2157                         },
2158                         {
2159                             "name": "keypair",
2160                             "value": "vlb_key"
2161                         },
2162                         {
2163                             "name": "cloud_env",
2164                             "value": "openstack"
2165                         },
2166                         {
2167                             "name": "nexus_artifact_repo",
2168                             "value": "https://nexus.onap.org"
2169                         },
2170                         {
2171                             "name": "sec_group",
2172                             "value": "default"
2173                         }
2174                     ]
2175                 }
2176             },
2177             "vnf-topology-identifier-structure": {
2178                 "vnf-name": "vLoadBalancer-Vnf-0211-1",
2179                 "vnf-type": "vLoadBalancer/vLoadBalancer 0"
2180             },
2181             "vnf-resource-assignments": {
2182                 "availability-zones": {
2183                     "availability-zone": [
2184                         "nova"
2185                     ],
2186                     "max-count": 1
2187                 },
2188                 "vnf-networks": {
2189                     "vnf-network": []
2190                 }
2191             }
2192         },
2193         "request-information": {
2194             "request-id": "robot12",
2195             "order-version": "1",
2196             "notification-url": "openecomp.org",
2197             "order-number": "1",
2198             "request-action": "PreloadVfModuleRequest"
2199         },
2200         "sdnc-request-header": {
2201             "svc-request-id": "robot12",
2202             "svc-notification-url": "http://openecomp.org:8080/adapters/rest/SDNCNotify",
2203             "svc-action": "reserve"
2204         }
2205     }
2206  }'
2207
2208
2209 Module-3 Preload
2210 ~~~~~~~~~~~~~~~~
2211
2212 ::
2213
2214     curl -X POST \
2215   http://<Any_K8S_Node_IP_Address>:30202/restconf/operations/GENERIC-RESOURCE-API:preload-vf-module-topology-operation \
2216   -H 'Content-Type: application/json' \
2217   -H 'Postman-Token: fd0a4706-f955-490a-875e-08ddd8fe002e' \
2218   -H 'cache-control: no-cache' \
2219   -d '{
2220     "input": {
2221         "preload-vf-module-topology-information": {
2222             "vf-module-topology": {
2223                 "vf-module-topology-identifier": {
2224                     "vf-module-name": "vDNS-0125-1"
2225                 },
2226                 "vf-module-parameters": {
2227                     "param": [
2228                         {
2229                             "name": "vdns_image_name",
2230                             "value": "ubuntu-16-04-cloud-amd64"
2231                         },
2232                         {
2233                             "name": "vdns_flavor_name",
2234                             "value": "m1.medium"
2235                         },
2236                         {
2237                             "name": "public_net_id",
2238                             "value": "public"
2239                         },
2240                         {
2241                             "name": "int_private_net_id",
2242                             "value": "vLBMS_zdfw1lb01_private"
2243                         },
2244                         {
2245                             "name": "int_private_subnet_id",
2246                             "value": "vLBMS_zdfw1lb01_private_sub_ms"
2247                         },
2248                         {
2249                             "name": "onap_private_net_id",
2250                             "value": "oam_onap_vnf_test"
2251                         },
2252                         {
2253                             "name": "onap_private_subnet_id",
2254                             "value": "oam_onap_vnf_test"
2255                         },
2256                         {
2257                             "name": "vlb_private_net_cidr",
2258                             "value": "192.168.10.0/24"
2259                         },
2260                         {
2261                             "name": "onap_private_net_cidr",
2262                             "value": "10.0.0.0/16"
2263                         },
2264                         {
2265                             "name": "vlb_int_private_ip_0",
2266                             "value": "192.168.10.111"
2267                         },
2268                         {
2269                             "name": "vlb_onap_private_ip_0",
2270                             "value": "10.0.150.1"
2271                         },
2272                         {
2273                             "name": "vlb_int_pktgen_private_ip_0",
2274                             "value": "192.168.9.111"
2275                         },
2276                         {
2277                             "name": "vdns_int_private_ip_0",
2278                             "value": "192.168.10.212"
2279                         },
2280                         {
2281                             "name": "vdns_onap_private_ip_0",
2282                             "value": "10.0.150.4"
2283                         },
2284                         {
2285                             "name": "vdns_name_0",
2286                             "value": "vdns-0211-1"
2287                         },
2288                         {
2289                             "name": "vnf_id",
2290                             "value": "vLoadBalancerMS"
2291                         },
2292                         {
2293                             "name": "vf_module_id",
2294                             "value": "vLoadBalancerMS"
2295                         },
2296                         {
2297                             "name": "vnf_name",
2298                             "value": "vLBMS"
2299                         },
2300                         {
2301                             "name": "install_script_version",
2302                             "value": "1.6.0-SNAPSHOT"
2303                         },
2304                         {
2305                             "name": "nb_api_version",
2306                             "value": "1.2.0"
2307                         },
2308                         {
2309                             "name": "keypair",
2310                             "value": "vlb_key"
2311                         },
2312                         {
2313                             "name": "cloud_env",
2314                             "value": "openstack"
2315                         },
2316                         {
2317                             "name": "sec_group",
2318                             "value": "default"
2319                         },
2320                         {
2321                             "name": "nexus_artifact_repo",
2322                             "value": "https://nexus.onap.org"
2323                         }
2324                     ]
2325                 }
2326             },
2327             "vnf-topology-identifier-structure": {
2328                 "vnf-name": "vLoadBalancer-Vnf-0125-1",
2329                 "vnf-type": "vLoadBalancer/vLoadBalancer 0"
2330             },
2331             "vnf-resource-assignments": {
2332                 "availability-zones": {
2333                     "availability-zone": [
2334                         "nova"
2335                     ],
2336                     "max-count": 1
2337                 },
2338                 "vnf-networks": {
2339                     "vnf-network": []
2340                 }
2341             }
2342         },
2343         "request-information": {
2344             "request-id": "robot12",
2345             "order-version": "1",
2346             "notification-url": "openecomp.org",
2347             "order-number": "1",
2348             "request-action": "PreloadVfModuleRequest"
2349         },
2350         "sdnc-request-header": {
2351             "svc-request-id": "robot12",
2352             "svc-notification-url": "http://openecomp.org:8080/adapters/rest/SDNCNotify",
2353             "svc-action": "reserve"
2354         }
2355     }
2356  }'
2357
2358 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.
2359
2360 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.
2361
2362 6) **Post Instantiation Actions**: Please refer to Sections 3-1 for vLB configuration and Section 3-2 for resource orchestration with heatbridge.
2363
2364 7) **Triggering Scale Out Manually**: Please refer to Section 4 to trigger scale out manually with direct API call to SO.
2365
2366
2367 PART 6 - Known Issues and Resolutions
2368 -------------------------------------
2369
2370    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
2371
2372 Resolution: Change TCA configuration for the old vLB/vDNS use case
2373
2374 - Connect to Consul: http://ANY_K8S_IP:30270 and click on "Key/Value" → "dcae-tca-analytics"
2375 - Change "eventName" in the vLB default policy to something different, for example "vLB" instead of the default value "vLoadBalancer"
2376 - Change "subscriberConsumerGroup" in the TCA configuration to something different, for example "OpenDCAE-c13" instead of the default value "OpenDCAE-c12"
2377 - Click "UPDATE" to upload the new TCA configuration
2378
2379 2) During Guilin testing, it has been noticed that there is an issue between SO and APPC for Healthcheck queries, this does not prevent the use case to proceed but limit APPC capabilities