Orchestrating a VNF in OSM - caprivm/virtualization GitHub Wiki

caprivm ([email protected])

Description

This page explains all the steps required to orchestrate a VNF (Virtual Network Function) in OSM. All steps that expose this section has been tested in a Virtual Machine using the following OS preparation requirements.

Feature Value
OS Used Ubuntu 18.04 LTS
vCPU 4
RAM (GB) 8
Disk (GB) 50

The contents of the page are:

Prerequisites

The only prerequisite to follow is the installation of OSM. For this you can consult the following link:

Configure a VNF in OSM

In this case, a OSM community VNF specifically intended for instantiation testing is used as the test. The VNF is named hackfest_basic and uses Ubuntu 16.04 as the OS base image under the name of ubuntu16.04, so the first validation to do is to see if the image exists in the VIM. For this, using the OpenStack client, the following command can be executed:

openstack image list
# +--------------------------------------+--------------------+--------+
# | ID                                   | Name               | Status |
# +--------------------------------------+--------------------+--------+
# | 6a8b3f3b-883b-45fc-9ce7-cc26ae56aab3 | cirros             | active |
# | 6f4f426d-dcc0-4003-b126-eb94a5962392 | cloudlinux-8.3     | active |
# | fe0fa9e4-ca0d-41f6-a7a0-5641f76cd249 | debian9            | active |
# | 2fd3f83e-f064-4100-b314-501574d36bda | epc-image          | active |
# | 8b0ea9ae-e2b4-42d2-8c2c-b484367d658b | focal              | active |
# | 1979a24c-b87c-44ea-9c1f-ac6fbe39ea8e | ubuntu-cloud-18-04 | active |
# | b97de7e7-5681-44b9-8fb6-b0ce1940765c | ubuntu16.04        | active |
# +--------------------------------------+--------------------+--------+

As you can, the last image of the CLI output is the one that corresponds to the VNF. Next, make sure the VIM is added and its status is ENABLED:

osm vim-list
# +-------------+--------------------------------------+-------------------+
# | vim name    | uuid                                 | operational state |
# +-------------+--------------------------------------+-------------------+
# | ID Tolu VIM | ed9987fa-310f-4482-9936-48a2ec11a320 | ENABLED           |
# +-------------+--------------------------------------+-------------------+

Following this, download the OSM package repository and build the NS and VNF for testing:

cd ~/osm
git clone https://osm.etsi.org/gitlab/vnf-onboarding/osm-packages.git osm_packages
cd osm_packages/

NOTE: Remember that the VNF uses the ubuntu 16.04 image as a base. You can change this image by editing the VNF descriptors. Now create the packages:

osm package-build hackfest_basic_ns
osm package-build hackfest_basic_vnf

The above commands generate two .tar.gz files in the folder where the command was run. Consider these two files to create the NS/VNF packages in OSM:

osm nfpkg-create hackfest_basic_vnf.tar.gz
osm nspkg-create hackfest_basic_ns.tar.gz

Verify that the packages were created using the following commands:

osm nfpkg-list
# +--------------------+--------------------------------------+-----------+
# | nfpkg name         | id                                   | desc type |
# +--------------------+--------------------------------------+-----------+
# | hackfest_basic-vnf | 1d23f660-3ef5-4038-bb0b-8a67c45452d9 | sol006    |
# +--------------------+--------------------------------------+-----------+
osm nspkg-list
# +-------------------+--------------------------------------+
# | nsd name          | id                                   |
# +-------------------+--------------------------------------+
# | hackfest_basic-ns | cb37fd39-1635-4029-a15b-0f063d676664 |
# +-------------------+--------------------------------------+

Now, with the packages loaded, you can instantiate the VNF from the following command:

osm ns-create --ns_name basic_ns --nsd_name hackfest_basic-ns --vim_account <VIM_ID>
# In CLI must be appears the ID assigned to NS/VNF instance
# 6c781267-bfd4-4267-b1a6-268d9fb5fd61

In the CLI you should see the NS displayed and in READY state:

osm ns-list
# +------------------+--------------------------------------+---------------------+----------+-------------------+---------------+
# | ns instance name | id                                   | date                | ns state | current operation | error details |
# +------------------+--------------------------------------+---------------------+----------+-------------------+---------------+
# | basic_ns         | 6c781267-bfd4-4267-b1a6-268d9fb5fd61 | 2021-05-24T17:22:04 | READY    | IDLE (None)       | N/A           |
# +------------------+--------------------------------------+---------------------+----------+-------------------+---------------+

The same validation could be done from the OSM graphical interface, in the Instances -> NS Instances tab as shown in the following figure:

VNF Instance Validation

Likewise, from the OpenStack interface you can see the instance created from OSM:

VNF Instance Validation from OpenStack

Cleanup the VNF deployment

From OSM it is easy to delete the VNF instantiation. It can be done with the following command:

osm ns-delete --wait basic_ns
⚠️ **GitHub.com Fallback** ⚠️