Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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

Table of Contents


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

For information on preparing the VNF images in previous releases, refer to  Preparing the vCPE VPP VNF Images for Amsterdam and Beijing.toc

The VPP based VNFs to be covered are:

  • vBRG
  • vBNG
  • vG-MUX
  • vGW

Preparing the vCPE VPP VNF Images for Casablanca

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.

Building a pre-built VNF Image

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.

For building and deploying VNF images in the Casablanca release, there are two sets of heat templates, environment files, and scripts:

To create a VNF image, use the build_vcpe_xxx.yaml and build_vcpe_xxx.env files, which invoke the v_xxx_build.sh script.

To instantiate a VNF using a pre-built image, use the base_vcpe_xxx.yaml and build_vcpe_xxx.env files, which invoke the v_xxx_install.sh script.

Building a pre-built VNF Image

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. The build .yaml file and the associated build .env file are used to invoke the VM which will build the image. The build .yaml will invoke the build script “v_gmux_build.sh”
  2. 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)
  3. Create a 'stack' - using an appropriately populated .env file
    1. openstack stack create -t base_vcpe_vgmux.yaml -e base_vcpe_vgmux.env vGMUX
  4. Log into the VM as the 'ubuntu' user and switch to the 'root' user
    1. sudo su -
    2. cd /opt
  5. Create the file "/opt/config/compile_state.txt" with the contents of "build"
  6. From /opt, invoke the install script./v_gmux_install.sh
    1. This will build vpp and honeycomb code, it may take 30-40 minutes
  7. Clean up some files not required for the final image (this will save several gigabytes):
    1. rm -fr /opt/vpp /opt/hc2vpp /opt/demo
  8. Edit the file "/opt/config/compile_state.txt" and change the contents of the file to "done"
    Note: In the case of the vbrg emulator, the file /opt/config/compile_state.txt is created by 
    the base_vcpe_vbrg.yaml file. The compile state (done, auto or build) can be passed into
    the vbrg env file before the VNF is created.

  9. Log into the VM as the 'ubuntu' user and check that build script has finished executing
    1. cat /opt/script_status.txt
    2. If the script has executed completely and successfully, the output will be “Execution of vG-MUX build script completed”.
    3. If the script has failed to execute successfully, the output will specify the reason for its failure. For more information, query the contents of the systemd journal using the ‘journalctl’ command. See also: Debugging and troubleshooting.
  10. Clean up some files not required for the final image (this will save several gigabytes):
    1. sudo su -
    2. rm -fr /opt/vpp /opt/hc2vpp /opt/demo /opt/script_status.txt
    Compile StateDescriptionDoneUse a prebuilt image. Install script sets up the environmentAutoInstall script builds honeycomb and vpp and sets up the environmentBuildInstall script builds honeycomb and vpp
  11. Reboot
  12. Save an image of the VNF
    1. openstack server image create --name vgmux-base-ubuntu-16-04 <VM Name or ID>
  13. "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 base .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 "base_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.

Pre-built VNF images available

Prebuilt images in the ONAP-vCPE, Integration and Integraiont-SB01 Projects (as of 11/13/2017):

...

vbng-base-ubuntu-16-04

...

  1. base .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".
  2. 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.

Pre-built VNF images available

Prebuilt images in the ONAP-vCPE Project (as of 08/15/18):

VNF

ONAP-vCPE Image Name

Checksum

vBRG

vbrg-casa-base-ubuntu-16-04


vBNG

vbng-casa-base-ubuntu-16-04


vG-MUX

vgmux-casa-base-ubuntu-16-04


vGW

vgw-casa-base-ubuntu-16-04


Compatibility with Amsterdam and Beijing Releases

The VNF heat templates and environment files for the Casablanca release provide backwards compatibility with previous releases. The build heat template will create the compile_state.txt file containing a status of ‘done’.

In the Amsterdam and Beijing releases, after building the VNF image, the process required manually changing the content of compile_state.txt to ‘done’ before saving the image of the VNF. The pre-built VNF images of the Casablanca release can be used with heat templates and environment files of previous releases.

Debugging and troubleshooting

  • To see the full output of the build script:

    • journalctl
      Image Added


  • To check that the build script is running:
    • ps aux | grep v_xxx_build.sh


  • To check that vpp and honeycomb are running:
    • systemctl status vpp.service
    • systemctl status honeycomb.service

Note that the vpp service should be ‘inactive’ after the completion of the build script, and it should be ‘running’ on all machines after the completion of the install script.

Image AddedImage Added

The honeycomb service should be running on the vBRG, vG-MUX, and vGW after the completion of the install script.

Image Added

This can also be confirmed by running ‘cat /var/log/honeycomb.log’:

Image Added

  • To check status on vGW of dhcp server:
    • systemctl status isc-dhcp-server


  • To check whether a package is installed using dpkg:
    • dpkg -s [package name]
    • For example: dpkg -s vpp

Image Added

...

VNF Specific Usage Information

...

Info
titleCLI command to static route
vppctl ip route add 10.3.0.0/24 via 10.1.0.10 GigabitEthernet0/4/0



·         To check whether a package is installed using dpkg:

o   dpkg -s [package name]

o   For example: dpkg -s vpp