Creating your own VNF package (Release ONE): Difference between revisions
No edit summary |
Garciadeblas (talk | contribs) No edit summary |
||
Line 9: | Line 9: | ||
./descriptor-packages/src/generate_descriptor_pkg.sh -t vnfd --image <IMAGE_PATH> -c <VNF_NAME> | ./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. | *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 descriptor 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. | **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: | *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 | ||
Line 20: | Line 23: | ||
===Using the GUI based composer === | ===Using the GUI based composer === | ||
==== Creating and | ==== Creating and onboarding a VNF descriptor ==== | ||
The GUI composer tool is recommended for editing complex VNFs such as multi- | The GUI composer tool is recommended for editing complex VNFs such as multi-VM VNFs | ||
* Bring up the OSM GUI. | * Bring up the OSM GUI. | ||
* Navigate to the "catalog" page and click on the "+" sign to choose "ADD VNFD" option. | * 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. | * 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 "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. | * 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. | * 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. | * 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. | * 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. | * Once all the edits to the descriptor are completed, click "ONBOARD" to onboard the descriptor. | ||
==== Exporting a VNF descriptor package ==== | ==== Exporting a VNF descriptor package ==== | ||
A descriptor that has been on-boarded (through package onboard or through the GUI composer) | 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. | #Note: In release1 implementation does not preserve any artifacts that was in the on-boarded package. | ||
==== Adding additional artifacts to a VNF descriptor package ==== | ==== Adding additional artifacts to a VNF descriptor package ==== | ||
The release1 implementation does not allow the editing of artifacts within a VNF package. So | 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, | If additional artifacts need to be included in the VNF package, then: | ||
* Export the VNF package to myvnf.tar.gz. | *Export the VNF package to myvnf.tar.gz. | ||
* Untar | *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. | *Copy the needed artifacts to the appropriate directory and update the descriptor to refer to them. | ||
* Recreate the package using the CLI tool | *Recreate the package using the CLI tool | ||
==VNF with primitives== | ==VNF with primitives== |
Revision as of 09:38, 3 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 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:
./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 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: 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, 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
(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
- ...