Add doc of ETSI VNF Deployment as VM with UserData
Usage guide for ETSI NFV-SOL VNF Deployment as VM with UserData is added in user docs. Change-Id: If36586e6ac0cce57fa882d495e99e74ec533ab59
This commit is contained in:
parent
4558f9ad37
commit
8d86d50b5a
206
doc/source/user/etsi_vnf_deployment_as_vm_with_user_data.rst
Normal file
206
doc/source/user/etsi_vnf_deployment_as_vm_with_user_data.rst
Normal file
@ -0,0 +1,206 @@
|
||||
==============================================================
|
||||
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 using CLI commands.
|
||||
Please check `LCM-user-data spec`_ and `NFV-SOL014 v2.8.1`_
|
||||
for more information on LCM operation user data.
|
||||
|
||||
.. note::
|
||||
Most of the content is the same as :doc:`./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].
|
||||
|
||||
Prerequisites
|
||||
-------------
|
||||
|
||||
The following packages should be installed:
|
||||
|
||||
* tacker
|
||||
* python-tackerclient
|
||||
|
||||
A default VIM should be registered according to
|
||||
:doc:`../cli/cli-legacy-vim`.
|
||||
|
||||
|
||||
The VNF Package(sample_vnf_pkg.zip) used below is prepared
|
||||
by referring to :doc:`./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 :doc:`./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
|
||||
:doc:`../cli/cli-etsi-vnfpkgm` and :doc:`../cli/cli-etsi-vnflcm`.
|
||||
|
||||
Many procedures are the same as :doc:`./etsi_vnf_deployment_as_vm_with_tosca`,
|
||||
so refer to the doc for those procedures.
|
||||
|
||||
|
||||
1. Create VNF Package Info
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
See procedure in :doc:`./etsi_vnf_deployment_as_vm_with_tosca`.
|
||||
|
||||
|
||||
2. Upload VNF Package
|
||||
^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
See procedure in :doc:`./etsi_vnf_deployment_as_vm_with_tosca`.
|
||||
|
||||
|
||||
3. Create VNF Identifier
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
See procedure in :doc:`./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 :doc:`./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 :doc:`../cli/cli-legacy-vim`.
|
||||
|
||||
Param file with only required parameters:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
{
|
||||
"flavourId":"simple",
|
||||
"additionalParams": {
|
||||
"lcm-operation-user-data": "./UserData/lcm_user_data.py",
|
||||
"lcm-operation-user-data-class": "SampleUserData"
|
||||
}
|
||||
}
|
||||
|
||||
Param file with optional parameters:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
{
|
||||
"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"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"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"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Execute the following CLI command to instantiate the VNF instance.
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ openstack vnflcm instantiate VNF_INSTANCE_ID \
|
||||
./sample_param_file.json
|
||||
|
||||
|
||||
Result:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
Instantiate request for VNF Instance 725f625e-f6b7-4bcd-b1b7-7184039fde45 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'.
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ openstack vnflcm show VNF_INSTANCE_ID \
|
||||
-c 'Instantiation State'
|
||||
|
||||
|
||||
Result:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
+---------------------+--------------+
|
||||
| Field | Value |
|
||||
+---------------------+--------------+
|
||||
| Instantiation State | INSTANTIATED |
|
||||
+---------------------+--------------+
|
||||
|
||||
|
||||
5. Terminate VNF
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
See procedure in :doc:`./etsi_vnf_deployment_as_vm_with_tosca`.
|
||||
|
||||
|
||||
6. Delete VNF Identifier
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
See procedure in :doc:`./etsi_vnf_deployment_as_vm_with_tosca`.
|
||||
|
||||
.. _LCM-user-data spec : https://specs.openstack.org/openstack/tacker-specs/specs/ussuri/lcm-operation-with-lcm-operation-user-data.html
|
||||
.. _NFV-SOL014 v2.8.1 : https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/014/02.08.01_60/gs_NFV-SOL014v020801p.pdf
|
||||
|
@ -51,6 +51,7 @@ Use cases
|
||||
dynamic_vnffg_usage_guide.rst
|
||||
enhanced_placement_awareness_usage_guide.rst
|
||||
etsi_vnf_deployment_as_vm_with_tosca.rst
|
||||
etsi_vnf_deployment_as_vm_with_user_data.rst
|
||||
etsi_containerized_vnf_usage_guide.rst
|
||||
etsi_vnf_healing.rst
|
||||
containerized_vnf_usage_guide.rst
|
||||
|
@ -31,6 +31,17 @@ The directory structure:
|
||||
* **Files/images/**
|
||||
* (optional) **Scripts/**
|
||||
* (optional) **<manifest file name>.mf**
|
||||
* (optional) **BaseHOT/**
|
||||
* (optional) **UserData/**
|
||||
|
||||
.. note:: BaseHOT and UserData are optional, but they are required when
|
||||
running LCM operation user data.
|
||||
This methodology is under discussion within `NFV-SOL014 v2.8.1`_
|
||||
and there is no clear directory structure yet.
|
||||
Please check with :doc:`./etsi_vnf_deployment_as_vm_with_user_data`.
|
||||
|
||||
The specification can be modified according to standardization
|
||||
`NFV-SOL014 v2.8.1`_.
|
||||
|
||||
.. code-block::
|
||||
|
||||
@ -52,6 +63,15 @@ The directory structure:
|
||||
!----Scripts (optional)
|
||||
!---- install.sh
|
||||
!---- manifest.mf
|
||||
!----BaseHOT (optional)
|
||||
!---- df_1
|
||||
!---- base_hot_df_1.yaml
|
||||
!---- ..
|
||||
!---- df_x
|
||||
!---- base_hot_df_x.yaml
|
||||
!----UserData (optional)
|
||||
!---- __init__.py
|
||||
!---- lcm_user_data.py
|
||||
|
||||
|
||||
TOSCA-Metadata/TOSCA.meta
|
||||
@ -207,6 +227,123 @@ Example:
|
||||
Hash: 36f945953929812aca2701b114b068c71bd8c95ceb3609711428c26325649165
|
||||
|
||||
|
||||
BaseHOT/
|
||||
^^^^^^^^
|
||||
|
||||
Base HOT file is a Native cloud orchestration template, HOT in this context,
|
||||
which is commonly used for LCM operations in different VNFs.
|
||||
This Base HOT can work on OpenStack API and be filled by Heat input parameters
|
||||
generated by LCM operation user data.
|
||||
It is the responsibility of the user to prepare this file, and it is necessary
|
||||
to make it consistent with VNFD placed under the **Definitions/** directory.
|
||||
|
||||
.. note:: Place the directory corresponding to deployment-flavour stored in
|
||||
the **Definitions/** under the **BaseHOT/** directory, and store the
|
||||
Base HOT files in it.
|
||||
In this DQ example, it is assumed that there is a deployment-flavour
|
||||
from `df_1` to` df_x`.
|
||||
For more information on deployment-flavour, see
|
||||
`NFV-SOL001 v2.6.1`_ Annex A.
|
||||
|
||||
Example:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
heat_template_version: 2013-05-23
|
||||
description: 'Template for test _generate_hot_from_tosca().'
|
||||
|
||||
parameters:
|
||||
nfv:
|
||||
type: json
|
||||
|
||||
resources:
|
||||
VDU1:
|
||||
type: OS::Nova::Server
|
||||
properties:
|
||||
flavor:
|
||||
get_resource: VDU1_flavor
|
||||
name: VDU1
|
||||
image: { get_param: [ nfv, VDU, VDU1, image ] }
|
||||
networks:
|
||||
- port:
|
||||
get_resource: CP1
|
||||
|
||||
CP1:
|
||||
type: OS::Neutron::Port
|
||||
properties:
|
||||
network: { get_param: [ nfv, CP, CP1, network ] }
|
||||
|
||||
VDU1_flavor:
|
||||
type: OS::Nova::Flavor
|
||||
properties:
|
||||
ram: { get_param: [ nfv, VDU, VDU1, flavor, ram ] }
|
||||
vcpus: { get_param: [ nfv, VDU, VDU1, flavor, vcpus ] }
|
||||
disk: { get_param: [ nfv, VDU, VDU1, flavor, disk ] }
|
||||
|
||||
outputs: {}
|
||||
|
||||
|
||||
.. note:: For property (e.g. image in VDU1) whose value is "get_param",
|
||||
the Heat input parameters generated by script placed under
|
||||
**UserData/** directory.
|
||||
|
||||
|
||||
UserData/
|
||||
^^^^^^^^^
|
||||
|
||||
LCM operation user data is a script that returns key/value data as
|
||||
Heat input parameters used for Base HOT.
|
||||
As Heat input parameter, OpenStack parameters that are not statically defined
|
||||
in the VNFD(e.g. flavors, images, hardware acceleration, driver-setup, etc.)
|
||||
can be assigned.
|
||||
|
||||
|
||||
.. note:: It is necessary to generate Heat input parameters for HOT file
|
||||
This script has the following advantages/disadvantages for VNF
|
||||
package creators/users.
|
||||
The advantage is that this script has no operational restrictions,
|
||||
so it can be freely described by creators and operated by users.
|
||||
The disadvantage is that creators can write a script that
|
||||
involves DB operations, which can lead to unexpected behavior for users.
|
||||
The trade-off between being able to write scripts freely and
|
||||
limiting operations is an issue for the future.
|
||||
|
||||
|
||||
Example:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
import tacker.vnfm.lcm_user_data.utils as UserDataUtil
|
||||
|
||||
from tacker.vnfm.lcm_user_data.abstract_user_data import AbstractUserData
|
||||
|
||||
class SampleUserData(AbstractUserData):
|
||||
|
||||
@staticmethod
|
||||
def instantiate(base_hot_dict=None,
|
||||
vnfd_dict=None,
|
||||
inst_req_info=None,
|
||||
grant_info=None):
|
||||
|
||||
# Create HOT input parameter using util functions.
|
||||
initial_param_dict = UserDataUtil.create_initial_param_dict(
|
||||
base_hot_dict)
|
||||
|
||||
vdu_flavor_dict = UserDataUtil.create_vdu_flavor_dict(vnfd_dict)
|
||||
vdu_image_dict = UserDataUtil.create_vdu_image_dict(grant_info)
|
||||
cpd_vl_dict = UserDataUtil.create_cpd_vl_dict(
|
||||
base_hot_dict, inst_req_info)
|
||||
|
||||
final_param_dict = UserDataUtil.create_final_param_dict(
|
||||
initial_param_dict, vdu_flavor_dict, vdu_image_dict, cpd_vl_dict)
|
||||
|
||||
return final_param_dict
|
||||
|
||||
|
||||
.. note:: It is necessary to generate Heat input parameters for HOT file
|
||||
placed under **BaseHOT/** directory by this scprit.
|
||||
|
||||
|
||||
CSAR zip without TOSCA-Metadata directory
|
||||
-----------------------------------------
|
||||
|
||||
@ -234,7 +371,7 @@ The file structure:
|
||||
^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
This is the top-level VNFD file. It can import additional VNFD files from
|
||||
**Definitions/** directory.
|
||||
the **Definitions/** directory.
|
||||
|
||||
Definitions/
|
||||
^^^^^^^^^^^^
|
||||
@ -259,5 +396,8 @@ YAML file. The contents is exactly same as described in the previous section.
|
||||
.. _Glance configuration : https://docs.openstack.org/glance/latest/user/signature.html#using-the-signature-verification
|
||||
.. _ETSI NFV-SOL001 repository : https://forge.etsi.org/rep/nfv/SOL001
|
||||
.. _IETF RFC 3339 : https://tools.ietf.org/html/rfc3339
|
||||
.. _NFV-SOL001 v2.6.1 : https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/001/02.06.01_60/gs_NFV-SOL001v020601p.pdf
|
||||
.. _NFV-SOL004 v2.6.1 : https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/004/02.06.01_60/gs_NFV-SOL004v020601p.pdf
|
||||
.. _NFV-SOL005 v2.6.1 : https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/005/02.06.01_60/gs_NFV-SOL005v020601p.pdf
|
||||
.. _NFV-SOL014 v2.8.1 : https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/014/02.08.01_60/gs_NFV-SOL014v020801p.pdf
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user