Preparing the vCPE VPP VNF Images for Amsterdam and Beijing

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.

  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
  1. 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.

Compile State

Description

Done

Use a prebuilt image. Install script sets up the environment

Auto

Install script builds honeycomb and vpp and sets up the environment

Build

Install script builds honeycomb and vpp

  1. Reboot
  2. 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.

Pre-built VNF images available

Prebuilt images in the ONAP-vCPE, Integration, and Integration-SB07 Projects (as of 8/15/2018):

VNF

ONAP-vCPE Image Name

Integration-SB-07 Image Name

Checksum

vBRG

vbrg-base-ubuntu-16-04-new

vbrg-base-ubuntu-16-04-new

5fa1bcc9a6074e343c1f9713d8174cb8

vBNG

vbng-base-ubuntu-16-04

vbng-base-ubuntu-16-04

9f2399a77e87c17bcf499ca941f93441

vG-MUX

vgmux2-base-ubuntu-16-04

vgmux2-base-ubuntu-16-04

59f5ebf915fdb3993c0a7f315807e7e2

vGW

vgw2-base-ubuntu-16-04

vgw-base-ubuntu-16-04

198806941e9d9368f6b8b8efc0606720


 

  • No labels