Creating your own VNF package (Release THREE): Difference between revisions
Garciadeblas (talk | contribs) (Created page with "==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==...") |
No edit summary |
||
Line 4: | Line 4: | ||
===Using the CLI tool=== | ===Using the CLI tool=== | ||
*Clone the | *Clone the devops repo: | ||
git clone https://osm.etsi.org/gerrit/osm/ | git clone https://osm.etsi.org/gerrit/osm/devops | ||
*Run the following command to create a folder with all the files required for a single-VM VNF package: | *Run the following command to create a folder with all the files required for a single-VM VNF package: | ||
./descriptor-packages/ | ./devops/descriptor-packages/tools/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. | *A folder called <VNF_NAME>_vnfd will be created with all the files required for a VNF package. | ||
*Edit the descriptor file <VNF_NAME>_vnfd.yaml. | *Edit the descriptor file <VNF_NAME>_vnfd.yaml. | ||
Line 15: | Line 15: | ||
*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. | *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/ | ./devops/descriptor-packages/tools/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 | ||
Line 54: | Line 54: | ||
You will have to create a proxy charm for the VNF. You can follow the general instructions below: | You will have to create a proxy charm for the VNF. You can follow the general instructions below: | ||
*Clone the | *Clone the devops repo: | ||
git clone https://osm.etsi.org/gerrit/osm/juju-charms | git clone https://osm.etsi.org/gerrit/osm/devops | ||
* Enter the juju-charms folder under devops and follow the instructions to create your own charm: [[Creating your own VNF charm (Release THREE)|Creating your own VNF charm]] | |||
You can then follow the ping-pong example in OSM descriptor packages to integrate the charm into VNF primitives | You can then follow the ping-pong example in OSM descriptor packages to integrate the charm into VNF primitives |
Revision as of 12:11, 5 October 2017
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 devops repo:
git clone https://osm.etsi.org/gerrit/osm/devops
- Run the following command to create a folder with all the files required for a single-VM VNF package:
./devops/descriptor-packages/tools/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 descriptor file <VNF_NAME>_vnfd.yaml.
- By default, the descriptor is prepared for a single-VM VNF.
- Add as many VMs as required.
- Add also Internal VLDs as required.
- 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:
./devops/descriptor-packages/tools/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 VM/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 in the VDU 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: Release1 does not include the artifacts that was in the on-boarded package in the exported 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, then:
- Export the VNF package to myvnf.tar.gz.
- Untar the package 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
You will have to create a proxy charm for the VNF. You can follow the general instructions below:
- Clone the devops repo:
git clone https://osm.etsi.org/gerrit/osm/devops
- Enter the juju-charms folder under devops and follow the instructions to create your own charm: Creating your own VNF charm
You can then follow the ping-pong example in OSM descriptor packages to integrate the charm into VNF primitives