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