blob: b9ed9adb72644d95c2aac46f257b20ebbd26e06c [file] [log] [blame]
Gary Wue4a2df82018-11-29 12:49:09 -08001.. _docs_vfw:
2
Marco Plataniae5064cd2018-11-28 15:33:47 -05003vFirewall Use Case
4------------------
5
6Source files
7~~~~~~~~~~~~
8
mrichommeaa961842019-10-15 11:34:19 +02009- vFirewall/vSink template file: https://git.onap.org/demo/tree/heat/vFWCL/vFWSNK/base_vfw.yaml?h=elalto
10- vFirewall/vSink environment file: https://git.onap.org/demo/tree/heat/vFWCL/vFWSNK/base_vfw.env?h=elalto
Marco Plataniae5064cd2018-11-28 15:33:47 -050011
mrichommeaa961842019-10-15 11:34:19 +020012- vPacketGenerator template file: https://git.onap.org/demo/tree/heat/vFWCL/vPKG/base_vpkg.env?h=elalto
13- vPacketGenerator environment file: https://git.onap.org/demo/tree/heat/vFWCL/vPKG/base_vpkg.env?h=elalto
Marco Plataniae5064cd2018-11-28 15:33:47 -050014
stark, steven6a507a42019-04-24 12:04:41 -070015VVP Report
16~~~~~~~~~~
17
18:download:`vFWCL/vPKG report <files/vFWCL_vPKG_report.json>`
19
20:download:`vFWCL/vFWSNK report <files/vFWCL_vFWSNK_report.json>`
Marco Plataniae5064cd2018-11-28 15:33:47 -050021
22Description
23~~~~~~~~~~~
24
mrichommeaa961842019-10-15 11:34:19 +020025The use case, introduced in Amsterdam version, is composed of three virtual
26functions (VFs): packet generator, firewall, and traffic sink.
27These VFs run in three separate VMs. The packet generator sends packets to the
28packet sink through the firewall.
29The firewall reports the volume of traffic passing though to the ONAP DCAE
30collector. To check the traffic volume that lands at the sink VM, you can access
31the link http://sink_ip_address:667 through your browser and enable automatic page
32refresh by clicking the "Off" button. You can see the traffic volume in the charts.
Marco Plataniae5064cd2018-11-28 15:33:47 -050033
mrichommeaa961842019-10-15 11:34:19 +020034The packet generator includes a script that periodically generates different
35volumes of traffic. The closed-loop policy has been configured to re-adjust the
36traffic volume when high-water or low-water marks are crossed.
Marco Plataniae5064cd2018-11-28 15:33:47 -050037
mrichommeaa961842019-10-15 11:34:19 +020038Since Casablanca, we have used a vFWCL service tag for this testing instead of
39the vFW service tag. vFW servic tag is a regression for onboard and
40instantiation of a single VNF service (all three VMs in the same VNF) where as the
Gary Wu9da1b692019-06-17 22:36:04 -070041vFWCL is a two VNF service (vFW+ vSNK and separeate vPKG)
Brian Freeman8aeeef82019-06-17 10:07:36 -050042
mrichommeaa961842019-10-15 11:34:19 +020043./demo-k8s.sh onap instantiateVFWCL can be used to onboard and instantiate a
44vFWCL via robot scripts or follow the procedure to use the GUI that is available
45in the documentation.
Brian Freeman8aeeef82019-06-17 10:07:36 -050046
Marco Plataniae5064cd2018-11-28 15:33:47 -050047
48Closed-Loop for vFirewall Use Case
49~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
50
mrichommeaa961842019-10-15 11:34:19 +020051Through the ONAP Portal's Policy Portal, we can find the configuration and
52operation policies that are currently enabled for the vFirewall use case:
Marco Plataniae5064cd2018-11-28 15:33:47 -050053
mrichommeaa961842019-10-15 11:34:19 +020054- The configuration policy sets the thresholds for generating an onset event
55 from DCAE to the Policy engine. Currently, the high-water mark is set to 700
56 packets while the low-water mark is set to 300 packets.
57 The measurement interval is set to 10 seconds.
58- When a threshold is crossed (i.e. the number of received packets is below 300
59 packets or above 700 packets per 10 seconds), the Policy engine executes the
60 operational policy to request APPC to adjust the traffic volume to 500 packets
61 per 10 seconds.
Gary Wu9da1b692019-06-17 22:36:04 -070062- APPC sends a request to the packet generator to adjust the traffic volume.
Marco Plataniae5064cd2018-11-28 15:33:47 -050063- Changes to the traffic volume can be observed through the link http://sink_ip_address:667.
64
65
66Adjust packet generator
67~~~~~~~~~~~~~~~~~~~~~~~
68
mrichommeaa961842019-10-15 11:34:19 +020069The packet generator contains 10 streams: fw_udp1, fw_udp2, fw_udp3, ..., fw_udp10.
70Each stream generates 100 packets per 10 seconds.
71A script in /opt/run_traffic_fw_demo.sh on the packet generator VM starts
72automatically and alternates high traffic (i.e. 10 active streams at the same
73time) and low traffic (1 active stream) every 5 minutes.
Marco Plataniae5064cd2018-11-28 15:33:47 -050074
mrichommeaa961842019-10-15 11:34:19 +020075To adjust the traffic volume produced by the packet generator, run the following
76command in a shell, replacing PacketGen_IP in the HTTP argument with localhost
77(if you run it in the packet generator VM) or the packet generator IP address:
Marco Plataniae5064cd2018-11-28 15:33:47 -050078
79::
80
Marco Platania9442f8f2019-06-17 09:12:21 -040081 curl -X PUT \
82 https://PacketGen_IP:8445/restconf/config/stream-count:stream-count/streams \
83 -H 'Accept: application/json' \
84 -H 'Content-Type: application/json' \
85 -H 'Postman-Token: 88610924-938b-4d64-a682-0b0aabed4a6d' \
86 -H 'cache-control: no-cache' \
87 -d '{
88 "streams": {
89 "active-streams": 5
90 }}'
91
Marco Plataniae5064cd2018-11-28 15:33:47 -050092
93The command above enables 5 streams.
94
Marco Plataniae5064cd2018-11-28 15:33:47 -050095Running the Use Case
96~~~~~~~~~~~~~~~~~~~~
Brian Freeman8aeeef82019-06-17 10:07:36 -050097
mrichommeaa961842019-10-15 11:34:19 +020098Users can run the use case using the automated Robot Framework or manually.
99For using the Robot Framework in an ONAP instance installed with OOM, users have
100to ssh to the Rancher VM and run the following command:
Marco Plataniae5064cd2018-11-28 15:33:47 -0500101
102::
103
104 bash oom/kubernetes/robot/demo-k8s.sh <namespace> vfwclosedloop <pgn-ip-address>
105
mrichommeaa961842019-10-15 11:34:19 +0200106The script sets the packet generator to high and low rates, and checks whether
107the policy kicks in to modulate the rates back to medium.
108At the end of the test , robot sets the streams back to Medium so that it is
109setup for the next test.
Marco Plataniae5064cd2018-11-28 15:33:47 -0500110
mrichommeaa961842019-10-15 11:34:19 +0200111For documentation about running the use case manually for previous releases,
112please look at the videos and the material available at this `wiki page`__.
Marco Plataniae5064cd2018-11-28 15:33:47 -0500113
114__ https://wiki.onap.org/display/DW/Running+the+ONAP+Demos
115
mrichommeaa961842019-10-15 11:34:19 +0200116Although videos are still valid, users are encouraged to use the Heat templates
117linked at the top of this page rather than the old Heat templates in that wiki page.
Marco Plataniae5064cd2018-11-28 15:33:47 -0500118
119Known issues and resolution
120~~~~~~~~~~~~~~~~~~~~~~~~~~~
Brian Freeman8aeeef82019-06-17 10:07:36 -0500121
mrichommeaa961842019-10-15 11:34:19 +0200122The packet generator may become unresponsive to external inputs like changing
123the number of active streams.
124To solve the problem, reboot the packet generator VM.
125
126Policy can lock the target VNF if there are too many failed attempts due to
127mis-configuration etc.
128Set the streams to medium and wait 30 minutes or so and the lock in policy will
129expire. Monitoring the DMaaP topic for DCAE_CL_OUTPUT can be used to confirm
130that no TCA events are coming in from the VNF through VES/TCA.
Brian Freeman8aeeef82019-06-17 10:07:36 -0500131
132::
133 http://<k8s-host>:30227/events/unauthenticated.DCAE_CL_OUTPUT/g1/c3?timeout=5000
mrichommeaa961842019-10-15 11:34:19 +0200134
135+-------------+------------+
136| JIRA ID | Status |
137+=============+============+
138| POLICY-2109 | Closed |
139+-------------+------------+
140| INT-1272 | Closed |
141+-------------+------------+