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