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.
- Manually configure the .yaml file to not run the install script
- Comment out the last line of base_vcpe_vgmux.yaml (i.e. do not invoke v_gmux_install.sh via the yaml)
- Create a 'stack' - using an appropriately populated .env file
- openstack stack create -t base_vcpe_vgmux.yaml -e base_vcpe_vgmux.env vGMUX
- Log into the VM as the 'ubuntu' user and switch to the 'root' user
- sudo su -
- cd /opt
- Create the file "/opt/config/compile_state.txt" with the contents of "build"
- From /opt, invoke the install script
- ./v_gmux_install.sh
- This will build vpp and honeycomb code, it may take 30-40 minutes
- Clean up some files not required for the final image (this will save several gigabytes):
- rm -fr /opt/vpp /opt/hc2vpp /opt/demo
- Edit the file "/opt/config/compile_state.txt" and change the contents of the file to "done"
- Reboot
- Save an image of the VNF
- openstack server image create --name vgmux-base-ubuntu-16-04 <VM Name or ID>
- "vgmux-base-ubuntu-16-04" will be the name of the new vG-MUX image
Instantiate a VNF based on the pre-built Image
- Change the .env file to use the VNF image created using the process described above.
- For example - replace "ubuntu-16-04-cloud-amd64" with "vgmux-base-ubuntu-16-04" in "vcpe_vgmux.env"
- Ensure the .yaml file does not have the install script commented out
- For example, ensure "v_gmux_install.sh" is not commented out in "base_vcpe_vgmux.yaml"
- Create a 'stack'
- openstack stack create -t base_vcpe_vgmux.yaml -e base_vcpe_vgmux.env vGMUX
- Note, remove the "vGMUX" stack that was created during the "Building a VNF Image" stage
- 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.