You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 8 Next »

This page provides technical information about the VPP based VNFs in the vCPE use case for ONAP R1.

The information builds upon, and updates in some areas, the information documented here:  ONAP vCPE VNF Installation Guide v1.docx

The VPP based VNFs to be covered are:

  • vBRG
  • vBNG
  • vG-MUX
  • vGW

Building a VNF Image

The VNFs are instantiated by a heat template and environment file which starts with a plain Ubuntu 16.04 image and then proceeds to build the VPP code and, in several cases, the Honeycomb agent code for the VNF.

The compilation of these components is time consuming (30+ minutes) and occasionally unsuccessful.  So, the plan is to create snapshot images for each VNF with the time consuming VPP and Honeycomb code pre-built.

Using the vG-MUX as an example, the following steps are used to create a vG-MUX image which can then be used as the image for instantiating a vG-MUX VNF.

  1. Manually configure the .yaml file to not run the install script
    1. Comment out the last line of base_vcpe_vgmux.yaml (i.e. do not invoke v_gmux_install.sh via the yaml)
  2. Create a 'stack' - using an appropriately populated .env file
    1. openstack stack create -t base_vcpe_vgmux.yaml -e base_vcpe_vgmux.env vGMUX
  3. Log into the VM as the 'ubuntu' user and switch to the 'root' user
    1. sudo su -
    2. cd /opt
  4. Create the file "/opt/config/compile_state.txt" with the contents of "build"
  5. From /opt, invoke the install script
    1. ./v_gmux_install.sh
    2. This will build vpp and honeycomb code, it may take 30-40 minutes
  6. Clean up some files not required for the final image (this will save several gigabytes):
    1. rm -fr /opt/vpp /opt/hc2vpp /opt/demo
  7. Edit the file "/opt/config/compile_state.txt" and change the contents of the file to "done"
  8. Reboot
  9. Save an image of the VNF
    1. openstack server image create --name vgmux-base-ubuntu-16-04 <VM Name or ID>
    2. "vgmux-base-ubuntu-16-04" will be the name of the new vG-MUX image

Instantiate a VNF based on the pre-built Image

  1. Change the .env file to use the VNF image created using the process described above.
    1. For example - replace "ubuntu-16-04-cloud-amd64" with "vgmux-base-ubuntu-16-04" in "vcpe_vgmux.env"
  2. Ensure the .yaml file does not have the install script commented out
    1. For example, ensure "v_gmux_install.sh" is not commented out in "base_vcpe_vgmux.yaml"
  3. Create a 'stack'
    1. openstack stack create -t base_vcpe_vgmux.yaml -e base_vcpe_vgmux.env vGMUX
    2. Note, remove the "vGMUX" stack that was created during the "Building a VNF Image" stage
    3. Using the image created above, the install script will perform some configuration steps and complete much more quickly since the VPP and Honeycomb code has already been compiled.


VNF Specific Usage Information

vG-MUX VES Configuration and Usage Information

The vG-MUX provides integrated VES functionality to generate sample events for demonstrating ONAP closed loop functionality.  The VES functionality can be configured via command line (CLI) or via the Honeycomb agent.

Configuration of VES via CLI

Configure VES agent to generate events

vppctl set ves agent server 127.0.0.1 port 88 intval 20

Query VES agent configuration

vppctl show ves agent

Modify VES agent configuration (2 steps - delete, then configure)

vppctl set ves agent del server 127.0.0.1 port 88 intval 20
vppctl set ves agent server 127.0.0.1 port 95 intval 30


The VES can be configured to generate events in 'real' or 'demo' mode.  In 'demo' mode, the value of the 'Packet Loss Rate' attribute can be configured.

Configure VES mode to 'demo' and 40% Packet Loss Rate

vppctl set ves mode demo base 40

This will cause events to be generated with output data that looks like the following sample.

Note that 'sourceId' and 'sourceName' are populated with the value of the 'vnf_id' metadata.

Also note that Packet-Loss-Rate has a value of "40.0" per the example configuration command shown above.

Sample vG-MUX VES Event
{
    "event": {
        "commonEventHeader": {
            "domain": "measurementsForVfScaling",
            "eventId": "Generic_traffic",
            "eventName": "Measurement_vGMUX",
            "eventType": "HTTP request rate",
            "lastEpochMicrosec": 1508871671489135,
            "priority": "Normal",
            "reportingEntityId": "No UUID available",
            "reportingEntityName": "zdcpe1cpe01mux01",
            "sequence": 2,
            "sourceId": "vCPE_Infrastructure_vGMUX_demo_app",
            "sourceName": "vCPE_Infrastructure_vGMUX_demo_app",
            "startEpochMicrosec": 1508871661489135,
            "version": 1.2
        },
        "measurementsForVfScalingFields": {
            "additionalMeasurements": [
                {
                    "arrayOfFields": [
                        {
                            "name": "Packet-Loss-Rate",
                            "value": "40.0"
                        }
                    ],
                    "name": "ONAP-DCAE"
                }
            ],
            "cpuUsageArray": [
                {
                    "cpuIdentifier": "cpu1",
                    "cpuIdle": 66.7,
                    "cpuUsageSystem": 0.0,
                    "cpuUsageUser": 3.3,
                    "percentUsage": 0.0
                }
            ],
            "measurementInterval": 10,
            "measurementsForVfScalingVersion": 2.1,
            "requestRate": 886,
            "vNicUsageArray": [
                {
                    "receivedOctetsDelta": 0.0,
                    "receivedTotalPacketsDelta": 0.0,
                    "transmittedOctetsDelta": 0.0,
                    "transmittedTotalPacketsDelta": 0.0,
                    "vNicIdentifier": "eth0",
                    "valuesAreSuspect": "true"
                }
            ]
        }
    }
}

The ves mode can be changed as desired to modify the Packet-Loss-Rate value.


Configuration of VES via Honeycomb

Sample 'curl' commands executed from the VM (i.e. 127.0.0.1) are shown to configure the VES agent and mode.

Configure the VES agent

curl -i -H "Content-Type:application/json" --data '{"config":{"server-addr":"127.0.0.1","server-port":80,"read-interval":10,"is-add":1}}' -X POST -u admin:admin http://127.0.0.1:8183/restconf/config/vesagent:vesagent

Delete the VES agent configuration (must be done before changing the configuration)

curl -i -H "Content-Type:application/json"  -X DELETE -u admin:admin http://127.0.0.1:8183/restconf/config/vesagent:vesagent/config

Query the VES agent configuration

curl -i -H "Content-Type:application/json" -X GET -u admin:admin http://127.0.0.1:8183/restconf/operational/vesagent:vesagent/config



Configure the VES mode to 'demo' and 40% packet loss

curl -i -H "Content-Type:application/json" --data '{"mode":{"working-mode":"demo","base-packet-loss":40}}' -X POST -u admin:admin http://127.0.0.1:8183/restconf/config/vesagent:vesagent

Delete the VES mode (need to delete before changing it via Honeycomb)

curl -i -H "Content-Type:application/json"  -X DELETE -u admin:admin http://127.0.0.1:8183/restconf/config/vesagent:vesagent/mode

Query the VES mode configuration

curl -i -H "Content-Type:application/json" -X GET -u admin:admin http://127.0.0.1:8183/restconf/operational/vesagent:vesagent/mode





  • No labels