Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vBNG setup on OpenStack manually #4

Closed
taylor opened this issue May 28, 2018 · 1 comment
Closed

vBNG setup on OpenStack manually #4

taylor opened this issue May 28, 2018 · 1 comment

Comments

@taylor
Copy link
Collaborator

taylor commented May 28, 2018

Related to CNFs issue cncf/cnf-testbed#8

@lixuna
Copy link
Collaborator

lixuna commented Jun 7, 2018

Building a pre-built VNF Image

(Originally source)

Using the vBNG as an example, the following steps are used to create a vBNG image which can then be used as the image for instantiating a v vBNG.

  1. Manually configure the .yaml file to not run the install script
  1. Create a 'stack' - using an appropriately populated .env file
  1. Log into the VM as the 'ubuntu' user and switch to the 'root' user
  • sudo su -
  • cd /opt
  1. Create the file "/opt/config/compile_state.txt" with the contents of "build"

  2. From /opt, invoke the install script

  • ./v_bng_install.sh
  • This will build vpp and honeycomb code, it may take 30-40 minutes
  1. Clean up some files not required for the final image (this will save several gigabytes):
  • 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

  • openstack server image create --name vbng-base-ubuntu-16-04
  • "vgmux-base-ubuntu-16-04" will be the name of the new vBNG 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 "vbng-base-ubuntu-16-04" in "vcpe_vbng.env"
  • Ensure the .yaml file does not have the install script commented out

    • For example, ensure "v_bng_install.sh" is not commented out in "base_vcpe_vbng.yaml"
  • Create a 'stack'

    • openstack stack create -t base_vcpe_vbng.yaml -e base_vcpe_vbng.env vBNG
    • Note, remove the "vBNG" 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants