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