blob: 5a9f6a2fb1923c702d0d8612b36e156701ede138 [file] [log] [blame]
Gary Wue4a2df82018-11-29 12:49:09 -08001.. _docs_vlb:
2
mrichomme3345d142020-11-30 18:31:29 +01003:orphan:
4
Marco Plataniae5064cd2018-11-28 15:33:47 -05005vLoadBalancer Use Case
6----------------------
7
8Source files
9~~~~~~~~~~~~
10
11- Base VNF template file: https://git.onap.org/demo/plain/heat/vLB/base_vlb.yaml
12- Base VNF environment file: https://git.onap.org/demo/plain/heat/vLB/base_vlb.env
13
14- VF module scaling template file: https://git.onap.org/demo/plain/heat/vLB/dnsscaling.yaml
15- VF module scaling environment file: https://git.onap.org/demo/plain/heat/vLB/dnsscaling.env
16
17
18Description
19~~~~~~~~~~~
mrichomme7eecfb32020-11-26 15:24:27 +010020The use case is composed of three VFs: packet generator, load balancer, and DNS server. These VFs run in three separate VMs. The packet generator issues DNS lookup queries that reach the DNS server via the load balancer. DNS replies reach the packet generator via the load balancer as well. The load balancer reports the average amount of traffic per DNS over a time interval to the DCAE collector. When the average amount of traffic per DNS server crosses a predefined threshold, the closed-loop is triggered and a new DNS server is instantiated.
Marco Plataniae5064cd2018-11-28 15:33:47 -050021
22To test the application, make sure that the security group in OpenStack has ingress/egress entries for protocol 47 (GRE). The user can run a DNS query from the packet generator VM:
23
24::
25
26 dig @vLoadBalancer_IP host1.dnsdemo.onap.org
27
mrichomme7eecfb32020-11-26 15:24:27 +010028The output below means that the load balancer has been set up correctly, has forwarded the DNS queries to one DNS instance, and the packet generator has received the DNS reply message.
Marco Plataniae5064cd2018-11-28 15:33:47 -050029
30::
31
32 ; <<>> DiG 9.10.3-P4-Ubuntu <<>> @192.168.9.111 host1.dnsdemo.onap.org
33 ; (1 server found)
34 ;; global options: +cmd
35 ;; Got answer:
36 ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 31892
37 ;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 2
38 ;; WARNING: recursion requested but not available
mrichomme7eecfb32020-11-26 15:24:27 +010039
Marco Plataniae5064cd2018-11-28 15:33:47 -050040 ;; OPT PSEUDOSECTION:
41 ; EDNS: version: 0, flags:; udp: 4096
42 ;; QUESTION SECTION:
43 ;host1.dnsdemo.onap.org. IN A
mrichomme7eecfb32020-11-26 15:24:27 +010044
Marco Plataniae5064cd2018-11-28 15:33:47 -050045 ;; ANSWER SECTION:
46 host1.dnsdemo.onap.org. 604800 IN A 10.0.100.101
mrichomme7eecfb32020-11-26 15:24:27 +010047
Marco Plataniae5064cd2018-11-28 15:33:47 -050048 ;; AUTHORITY SECTION:
49 dnsdemo.onap.org. 604800 IN NS dnsdemo.onap.org.
mrichomme7eecfb32020-11-26 15:24:27 +010050
Marco Plataniae5064cd2018-11-28 15:33:47 -050051 ;; ADDITIONAL SECTION:
52 dnsdemo.onap.org. 604800 IN A 10.0.100.100
mrichomme7eecfb32020-11-26 15:24:27 +010053
Marco Plataniae5064cd2018-11-28 15:33:47 -050054 ;; Query time: 0 msec
55 ;; SERVER: 192.168.9.111#53(192.168.9.111)
56 ;; WHEN: Fri Nov 10 17:39:12 UTC 2017
57 ;; MSG SIZE rcvd: 97
mrichomme7eecfb32020-11-26 15:24:27 +010058
Marco Plataniae5064cd2018-11-28 15:33:47 -050059
60Closedloop for vLoadBalancer/vDNS
61~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
62
63Through the Policy Portal (accessible via the ONAP Portal), we can find the configuration and operation policies that are enabled by default for the vLoadBalancer/vDNS application:
64
65- The configuration policy sets the thresholds for generating an onset event from DCAE to the Policy engine. Currently, the threshold is set to 200 packets, while the measurement interval is set to 10 seconds;
66- Once the threshold is crossed (e.g. the number of received packets is above 200 packets per 10 seconds), the Policy Engine executes the operational policy. The Policy engine queries A&AI to fetch the VNF UUID and sends a request to the Service Orchestrator (SO) to spin up a new DNS instance for the VNF identified by that UUID;
67- SO spins up a new DNS instance.
68
69
70To change the volume of queries generated by the packet generator, run the following command in a shell, replacing PacketGen_IP in the HTTP argument with localhost (if you run it in the packet generator VM) or the packet generator IP address:
71
72::
73
mrichomme7eecfb32020-11-26 15:24:27 +010074 curl -X PUT -H "Authorization: Basic YWRtaW46YWRtaW4=" -H "Content-Type: application/json" -H "Cache-Control: no-cache" -d '{"pg-streams":{"pg-stream": [{"id":"dns1", "is-enabled":"true"}]}}' "http://PacketGen_IP:8183/restconf/config/sample-plugin:sample-plugin/pg-streams"
75
76- {"id":"dns1", "is-enabled":"true"} shows the stream "dns1" is enabled. The packet generator sends requests in the rate of 100 packets per 10 seconds;
Marco Plataniae5064cd2018-11-28 15:33:47 -050077- To increase the amount of traffic, you can enable more streams. The packet generator has 10 streams, "dns1", "dns2", "dns3" to "dns10". Each of them generates 100 packets per 10 seconds. To enable the streams, please add {"id":"dnsX", "is-enabled":"true"} to the pg-stream bracket of the curl command, where X is the stream ID.
78
79For example, if you want to enable 3 streams, the curl command will be:
80
81::
82
83 curl -X PUT -H "Authorization: Basic YWRtaW46YWRtaW4=" -H "Content-Type: application/json" -H "Cache-Control: no-cache" -d '{"pg-streams":{"pg-stream": [{"id":"dns1", "is-enabled":"true"}, {"id":"dns2", "is-enabled":"true"},{"id":"dns3", "is-enabled":"true"}]}}' "http://PacketGen_IP:8183/restconf/config/sample-plugin:sample-plugin/pg-streams"
84
85When the VNF starts, the packet generator is automatically configured to run 5 streams.
86
Marco Plataniae5064cd2018-11-28 15:33:47 -050087Running the Use Case
88~~~~~~~~~~~~~~~~~~~~
mrichomme3345d142020-11-30 18:31:29 +010089Automated closed loop via Robot Framework is not supported at this time.
90For documentation about running the use case manually for previous releases,
91please look at the videos and the material available at
92`Running the ONAP Demos wiki page <https://wiki.onap.org/display/DW/Running+the+ONAP+Demos>`_
Marco Plataniae5064cd2018-11-28 15:33:47 -050093
mrichomme3345d142020-11-30 18:31:29 +010094Although videos are still valid, users are encouraged to use the Heat templates
95linked at the top of this page rather than the old Heat templates in that wiki page.
Marco Plataniae5064cd2018-11-28 15:33:47 -050096
97Known issues and resolution
98~~~~~~~~~~~~~~~~~~~~~~~~~~~
mrichomme3345d142020-11-30 18:31:29 +0100991) The packet generator may become unresponsive and stop generating traffic.
100 To solve the problem, reboot the packet generator.
Marco Plataniae5064cd2018-11-28 15:33:47 -0500101
1022) The base and scaling VF module names need to follow a specific naming convention:
103
104 a) The base VF module name must be "Vfmodule\_xyz"
105
106 b) The SDNC preload for the scaling VF module must set the VF module name to "vDNS\_xyz", where "xyz" is the same as the base module. This is required because during closed loop Policy looks for "Vfmodule\_" and replaces it with "vDNS\_"
107
mrichomme7eecfb32020-11-26 15:24:27 +01001083) Only one scaling operation is supported.