Creating your own VNF package (Release ONE): Difference between revisions

From OSM Public Wiki
Jump to: navigation, search
No edit summary
Line 10: Line 10:
*A folder called <VNF_NAME>_vnfd will be created with all the files required for a VNF package.
*A folder called <VNF_NAME>_vnfd will be created with all the files required for a VNF package.
*Edit the file <VNF_NAME>_vnfd.yaml.
*Edit the file <VNF_NAME>_vnfd.yaml.
* Add any artifacts needed by the VNF (eg, charm, icons, images etc ...) to the appropriate folder and make sure it is referenced in the descriptor.
*Once done, you can generate the tar.gz VNF package with the command:
*Once done, you can generate the tar.gz VNF package with the command:
  ./descriptor-packages/src/generate_descriptor_pkg.sh -t vnfd -N <VNF_NAME>_vnfd
  ./descriptor-packages/src/generate_descriptor_pkg.sh -t vnfd -N <VNF_NAME>_vnfd
  #Note: the argument -N is optional and is intended to keep the package files after creating the package
  #Note: the argument -N is optional and is intended to keep the package files after creating the package
'''Note''': If the descriptor is more complex such as a multi-VM VNF the GUI based composer tool is recommended to create the descriptor.
===Using the GUI based composer ===
==== Creating and Onboarding a VNF descriptor ====
The GUI  composer tool is recommended for editing complex VNFs  such as multi-vm VNFs
* Bring up  the OSM GUI.
* Navigate to the "catalog" page and click on the "+" sign to choose "ADD VNFD" option.
* A new VNF will be added to the canvas. By default the VNF will contain a single VDU.
* Use the "model driven" editor  on the right most side of the page to update the various fields in the VNF descriptor.
* Use the "ADD VDU" and "ADD IVLD" buttons to add additional VDUs and Internal VLDs needed by the VNF.
* Select the VDUs and VLDs created and update the fields as needed using the model driven editor on the right.
* For VDUs that need connection to an  Internal VLD, add internal connection points to the VDU. Once added, the connection points will be visible on the canvas.
* Make the connection to Internal VLD and VDU by clicking and drawing a line to the VLD.
* Once all the edits to the descriptor are completed, click "ONBOARD" to onboard the descriptor.
==== Exporting a VNF descriptor package ====
A descriptor that has been on-boarded (through package onboard or through the GUI composer)  will be available for export to create a descriptor package.
#Note: In release1 implementation does not preserve any artifacts that was in the on-boarded package.
==== Adding additional artifacts to  a VNF descriptor package ====
The release1 implementation does not allow the editing of artifacts within a VNF package. So  only descriptors can be generated using the GUI composer tool.
If additional artifacts need to be included in the VNF package,
* Export the VNF package to myvnf.tar.gz.
* Untar and using tar -zxvf myvnf.tar.gz.
* Copy the needed artifacts to the appropriate directory and update the descriptor to refer to them.
* Recreate the package using the CLI tool


==VNF with primitives==
==VNF with primitives==

Revision as of 22:57, 2 November 2016

VNF without primitives

Using web form

You can access this web page and follow the instructions: http://riftio.com/osm-vnf-package-generator/

Using the CLI tool

  • Clone the descriptor-packages repo:
git clone https://osm.etsi.org/gerrit/osm/descriptor-packages
  • Run the following command to create a folder with all the files required for a single-VM VNF package:
./descriptor-packages/src/generate_descriptor_pkg.sh -t vnfd --image <IMAGE_PATH> -c <VNF_NAME>
  • A folder called <VNF_NAME>_vnfd will be created with all the files required for a VNF package.
  • Edit the file <VNF_NAME>_vnfd.yaml.
  • Add any artifacts needed by the VNF (eg, charm, icons, images etc ...) to the appropriate folder and make sure it is referenced in the descriptor.
  • Once done, you can generate the tar.gz VNF package with the command:
./descriptor-packages/src/generate_descriptor_pkg.sh -t vnfd -N <VNF_NAME>_vnfd
#Note: the argument -N is optional and is intended to keep the package files after creating the package

Note: If the descriptor is more complex such as a multi-VM VNF the GUI based composer tool is recommended to create the descriptor.


Using the GUI based composer

Creating and Onboarding a VNF descriptor

The GUI composer tool is recommended for editing complex VNFs such as multi-vm VNFs

  • Bring up the OSM GUI.
  • Navigate to the "catalog" page and click on the "+" sign to choose "ADD VNFD" option.
  • A new VNF will be added to the canvas. By default the VNF will contain a single VDU.
  • Use the "model driven" editor on the right most side of the page to update the various fields in the VNF descriptor.
  • Use the "ADD VDU" and "ADD IVLD" buttons to add additional VDUs and Internal VLDs needed by the VNF.
  • Select the VDUs and VLDs created and update the fields as needed using the model driven editor on the right.
  • For VDUs that need connection to an Internal VLD, add internal connection points to the VDU. Once added, the connection points will be visible on the canvas.
  • Make the connection to Internal VLD and VDU by clicking and drawing a line to the VLD.
  • Once all the edits to the descriptor are completed, click "ONBOARD" to onboard the descriptor.

Exporting a VNF descriptor package

A descriptor that has been on-boarded (through package onboard or through the GUI composer) will be available for export to create a descriptor package.

  1. Note: In release1 implementation does not preserve any artifacts that was in the on-boarded package.

Adding additional artifacts to a VNF descriptor package

The release1 implementation does not allow the editing of artifacts within a VNF package. So only descriptors can be generated using the GUI composer tool. If additional artifacts need to be included in the VNF package,

  • Export the VNF package to myvnf.tar.gz.
  • Untar and using tar -zxvf myvnf.tar.gz.
  • Copy the needed artifacts to the appropriate directory and update the descriptor to refer to them.
  • Recreate the package using the CLI tool

VNF with primitives

(Under elaboration)

You will have to create a proxy charm for the VNF. You can follow the general instructions below:

  • Clone the descriptor-packages repo:
git clone https://osm.etsi.org/gerrit/osm/juju-charms
  • ...