cncf / onap-demo

*NO LONGER MAINTAINED* Fork of https://github.com/onap/demo. Goal: Support Packet, update OpenStack, test VNF use cases, create equivalent CNF use cases on K8s. All CNF development has moved to the CNCF CNF Testbed, https://github.com/cncf/cnf-testbed.
Other
2 stars 10 forks source link

vBNG setup on OpenStack manually #4

Closed taylor closed 6 years ago

taylor commented 6 years ago

Related to CNFs issue https://github.com/cncf/cnfs/issues/8

lixuna commented 6 years ago

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. [x] Manually configure the .yaml file to not run the install script

  2. [x] Create a 'stack' - using an appropriately populated .env file

  3. [x] Log into the VM as the 'ubuntu' user and switch to the 'root' user

    • [x] sudo su -
    • [x] cd /opt
  4. [x] Create the file "/opt/config/compile_state.txt" with the contents of "build"

  5. [x] From /opt, invoke the install script

    • [x] ./v_bng_install.sh
    • [x] This will build vpp and honeycomb code, it may take 30-40 minutes
  6. [x] Clean up some files not required for the final image (this will save several gigabytes):

    • [x] rm -fr /opt/vpp /opt/hc2vpp /opt/demo
  7. [x] 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
  8. [x] Reboot

  9. [x] Save an image of the VNF

    • [x] openstack server image create --name vbng-base-ubuntu-16-04
    • [x] "vgmux-base-ubuntu-16-04" will be the name of the new vBNG image

Instantiate a VNF based on the pre-built Image