7.6 KiB
ETSI NFV-SOL VNF Deployment as VM with LCM Operation User Data
This document describes how to deploy VNF as VM with LCM operation user data in Tacker v1 API using CLI commands. Please check LCM-user-data spec and NFV-SOL014 v2.8.1 for more information on LCM operation user data.
Note
This is a document for Tacker v1 API. See /user/v2/vnf/deployment_with_user_data/index
for
Tacker v2 API.
Note
Most of the content is the same as /user/etsi_vnf_deployment_as_vm_with_tosca
, but some
have 'LCM operation user data' specific descriptions. The part will be
clarified with the notation [This is UserData specific part].
Overview
The diagram below shows an overview of the VNF deployment.
Request create VNF
A user requests tacker-server to create a VNF with tacker-client by uploading a VNF Package and requesting
create VNF
. The VNF Package should containBaseHOT
andUserData
in addition toVNFD
. The detailed explanation of these contents can be found in/user/vnf-package
.Request instantiate VNF
A user requests tacker-server to instantiate the created VNF by requesting
instantiate VNF
with instantiate parameters.Call OpenStack Heat API
Upon receiving a request, tacker-server redirects it to tacker-conductor. In tacker-conductor, the request is redirected again to an appropriate infra-driver (in this case OpenStack infra-driver) according to the contents of the instantiate parameters. Then, OpenStack infra-driver calls OpenStack Heat APIs to create a VM as a VNF.
Create a VM
OpenStack Heat creates a VM according to the API calls.
Prerequisites
The following packages should be installed:
- tacker
- python-tackerclient
A default VIM should be registered according to /cli/cli-legacy-vim
.
The VNF Package(sample_vnf_package_csar.zip) used below is prepared
by referring to /user/vnf-package
.
Note
[This is UserData specific part] In order to deploy VNF using LCM
operation user data, it is necessary to include BaseHOT and UserData in
the VNF Package, which are optional in /user/vnf-package
.
VNF Deployment Procedure as VM
In order to deploy VNF as a VM, it is necessary to execute the
following procedure. Details of CLI commands are described in /cli/cli-etsi-vnfpkgm
and
/cli/cli-etsi-vnflcm
.
Many procedures are the same as /user/etsi_vnf_deployment_as_vm_with_tosca
, so refer
to the doc for those procedures.
1. Create VNF Package Info
See procedure in /user/etsi_vnf_deployment_as_vm_with_tosca
.
2. Upload VNF Package
See procedure in /user/etsi_vnf_deployment_as_vm_with_tosca
.
3. Create VNF Identifier
See procedure in /user/etsi_vnf_deployment_as_vm_with_tosca
.
4. Instantiate VNF
Create a sample_param_file.json file with the following format. This is the file that defines the parameters for an instantiate request. These parameters will be set in the body of the instantiate request.
Required parameter:
- flavourId
- additionalParams
Note
Details of flavourId is described in /user/vnfd-sol001
.
Note
[This is UserData specific part] additionalParams is a parameter that can be described by KeyValuePairs. By setting the following two parameters in this parameter, instantiate using LCM operation user data becomes possible. For file_name.py and class_name, set the file name and class name described in Prerequisites.
- lcm-operation-user-data: ./UserData/file_name.py
- lcm-operation-user-data-class: class_name
Optional parameters:
- instantiationLevelId
- extVirtualLinks
- extManagedVirtualLinks
- vimConnectionInfo
Note
You can skip vimConnectionInfo
only when you have the
default VIM described in /cli/cli-legacy-vim
.
Note
This operation can specify the vimConnectionInfo
for the
VNF instance. Even if this operation specify multiple
vimConnectionInfo
associated with one VNF instance, only
one of them will be used for life cycle management operations.
An example of a param file with only required parameters:
{
"flavourId":"simple",
"additionalParams": {
"lcm-operation-user-data": "./UserData/lcm_user_data.py",
"lcm-operation-user-data-class": "SampleUserData"
}
}
An example of a param file with optional parameters:
{
"flavourId": "simple",
"instantiationLevelId": "instantiation_level_1",
"extVirtualLinks": [
{
"id": "net0",
"resourceId": "4bf3e646-7a24-4f04-a985-d8f4bb1203de", #Set the uuid of the network to use
"extCps": [
{
"cpdId": "CP1",
"cpConfig": [
{
"cpProtocolData": [
{
"layerProtocol": "IP_OVER_ETHERNET",
"ipOverEthernet": {
"ipAddresses": [
{
"type": "IPV4",
"fixedAddresses": [
"10.10.0.49" #Set the ip address from subnet range
],
"subnetId": "06709e3e-33ff-4221-9d07-565c3fd55223" #Set the subnetID of net0
}
]
}
}
]
}
]
}
]
}
],
"vimConnectionInfo": [
{
"id": "e24f9796-a8e9-4cb0-85ce-5920dcddafa1", #Set a random uuid.
"vimId": "8a0fd79d-e224-4c27-85f5-ee79c6e0d870", #Set the uuid of the VIM to use
"vimType": "ETSINFV.OPENSTACK_KEYSTONE.v_2"
}
],
"additionalParams": {
"lcm-operation-user-data": "./UserData/lcm_user_data.py",
"lcm-operation-user-data-class": "SampleUserData"
}
}
samlple_param_file.json used in this document is below.
../../../samples/etsi_getting_started/userdata/lcm_instantiate_request/sample_param_file.json
Execute the following CLI command to instantiate the VNF instance.
$ openstack vnflcm instantiate VNF_INSTANCE_ID ./sample_param_file.json
Result:
Instantiate request for VNF Instance 810d8c9b-e467-4b06-9265-ac9dce015fce has been accepted.
After that, execute the following CLI command and confirm that VNF instance instantiation was successful.
- Confirm that the 'Instantiation State' is 'INSTANTIATED'.
$ openstack vnflcm show VNF_INSTANCE_ID -c 'Instantiation State'
Result:
+---------------------+--------------+
| Field | Value |
+---------------------+--------------+
| Instantiation State | INSTANTIATED |
+---------------------+--------------+
5. Terminate VNF
See procedure in /user/etsi_vnf_deployment_as_vm_with_tosca
.
6. Delete VNF Identifier
See procedure in /user/etsi_vnf_deployment_as_vm_with_tosca
.