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