Merge "Separate UseCaseGuide for v1 API and v2 API"

This commit is contained in:
Zuul 2024-03-13 18:36:43 +00:00 committed by Gerrit Code Review
commit 0ec99497f6
148 changed files with 20767 additions and 9839 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 81 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 146 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 117 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 118 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 91 KiB

File diff suppressed because it is too large Load Diff

View File

@ -1,735 +0,0 @@
===============================================================
ETSI NFV-SOL CNF Auto Healing With Prometheus via FM Interfaces
===============================================================
This document describes how to auto heal CNF in Tacker with Prometheus
via Fault Management Interfaces.
Overview
--------
Using the Fault Management interfaces, there are two ways to implement
auto heal, Polling Mode and Notification Mode.
The diagram below shows an overview of the CNF auto healing.
1. Create FM subscription(Notification Mode)
NFVO sends a request to Tacker to create a FM subscription.
2. Collect metrics
Prometheus collects metrics and decides whether triggering alert
is needed or not.
3. POST alert
Prometheus sends alerts to Tacker.
4. Convert alert to alarm
Tacker receives informed alerts, converts them to alarms, and saves
them to Tacker DB.
5. Get Alarms and return result(Polling Mode)
NFVO sends a request at regular intervals to get the alarm in
the Tacker. Tacker searches Tacker DB with the query condition
specified by NFVO, and returns the alarm that matches the
condition to NFVO.
6. Send alarm notification(Notification Mode)
VnffmDriver finds all FM subscriptions in the DB and matches the
alerts to them. If there is a FM subscription that can match
successfully, the alarm is sent to the specified path of the
NFVO. If the match is not successful, the processing ends.
7. Heal
NFVO recognizes the failure of the CNF from the alarm and sends
a heal request to the Tacker.
8. Call Kubernetes API
In tacker-conductor, the request is redirected again to an
appropriate infra-driver (in this case Kubernetes infra-driver)
according to the contents of the instantiate parameters. Then,
Kubernetes infra-driver calls Kubernetes APIs.
9. Create a new pod
Kubernetes Master adds the number of Pods according to the
API calls.
10. Delete the old pod
Kubernetes Master deletes the number of Pods according to the
API calls.
.. figure:: ../_images/etsi_cnf_auto_healing_fm.png
:align: left
Prerequisites
-------------
* The following packages should be installed:
* tacker
* python-tackerclient
At least one VNF instance with status of ``INSTANTIATED`` is required.
You can refer to :doc:`./etsi_containerized_vnf_usage_guide` for the
procedure to instantiate VNF.
The VNF Package used can refer to `the sample`_.
* The following third-party services should be installed
* NFVO
* Prometheus(including Alertmanager)
Each operator has its own NFVO, there is no restriction here, as long as
it conforms to `ETSI NFV-SOL 002 v3.3.1`_ and `ETSI NFV-SOL 003 v3.3.1`_,
it can be used.
For the installation of Prometheus and Alertmanager, please refer to
the `Prometheus official website`_.
How to configure Prometheus Plugin
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The Prometheus Plugin is disabled by default in Tacker.
For it to work, we need to find ``fault_management`` in
``tacker.conf`` and change its value to ``True``.
.. code-block:: console
$ vi /etc/tacker/tacker.conf
...
[prometheus_plugin]
fault_management = True
[v2_vnfm]
# Enable https access to notification server from Tacker (boolean value)
notification_verify_cert = true
...
After modifying the configuration file, don't forget to restart the
Tacker service to take effect.
.. code-block:: console
$ sudo systemctl stop devstack@tacker
$ sudo systemctl restart devstack@tacker-conductor
$ sudo systemctl start devstack@tacker
How to configure Prometheus
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Unlike auto scale via PM interfaces, auto heal via FM interfaces does not
need to login Prometheus server via SSH to modify its configuration.
Users need to manually modify the configuration file of Prometheus, and
then it will monitor the specified resources.
For the setting method of Prometheus configuration file, please refer to
`Prometheus Configuration`_ for details.
The following is the content of a sample ``prometheus.yml``:
.. code-block:: yaml
global:
scrape_interval: 15s
evaluation_interval: 15s
alerting:
alertmanagers:
- static_configs:
- targets:
- <IP of Alertmanager>:9093
rule_files:
- "tacker-samplevnf-rules.yaml"
scrape_configs:
- job_name: "kube-state-metrics"
static_configs:
- targets: ["<IP of Kubernetes>:<port of metrics>"]
The following is the content of a sample ``tacker-samplevnf-rules.yaml``:
.. code-block:: yaml
groups:
- name: example
rules:
- alert: KubePodCrashLooping
annotations:
probable_cause: The server cannot be connected.
fault_type: Server Down
fault_details: fault details
expr: |
rate(kube_pod_container_status_restarts_total{job="kube-state-metrics"}[10m]) * 60 * 5 > 0
for: 5m
labels:
receiver_type: tacker
function_type: vnffm
vnf_instance_id: <VNF instance ID>
perceived_severity: WARNING
event_type: EQUIPMENT_ALARM
The following is the content of a sample ``alertmanager.yml``:
.. code-block:: yaml
route:
group_by: ['cluster']
group_wait: 30s
group_interval: 2m
repeat_interval: 1h
receiver: 'web.boo'
routes:
- match:
alertname: KubePodCrashLooping
receiver: 'web.boo'
receivers:
- name: 'web.boo'
webhook_configs:
- url: 'http://<IP of Tacker>:9890/alert'
inhibit_rules:
- source_match:
severity: 'critical'
target_match:
severity: 'warning'
equal: ['dev', 'instance']
How does NFVO Auto Heal CNF
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Through the FM interfaces, there are two modes to auto heal the CNF.
Polling Mode
^^^^^^^^^^^^
This mode is where NFVO actively sends a get alarms request to Tacker
at an interval.
According to the content of the response, confirm the VNFC instance ID
of the CNF in which the problem occurred.
The following is an example of a response to a get alarms request:
.. code-block:: json
[
{
"id": "78a39661-60a8-4824-b989-88c1b0c3534a",
"managedObjectId": "c61314d0-f583-4ab3-a457-46426bce02d3",
"vnfcInstanceIds": [
"VDU2-curry-probe-test001-766bdd79bf-wgc7m"
],
"alarmRaisedTime": "2021-09-03 10:21:03",
"alarmChangedTime": "",
"alarmClearedTime": "",
"alarmAcknowledgedTime": "",
"ackState": "UNACKNOWLEDGED",
"perceivedSeverity": "WARNING",
"eventTime": "2021-09-03 10:06:03",
"eventType": "EQUIPMENT_ALARM",
"faultType": "",
"probableCause": "The server cannot be connected.",
"isRootCause": "false",
"correlatedAlarmIds": [],
"faultDetails": [],
"_links": {
"self": "/vnffm/v1/alarms/78a39661-60a8-4824-b989-88c1b0c3534a",
"objectInstance": ""
}
}
]
.. note::
The value of ``managedObjectId`` is the VNF instance ID.
The value of ``vnfcInstanceIds`` is the VNFC instance IDs.
Then send a heal request specifying the VNFC instance ID to Tacker.
The format of the heal request can refer to `heal request`_.
.. _Notification Mode :
Notification Mode
^^^^^^^^^^^^^^^^^
This mode is that NFVO will create a FM subscription on Tacker.
In this FM subscription, multiple filter conditions can be set, so that
the VNF instance that has been instantiated in Tacker can be matched.
Create FM subscription can be executed by the following CLI command.
.. code-block:: console
$ openstack vnffm sub create sample_param_file.json --os-tacker-api-version 2
The content of the sample ``sample_param_file.json`` in this document is
as follows:
.. code-block:: json
{
"filter": {
"vnfInstanceSubscriptionFilter": {
"vnfdIds": [
"4d5ffa3b-9dde-45a9-a805-659dc8df0c02"
],
"vnfProductsFromProviders": [
{
"vnfProvider": "Company",
"vnfProducts": [
{
"vnfProductName": "Sample VNF",
"versions": [
{
"vnfSoftwareVersion": 1.0,
"vnfdVersions": [1.0, 2.0]
}
]
}
]
}
],
"vnfInstanceIds": [
"aad7d2fe-ed51-47da-a20d-7b299860607e"
],
"vnfInstanceNames": [
"test"
]
},
"notificationTypes": [
"AlarmNotification"
],
"faultyResourceTypes": [
"COMPUTE"
],
"perceivedSeverities": [
"WARNING"
],
"eventTypes": [
"EQUIPMENT_ALARM"
],
"probableCauses": [
"The server cannot be connected."
]
},
"callbackUri": "http://127.0.0.1:9890/vnffm/v1/subscriptions/407cb9c5-60f2-43e8-a43a-925c0323c3eb",
"authentication": {
"authType": [
"BASIC",
"OAUTH2_CLIENT_CREDENTIALS",
"OAUTH2_CLIENT_CERT"
],
"paramsBasic": {
"userName": "nfvo",
"password": "nfvopwd"
},
"paramsOauth2ClientCredentials": {
"clientId": "auth_user_name",
"clientPassword": "auth_password",
"tokenEndpoint": "token_endpoint"
},
"paramsOauth2ClientCert": {
"clientId": "auth_user_name",
"certificateRef": {
"type": "x5t#S256",
"value": "certificate_fingerprint"
},
"tokenEndpoint": "token_endpoint"
}
}
}
Here is an example of create FM subscription:
.. code-block:: console
$ openstack vnffm sub create sample_param_file.json --os-tacker-api-version 2
+--------------+-----------------------------------------------------------------------------------------------------+
| Field | Value |
+--------------+-----------------------------------------------------------------------------------------------------+
| Callback Uri | /nfvo/notification |
| Filter | { |
| | "vnfInstanceSubscriptionFilter": { |
| | "vnfdIds": [ |
| | "4d5ffa3b-9dde-45a9-a805-659dc8df0c02" |
| | ], |
| | "vnfProductsFromProviders": [ |
| | { |
| | "vnfProvider": "Company", |
| | "vnfProducts": [ |
| | { |
| | "vnfProductName": "Sample VNF", |
| | "versions": [ |
| | { |
| | "vnfSoftwareVersion": "1.0", |
| | "vnfdVersions": [ |
| | "1.0", |
| | "2.0" |
| | ] |
| | } |
| | ] |
| | } |
| | ] |
| | } |
| | ], |
| | "vnfInstanceIds": [ |
| | "aad7d2fe-ed51-47da-a20d-7b299860607e" |
| | ], |
| | "vnfInstanceNames": [ |
| | "test" |
| | ] |
| | }, |
| | "notificationTypes": [ |
| | "AlarmNotification" |
| | ], |
| | "faultyResourceTypes": [ |
| | "COMPUTE" |
| | ], |
| | "perceivedSeverities": [ |
| | "WARNING" |
| | ], |
| | "eventTypes": [ |
| | "EQUIPMENT_ALARM" |
| | ], |
| | "probableCauses": [ |
| | "The server cannot be connected." |
| | ] |
| | } |
| ID | a7a18ac6-a668-4d94-8ba0-f04c20cfeacd |
| Links | { |
| | "self": { |
| | "href": "http://127.0.0.1:9890/vnffm/v1/subscriptions/407cb9c5-60f2-43e8-a43a-925c0323c3eb" |
| | } |
| | } |
+--------------+-----------------------------------------------------------------------------------------------------+
After the FM subscription is created, whenever Prometheus sends an alert
to Tacker, Tacker will find a matching FM subscription based on the
information in the alert.
The following is an example of the request body that Prometheus sends
an alert:
.. code-block:: json
{
"receiver": "receiver",
"status": "firing",
"alerts": [
{
"status": "firing",
"labels": {
"receiver_type": "tacker",
"function_type": "vnffm",
"vnf_instance_id": "aad7d2fe-ed51-47da-a20d-7b299860607e",
"pod": "curry-probe-test001-766bdd79bf-wgc7m",
"perceived_severity": "WARNING",
"event_type": "PROCESSING_ERROR_ALARM"
},
"annotations": {
"fault_type": "Server Down",
"probable_cause": "Process Terminated",
"fault_details": "pid 12345"
},
"startsAt": "2022-06-21T23:47:36.453Z",
"endsAt": "0001-01-01T00:00:00Z",
"generatorURL": "http://controller147:9090/graph?g0.expr=up%7Bjob%3D%22node%22%7D+%3D%3D+0&g0.tab=1",
"fingerprint": "5ef77f1f8a3ecb8d"
}
],
"groupLabels": {},
"commonLabels": {
"alertname": "NodeInstanceDown",
"job": "node"
},
"commonAnnotations": {
"description": "sample"
},
"externalURL": "http://controller147:9093",
"version": "4",
"groupKey": "{}:{}",
"truncatedAlerts": 0
}
Finally, a notification is sent to the Callback Uri (i.e. NFVO) in the FM
subscription. NFVO sends a heal request to Tacker according to the
content in the notification.
The format of the heal request can refer to `heal request`_.
The following is an example of the request body that Tacker sends
a notification:
.. code-block:: json
{
"id": "87bea1ed-6ced-403e-8640-2c631eb55d08",
"notificationType": "AlarmNotification",
"subscriptionId": "fb782658-af96-47e7-9faa-90ba8416e426",
"timeStamp": "2021-09-03 10:21:03",
"alarm": {
"id": "78a39661-60a8-4824-b989-88c1b0c3534a",
"managedObjectId": "c61314d0-f583-4ab3-a457-46426bce02d3",
"vnfcInstanceIds": [
"VDU2-curry-probe-test001-766bdd79bf-wgc7m"
],
"alarmRaisedTime": "2021-09-03 10:21:03",
"alarmChangedTime": "",
"alarmClearedTime": "",
"alarmAcknowledgedTime": "",
"ackState": "UNACKNOWLEDGED",
"perceivedSeverity": "WARNING",
"eventTime": "2021-09-03 10:06:03",
"eventType": "EQUIPMENT_ALARM",
"faultType": "",
"probableCause": "The server cannot be connected.",
"isRootCause": "false",
"correlatedAlarmIds": [],
"faultDetails": [],
"_links": {
"self": {
"href": "/vnffm/v1/alarms/78a39661-60a8-4824-b989-88c1b0c3534a"
},
"objectInstance": {
"href": "/vnffm/v1/vnf_instances/c61314d0-f583-4ab3-a457-46426bce02d3"
}
}
},
"_links": {
"subscription": {
"href": "/vnffm/v1/subscriptions/fb782658-af96-47e7-9faa-90ba8416e426"
}
}
}
How to use the CLI of FM interfaces
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Get all alarms
^^^^^^^^^^^^^^
Get all alarms can be executed by the following CLI command.
.. code-block:: console
$ openstack vnffm alarm list --os-tacker-api-version 2
Here is an example of getting all alarms:
.. code-block:: console
$ openstack vnffm alarm list --os-tacker-api-version 2
+--------------------------------------+--------------------------------------+--------------+------------------------+--------------------+--------------------+
| ID | Managed Object Id | Ack State | Event Type | Perceived Severity | Probable Cause |
+--------------------------------------+--------------------------------------+--------------+------------------------+--------------------+--------------------+
| 1829331c-4439-4bda-bf57-832fb5786ce9 | fe9b053d-777a-442f-ad24-cfc9fd23b0c4 | ACKNOWLEDGED | PROCESSING_ERROR_ALARM | WARNING | Process Terminated |
| 70935ca5-e03c-4190-8eca-233dd4b2be9a | ca1999fd-44ef-43c0-b3e3-3290a54b2bb4 | ACKNOWLEDGED | PROCESSING_ERROR_ALARM | WARNING | Process Terminated |
+--------------------------------------+--------------------------------------+--------------+------------------------+--------------------+--------------------+
Get the specified alarm
^^^^^^^^^^^^^^^^^^^^^^^
Get the specified alarm can be executed by the following CLI command.
.. code-block:: console
$ openstack vnffm alarm show ALARM_ID --os-tacker-api-version 2
Here is an example of getting the specified alarm:
.. code-block:: console
$ openstack vnffm alarm show 1829331c-4439-4bda-bf57-832fb5786ce9 --os-tacker-api-version 2
+----------------------------+------------------------------------------------------------------------------------------------------+
| Field | Value |
+----------------------------+------------------------------------------------------------------------------------------------------+
| Ack State | ACKNOWLEDGED |
| Alarm Acknowledged Time | 2022-08-30T12:23:52Z |
| Alarm Changed Time | 2022-08-31T07:47:05Z |
| Alarm Cleared Time | 2022-06-22T23:47:36Z |
| Alarm Raised Time | 2022-08-31T07:46:59Z |
| Correlated Alarm Ids | |
| Event Time | 2022-06-21T23:47:36Z |
| Event Type | PROCESSING_ERROR_ALARM |
| Fault Details | [ |
| | "fingerprint: 5ef77f1f8a3ecb8d", |
| | "detail: pid 12345" |
| | ] |
| Fault Type | Server Down |
| ID | 1829331c-4439-4bda-bf57-832fb5786ce9 |
| Is Root Cause | False |
| Links | { |
| | "self": { |
| | "href": "http://127.0.0.1:9890/vnffm/v1/alarms/1829331c-4439-4bda-bf57-832fb5786ce9" |
| | }, |
| | "objectInstance": { |
| | "href": "http://127.0.0.1:9890/vnflcm/v2/vnf_instances/fe9b053d-777a-442f-ad24-cfc9fd23b0c4" |
| | } |
| | } |
| Managed Object Id | fe9b053d-777a-442f-ad24-cfc9fd23b0c4 |
| Perceived Severity | WARNING |
| Probable Cause | Process Terminated |
| Root Cause Faulty Resource | |
| Vnfc Instance Ids | [ |
| | "VDU2-curry-probe-test001-766bdd79bf-wgc7m" |
| | ] |
+----------------------------+------------------------------------------------------------------------------------------------------+
Change target Alarm
^^^^^^^^^^^^^^^^^^^
Change the ackState of the alarm can be executed by the following CLI
command.
.. code-block:: console
$ openstack vnffm alarm update ALARM_ID --ack-state UNACKNOWLEDGED --os-tacker-api-version 2
.. note::
The value of ``--ack-state`` can only be ``ACKNOWLEDGED`` or
``UNACKNOWLEDGED``.
Here is an example of changing target alarm:
.. code-block:: console
$ openstack vnffm alarm update 1829331c-4439-4bda-bf57-832fb5786ce9 --ack-state UNACKNOWLEDGED --os-tacker-api-version 2
+-----------+----------------+
| Field | Value |
+-----------+----------------+
| Ack State | UNACKNOWLEDGED |
+-----------+----------------+
Create a new FM subscription
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The creation of FM subscription has been introduced in the
:ref:`Notification Mode` above, and the use case of the CLI command
can be referred to there.
Get all FM subscriptions
^^^^^^^^^^^^^^^^^^^^^^^^
Get all FM subscriptions can be executed by the following CLI command.
.. code-block:: console
$ openstack vnffm sub list --os-tacker-api-version 2
Here is an example of getting all FM subscriptions:
.. code-block:: console
$ openstack vnffm sub list --os-tacker-api-version 2
+--------------------------------------+--------------------------------------------------------------------------------+
| ID | Callback Uri |
+--------------------------------------+--------------------------------------------------------------------------------+
| 407cb9c5-60f2-43e8-a43a-925c0323c3eb | http://localhost:9990/notification/callback/test_faultmanagement_interface_max |
| c4f21875-c41d-42a8-967a-3ec7efe1d867 | http://localhost:9990/notification/callback/test_faultmanagement_interface_min |
+--------------------------------------+--------------------------------------------------------------------------------+
Get the specified FM subscription
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Get the specified FM subscription can be executed by the following CLI command.
.. code-block:: console
$ openstack vnffm sub show FM_SUBSCRIPTION_ID --os-tacker-api-version 2
Here is an example of getting the specified FM subscription:
.. code-block:: console
$ openstack vnffm sub show 407cb9c5-60f2-43e8-a43a-925c0323c3eb --os-tacker-api-version 2
+--------------+-----------------------------------------------------------------------------------------------------+
| Field | Value |
+--------------+-----------------------------------------------------------------------------------------------------+
| Callback Uri | http://localhost:9990/notification/callback/test_faultmanagement_interface_max |
| Filter | { |
| | "vnfInstanceSubscriptionFilter": { |
| | "vnfdIds": [ |
| | "4d5ffa3b-9dde-45a9-a805-659dc8df0c02" |
| | ], |
| | "vnfProductsFromProviders": [ |
| | { |
| | "vnfProvider": "Company", |
| | "vnfProducts": [ |
| | { |
| | "vnfProductName": "Sample VNF", |
| | "versions": [ |
| | { |
| | "vnfSoftwareVersion": "1.0", |
| | "vnfdVersions": [ |
| | "1.0" |
| | ] |
| | } |
| | ] |
| | } |
| | ] |
| | } |
| | ], |
| | "vnfInstanceIds": [ |
| | "aad7d2fe-ed51-47da-a20d-7b299860607e" |
| | ], |
| | "vnfInstanceNames": [ |
| | "test" |
| | ] |
| | }, |
| | "notificationTypes": [ |
| | "AlarmNotification", |
| | "AlarmClearedNotification" |
| | ], |
| | "faultyResourceTypes": [ |
| | "COMPUTE" |
| | ], |
| | "perceivedSeverities": [ |
| | "WARNING" |
| | ], |
| | "eventTypes": [ |
| | "PROCESSING_ERROR_ALARM" |
| | ], |
| | "probableCauses": [ |
| | "Process Terminated" |
| | ] |
| | } |
| ID | 407cb9c5-60f2-43e8-a43a-925c0323c3eb |
| Links | { |
| | "self": { |
| | "href": "http://127.0.0.1:9890/vnffm/v1/subscriptions/407cb9c5-60f2-43e8-a43a-925c0323c3eb" |
| | } |
| | } |
+--------------+-----------------------------------------------------------------------------------------------------+
Delete the specified FM subscription
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Delete the specified FM subscription can be executed by the following CLI
command.
.. code-block:: console
$ openstack vnffm sub delete FM_SUBSCRIPTION_ID --os-tacker-api-version 2
Here is an example of deleting the specified FM subscription:
.. code-block:: console
$ openstack vnffm sub delete a7a18ac6-a668-4d94-8ba0-f04c20cfeacd --os-tacker-api-version 2
VNF FM subscription 'a7a18ac6-a668-4d94-8ba0-f04c20cfeacd' deleted successfully
.. _the sample : https://docs.openstack.org/tacker/latest/user/etsi_cnf_healing.html#how-to-create-vnf-package-for-healing
.. _Prometheus Configuration : https://prometheus.io/docs/prometheus/latest/configuration/configuration/
.. _Prometheus official website : https://prometheus.io/docs/prometheus/latest/getting_started/
.. _ETSI NFV-SOL 002 v3.3.1 : https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/002/03.03.01_60/gs_nfv-sol002v030301p.pdf
.. _ETSI NFV-SOL 003 v3.3.1 : https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/003/03.03.01_60/gs_nfv-sol003v030301p.pdf
.. _heal request : https://docs.openstack.org/api-ref/nfv-orchestration/v2/vnflcm.html?expanded=heal-a-vnf-instance-v2-detail#heal-a-vnf-instance-v2

View File

@ -1,671 +0,0 @@
===================================================================
ETSI NFV-SOL CNF Auto Scaling With Prometheus via PM Job Interfaces
===================================================================
This document describes how to auto scale CNF in Tacker with Prometheus
via Performance Management Job Interfaces.
Overview
--------
The diagram below shows an overview of the CNF auto scaling.
1. Create PM job
The NFVO sends a request to the Tacker to create a PM job.
2. Set PM job
Prometheus Plugin sets PM job to Prometheus.
3. Trigger event
Prometheus collects metrics and decides whether triggering event is
needed or not.
4. POST event
Prometheus sends POST request to Tacker with specified URI. Tacker
collects data related to the PM event.
5. Convert event to report
Tacker receives informed event, converts it to report, and saves
it to DB. Tacker also saves timestamp of the event.
6. Send report notification
VnfPmDriverV2 finds all jobs in the DB and matches the report to
job. If there is a job that can match successfully, the report is
sent to the specified path of the NFVO. If the match is not successful,
the processing ends.
7. Get PM report
The NFVO make a request for the content of the report, then make a
decision of scaling.
8. Scale
Upon receiving a request to scale VNF from NFVO, tacker-server
redirects it to tacker-conductor.
9. Call Kubernetes API
In tacker-conductor, the request is redirected again to an
appropriate infra-driver (in this case Kubernetes infra-driver)
according to the contents of the instantiate parameters. Then,
Kubernetes infra-driver calls Kubernetes APIs.
10. Change the number of Pods
Kubernetes Master change the number of Pods according to the
API calls.
.. figure:: ../_images/etsi_cnf_auto_scaling_pm.png
:align: left
Prerequisites
-------------
* The following packages should be installed:
* tacker
* python-tackerclient
At least one VNF instance with status of ``INSTANTIATED`` is required.
You can refer to :doc:`./etsi_containerized_vnf_usage_guide` for the
procedure to instantiate VNF.
The VNF Package used can refer to `the sample`_.
* The following third-party services should be installed
* NFVO
* Prometheus(including Alertmanager)
Each operator has its own NFVO, there is no restriction here, as long as
it conforms to `ETSI NFV-SOL 002 v3.3.1`_ and `ETSI NFV-SOL 003 v3.3.1`_,
it can be used.
For the installation of Prometheus and Alertmanager, please refer to
the `official website`_.
How to configure Prometheus Plugin
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The Prometheus Plugin is disabled by default in Tacker.
For it to work, we need to find ``performance_management`` in
``tacker.conf`` and change its value to ``True``.
.. code-block:: console
$ vi /etc/tacker/tacker.conf
...
[prometheus_plugin]
performance_management = True
[v2_vnfm]
# Enable https access to notification server from Tacker (boolean value)
notification_verify_cert = true
...
After modifying the configuration file, don't forget to restart the
Tacker service to take effect.
.. code-block:: console
$ sudo systemctl stop devstack@tacker
$ sudo systemctl restart devstack@tacker-conductor
$ sudo systemctl start devstack@tacker
.. _Create PM job :
How to create a PM job
~~~~~~~~~~~~~~~~~~~~~~
After having a CNF that can scale, we need to create a PM job. It
determines the monitoring metrics and monitoring resources to be
used by Prometheus.
.. note::
When having an NFVO client, the request is sent by NFVO.
The interface for creating PM jobs is defined in both
`ETSI NFV-SOL 002 v3.3.1`_ and `ETSI NFV-SOL 003 v3.3.1`_.
The following are the parameters required by this interface.
.. list-table:: additional params
:widths: 18 18 10 50
:header-rows: 1
* - Attribute name
- Data type
- Cardinality
- Description
* - objectType
- String
- 1
- Type of the measured object. The applicable measured object type for a
measurement is defined in clause 7.2 of `ETSI GS NFV-IFA 027`_.
* - objectInstanceIds
- Identifier
- 1..N
- Identifiers of the measured object instances for which performance
information is requested to be collected.
* - subObjectInstanceIds
- IdentifierInVnf
- 0..N
- Identifiers of the measured object instances in case of a structured
measured object.
* - criteria
- PmJobCriteria
- 1
- Criteria of the collection of performance information.
* - performanceMetric
- String
- 0..N
- This defines the types of performance metrics for the specified object
instances. Valid values are specified as "Measurement Name" values in
clause 7.2 of `ETSI GS NFV-IFA 027`_. At least one of the two
attributes (performance metric or group) shall be present.
* - performanceMetricGroup
- String
- 0..N
- Group of performance metrics. A metric group is a pre-defined list of
metrics, known to the API producer that it can decompose to individual
metrics. Valid values are specified as "Measurement Group" values in
clause 7.2 of `ETSI GS NFV-IFA 027`_. At least one of the two
attributes (performance metric or group) shall be present.
* - collectionPeriod
- UnsignedInt
- 1
- Specifies the periodicity at which the API producer will collect
performance information. The unit shall be seconds.
* - reportingPeriod
- UnsignedInt
- 1
- Specifies the periodicity at which the API producer will report to
the API consumer. about performance information. The unit shall be
seconds. The reportingPeriod should be equal to or a multiple of
the collectionPeriod.
* - reportingBoundary
- DateTime
- 0..1
- Identifies a time boundary after which the reporting will stop. The
boundary shall allow a single reporting as well as periodic reporting
up to the boundary.
* - callbackUri
- Uri
- 1
- The URI of the endpoint to send the notification to.
* - authentication
- SubscriptionAuthentication
- 0..1
- Authentication parameters to configure the use of Authorization when
sending notifications corresponding to this subscription. See as
clause 8.3.4 of `ETSI GS NFV-SOL 013`_.
* - metadata
- Structure
- 1
- Additional parameters to create PM job.
* - monitoring
- Structure
- 1
- Treats to specify such as monitoring system and driver information.
* - monitorName
- String
- 1
- In case specifying “prometheus”, backend of monitoring feature is
to be Prometheus.
* - driverType
- String
- 1
- “external”: SCP/SFTP for config file transfer.
* - targetsInfo
- Structure
- 1..N
- Information about the target monitoring system.
* - prometheusHost
- String
- 1
- FQDN or ip address of target PrometheusServer.
* - prometheusHostPort
- Int
- 1
- Port of the ssh target PrometheusServer.
* - alertRuleConfigPath
- String
- 1
- Path of alertRuleConfig path for target Prometheus.
* - prometheusReloadApiEndpoint
- String
- 1
- Endpoint url of reload API of target Prometheus.
* - authInfo
- Structure
- 1
- Define authentication information to access host.
* - ssh_username
- String
- 1
- The username of the target host for ssh.
* - ssh_password
- String
- 1
- The password of the target host for ssh.
.. note::
* If ``subObjectInstanceIds`` is present, the cardinality of the
``objectInstanceIds`` attribute shall be 1.
* ``performanceMetric`` and ``performanceMetricGroup``, at least one of
the two attributes shall be present.
* ``objectType`` has only the following values: ``Vnf``, ``Vnfc``,
``VnfIntCp``, ``VnfExtCp``.
Create PM job can be executed by the following CLI command.
.. code-block:: console
$ openstack vnfpm job create sample_param_file.json --os-tacker-api-version 2
The content of the sample ``sample_param_file.json`` in this document is
as follows:
.. code-block:: json
{
"objectType": "Vnf",
"objectInstanceIds": ["495ffedf-2755-42c8-bf14-a5433701311e"],
"subObjectInstanceIds": [],
"criteria": {
"performanceMetric": [
"VcpuUsageMeanVnf.495ffedf-2755-42c8-bf14-a5433701311e"
],
"performanceMetricGroup": [
"VirtualisedComputeResource"
],
"collectionPeriod": 5,
"reportingPeriod": 10,
"reportingBoundary": "2022-06-23T04:56:00.910Z"
},
"callbackUri": "http://localhost:9990/notification/callback/test_performancemanagement_interface_min_1",
"authentication": {
"authType": [
"BASIC",
"OAUTH2_CLIENT_CREDENTIALS",
"OAUTH2_CLIENT_CERT"
],
"paramsBasic": {
"userName": "nfvo",
"password": "nfvopwd"
},
"paramsOauth2ClientCredentials": {
"clientId": "auth_user_name",
"clientPassword": "auth_password",
"tokenEndpoint": "token_endpoint"
},
"paramsOauth2ClientCert": {
"clientId": "auth_user_name",
"certificateRef": {
"type": "x5t#S256",
"value": "certificate_fingerprint"
},
"tokenEndpoint": "token_endpoint"
}
},
"metadata": {
"monitoring": {
"monitorName": "prometheus",
"driverType": "external",
"targetsInfo": [
{
"prometheusHost": "prometheusHost",
"prometheusHostPort": "22",
"authInfo": {
"ssh_username": "ssh_username",
"ssh_password": "ssh_password"
},
"alertRuleConfigPath": "/etc/prometheus/rules",
"prometheusReloadApiEndpoint": "http://localhost:9990/-/reload"
}
]
}
}
}
Here is an example of create PM job:
.. code-block:: console
$ openstack vnfpm job create sample_param_file.json --os-tacker-api-version 2
+-------------------------+------------------------------------------------------------------------------------------------------------------------+
| Field | Value |
+-------------------------+------------------------------------------------------------------------------------------------------------------------+
| Callback Uri | http://localhost:9990/notification/callback/test_performancemanagement_interface_min_1 |
| Criteria | { |
| | "performanceMetric": [ |
| | "VCpuUsageMeanVnf.495ffedf-2755-42c8-bf14-a5433701311e" |
| | ], |
| | "collectionPeriod": 5, |
| | "reportingPeriod": 10 |
| | } |
| ID | ca9b58cf-8493-44e3-9e76-678ea0e80a80 |
| Links | { |
| | "self": { |
| | "href": "http://127.0.0.1:9890/vnfpm/v2/pm_jobs/ca9b58cf-8493-44e3-9e76-678ea0e80a80" |
| | }, |
| | "objects": [ |
| | { |
| | "href": "http://127.0.0.1:9890/vnflcm/v2/vnf_instances/495ffedf-2755-42c8-bf14-a5433701311e" |
| | } |
| | ] |
| | } |
| Object Instance Ids | [ |
| | "495ffedf-2755-42c8-bf14-a5433701311e" |
| | ] |
| Object Type | Vnf |
| Reports | [] |
| Sub Object Instance Ids | |
+-------------------------+------------------------------------------------------------------------------------------------------------------------+
When creating a PM job, Tacker will modify the configuration file on the
specified Prometheus based on ``metadata``.
Then Prometheus will monitor the specified resource and send the monitored
information to Tacker.
Tacker converts the received monitoring information into a report and
sends a notification request to NFVO.
The following is the request body of a sample notification request.
.. code-block:: console
{
'id': 'c045dae8-cd94-4a29-b09c-96729060f2ad',
'notificationType': 'PerformanceInformationAvailableNotification',
'timeStamp': '2022-09-05T06:56:39Z',
'pmJobId': '34f7a186-88fa-4a42-a35f-30ea9ad710f1',
'objectType': 'Vnf',
'objectInstanceId': 'e30f5f45-522c-4e84-9b2d-9e1669708fff',
'_links': {
'objectInstance': {
'href': 'http://127.0.0.1:9890/vnflcm/v2/vnf_instances/e30f5f45-522c-4e84-9b2d-9e1669708fff'
},
'pmJob': {
'href': 'http://127.0.0.1:9890/vnfpm/v2/pm_jobs/34f7a186-88fa-4a42-a35f-30ea9ad710f1'
},
'performanceReport': {
'href': 'http://127.0.0.1:9890/vnfpm/v2/pm_jobs/34f7a186-88fa-4a42-a35f-30ea9ad710f1/reports/46e95584-7f11-4fd0-b59c-4688c37177ff'
}
}
}
.. note::
The target URL of this notification request is the ``Callback Uri``
field in the PM job.
How does NFVO Auto Scale CNF
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
NFVO will send a get PM report request to Tacker according to the URL
of the report in the notification request.
The response returned by Tacker is as follows:
.. code-block:: console
{
'entries': [
{
'objectType': 'Vnf',
'objectInstanceId': 'e30f5f45-522c-4e84-9b2d-9e1669708fff',
'subObjectInstanceId': 'VDU2-curry-probe-test001-766bdd79bf-wgc7m',
'performanceMetric': 'VCpuUsageMeanVnf.e30f5f45-522c-4e84-9b2d-9e1669708fff',
'performanceValues': [
{
'timeStamp': '2022-09-05T08:02:58Z',
'value': 99.0
}
]
}
]
}
NFVO will determine whether a scale operation is required based on
the report data. If needed, a scale request will be sent to Tacker.
How to use the CLI of PM interfaces
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Create a PM job
^^^^^^^^^^^^^^^
The creation of PM job has been introduced in the
:ref:`Create PM job` above, and the use case of the CLI
command can be referred to there.
Get all PM jobs
^^^^^^^^^^^^^^^
Get all PM jobs can be executed by the following CLI command.
.. code-block:: console
$ openstack vnfpm job list --os-tacker-api-version 2
Here is an example of getting all PM jobs:
.. code-block:: console
$ openstack vnfpm job list --os-tacker-api-version 2
+--------------------------------------+-------------+----------------------------------------------------------------------------------------------------------+
| Id | Object Type | Links |
+--------------------------------------+-------------+----------------------------------------------------------------------------------------------------------+
| b8b4095a-148d-42b5-b714-9d703e6c7c62 | Vnf | { |
| | | "self": { |
| | | "href": "http://127.0.0.1:9890/vnfpm/v2/pm_jobs/b8b4095a-148d-42b5-b714-9d703e6c7c62" |
| | | }, |
| | | "objects": [ |
| | | { |
| | | "href": "http://127.0.0.1:9890/vnflcm/v2/vnf_instances/97efce79-34c4-474d-87a0-38ad954f64af" |
| | | } |
| | | ] |
| | | } |
| ca9b58cf-8493-44e3-9e76-678ea0e80a80 | Vnf | { |
| | | "self": { |
| | | "href": "http://127.0.0.1:9890/vnfpm/v2/pm_jobs/ca9b58cf-8493-44e3-9e76-678ea0e80a80" |
| | | }, |
| | | "objects": [ |
| | | { |
| | | "href": "http://127.0.0.1:9890/vnflcm/v2/vnf_instances/495ffedf-2755-42c8-bf14-a5433701311e" |
| | | } |
| | | ] |
| | | } |
+--------------------------------------+-------------+----------------------------------------------------------------------------------------------------------+
Get the specified PM job
^^^^^^^^^^^^^^^^^^^^^^^^
Get the specified PM job can be executed by the following CLI command.
.. code-block:: console
$ openstack vnfpm job show JOB_ID --os-tacker-api-version 2
Here is an example of getting the specified PM job:
.. code-block:: console
$ openstack vnfpm job show ca9b58cf-8493-44e3-9e76-678ea0e80a80 --os-tacker-api-version 2
+-------------------------+------------------------------------------------------------------------------------------------------------------------+
| Field | Value |
+-------------------------+------------------------------------------------------------------------------------------------------------------------+
| Callback Uri | http://localhost:9990/notification/callback/test_performancemanagement_interface_min_1 |
| Criteria | { |
| | "performanceMetric": [ |
| | "VCpuUsageMeanVnf.495ffedf-2755-42c8-bf14-a5433701311e" |
| | ], |
| | "collectionPeriod": 5, |
| | "reportingPeriod": 10 |
| | } |
| ID | ca9b58cf-8493-44e3-9e76-678ea0e80a80 |
| Links | { |
| | "self": { |
| | "href": "http://127.0.0.1:9890/vnfpm/v2/pm_jobs/ca9b58cf-8493-44e3-9e76-678ea0e80a80" |
| | }, |
| | "objects": [ |
| | { |
| | "href": "http://127.0.0.1:9890/vnflcm/v2/vnf_instances/495ffedf-2755-42c8-bf14-a5433701311e" |
| | } |
| | ] |
| | } |
| Object Instance Ids | [ |
| | "495ffedf-2755-42c8-bf14-a5433701311e" |
| | ] |
| Object Type | Vnf |
| Reports | [ |
| | { |
| | "href": "/vnfpm/v2/pm_jobs/ca9b58cf-8493-44e3-9e76-678ea0e80a80/reports/53aafe25-7124-4880-8b58-47a93b3dc371", |
| | "readyTime": "2022-08-30T08:02:58Z" |
| | } |
| | ] |
| Sub Object Instance Ids | |
+-------------------------+------------------------------------------------------------------------------------------------------------------------+
Change target PM job
^^^^^^^^^^^^^^^^^^^^
Updating a PM job can only change two fields, callbackUri and authentication.
It can be executed by the following CLI command.
.. code-block:: console
$ openstack vnfpm job update JOB_ID sample_param_file.json --os-tacker-api-version 2
The content of the sample ``sample_param_file.json`` in this document is
as follows:
.. code-block:: json
{
"callbackUri": "http://localhost:9990/notification/callback",
"authentication": {
"authType": [
"BASIC",
"OAUTH2_CLIENT_CREDENTIALS",
"OAUTH2_CLIENT_CERT"
],
"paramsBasic": {
"userName": "nfvo",
"password": "nfvopwd"
},
"paramsOauth2ClientCredentials": {
"clientId": "auth_user_name",
"clientPassword": "auth_password",
"tokenEndpoint": "token_endpoint"
},
"paramsOauth2ClientCert": {
"clientId": "auth_user_name",
"certificateRef": {
"type": "x5t#S256",
"value": "certificate_fingerprint"
},
"tokenEndpoint": "token_endpoint"
}
}
}
Here is an example of changing target PM job:
.. code-block:: console
$ openstack vnfpm job update ca9b58cf-8493-44e3-9e76-678ea0e80a80 sample_param_file.json --os-tacker-api-version 2
+-------------------------+------------------------------------------------------------------------------------------------------------------------+
| Field | Value |
+-------------------------+------------------------------------------------------------------------------------------------------------------------+
| Callback Uri | http://localhost:9990/notification/callback |
| Criteria | { |
| | "performanceMetric": [ |
| | "VCpuUsageMeanVnf.495ffedf-2755-42c8-bf14-a5433701311e" |
| | ], |
| | "collectionPeriod": 5, |
| | "reportingPeriod": 10 |
| | } |
| ID | ca9b58cf-8493-44e3-9e76-678ea0e80a80 |
| Links | { |
| | "self": { |
| | "href": "http://127.0.0.1:9890/vnfpm/v2/pm_jobs/ca9b58cf-8493-44e3-9e76-678ea0e80a80" |
| | }, |
| | "objects": [ |
| | { |
| | "href": "http://127.0.0.1:9890/vnflcm/v2/vnf_instances/495ffedf-2755-42c8-bf14-a5433701311e" |
| | } |
| | ] |
| | } |
| Object Instance Ids | [ |
| | "495ffedf-2755-42c8-bf14-a5433701311e" |
| | ] |
| Object Type | Vnf |
| Reports | [] |
| Sub Object Instance Ids | |
+-------------------------+------------------------------------------------------------------------------------------------------------------------+
Delete the specified PM job
^^^^^^^^^^^^^^^^^^^^^^^^^^^
Delete the specified PM job can be executed by the following CLI command.
.. code-block:: console
$ openstack vnfpm job delete JOB_ID --os-tacker-api-version 2
Here is an example of deleting the specified PM job:
.. code-block:: console
$ openstack vnfpm job delete ca9b58cf-8493-44e3-9e76-678ea0e80a80 --os-tacker-api-version 2
VNF PM job 'ca9b58cf-8493-44e3-9e76-678ea0e80a80' deleted successfully
Get the specified PM report
^^^^^^^^^^^^^^^^^^^^^^^^^^^
Get the specified PM report can be executed by the following CLI command.
.. code-block:: console
$ openstack vnfpm report show JOB_ID REPORT_ID --os-tacker-api-version 2
Here is an example of getting the specified PM report:
.. code-block:: console
$ openstack vnfpm report show ca9b58cf-8493-44e3-9e76-678ea0e80a80 53aafe25-7124-4880-8b58-47a93b3dc371 --os-tacker-api-version 2
+---------+---------------------------------------------------------------------------------------+
| Field | Value |
+---------+---------------------------------------------------------------------------------------+
| Entries | [ |
| | { |
| | "objectType": "Vnf", |
| | "objectInstanceId": "495ffedf-2755-42c8-bf14-a5433701311e", |
| | "performanceMetric": "VCpuUsageMeanVnf.495ffedf-2755-42c8-bf14-a5433701311e", |
| | "performanceValues": [ |
| | { |
| | "timeStamp": "2022-08-30T08:02:58Z", |
| | "value": "99.0" |
| | } |
| | ] |
| | } |
| | ] |
+---------+---------------------------------------------------------------------------------------+
.. _ETSI NFV-SOL 002 v3.3.1 : https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/002/03.03.01_60/gs_nfv-sol002v030301p.pdf
.. _ETSI NFV-SOL 003 v3.3.1 : https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/003/03.03.01_60/gs_nfv-sol003v030301p.pdf
.. _official website : https://prometheus.io/docs/prometheus/latest/getting_started/
.. _the sample : https://docs.openstack.org/tacker/latest/user/etsi_cnf_scaling.html#how-to-create-vnf-package-for-scaling
.. _ETSI GS NFV-IFA 027 : https://www.etsi.org/deliver/etsi_gs/NFV-IFA/001_099/027/03.03.01_60/gs_nfv-ifa027v030301p.pdf
.. _ETSI GS NFV-SOL 013 : https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/013/03.04.01_60/gs_nfv-sol013v030401p.pdf

View File

@ -1,527 +0,0 @@
=========================================================================
ETSI NFV-SOL CNF Auto Scaling With Prometheus via PM Threshold Interfaces
=========================================================================
This document describes how to auto scale CNF in Tacker with Prometheus
via Performance Management Threshold Interfaces.
Overview
--------
The diagram below shows an overview of the CNF auto scaling.
1. Create PM threshold
The NFVO sends a request to the Tacker to create a PM threshold.
2. Set PM threshold
Prometheus Plugin sets PM threshold to Prometheus.
3. Trigger threshold event
Prometheus collects metrics and decides whether triggering threshold event
is needed or not.
4. POST threshold event
Prometheus sends POST request to Tacker with specified URI. Tacker
collects data related to the PM threshold event.
5. Convert threshold event to threshold state
Tacker receives informed threshold event, converts it to threshold state,
and saves it to DB.
6. Send threshold state notification
VnfPmDriverV2 finds all thresholds in the DB and matches the threshold
state to threshold. If the crossingDirection of threshold state is ``UP``
or ``DOWN``, the notification is sent to the specified path of the NFVO.
If the match is not successful or the situation does not exist, the
processing ends.
7. Scale
Upon receiving a request to scale VNF from NFVO, tacker-server
redirects it to tacker-conductor.
8. Call Kubernetes API
In tacker-conductor, the request is redirected again to an
appropriate infra-driver (in this case Kubernetes infra-driver)
according to the contents of the instantiate parameters. Then,
Kubernetes infra-driver calls Kubernetes APIs.
9. Change the number of Pods
Kubernetes Master change the number of Pods according to the
API calls.
.. figure:: ../_images/etsi_cnf_auto_scaling_pm_threshold.png
:align: left
Prerequisites
-------------
* The following packages should be installed:
* tacker
* python-tackerclient
At least one VNF instance with status of ``INSTANTIATED`` is required.
You can refer to :doc:`./etsi_containerized_vnf_usage_guide` for the
procedure to instantiate VNF.
The VNF Package used can refer to `the sample`_.
* The following third-party services should be installed
* NFVO
* Prometheus(including Alertmanager)
Each operator has its own NFVO, there is no restriction here, as long as
it conforms to `ETSI NFV-SOL 002 v3.3.1`_ and `ETSI NFV-SOL 003 v3.3.1`_,
it can be used.
For the installation of Prometheus and Alertmanager, please refer to
the `official website`_.
How to configure Prometheus Plugin
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Please refer to `How to configure Prometheus Plugin`_ to enable the
Prometheus Plugin.
.. _Create PM threshold :
How to create a PM threshold
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
After having a CNF that can scale, we need to create a PM threshold. It
determines the monitoring metrics and monitoring resources to be
used by Prometheus.
.. note::
When having an NFVO client, the request is sent by NFVO.
The interface for creating PM thresholds is defined in both
`ETSI NFV-SOL 002 v3.3.1`_ and `ETSI NFV-SOL 003 v3.3.1`_.
The following are the parameters required by this interface.
.. list-table:: additional params
:widths: 18 18 10 50
:header-rows: 1
* - Attribute name
- Data type
- Cardinality
- Description
* - objectType
- String
- 1
- Type of the measured object. The applicable measured object type for a
measurement is defined in clause 7.2 of `ETSI GS NFV-IFA 027`_.
* - objectInstanceId
- Identifier
- 1
- Identifiers of the measured object instances for which performance
information is requested to be collected.
* - subObjectInstanceIds
- IdentifierInVnf
- 0..N
- Identifiers of the measured object instances in case of a structured
measured object.
* - criteria
- ThresholdCriteria
- 1
- Criteria of the collection of performance information.
* - performanceMetric
- String
- 1
- This defines the types of performance metrics for the specified object
instances. Valid values are specified as "Measurement Name" values in
clause 7.2 of `ETSI GS NFV-IFA 027`_.
* - thresholdType
- String
- 1
- This defines the type of threshold. This attribute determines which other
attributes are present in the data structure.
* - simpleThresholdDetails
- Structure
- 0..1
- Details of a simple threshold. Shall be present if
thresholdType="SIMPLE".
* - thresholdValue
- Float
- 1
- The threshold value. Shall be represented as a floating point number.
* - hysteresis
- Float
- 1
- The hysteresis of the threshold. Shall be represented as a non-negative
floating point number.
* - callbackUri
- Uri
- 1
- The URI of the endpoint to send the notification to.
* - authentication
- SubscriptionAuthentication
- 0..1
- Authentication parameters to configure the use of Authorization when
sending notifications corresponding to this subscription. See as
clause 8.3.4 of `ETSI GS NFV-SOL 013`_.
* - metadata
- Structure
- 1
- Additional parameters to create PM threshold.
* - monitoring
- Structure
- 1
- Treats to specify such as monitoring system and driver information.
* - monitorName
- String
- 1
- In case specifying "prometheus", backend of monitoring feature is
to be Prometheus.
* - driverType
- String
- 1
- "external": SCP/SFTP for config file transfer.
* - targetsInfo
- Structure
- 1..N
- Information about the target monitoring system.
* - prometheusHost
- String
- 1
- FQDN or ip address of target PrometheusServer.
* - prometheusHostPort
- Int
- 1
- Port of the ssh target PrometheusServer.
* - alertRuleConfigPath
- String
- 1
- Path of alertRuleConfig path for target Prometheus.
* - prometheusReloadApiEndpoint
- String
- 1
- Endpoint url of reload API of target Prometheus.
* - authInfo
- Structure
- 1
- Define authentication information to access host.
* - ssh_username
- String
- 1
- The username of the target host for ssh.
* - ssh_password
- String
- 1
- The password of the target host for ssh.
.. note::
* ``objectType`` has only the following values: ``Vnf``, ``Vnfc``,
``VnfIntCp``, ``VnfExtCp``.
Create PM threshold can be executed by the following CLI command.
.. code-block:: console
$ openstack vnfpm threshold create sample_param_file.json --os-tacker-api-version 2
The content of the sample ``sample_param_file.json`` in this document is
as follows:
.. code-block:: json
{
"objectType": "Vnf",
"objectInstanceId": "511a2d68-c975-4913-b7b8-d75468e3102b",
"subObjectInstanceIds": [],
"criteria": {
"performanceMetric": "VMemoryUsageMeanVnf.511a2d68-c975-4913-b7b8-d75468e3102b",
"thresholdType": "SIMPLE",
"simpleThresholdDetails": {
"thresholdValue": 55,
"hysteresis": 30
}
},
"callbackUri": "http://localhost:9990/notification/callbackuri/511a2d68-c975-4913-b7b8-d75468e3102b",
"authentication": {
"authType": [
"BASIC",
"OAUTH2_CLIENT_CREDENTIALS",
"OAUTH2_CLIENT_CERT"
],
"paramsBasic": {
"userName": "nfvo",
"password": "nfvopwd"
},
"paramsOauth2ClientCredentials": {
"clientId": "auth_user_name",
"clientPassword": "auth_password",
"tokenEndpoint": "token_endpoint"
},
"paramsOauth2ClientCert": {
"clientId": "auth_user_name",
"certificateRef": {
"type": "x5t#S256",
"value": "certificate_fingerprint"
},
"tokenEndpoint": "token_endpoint"
}
},
"metadata": {
"monitoring": {
"monitorName": "prometheus",
"driverType": "external",
"targetsInfo": [
{
"prometheusHost": "prometheusHost",
"prometheusHostPort": "22",
"authInfo": {
"ssh_username": "ssh_username",
"ssh_password": "ssh_password"
},
"alertRuleConfigPath": "/etc/prometheus/rules",
"prometheusReloadApiEndpoint": "http://localhost:9990/-/reload"
}
]
}
}
}
Here is an example of create PM threshold:
.. code-block:: console
$ openstack vnfpm threshold create sample_param_file.json --os-tacker-api-version 2
+-------------------------+------------------------------------------------------------------------------------------------------+
| Field | Value |
+-------------------------+------------------------------------------------------------------------------------------------------+
| Callback Uri | http://127.0.0.1:9990/notification/callbackuri/511a2d68-c975-4913-b7b8-d75468e3102b |
| Criteria | { |
| | "performanceMetric": "VMemoryUsageMeanVnf.511a2d68-c975-4913-b7b8-d75468e3102b", |
| | "thresholdType": "SIMPLE", |
| | "simpleThresholdDetails": { |
| | "thresholdValue": 55.0, |
| | "hysteresis": 30.0 |
| | } |
| | } |
| ID | 4787c544-c3d0-4aeb-bf60-1598125c3d4f |
| Links | { |
| | "self": { |
| | "href": "http://127.0.0.1:9890/vnfpm/v2/thresholds/4787c544-c3d0-4aeb-bf60-1598125c3d4f" |
| | }, |
| | "object": { |
| | "href": "http://127.0.0.1:9890/vnflcm/v2/vnf_instances/511a2d68-c975-4913-b7b8-d75468e3102b" |
| | } |
| | } |
| Object Instance Id | 511a2d68-c975-4913-b7b8-d75468e3102b |
| Object Type | Vnf |
| Sub Object Instance Ids | |
+-------------------------+------------------------------------------------------------------------------------------------------+
When creating a PM threshold, Tacker will modify the configuration file on the
specified Prometheus based on ``metadata``.
Then Prometheus will monitor the specified resource and send the monitored
information to Tacker.
Tacker converts the received monitoring information into a threshold state and
sends a notification request to NFVO.
The following is the request body of a sample notification request.
.. code-block:: json
{
"id": "ec3cfe7b-aef4-4d66-9b65-15fe6a589b2e",
"notificationType": "PerformanceThresholdNotification",
"timeStamp": "2023-02-10T02:39:07Z",
"thresholdId": "4787c544-c3d0-4aeb-bf60-1598125c3d4f",
"crossingDirection": "DOWN",
"objectType": "Vnf",
"objectInstanceId": "511a2d68-c975-4913-b7b8-d75468e3102b",
"performanceMetric": "VMemoryUsageMeanVnf.511a2d68-c975-4913-b7b8-d75468e3102b",
"performanceValue": "0.0014381563014867896",
"_links": {
"objectInstance": {
"href": "http://127.0.0.1:9890/vnflcm/v2/vnf_instances/511a2d68-c975-4913-b7b8-d75468e3102b"
},
"threshold": {
"href": "http://127.0.0.1:9890/vnfpm/v2/thresholds/4787c544-c3d0-4aeb-bf60-1598125c3d4f"
}
}
}
.. note::
The target URL of this notification request is the ``Callback Uri``
field in the PM threshold.
How does NFVO Auto Scale CNF
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
NFVO will determine whether a scale operation is required based on
the notification data. If needed, a scale request will be sent to Tacker.
How to use the CLI of PM interfaces
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Create a PM threshold
^^^^^^^^^^^^^^^^^^^^^
The creation of PM threshold has been introduced in the
:ref:`Create PM threshold` above, and the use case of the CLI
command can be referred to there.
Get all PM thresholds
^^^^^^^^^^^^^^^^^^^^^
Get all PM thresholds can be executed by the following CLI command.
.. code-block:: console
$ openstack vnfpm threshold list --os-tacker-api-version 2
Here is an example of getting all PM thresholds:
.. code-block:: console
$ openstack vnfpm threshold list --os-tacker-api-version 2
+--------------------------------------+-------------+------------------------------------------------------------------------------------------------------+
| ID | Object Type | Links |
+--------------------------------------+-------------+------------------------------------------------------------------------------------------------------+
| 682eb763-a976-4a7a-b6a6-a40787d25dbb | Vnf | { |
| | | "self": { |
| | | "href": "http://127.0.0.1:9890/vnfpm/v2/thresholds/682eb763-a976-4a7a-b6a6-a40787d25dbb" |
| | | }, |
| | | "object": { |
| | | "href": "http://127.0.0.1:9890/vnflcm/v2/vnf_instances/511a2d68-c975-4913-b7b8-d75468e3102b" |
| | | } |
| | | } |
+--------------------------------------+-------------+------------------------------------------------------------------------------------------------------+
Get the specified PM threshold
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Get the specified PM threshold can be executed by the following CLI command.
.. code-block:: console
$ openstack vnfpm threshold show THRESHOLD_ID --os-tacker-api-version 2
Here is an example of getting the specified PM threshold:
.. code-block:: console
$ openstack vnfpm threshold show 682eb763-a976-4a7a-b6a6-a40787d25dbb --os-tacker-api-version 2
+-------------------------+------------------------------------------------------------------------------------------------------+
| Field | Value |
+-------------------------+------------------------------------------------------------------------------------------------------+
| Callback Uri | http://127.0.0.1:9990/notification/callbackuri/511a2d68-c975-4913-b7b8-d75468e3102b |
| Criteria | { |
| | "performanceMetric": "VMemoryUsageMeanVnf.511a2d68-c975-4913-b7b8-d75468e3102b", |
| | "thresholdType": "SIMPLE", |
| | "simpleThresholdDetails": { |
| | "thresholdValue": 55.0, |
| | "hysteresis": 30.0 |
| | } |
| | } |
| ID | 682eb763-a976-4a7a-b6a6-a40787d25dbb |
| Links | { |
| | "self": { |
| | "href": "http://127.0.0.1:9890/vnfpm/v2/thresholds/682eb763-a976-4a7a-b6a6-a40787d25dbb" |
| | }, |
| | "object": { |
| | "href": "http://127.0.0.1:9890/vnflcm/v2/vnf_instances/511a2d68-c975-4913-b7b8-d75468e3102b" |
| | } |
| | } |
| Object Instance Id | 511a2d68-c975-4913-b7b8-d75468e3102b |
| Object Type | Vnf |
| Sub Object Instance Ids | |
+-------------------------+------------------------------------------------------------------------------------------------------+
Change target PM threshold
^^^^^^^^^^^^^^^^^^^^^^^^^^
Updating a PM threshold can only change two fields, callbackUri and
authentication.
It can be executed by the following CLI command.
.. code-block:: console
$ openstack vnfpm threshold update THRESHOLD_ID sample_param_file.json --os-tacker-api-version 2
The content of the sample ``sample_param_file.json`` in this document is
as follows:
.. code-block:: json
{
"callbackUri": "http://127.0.0.1:9990/notification/callbackuri/callbackUri",
"authentication": {
"authType": [
"BASIC",
"OAUTH2_CLIENT_CREDENTIALS",
"OAUTH2_CLIENT_CERT"
],
"paramsBasic": {
"userName": "nfvo",
"password": "nfvopwd"
},
"paramsOauth2ClientCredentials": {
"clientId": "auth_user_name",
"clientPassword": "password",
"tokenEndpoint": "token_endpoint"
},
"paramsOauth2ClientCert": {
"clientId": "auth_user_name",
"certificateRef": {
"type": "x5t#S256",
"value": "certificate_fingerprint"
},
"tokenEndpoint": "token_endpoint"
}
}
}
Here is an example of changing target PM threshold:
.. code-block:: console
$ openstack vnfpm threshold update 682eb763-a976-4a7a-b6a6-a40787d25dbb sample_param_file.json --os-tacker-api-version 2
+----------------+------------------------------------------------------------+
| Field | Value |
+----------------+------------------------------------------------------------+
| Callback Uri | http://127.0.0.1:9990/notification/callbackuri/callbackUri |
+----------------+------------------------------------------------------------+
Delete the specified PM threshold
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Delete the specified PM threshold can be executed by the following CLI command.
.. code-block:: console
$ openstack vnfpm threshold delete THRESHOLD_ID --os-tacker-api-version 2
Here is an example of deleting the specified PM threshold:
.. code-block:: console
$ openstack vnfpm threshold delete 682eb763-a976-4a7a-b6a6-a40787d25dbb --os-tacker-api-version 2
VNF PM threshold '682eb763-a976-4a7a-b6a6-a40787d25dbb' deleted successfully
.. _ETSI NFV-SOL 002 v3.3.1 : https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/002/03.03.01_60/gs_nfv-sol002v030301p.pdf
.. _ETSI NFV-SOL 003 v3.3.1 : https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/003/03.03.01_60/gs_nfv-sol003v030301p.pdf
.. _official website : https://prometheus.io/docs/prometheus/latest/getting_started/
.. _the sample : https://docs.openstack.org/tacker/latest/user/etsi_cnf_scaling.html#how-to-create-vnf-package-for-scaling
.. _ETSI GS NFV-IFA 027 : https://www.etsi.org/deliver/etsi_gs/NFV-IFA/001_099/027/03.03.01_60/gs_nfv-ifa027v030301p.pdf
.. _ETSI GS NFV-SOL 013 : https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/013/03.04.01_60/gs_nfv-sol013v030401p.pdf
.. _How to configure Prometheus Plugin : https://docs.openstack.org/tacker/latest/user/etsi_cnf_auto_scaling_pm.html#how-to-configure-prometheus-plugin

View File

@ -2,7 +2,13 @@
ETSI NFV-SOL CNF Healing
========================
This document describes how to heal CNF in Tacker.
This document describes how to heal CNF in Tacker v1 API.
.. note::
This is a document for Tacker v1 API.
See :doc:`/user/v2/cnf/heal/index` for Tacker v2 API.
Overview
--------
@ -17,17 +23,16 @@ The diagram below shows an overview of the CNF healing.
2. Call Kubernetes API
Upon receiving a request from tacker-client, tacker-server redirects it to
tacker-conductor. In tacker-conductor, the request is redirected again to
tacker-conductor. In tacker-conductor, the request is redirected again to
an appropriate infra-driver (in this case Kubernetes infra-driver) according
to the contents of the instantiate parameters. Then, Kubernetes
to the contents of the instantiate parameters. Then, Kubernetes
infra-driver calls Kubernetes APIs.
3. Re-create Pods
Kubernetes Master re-creates Pods according to the API calls.
.. figure:: ../_images/etsi_cnf_healing.png
:align: left
.. figure:: /_images/etsi_cnf_healing.png
Prerequisites
@ -40,10 +45,11 @@ The following packages should be installed:
The procedure of prepare for healing operation that from "register VIM" to
"Instantiate VNF", basically refer to
:doc:`./etsi_containerized_vnf_usage_guide`.
:doc:`/user/etsi_containerized_vnf_usage_guide`.
This procedure uses an example using the sample VNF package.
How to Create VNF Package for Healing
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Using `samples/tests/etc/samples/etsi/nfv/test_cnf_heal`_,
@ -59,19 +65,21 @@ on TOSCA specifications.
.. code-block:: console
$ cd Definitions
$ wget https://forge.etsi.org/rep/nfv/SOL001/raw/v2.6.1/etsi_nfv_sol001_common_types.yaml
$ wget https://forge.etsi.org/rep/nfv/SOL001/raw/v2.6.1/etsi_nfv_sol001_vnfd_types.yaml
$ cd Definitions
$ wget https://forge.etsi.org/rep/nfv/SOL001/raw/v2.6.1/etsi_nfv_sol001_common_types.yaml
$ wget https://forge.etsi.org/rep/nfv/SOL001/raw/v2.6.1/etsi_nfv_sol001_vnfd_types.yaml
CSAR Package should be compressed into a ZIP file for uploading.
Following commands are an example of compressing a VNF Package:
.. code-block:: console
$ cd -
$ zip deployment.zip -r Definitions/ Files/ TOSCA-Metadata/
$ ls
Definitions deployment.zip Files TOSCA-Metadata
$ cd -
$ zip deployment.zip -r Definitions/ Files/ TOSCA-Metadata/
$ ls
Definitions deployment.zip Files TOSCA-Metadata
After creating a vnf package with :command:`openstack vnf package create`,
some information including ID, Links,
@ -79,26 +87,28 @@ Onboarding State, Operational State, and Usage State will be returned.
When the Onboarding State is CREATED, the Operational State is DISABLED,
and the Usage State is NOT_IN_USE, indicate the creation is successful.
.. code-block:: console
$ openstack vnf package create
+-------------------+-------------------------------------------------------------------------------------------------+
| Field | Value |
+-------------------+-------------------------------------------------------------------------------------------------+
| ID | 08d00a5c-e8aa-4219-9412-411458eaa7d2 |
| Links | { |
| | "self": { |
| | "href": "/vnfpkgm/v1/vnf_packages/08d00a5c-e8aa-4219-9412-411458eaa7d2" |
| | }, |
| | "packageContent": { |
| | "href": "/vnfpkgm/v1/vnf_packages/08d00a5c-e8aa-4219-9412-411458eaa7d2/package_content" |
| | } |
| | } |
| Onboarding State | CREATED |
| Operational State | DISABLED |
| Usage State | NOT_IN_USE |
| User Defined Data | {} |
+-------------------+-------------------------------------------------------------------------------------------------+
$ openstack vnf package create
+-------------------+-------------------------------------------------------------------------------------------------+
| Field | Value |
+-------------------+-------------------------------------------------------------------------------------------------+
| ID | 094c8abf-b5c8-45a1-9332-3952a710c65c |
| Links | { |
| | "self": { |
| | "href": "/vnfpkgm/v1/vnf_packages/094c8abf-b5c8-45a1-9332-3952a710c65c" |
| | }, |
| | "packageContent": { |
| | "href": "/vnfpkgm/v1/vnf_packages/094c8abf-b5c8-45a1-9332-3952a710c65c/package_content" |
| | } |
| | } |
| Onboarding State | CREATED |
| Operational State | DISABLED |
| Usage State | NOT_IN_USE |
| User Defined Data | {} |
+-------------------+-------------------------------------------------------------------------------------------------+
Upload the CSAR zip file to the VNF Package by running the following command
:command:`openstack vnf package upload --path <path of vnf package> <vnf package ID>`.
@ -106,8 +116,9 @@ Here is an example of uploading VNF package:
.. code-block:: console
$ openstack vnf package upload --path deployment.zip 08d00a5c-e8aa-4219-9412-411458eaa7d2
Upload request for VNF package 08d00a5c-e8aa-4219-9412-411458eaa7d2 has been accepted.
$ openstack vnf package upload --path deployment.zip 094c8abf-b5c8-45a1-9332-3952a710c65c
Upload request for VNF package 094c8abf-b5c8-45a1-9332-3952a710c65c has been accepted.
Create VNF instance by running :command:`openstack vnflcm create <VNFD ID>`.
@ -116,27 +127,29 @@ Here is an example of creating VNF :
.. code-block:: console
$ openstack vnflcm create b1bb0ce7-ebca-4fa7-95ed-4840d70a1177
+--------------------------+---------------------------------------------------------------------------------------------+
| Field | Value |
+--------------------------+---------------------------------------------------------------------------------------------+
| ID | 92cf0ccb-e575-46e2-9c0d-30c67e75aaf6 |
| Instantiation State | NOT_INSTANTIATED |
| Links | { |
| | "self": { |
| | "href": "/vnflcm/v1/vnf_instances/92cf0ccb-e575-46e2-9c0d-30c67e75aaf6" |
| | }, |
| | "instantiate": { |
| | "href": "/vnflcm/v1/vnf_instances/92cf0ccb-e575-46e2-9c0d-30c67e75aaf6/instantiate" |
| | } |
| | } |
| VNF Instance Description | None |
| VNF Instance Name | None |
| VNF Product Name | Sample VNF |
| VNF Provider | Company |
| VNF Software Version | 1.0 |
| VNFD ID | b1bb0ce7-ebca-4fa7-95ed-4840d70a1177 |
| VNFD Version | 1.0 |
+--------------------------+---------------------------------------------------------------------------------------------+
+-----------------------------+------------------------------------------------------------------------------------------------------------------+
| Field | Value |
+-----------------------------+------------------------------------------------------------------------------------------------------------------+
| ID | 2a9a1197-953b-4f0a-b510-5ab4ab979959 |
| Instantiation State | NOT_INSTANTIATED |
| Links | { |
| | "self": { |
| | "href": "http://localhost:9890/vnflcm/v1/vnf_instances/2a9a1197-953b-4f0a-b510-5ab4ab979959" |
| | }, |
| | "instantiate": { |
| | "href": "http://localhost:9890/vnflcm/v1/vnf_instances/2a9a1197-953b-4f0a-b510-5ab4ab979959/instantiate" |
| | } |
| | } |
| VNF Configurable Properties | |
| VNF Instance Description | |
| VNF Instance Name | vnf-2a9a1197-953b-4f0a-b510-5ab4ab979959 |
| VNF Product Name | Sample VNF |
| VNF Provider | Company |
| VNF Software Version | 1.0 |
| VNFD ID | b1bb0ce7-ebca-4fa7-95ed-4840d70a1177 |
| VNFD Version | 1.0 |
| vnfPkgId | |
+-----------------------------+------------------------------------------------------------------------------------------------------------------+
After the command is executed, instantiate VNF.
@ -148,31 +161,28 @@ described in ``deployment_heal_simple.yaml``. Please note that ``additionalParam
includes path of Kubernetes resource definition file and that
``lcm-kubernetes-def-files`` should be a list.
.. code-block:: console
$ cat ./instance_kubernetes.json
{
"flavourId": "simple",
"additionalParams": {
"lcm-kubernetes-def-files": [
"Files/kubernetes/deployment_heal_simple.yaml"
]
},
"vimConnectionInfo": [
{
"id": "8a3adb69-0784-43c7-833e-aab0b6ab4470",
"vimId": "8d8373fe-6977-49ff-83ac-7756572ed186",
"vimType": "kubernetes"
}
$ cat ./instance_kubernetes.json
{
"flavourId": "simple",
"additionalParams": {
"lcm-kubernetes-def-files": [
"Files/kubernetes/deployment_heal_simple.yaml"
]
}
$ openstack vnflcm instantiate 92cf0ccb-e575-46e2-9c0d-30c67e75aaf6 instance_kubernetes.json
Instantiate request for VNF Instance 92cf0ccb-e575-46e2-9c0d-30c67e75aaf6 has been accepted.
},
"vimConnectionInfo": [
{
"id": "8a3adb69-0784-43c7-833e-aab0b6ab4470",
"vimId": "43176042-ca97-4954-9bd5-0a9c054885e1",
"vimType": "kubernetes"
}
]
}
$ openstack vnflcm instantiate 2a9a1197-953b-4f0a-b510-5ab4ab979959 instance_kubernetes.json
Instantiate request for VNF Instance 2a9a1197-953b-4f0a-b510-5ab4ab979959 has been accepted.
.. note::
In the case of version 2 API, you can also set
``vimType`` as ``ETSINFV.KUBERNETES.V_1`` in ``vimConnectionInfo``.
CNF Healing Procedure
---------------------
@ -180,7 +190,7 @@ CNF Healing Procedure
As mentioned in Prerequisites and Healing target VNF instance, the VNF must be
instantiated before healing.
Details of CLI commands are described in :doc:`../cli/cli-etsi-vnflcm`.
Details of CLI commands are described in :doc:`/cli/cli-etsi-vnflcm`.
There are two main methods for CNF healing.
@ -194,11 +204,12 @@ There are two main methods for CNF healing.
resources of Kubernetes such as Deployment, DaemonSet, StatefulSet and
ReplicaSet.
.. note:: A VNFC is a 'VNF Component', and one VNFC basically corresponds to
one VDU in the VNF. For more information on VNFC, see
`NFV-SOL002 v2.6.1`_.
.. note::
A VNFC is a 'VNF Component', and one VNFC basically corresponds to
one VDU in the VNF. For more information on VNFC, see
`NFV-SOL002 v2.6.1`_.
.. _labelCapHealingtargetVNFinstance:
Healing Target VNF Instance
~~~~~~~~~~~~~~~~~~~~~~~~~~~
@ -211,77 +222,98 @@ This instance will be healed.
$ openstack vnflcm show VNF_INSTANCE_ID
Result:
.. code-block:: console
+--------------------------+-------------------------------------------------------------------------------------------+
| Field | Value |
+--------------------------+-------------------------------------------------------------------------------------------+
| ID | 92cf0ccb-e575-46e2-9c0d-30c67e75aaf6 |
| Instantiated Vnf Info | { |
| | "flavourId": "simple", |
| | "vnfState": "STARTED", |
| | "scaleStatus": [ |
| | { |
| | "aspectId": "vdu1_aspect", |
| | "scaleLevel": 0 |
| | } |
| | ], |
| | "extCpInfo": [], |
| | "vnfcResourceInfo": [ |
| | { |
| | "id": "686b356f-8096-4e24-99e5-3c81d36341be", |
| | "vduId": "VDU1", |
| | "computeResource": { |
| | "vimConnectionId": null, |
| | "resourceId": "vdu1-heal-simple-75b5566444-wgc7m", |
| | "vimLevelResourceType": "Deployment" |
| | }, |
| | "storageResourceIds": [] |
| | }, |
| | { |
| | "id": "73cb41e7-31ae-494b-b4d0-66b8168c257e", |
| | "vduId": "VDU1", |
| | "computeResource": { |
| | "vimConnectionId": null, |
| | "resourceId": "vdu1-heal-simple-75b5566444-wwzcm", |
| | "vimLevelResourceType": "Deployment" |
| | }, |
| | "storageResourceIds": [] |
| | } |
| | ], |
| | "additionalParams": {} |
| | } |
| Instantiation State | INSTANTIATED |
| Links | { |
| | "self": { |
| | "href": "/vnflcm/v1/vnf_instances/92cf0ccb-e575-46e2-9c0d-30c67e75aaf6" |
| | }, |
| | "terminate": { |
| | "href": "/vnflcm/v1/vnf_instances/92cf0ccb-e575-46e2-9c0d-30c67e75aaf6/terminate" |
| | }, |
| | "heal": { |
| | "href": "/vnflcm/v1/vnf_instances/92cf0ccb-e575-46e2-9c0d-30c67e75aaf6/heal" |
| | } |
| | } |
| VIM Connection Info | [ |
| | { |
| | "id": "8a3adb69-0784-43c7-833e-aab0b6ab4470", |
| | "vimId": "8d8373fe-6977-49ff-83ac-7756572ed186", |
| | "vimType": "kubernetes", |
| | "interfaceInfo": {}, |
| | "accessInfo": {} |
| | } |
| | ] |
| VNF Instance Description | None |
| VNF Instance Name | None |
| VNF Product Name | Sample VNF |
| VNF Provider | Company |
| VNF Software Version | 1.0 |
| VNFD ID | b1bb0ce7-ebca-4fa7-95ed-4840d70a1177 |
| VNFD Version | 1.0 |
+--------------------------+-------------------------------------------------------------------------------------------+
+-----------------------------+----------------------------------------------------------------------------------------------------------------------+
| Field | Value |
+-----------------------------+----------------------------------------------------------------------------------------------------------------------+
| ID | 2a9a1197-953b-4f0a-b510-5ab4ab979959 |
| Instantiated Vnf Info | { |
| | "flavourId": "simple", |
| | "vnfState": "STARTED", |
| | "scaleStatus": [ |
| | { |
| | "aspectId": "vdu1_aspect", |
| | "scaleLevel": 0 |
| | } |
| | ], |
| | "extCpInfo": [], |
| | "vnfcResourceInfo": [ |
| | { |
| | "id": "da087f50-521a-4f71-a3e4-3464a196d4e6", |
| | "vduId": "VDU1", |
| | "computeResource": { |
| | "vimConnectionId": null, |
| | "resourceId": "vdu1-heal-simple-6d649fd6f7-dcjpn", |
| | "vimLevelResourceType": "Deployment" |
| | }, |
| | "storageResourceIds": [] |
| | }, |
| | { |
| | "id": "4e66f5d3-a4c5-4025-8ad8-6ad21414cffa", |
| | "vduId": "VDU1", |
| | "computeResource": { |
| | "vimConnectionId": null, |
| | "resourceId": "vdu1-heal-simple-6d649fd6f7-hmsbh", |
| | "vimLevelResourceType": "Deployment" |
| | }, |
| | "storageResourceIds": [] |
| | } |
| | ], |
| | "additionalParams": { |
| | "lcm-kubernetes-def-files": [ |
| | "Files/kubernetes/deployment_heal_simple.yaml" |
| | ] |
| | } |
| | } |
| Instantiation State | INSTANTIATED |
| Links | { |
| | "self": { |
| | "href": "http://localhost:9890/vnflcm/v1/vnf_instances/2a9a1197-953b-4f0a-b510-5ab4ab979959" |
| | }, |
| | "terminate": { |
| | "href": "http://localhost:9890/vnflcm/v1/vnf_instances/2a9a1197-953b-4f0a-b510-5ab4ab979959/terminate" |
| | }, |
| | "heal": { |
| | "href": "http://localhost:9890/vnflcm/v1/vnf_instances/2a9a1197-953b-4f0a-b510-5ab4ab979959/heal" |
| | }, |
| | "changeExtConn": { |
| | "href": "http://localhost:9890/vnflcm/v1/vnf_instances/2a9a1197-953b-4f0a-b510-5ab4ab979959/change_ext_conn" |
| | } |
| | } |
| VIM Connection Info | [ |
| | { |
| | "id": "8a3adb69-0784-43c7-833e-aab0b6ab4470", |
| | "vimId": "43176042-ca97-4954-9bd5-0a9c054885e1", |
| | "vimType": "kubernetes", |
| | "interfaceInfo": {}, |
| | "accessInfo": {}, |
| | "extra": {} |
| | }, |
| | { |
| | "id": "f1e70f72-0e1f-427e-a672-b447d45ee52e", |
| | "vimId": "43176042-ca97-4954-9bd5-0a9c054885e1", |
| | "vimType": "kubernetes", |
| | "interfaceInfo": {}, |
| | "accessInfo": {}, |
| | "extra": {} |
| | } |
| | ] |
| VNF Configurable Properties | |
| VNF Instance Description | |
| VNF Instance Name | vnf-2a9a1197-953b-4f0a-b510-5ab4ab979959 |
| VNF Product Name | Sample VNF |
| VNF Provider | Company |
| VNF Software Version | 1.0 |
| VNFD ID | b1bb0ce7-ebca-4fa7-95ed-4840d70a1177 |
| VNFD Version | 1.0 |
| metadata | namespace=default, tenant=default |
| vnfPkgId | |
+-----------------------------+----------------------------------------------------------------------------------------------------------------------+
How to Heal of the Entire VNF
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@ -296,8 +328,9 @@ Pod information before heal:
$ kubectl get pod
NAME READY STATUS RESTARTS AGE
vdu1-heal-simple-75b5566444-wgc7m 1/1 Running 0 20m
vdu1-heal-simple-75b5566444-wwzcm 1/1 Running 0 20m
vdu1-heal-simple-6d649fd6f7-dcjpn 1/1 Running 0 11m
vdu1-heal-simple-6d649fd6f7-hmsbh 1/1 Running 0 11m
Heal entire VNF can be executed by the following CLI command.
@ -305,11 +338,13 @@ Heal entire VNF can be executed by the following CLI command.
$ openstack vnflcm heal VNF_INSTANCE_ID
Result:
.. code-block:: console
Heal request for VNF Instance 92cf0ccb-e575-46e2-9c0d-30c67e75aaf6 has been accepted.
Heal request for VNF Instance 2a9a1197-953b-4f0a-b510-5ab4ab979959 has been accepted.
Pod information after heal:
@ -317,91 +352,113 @@ Pod information after heal:
$ kubectl get pod
NAME READY STATUS RESTARTS AGE
vdu1-heal-simple-75b5566444-ks785 1/1 Running 0 60s
vdu1-heal-simple-75b5566444-p5mjv 1/1 Running 0 60s
vdu1-heal-simple-6d649fd6f7-2wvxj 1/1 Running 0 17s
vdu1-heal-simple-6d649fd6f7-tj4vx 1/1 Running 0 17s
All ``vnfcResourceInfo`` in ``Instantiated Vnf Info`` will be updated from
the VNF Instance displayed in :ref:`labelCapHealingtargetVNFinstance`.
the VNF Instance displayed in `Healing Target VNF Instance`_.
.. code-block:: console
$ openstack vnflcm show VNF_INSTANCE_ID
Result:
.. code-block:: console
+--------------------------+-------------------------------------------------------------------------------------------+
| Field | Value |
+--------------------------+-------------------------------------------------------------------------------------------+
| ID | 92cf0ccb-e575-46e2-9c0d-30c67e75aaf6 |
| Instantiated Vnf Info | { |
| | "flavourId": "simple", |
| | "vnfState": "STARTED", |
| | "scaleStatus": [ |
| | { |
| | "aspectId": "vdu1_aspect", |
| | "scaleLevel": 0 |
| | } |
| | ], |
| | "extCpInfo": [], |
| | "vnfcResourceInfo": [ |
| | { |
| | "id": "a77b9a8e-a672-492d-9459-81c7b6483947", |
| | "vduId": "VDU1", |
| | "computeResource": { |
| | "vimConnectionId": null, |
| | "resourceId": "vdu1-heal-simple-75b5566444-j45qb", |
| | "vimLevelResourceType": "Deployment" |
| | }, |
| | "storageResourceIds": [] |
| | }, |
| | { |
| | "id": "9463d02b-faba-41cb-8131-e90eaa319c83", |
| | "vduId": "VDU1", |
| | "computeResource": { |
| | "vimConnectionId": null, |
| | "resourceId": "vdu1-heal-simple-75b5566444-p5mjv", |
| | "vimLevelResourceType": "Deployment" |
| | }, |
| | "storageResourceIds": [] |
| | } |
| | ], |
| | "additionalParams": {} |
| | } |
| Instantiation State | INSTANTIATED |
| Links | { |
| | "self": { |
| | "href": "/vnflcm/v1/vnf_instances/92cf0ccb-e575-46e2-9c0d-30c67e75aaf6" |
| | }, |
| | "terminate": { |
| | "href": "/vnflcm/v1/vnf_instances/92cf0ccb-e575-46e2-9c0d-30c67e75aaf6/terminate" |
| | }, |
| | "heal": { |
| | "href": "/vnflcm/v1/vnf_instances/92cf0ccb-e575-46e2-9c0d-30c67e75aaf6/heal" |
| | } |
| | } |
| VIM Connection Info | [ |
| | { |
| | "id": "8a3adb69-0784-43c7-833e-aab0b6ab4470", |
| | "vimId": "8d8373fe-6977-49ff-83ac-7756572ed186", |
| | "vimType": "kubernetes", |
| | "interfaceInfo": {}, |
| | "accessInfo": {} |
| | } |
| | ] |
| VNF Instance Description | None |
| VNF Instance Name | None |
| VNF Product Name | Sample VNF |
| VNF Provider | Company |
| VNF Software Version | 1.0 |
| VNFD ID | b1bb0ce7-ebca-4fa7-95ed-4840d70a1177 |
| VNFD Version | 1.0 |
+--------------------------+-------------------------------------------------------------------------------------------+
+-----------------------------+----------------------------------------------------------------------------------------------------------------------+
| Field | Value |
+-----------------------------+----------------------------------------------------------------------------------------------------------------------+
| ID | 2a9a1197-953b-4f0a-b510-5ab4ab979959 |
| Instantiated Vnf Info | { |
| | "flavourId": "simple", |
| | "vnfState": "STARTED", |
| | "scaleStatus": [ |
| | { |
| | "aspectId": "vdu1_aspect", |
| | "scaleLevel": 0 |
| | } |
| | ], |
| | "extCpInfo": [], |
| | "vnfcResourceInfo": [ |
| | { |
| | "id": "63a16aa7-ab36-4bfb-a6e3-724636155c4f", |
| | "vduId": "VDU1", |
| | "computeResource": { |
| | "vimConnectionId": null, |
| | "resourceId": "vdu1-heal-simple-6d649fd6f7-2wvxj", |
| | "vimLevelResourceType": "Deployment" |
| | }, |
| | "storageResourceIds": [] |
| | }, |
| | { |
| | "id": "ca211f05-2509-4abf-b6f2-a553d18a6863", |
| | "vduId": "VDU1", |
| | "computeResource": { |
| | "vimConnectionId": null, |
| | "resourceId": "vdu1-heal-simple-6d649fd6f7-tj4vx", |
| | "vimLevelResourceType": "Deployment" |
| | }, |
| | "storageResourceIds": [] |
| | } |
| | ], |
| | "additionalParams": { |
| | "lcm-kubernetes-def-files": [ |
| | "Files/kubernetes/deployment_heal_simple.yaml" |
| | ] |
| | } |
| | } |
| Instantiation State | INSTANTIATED |
| Links | { |
| | "self": { |
| | "href": "http://localhost:9890/vnflcm/v1/vnf_instances/2a9a1197-953b-4f0a-b510-5ab4ab979959" |
| | }, |
| | "terminate": { |
| | "href": "http://localhost:9890/vnflcm/v1/vnf_instances/2a9a1197-953b-4f0a-b510-5ab4ab979959/terminate" |
| | }, |
| | "heal": { |
| | "href": "http://localhost:9890/vnflcm/v1/vnf_instances/2a9a1197-953b-4f0a-b510-5ab4ab979959/heal" |
| | }, |
| | "changeExtConn": { |
| | "href": "http://localhost:9890/vnflcm/v1/vnf_instances/2a9a1197-953b-4f0a-b510-5ab4ab979959/change_ext_conn" |
| | } |
| | } |
| VIM Connection Info | [ |
| | { |
| | "id": "8a3adb69-0784-43c7-833e-aab0b6ab4470", |
| | "vimId": "43176042-ca97-4954-9bd5-0a9c054885e1", |
| | "vimType": "kubernetes", |
| | "interfaceInfo": {}, |
| | "accessInfo": {}, |
| | "extra": {} |
| | }, |
| | { |
| | "id": "f1e70f72-0e1f-427e-a672-b447d45ee52e", |
| | "vimId": "43176042-ca97-4954-9bd5-0a9c054885e1", |
| | "vimType": "kubernetes", |
| | "interfaceInfo": {}, |
| | "accessInfo": {}, |
| | "extra": {} |
| | } |
| | ] |
| VNF Configurable Properties | |
| VNF Instance Description | |
| VNF Instance Name | vnf-2a9a1197-953b-4f0a-b510-5ab4ab979959 |
| VNF Product Name | Sample VNF |
| VNF Provider | Company |
| VNF Software Version | 1.0 |
| VNFD ID | b1bb0ce7-ebca-4fa7-95ed-4840d70a1177 |
| VNFD Version | 1.0 |
| metadata | namespace=default, tenant=default |
| vnfPkgId | |
+-----------------------------+----------------------------------------------------------------------------------------------------------------------+
How to Heal Specified with VNFC Instances
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Execute Heal of the partial CNF CLI command and check the name and age of pod
information before and after healing.
This is to confirm that the name has changed and age has been new after heal.
@ -412,30 +469,29 @@ Pod information before heal:
$ kubectl get pod
NAME READY STATUS RESTARTS AGE
vdu1-heal-simple-75b5566444-wgc7m 1/1 Running 0 20m
vdu1-heal-simple-75b5566444-wwzcm 1/1 Running 0 20m
vdu1-heal-simple-6d649fd6f7-dcjpn 1/1 Running 0 22m
vdu1-heal-simple-6d649fd6f7-hmsbh 1/1 Running 0 22m
Heal specified with VNFC instances can be executed by running
:command:`openstack vnflcm heal VNF_INSTANCE_ID --vnfc-instance VNFC_INSTANCE_ID`.
In the example of this procedure, specify the ID
``686b356f-8096-4e24-99e5-3c81d36341be`` of the first ``vnfcResourceInfo`` as
``da087f50-521a-4f71-a3e4-3464a196d4e6`` of the first ``vnfcResourceInfo`` as
``VNFC_INSTANCE_ID``.
.. note:: In the case of version 1 API,
``VNFC_INSTANCE_ID`` is ``instantiatedVnfInfo.vnfcResourceInfo.id``.
In the case of version 2 API,
``VNFC_INSTANCE_ID`` is ``instantiatedVnfInfo.vnfcInfo.id``.
.. code-block:: console
$ openstack vnflcm heal 92cf0ccb-e575-46e2-9c0d-30c67e75aaf6 --vnfc-instance 686b356f-8096-4e24-99e5-3c81d36341be
$ openstack vnflcm heal 2a9a1197-953b-4f0a-b510-5ab4ab979959 --vnfc-instance da087f50-521a-4f71-a3e4-3464a196d4e6
Result:
.. code-block:: console
Heal request for VNF Instance 92cf0ccb-e575-46e2-9c0d-30c67e75aaf6 has been accepted.
Heal request for VNF Instance 2a9a1197-953b-4f0a-b510-5ab4ab979959 has been accepted.
Pod information after heal:
@ -443,89 +499,122 @@ Pod information after heal:
$ kubectl get pod
NAME READY STATUS RESTARTS AGE
vdu1-heal-simple-75b5566444-ks785 1/1 Running 0 24s
vdu1-heal-simple-75b5566444-wwzcm 1/1 Running 0 20m
vdu1-heal-simple-6d649fd6f7-2wvxj 1/1 Running 0 13s
vdu1-heal-simple-6d649fd6f7-hmsbh 1/1 Running 0 22m
Only the ``resourceId`` of target ``vnfcResourceInfo`` in
``Instantiated Vnf Info`` will be updated from the VNF Instance displayed in
:ref:`labelCapHealingtargetVNFinstance`.
`Healing Target VNF Instance`_.
.. code-block:: console
$ openstack vnflcm show VNF_INSTANCE_ID
Result:
.. code-block:: console
+--------------------------+-------------------------------------------------------------------------------------------+
| Field | Value |
+--------------------------+-------------------------------------------------------------------------------------------+
| ID | 92cf0ccb-e575-46e2-9c0d-30c67e75aaf6 |
| Instantiated Vnf Info | { |
| | "flavourId": "simple", |
| | "vnfState": "STARTED", |
| | "scaleStatus": [ |
| | { |
| | "aspectId": "vdu1_aspect", |
| | "scaleLevel": 0 |
| | } |
| | ], |
| | "extCpInfo": [], |
| | "vnfcResourceInfo": [ |
| | { |
| | "id": "686b356f-8096-4e24-99e5-3c81d36341be", |
| | "vduId": "VDU1", |
| | "computeResource": { |
| | "vimConnectionId": null, |
| | "resourceId": "vdu1-heal-simple-75b5566444-ks785", |
| | "vimLevelResourceType": "Deployment" |
| | }, |
| | "storageResourceIds": [] |
| | }, |
| | { |
| | "id": "73cb41e7-31ae-494b-b4d0-66b8168c257e", |
| | "vduId": "VDU1", |
| | "computeResource": { |
| | "vimConnectionId": null, |
| | "resourceId": "vdu1-heal-simple-75b5566444-wwzcm", |
| | "vimLevelResourceType": "Deployment" |
| | }, |
| | "storageResourceIds": [] |
| | } |
| | ], |
| | "additionalParams": {} |
| | } |
| Instantiation State | INSTANTIATED |
| Links | { |
| | "self": { |
| | "href": "/vnflcm/v1/vnf_instances/92cf0ccb-e575-46e2-9c0d-30c67e75aaf6" |
| | }, |
| | "terminate": { |
| | "href": "/vnflcm/v1/vnf_instances/92cf0ccb-e575-46e2-9c0d-30c67e75aaf6/terminate" |
| | }, |
| | "heal": { |
| | "href": "/vnflcm/v1/vnf_instances/92cf0ccb-e575-46e2-9c0d-30c67e75aaf6/heal" |
| | } |
| | } |
| VIM Connection Info | [ |
| | { |
| | "id": "8a3adb69-0784-43c7-833e-aab0b6ab4470", |
| | "vimId": "8d8373fe-6977-49ff-83ac-7756572ed186", |
| | "vimType": "kubernetes", |
| | "interfaceInfo": {}, |
| | "accessInfo": {} |
| | } |
| | ] |
| VNF Instance Description | None |
| VNF Instance Name | None |
| VNF Product Name | Sample VNF |
| VNF Provider | Company |
| VNF Software Version | 1.0 |
| VNFD ID | b1bb0ce7-ebca-4fa7-95ed-4840d70a1177 |
| VNFD Version | 1.0 |
+--------------------------+-------------------------------------------------------------------------------------------+
+-----------------------------+----------------------------------------------------------------------------------------------------------------------+
| Field | Value |
+-----------------------------+----------------------------------------------------------------------------------------------------------------------+
| ID | 2a9a1197-953b-4f0a-b510-5ab4ab979959 |
| Instantiated Vnf Info | { |
| | "flavourId": "simple", |
| | "vnfState": "STARTED", |
| | "scaleStatus": [ |
| | { |
| | "aspectId": "vdu1_aspect", |
| | "scaleLevel": 0 |
| | } |
| | ], |
| | "extCpInfo": [], |
| | "vnfcResourceInfo": [ |
| | { |
| | "id": "da087f50-521a-4f71-a3e4-3464a196d4e6", |
| | "vduId": "VDU1", |
| | "computeResource": { |
| | "vimConnectionId": null, |
| | "resourceId": "vdu1-heal-simple-6d649fd6f7-2wvxj", |
| | "vimLevelResourceType": "Deployment" |
| | }, |
| | "storageResourceIds": [] |
| | }, |
| | { |
| | "id": "4e66f5d3-a4c5-4025-8ad8-6ad21414cffa", |
| | "vduId": "VDU1", |
| | "computeResource": { |
| | "vimConnectionId": null, |
| | "resourceId": "vdu1-heal-simple-6d649fd6f7-hmsbh", |
| | "vimLevelResourceType": "Deployment" |
| | }, |
| | "storageResourceIds": [] |
| | } |
| | ], |
| | "additionalParams": { |
| | "lcm-kubernetes-def-files": [ |
| | "Files/kubernetes/deployment_heal_simple.yaml" |
| | ] |
| | } |
| | } |
| Instantiation State | INSTANTIATED |
| Links | { |
| | "self": { |
| | "href": "http://localhost:9890/vnflcm/v1/vnf_instances/2a9a1197-953b-4f0a-b510-5ab4ab979959" |
| | }, |
| | "terminate": { |
| | "href": "http://localhost:9890/vnflcm/v1/vnf_instances/2a9a1197-953b-4f0a-b510-5ab4ab979959/terminate" |
| | }, |
| | "heal": { |
| | "href": "http://localhost:9890/vnflcm/v1/vnf_instances/2a9a1197-953b-4f0a-b510-5ab4ab979959/heal" |
| | }, |
| | "changeExtConn": { |
| | "href": "http://localhost:9890/vnflcm/v1/vnf_instances/2a9a1197-953b-4f0a-b510-5ab4ab979959/change_ext_conn" |
| | } |
| | } |
| VIM Connection Info | [ |
| | { |
| | "id": "8a3adb69-0784-43c7-833e-aab0b6ab4470", |
| | "vimId": "43176042-ca97-4954-9bd5-0a9c054885e1", |
| | "vimType": "kubernetes", |
| | "interfaceInfo": {}, |
| | "accessInfo": {}, |
| | "extra": {} |
| | }, |
| | { |
| | "id": "f1e70f72-0e1f-427e-a672-b447d45ee52e", |
| | "vimId": "43176042-ca97-4954-9bd5-0a9c054885e1", |
| | "vimType": "kubernetes", |
| | "interfaceInfo": {}, |
| | "accessInfo": {}, |
| | "extra": {} |
| | } |
| | ] |
| VNF Configurable Properties | |
| VNF Instance Description | |
| VNF Instance Name | vnf-2a9a1197-953b-4f0a-b510-5ab4ab979959 |
| VNF Product Name | Sample VNF |
| VNF Provider | Company |
| VNF Software Version | 1.0 |
| VNFD ID | b1bb0ce7-ebca-4fa7-95ed-4840d70a1177 |
| VNFD Version | 1.0 |
| metadata | namespace=default, tenant=default |
| vnfPkgId | |
+-----------------------------+----------------------------------------------------------------------------------------------------------------------+
.. _NFV-SOL002 v2.6.1 : https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/002/02.06.01_60/gs_nfv-sol002v020601p.pdf
.. _samples/tests/etc/samples/etsi/nfv/test_cnf_heal : https://opendev.org/openstack/tacker/src/branch/master/samples/tests/etc/samples/etsi/nfv/test_cnf_heal
History of Checks
-----------------
The content of this document has been confirmed to work
using the following VNF Package.
* `test_cnf_heal for 2023.2 Bobcat`_
.. _samples/tests/etc/samples/etsi/nfv/test_cnf_heal:
https://opendev.org/openstack/tacker/src/branch/master/samples/tests/etc/samples/etsi/nfv/test_cnf_heal
.. _NFV-SOL002 v2.6.1: https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/002/02.06.01_60/gs_nfv-sol002v020601p.pdf
.. _test_cnf_heal for 2023.2 Bobcat:
https://opendev.org/openstack/tacker/src/branch/stable/2023.2/tacker/tests/etc/samples/etsi/nfv/test_cnf_heal

File diff suppressed because it is too large Load Diff

View File

@ -2,7 +2,13 @@
ETSI NFV-SOL CNF Scaling
========================
This document describes how to scale CNF in Tacker.
This document describes how to scale CNF in Tacker v1 API.
.. note::
This is a document for Tacker v1 API.
See :doc:`/user/v2/cnf/scale/index` for Tacker v2 API.
Overview
--------
@ -17,17 +23,17 @@ The diagram below shows an overview of the CNF scaling.
2. Call Kubernetes API
Upon receiving a request from tacker-client, tacker-server redirects it to
tacker-conductor. In tacker-conductor, the request is redirected again to
tacker-conductor. In tacker-conductor, the request is redirected again to
an appropriate infra-driver (in this case Kubernetes infra-driver) according
to the contents of the instantiate parameters. Then, Kubernetes
to the contents of the instantiate parameters. Then, Kubernetes
infra-driver calls Kubernetes APIs.
3. Change the number of Pods
Kubernetes Master change the number of Pods according to the API calls.
.. figure:: ../_images/etsi_cnf_scaling.png
:align: left
.. figure:: /_images/etsi_cnf_scaling.png
Prerequisites
-------------
@ -39,10 +45,11 @@ The following packages should be installed:
The procedure of prepare for scaling operation that from "register VIM" to
"Instantiate VNF", basically refer to
:doc:`./etsi_containerized_vnf_usage_guide`.
:doc:`/user/etsi_containerized_vnf_usage_guide`.
This procedure uses an example using the sample VNF package.
How to Create VNF Package for Scaling
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Using `samples/tests/etc/samples/etsi/nfv/test_cnf_scale`_,
@ -50,7 +57,8 @@ describe how to create VNF package for scaling.
.. code-block:: console
$ cd samples/tests/etc/samples/etsi/nfv/test_cnf_scale
$ cd samples/tests/etc/samples/etsi/nfv/test_cnf_scale
Download official definition files from ETSI NFV.
ETSI GS NFV-SOL 001 [i.4] specifies the structure and format of the VNFD based
@ -58,19 +66,21 @@ on TOSCA specifications.
.. code-block:: console
$ cd Definitions
$ wget https://forge.etsi.org/rep/nfv/SOL001/raw/v2.6.1/etsi_nfv_sol001_common_types.yaml
$ wget https://forge.etsi.org/rep/nfv/SOL001/raw/v2.6.1/etsi_nfv_sol001_vnfd_types.yaml
$ cd Definitions
$ wget https://forge.etsi.org/rep/nfv/SOL001/raw/v2.6.1/etsi_nfv_sol001_common_types.yaml
$ wget https://forge.etsi.org/rep/nfv/SOL001/raw/v2.6.1/etsi_nfv_sol001_vnfd_types.yaml
CSAR Package should be compressed into a ZIP file for uploading.
Following commands are an example of compressing a VNF Package:
.. code-block:: console
$ cd -
$ zip deployment.zip -r Definitions/ Files/ TOSCA-Metadata/
$ ls
Definitions deployment.zip Files TOSCA-Metadata
$ cd -
$ zip deployment.zip -r Definitions/ Files/ TOSCA-Metadata/
$ ls
Definitions deployment.zip Files TOSCA-Metadata
After creating a vnf package with :command:`openstack vnf package create`, some
information including ID, Links, Onboarding State, Operational State, and Usage
@ -80,24 +90,25 @@ successful.
.. code-block:: console
$ openstack vnf package create
+-------------------+-------------------------------------------------------------------------------------------------+
| Field | Value |
+-------------------+-------------------------------------------------------------------------------------------------+
| ID | 08d00a5c-e8aa-4219-9412-411458eaa7d2 |
| Links | { |
| | "self": { |
| | "href": "/vnfpkgm/v1/vnf_packages/08d00a5c-e8aa-4219-9412-411458eaa7d2" |
| | }, |
| | "packageContent": { |
| | "href": "/vnfpkgm/v1/vnf_packages/08d00a5c-e8aa-4219-9412-411458eaa7d2/package_content" |
| | } |
| | } |
| Onboarding State | CREATED |
| Operational State | DISABLED |
| Usage State | NOT_IN_USE |
| User Defined Data | {} |
+-------------------+-------------------------------------------------------------------------------------------------+
$ openstack vnf package create
+-------------------+-------------------------------------------------------------------------------------------------+
| Field | Value |
+-------------------+-------------------------------------------------------------------------------------------------+
| ID | 094c8abf-b5c8-45a1-9332-3952a710c65c |
| Links | { |
| | "self": { |
| | "href": "/vnfpkgm/v1/vnf_packages/094c8abf-b5c8-45a1-9332-3952a710c65c" |
| | }, |
| | "packageContent": { |
| | "href": "/vnfpkgm/v1/vnf_packages/094c8abf-b5c8-45a1-9332-3952a710c65c/package_content" |
| | } |
| | } |
| Onboarding State | CREATED |
| Operational State | DISABLED |
| Usage State | NOT_IN_USE |
| User Defined Data | {} |
+-------------------+-------------------------------------------------------------------------------------------------+
Upload the CSAR zip file in to the VNF Package by running the following command
:command:`openstack vnf package upload --path <path of vnf package> <vnf package ID>`
@ -106,8 +117,9 @@ Here is an example of uploading VNF package:
.. code-block:: console
$ openstack vnf package upload --path deployment.zip 08d00a5c-e8aa-4219-9412-411458eaa7d2
Upload request for VNF package 08d00a5c-e8aa-4219-9412-411458eaa7d2 has been accepted.
$ openstack vnf package upload --path deployment.zip 094c8abf-b5c8-45a1-9332-3952a710c65c
Upload request for VNF package 094c8abf-b5c8-45a1-9332-3952a710c65c has been accepted.
Create VNF instance by running :command:`openstack vnflcm create <VNFD ID>`.
@ -116,27 +128,30 @@ Here is an example of creating VNF :
.. code-block:: console
$ openstack vnflcm create b1bb0ce7-ebca-4fa7-95ed-4840d70a1177
+--------------------------+---------------------------------------------------------------------------------------------+
| Field | Value |
+--------------------------+---------------------------------------------------------------------------------------------+
| ID | 92cf0ccb-e575-46e2-9c0d-30c67e75aaf6 |
| Instantiation State | NOT_INSTANTIATED |
| Links | { |
| | "self": { |
| | "href": "/vnflcm/v1/vnf_instances/92cf0ccb-e575-46e2-9c0d-30c67e75aaf6" |
| | }, |
| | "instantiate": { |
| | "href": "/vnflcm/v1/vnf_instances/92cf0ccb-e575-46e2-9c0d-30c67e75aaf6/instantiate" |
| | } |
| | } |
| VNF Instance Description | None |
| VNF Instance Name | None |
| VNF Product Name | Sample VNF |
| VNF Provider | Company |
| VNF Software Version | 1.0 |
| VNFD ID | b1bb0ce7-ebca-4fa7-95ed-4840d70a1177 |
| VNFD Version | 1.0 |
+--------------------------+---------------------------------------------------------------------------------------------+
+-----------------------------+------------------------------------------------------------------------------------------------------------------+
| Field | Value |
+-----------------------------+------------------------------------------------------------------------------------------------------------------+
| ID | e9d7c08e-72ed-4c64-bc91-78cd82163969 |
| Instantiation State | NOT_INSTANTIATED |
| Links | { |
| | "self": { |
| | "href": "http://localhost:9890/vnflcm/v1/vnf_instances/e9d7c08e-72ed-4c64-bc91-78cd82163969" |
| | }, |
| | "instantiate": { |
| | "href": "http://localhost:9890/vnflcm/v1/vnf_instances/e9d7c08e-72ed-4c64-bc91-78cd82163969/instantiate" |
| | } |
| | } |
| VNF Configurable Properties | |
| VNF Instance Description | |
| VNF Instance Name | vnf-e9d7c08e-72ed-4c64-bc91-78cd82163969 |
| VNF Product Name | Sample VNF |
| VNF Provider | Company |
| VNF Software Version | 1.0 |
| VNFD ID | b1bb0ce7-ebca-4fa7-95ed-4840d70a1177 |
| VNFD Version | 1.0 |
| vnfPkgId | |
+-----------------------------+------------------------------------------------------------------------------------------------------------------+
After the command is executed, instantiate VNF.
Instantiate VNF by running the following command
@ -149,29 +164,25 @@ includes path of Kubernetes resource definition file and that
.. code-block:: console
$ cat ./instance_kubernetes.json
{
"flavourId": "simple",
"additionalParams": {
"lcm-kubernetes-def-files": [
"Files/kubernetes/deployment_scale.yaml"
]
},
"vimConnectionInfo": [
{
"id": "8a3adb69-0784-43c7-833e-aab0b6ab4470",
"vimId": "8d8373fe-6977-49ff-83ac-7756572ed186",
"vimType": "kubernetes"
}
$ cat ./instance_kubernetes.json
{
"flavourId": "simple",
"additionalParams": {
"lcm-kubernetes-def-files": [
"Files/kubernetes/deployment_scale.yaml"
]
}
$ openstack vnflcm instantiate 92cf0ccb-e575-46e2-9c0d-30c67e75aaf6 instance_kubernetes.json
Instantiate request for VNF Instance 92cf0ccb-e575-46e2-9c0d-30c67e75aaf6 has been accepted.
},
"vimConnectionInfo": [
{
"id": "8a3adb69-0784-43c7-833e-aab0b6ab4470",
"vimId": "43176042-ca97-4954-9bd5-0a9c054885e1",
"vimType": "kubernetes"
}
]
}
$ openstack vnflcm instantiate e9d7c08e-72ed-4c64-bc91-78cd82163969 instance_kubernetes.json
Instantiate request for VNF Instance e9d7c08e-72ed-4c64-bc91-78cd82163969 has been accepted.
.. note::
In the case of version 2 API, you can also set
``vimType`` as ``ETSINFV.KUBERNETES.V_1`` in ``vimConnectionInfo``.
CNF Scaling Procedure
---------------------
@ -181,18 +192,22 @@ scaling.
Users can scale the number of pod replicas managed by controller resources such
as Kubernetes Deployment, StatefulSet, and ReplicaSet.
.. note:: If kind is Stateful Set and not dynamic provisioning
(no-provisioner), user must create the Persistent Volume for the
maximum replicas in advance because the increased Persistent Volume
is not created during the scale out operation.
.. note::
Details of CLI commands are described in :doc:`../cli/cli-etsi-vnflcm`.
If kind is Stateful Set and not dynamic provisioning
(no-provisioner), user must create the Persistent Volume for the
maximum replicas in advance because the increased Persistent Volume
is not created during the scale out operation.
Details of CLI commands are described in :doc:`/cli/cli-etsi-vnflcm`.
There are two main methods for CNF scaling.
* Scale out CNF
* Scale in CNF
How to Identify ASPECT_ID
~~~~~~~~~~~~~~~~~~~~~~~~~
@ -278,7 +293,11 @@ In the following VNFD excerpt, **vdu1_aspect** corresponds to ``ASPECT_ID``.
...snip VNFD...
.. note:: See `NFV-SOL001 v2.6.1`_ annex A.6 for details about ``ASPECT_ID``.
.. note::
See `NFV-SOL001 v2.6.1`_ annex A.6 for details about ``ASPECT_ID``.
How to Scale Out CNF
~~~~~~~~~~~~~~~~~~~~
@ -296,17 +315,20 @@ Replicas information before scale-out:
NAME READY UP-TO-DATE AVAILABLE AGE
vdu1 1/1 1 1 2d
Scale-out CNF can be executed by the following CLI command.
.. code-block:: console
$ openstack vnflcm scale --type SCALE_OUT --aspect-id vdu1_aspect VNF_INSTANCE_ID
Result:
.. code-block:: console
Scale request for VNF Instance edd306c3-647c-412c-a033-74aa40118038 has been accepted.
Scale request for VNF Instance e9d7c08e-72ed-4c64-bc91-78cd82163969 has been accepted.
Replicas information after scale-out:
@ -316,6 +338,7 @@ Replicas information after scale-out:
NAME READY UP-TO-DATE AVAILABLE AGE
vdu1 2/2 2 2 2d
How to Scale in CNF
~~~~~~~~~~~~~~~~~~~
@ -332,18 +355,20 @@ Replicas information before scale-out:
NAME READY UP-TO-DATE AVAILABLE AGE
vdu1 2/2 2 2 2d
Scale-in VNF can be executed by the following CLI command.
.. code-block:: console
$ openstack vnflcm scale --type SCALE_IN --aspect-id vdu1_aspect VNF_INSTANCE_ID
Result:
.. code-block:: console
Scale request for VNF Instance
edd306c3-647c-412c-a033-74aa40118038 has been accepted.
Scale request for VNF Instance e9d7c08e-72ed-4c64-bc91-78cd82163969 has been accepted.
Replicas information after scale-in:
@ -353,5 +378,18 @@ Replicas information after scale-in:
NAME READY UP-TO-DATE AVAILABLE AGE
vdu1 1/1 1 1 2d
.. _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
.. _samples/tests/etc/samples/etsi/nfv/test_cnf_scale : https://opendev.org/openstack/tacker/src/branch/master/samples/tests/etc/samples/etsi/nfv/test_cnf_scale
History of Checks
-----------------
The content of this document has been confirmed to work
using the following VNF Package.
* `test_cnf_scale for 2023.2 Bobcat`_
.. _samples/tests/etc/samples/etsi/nfv/test_cnf_scale:
https://opendev.org/openstack/tacker/src/branch/master/samples/tests/etc/samples/etsi/nfv/test_cnf_scale
.. _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
.. _test_cnf_scale for 2023.2 Bobcat:
https://opendev.org/openstack/tacker/src/branch/stable/2023.2/tacker/tests/etc/samples/etsi/nfv/test_cnf_scale

File diff suppressed because it is too large Load Diff

View File

@ -23,28 +23,36 @@ Summary
This lecture enables you to:
- create & delete a sample VNF on the OpenStack with Tacker
- create & delete a sample VNF on the OpenStack with Tacker v1 API
.. note::
This is a document for Tacker v1 API.
See :doc:`/user/v2/getting_started/index` for Tacker v2 API.
Following two types of VNF deployment supported by Tacker are introduced in
this lecture.
- VNF Deployment with TOSCA [#f1]_
- VNF Deployment with LCM Operation User Data (optional) [#f2]_
- :doc:`/user/etsi_vnf_deployment_as_vm_with_tosca`
- :doc:`/user/etsi_vnf_deployment_as_vm_with_user_data`
"VNF Deployment with LCM Operation User Data" is optional.
The part will be clarified with the notation [This is UserData specific part].
The following figure shows a sample VNF used in this lecture.
.. figure:: ../_images/etsi-getting-started-sample-vnf.png
.. figure:: /_images/etsi-getting-started-sample-vnf.png
:align: left
.. note::
VIM config, a VNF package, and instantiation parameters used in this tutorial are placed at the repository.
- VNF Deployment with TOSCA [#f3]_
- VNF Deployment with LCM Operation User Data [#f4]_
- `samples/etsi_getting_started/tosca`_
- `samples/etsi_getting_started/userdata`_
.. note::
@ -59,7 +67,7 @@ The following figure shows a sample VNF used in this lecture.
Prerequisites
-------------
The following packages should be installed [#f5]_:
The following packages should be installed:
* tacker
* python-tackerclient
@ -70,8 +78,28 @@ Configuration
Load credentials for client operations
""""""""""""""""""""""""""""""""""""""
Before any Tacker commands can be run, your credentials need to be sourced
[#f6]_.
Before any Tacker commands can be run, your credentials need to be sourced.
.. note::
See `Create OpenStack client environment scripts`_ for details.
In this document, the settings are as follows:
.. code-block::
OS_REGION_NAME=RegionOne
OS_PROJECT_DOMAIN_ID=default
OS_CACERT=
OS_AUTH_URL=http://192.168.56.10/identity
OS_TENANT_NAME=admin
OS_USER_DOMAIN_ID=default
OS_USERNAME=admin
OS_VOLUME_API_VERSION=3
OS_AUTH_TYPE=password
OS_PROJECT_NAME=admin
OS_PASSWORD=devstack
OS_IDENTITY_API_VERSION=3
You can confirm that Tacker is available by checking this command works without
error:
@ -80,9 +108,10 @@ error:
$ openstack vim list
.. note::
See CLI reference [#f7]_ to find all the available commands.
See :doc:`/cli/index` to find all the available commands.
Register VIM
@ -91,7 +120,7 @@ Register VIM
#. Prepare VIM configuration file:
You can use a setup script for generating VIM configuration or edit it from
scratch as described in :doc:`here </reference/vim_config>`.
scratch as described in :doc:`/reference/vim_config`.
This script finds parameters for the configuration, such as user
name or password, from your environment variables.
Here is an example of generating OpenStack VIM configuration as
@ -103,6 +132,7 @@ Register VIM
$ bash TACKER_ROOT/tools/gen_vim_config.sh
Config for OpenStack VIM 'vim_config.yaml' generated.
There are several options for configuring parameters from command
line supported. Refer help with ``-h`` for details.
@ -114,8 +144,10 @@ Register VIM
$ cp TACKER_ROOT/samples/etsi_getting_started/tosca/vim/vim_config.yaml ./
$ vi vim_config.yaml
.. literalinclude:: ../../../samples/etsi_getting_started/tosca/vim/vim_config.yaml
:language: yaml
:language: yaml
#. Register Default VIM:
@ -126,57 +158,55 @@ Register VIM
$ openstack vim register --config-file ./vim_config.yaml \
--is-default --fit-width openstack-admin-vim
+----------------+-----------------------------------------------------+
| Field | Value |
+----------------+-----------------------------------------------------+
| auth_cred | { |
| | "username": "admin", |
| | "user_domain_name": "default", |
| | "cert_verify": "True", |
| | "project_id": null, |
| | "project_name": "admin", |
| | "project_domain_name": "default", |
| | "auth_url": "http://192.168.56.10/identity/v3", |
| | "key_type": "barbican_key", |
| | "secret_uuid": "***", |
| | "password": "***" |
| | } |
| auth_url | http://192.168.56.10/identity/v3 |
| created_at | 2023-12-21 07:39:09.617234 |
| description | |
| extra | |
| id | 662e5f4f-3b16-4ca6-b560-28b62dd0e13b |
| is_default | True |
| name | openstack-admin-vim |
| placement_attr | { |
| | "regions": [ |
| | "RegionOne" |
| | ] |
| | } |
| project_id | 1994d69783d64c00aadab564038c2fd7 |
| status | ACTIVE |
| type | openstack |
| updated_at | None |
| vim_project | { |
| | "name": "admin", |
| | "project_domain_name": "default" |
| | } |
+----------------+-----------------------------------------------------+
+----------------+-------------------------------------------------+
| Field | Value |
+----------------+-------------------------------------------------+
| auth_cred | { |
| | "username": "admin", |
| | "user_domain_name": "Default", |
| | "cert_verify": "True", |
| | "project_id": null, |
| | "project_name": "admin", |
| | "project_domain_name": "Default", |
| | "auth_url": "http://127.0.0.1/identity/v3", |
| | "key_type": "barbican_key", |
| | "secret_uuid": "***", |
| | "password": "***" |
| | } |
| auth_url | http://127.0.0.1/identity/v3 |
| created_at | 2020-05-24 07:00:25.923831 |
| description | |
| id | 4bb57004-9e33-4c52-b5f9-629f876b4168 |
| is_default | True |
| name | openstack-admin-vim |
| placement_attr | { |
| | "regions": [ |
| | "RegionOne" |
| | ] |
| | } |
| project_id | d413421abf074c9b8f54a1403857038c |
| status | PENDING |
| type | openstack |
| updated_at | None |
| vim_project | { |
| | "name": "admin", |
| | "project_domain_name": "Default" |
| | } |
+----------------+-------------------------------------------------+
#. Confirm that the status of registered VIM is ``REACHABLE`` as ready to use:
#. Confirm that the status of registered VIM is ``ACTIVE`` as ready to use:
.. code-block:: console
$ openstack vim list
+--------------------------------------+---------------------+----------------------------------+-----------+------------+--------+
| ID | Name | Tenant_id | Type | Is Default | Status |
+--------------------------------------+---------------------+----------------------------------+-----------+------------+--------+
| 662e5f4f-3b16-4ca6-b560-28b62dd0e13b | openstack-admin-vim | 1994d69783d64c00aadab564038c2fd7 | openstack | True | ACTIVE |
+--------------------------------------+---------------------+----------------------------------+-----------+------------+--------+
+------------+------------+------------+-----------+------------+-----------+
| ID | Name | Tenant_id | Type | Is Default | Status |
+------------+------------+------------+-----------+------------+-----------+
| 4bb57004-9 | openstack- | d413421abf | openstack | True | REACHABLE |
| e33-4c52-b | admin-vim | 074c9b8f54 | | | |
| 5f9-629f87 | | a140385703 | | | |
| 6b4168 | | 8c | | | |
+------------+------------+------------+-----------+------------+-----------+
Create and Upload VNF Package
-----------------------------
@ -189,15 +219,17 @@ Prepare VNF Package
.. code-block:: console
$ mkdir -p ./sample_vnf_package_csar/TOSCA-Metadata \
./sample_vnf_package_csar/Definitions \
./sample_vnf_package_csar/Files
./sample_vnf_package_csar/Definitions \
./sample_vnf_package_csar/Files/images
[This is UserData specific part] When using UserData, create the following directories in addition.
.. code-block:: console
$ mkdir -p ./sample_vnf_package_csar/BaseHOT/simple \
./sample_vnf_package_csar/UserData
./sample_vnf_package_csar/UserData
#. Create a ``TOSCA.meta`` file:
@ -205,25 +237,39 @@ Prepare VNF Package
$ vi ./sample_vnf_package_csar/TOSCA-Metadata/TOSCA.meta
.. literalinclude:: ../../../samples/etsi_getting_started/tosca/sample_vnf_package_csar/TOSCA-Metadata/TOSCA.meta
:language: text
:language: text
#. Download image file:
.. code-block:: console
$ cd ./sample_vnf_package_csar/Files/images
$ wget https://download.cirros-cloud.net/0.5.2/cirros-0.5.2-x86_64-disk.img
#. Download ETSI definition files:
You should set ``${TOSCA_VERSION}`` to one of the appropriate TOSCA service
template versions [#f8]_, e.g., ``export TOSCA_VERSION=v2.6.1``.
template versions (`SOL001`_), e.g., ``export TOSCA_VERSION=v2.6.1``.
.. important::
You should also check if the version of TOSCA service template is
supported by tacker [#f9]_.
supported by tacker.
See :doc:`/user/vnfd-sol001` for supported version.
.. code-block:: console
$ cd -
$ cd ./sample_vnf_package_csar/Definitions
$ wget https://forge.etsi.org/rep/nfv/SOL001/raw/${TOSCA_VERSION}/etsi_nfv_sol001_common_types.yaml
$ wget https://forge.etsi.org/rep/nfv/SOL001/raw/${TOSCA_VERSION}/etsi_nfv_sol001_vnfd_types.yaml
#. Create VNFD files:
- Create ``sample_vnfd_top.yaml``
@ -233,7 +279,8 @@ Prepare VNF Package
$ vi ./sample_vnfd_top.yaml
.. literalinclude:: ../../../samples/etsi_getting_started/tosca/sample_vnf_package_csar/Definitions/sample_vnfd_top.yaml
:language: yaml
:language: yaml
- Create ``sample_vnfd_types.yaml``
@ -241,22 +288,27 @@ Prepare VNF Package
$ vi ./sample_vnfd_types.yaml
.. literalinclude:: ../../../samples/etsi_getting_started/tosca/sample_vnf_package_csar/Definitions/sample_vnfd_types.yaml
:language: yaml
:language: yaml
.. note::
``description_id`` shall be globally unique, i.e., you cannot create
multiple VNFDs with the same ``description_id``.
- Create ``sample_vnfd_df_simple.yaml``
.. code-block:: console
$ vi ./sample_vnfd_df_simple.yaml
.. literalinclude:: ../../../samples/etsi_getting_started/tosca/sample_vnf_package_csar/Definitions/sample_vnfd_df_simple.yaml
:language: yaml
:language: yaml
.. note::
@ -264,6 +316,7 @@ Prepare VNF Package
Tacker cannot handle it. After the instantiation, the default value in
``sample_vnfd_types.yaml`` is always used.
#. [This is UserData specific part] Create BaseHOT files:
.. code-block:: console
@ -271,8 +324,10 @@ Prepare VNF Package
$ cd -
$ vi ./sample_vnf_package_csar/BaseHOT/simple/sample_lcm_with_user_data_hot.yaml
.. literalinclude:: ../../../samples/etsi_getting_started/userdata/sample_vnf_package_csar/BaseHOT/simple/sample_lcm_with_user_data_hot.yaml
:language: yaml
:language: yaml
#. [This is UserData specific part] Create UserData files:
@ -282,8 +337,10 @@ Prepare VNF Package
$ touch ./__init__.py
$ vi ./lcm_user_data.py
.. literalinclude:: ../../../samples/etsi_getting_started/userdata/sample_vnf_package_csar/UserData/lcm_user_data.py
:language: python
:language: python
#. Compress the VNF Package CSAR to zip:
@ -311,12 +368,14 @@ Prepare VNF Package
TOSCA-Metadata/
TOSCA-Metadata/TOSCA.meta
- [This is UserData specific part] When using UserData, add ``BaseHOT`` and ``UserData`` directories.
.. code-block:: console
$ zip sample_vnf_package_csar.zip -r BaseHOT/ UserData/
The contents of the zip file should look something like this.
.. code-block:: console
@ -340,10 +399,10 @@ Prepare VNF Package
UserData/lcm_user_data.py
UserData/__init__.py
Here, you can find the structure of the sample VNF Package CSAR as a
zip file.
.. _Create VNF Package:
Create VNF Package
^^^^^^^^^^^^^^^^^^
@ -358,36 +417,42 @@ Create VNF Package
.. code-block:: console
$ openstack vnf package create --fit-width
$ openstack vnf package create
+-------------------+-------------------------------------------------------------------------------------------------+
| Field | Value |
+-------------------+-------------------------------------------------------------------------------------------------+
| ID | 156f1c4f-bfe2-492b-a079-a1bad32c0c3d |
| Links | { |
| | "self": { |
| | "href": "/vnfpkgm/v1/vnf_packages/156f1c4f-bfe2-492b-a079-a1bad32c0c3d" |
| | }, |
| | "packageContent": { |
| | "href": "/vnfpkgm/v1/vnf_packages/156f1c4f-bfe2-492b-a079-a1bad32c0c3d/package_content" |
| | } |
| | } |
| Onboarding State | CREATED |
| Operational State | DISABLED |
| Usage State | NOT_IN_USE |
| User Defined Data | {} |
+-------------------+-------------------------------------------------------------------------------------------------+
+-------------------+----------------------------------------------------------------------------------------------------------------+
| Field | Value |
+-------------------+----------------------------------------------------------------------------------------------------------------+
| ID | e712a702-741f-4093-a971-b3ad69411ac1 |
| Links | packageContent=href=/vnfpkgm/v1/vnf_packages/e712a702-741f-4093-a971-b3ad69411ac1/package_content, |
| | self=href=/vnfpkgm/v1/vnf_packages/e712a702-741f-4093-a971-b3ad69411ac1 |
| Onboarding State | CREATED |
| Operational State | DISABLED |
| Usage State | NOT_IN_USE |
| User Defined Data | |
+-------------------+----------------------------------------------------------------------------------------------------------------+
Upload VNF Package
^^^^^^^^^^^^^^^^^^
#. Execute vnfpkgm upload:
The "VNF Package ID" ``e712a702-741f-4093-a971-b3ad69411ac1`` needs to be
replaced with the appropriate one that was obtained from :ref:`Create VNF
The "VNF Package ID" ``156f1c4f-bfe2-492b-a079-a1bad32c0c3d`` needs to be
replaced with the appropriate one that was obtained from `Create VNF
Package`.
.. code-block:: console
$ openstack vnf package upload \
--path ./sample_vnf_package_csar/sample_vnf_package_csar.zip \
e712a702-741f-4093-a971-b3ad69411ac1
--path ./sample_vnf_package_csar/sample_vnf_package_csar.zip \
156f1c4f-bfe2-492b-a079-a1bad32c0c3d
Upload request for VNF package 156f1c4f-bfe2-492b-a079-a1bad32c0c3d has been accepted.
Upload request for VNF package e712a702-741f-4093-a971-b3ad69411ac1 has been accepted.
Check the created VNF Package
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -398,20 +463,33 @@ Check the created VNF Package
.. code-block:: console
$ openstack vnf package list
+--------------------------------------+------------------+------------------+-------------+-------------------+
| Id | Vnf Product Name | Onboarding State | Usage State | Operational State |
+--------------------------------------+------------------+------------------+-------------+-------------------+
| e712a702-741f-4093-a971-b3ad69411ac1 | | PROCESSING | NOT_IN_USE | DISABLED |
+--------------------------------------+------------------+------------------+-------------+-------------------+
+--------------------------------------+------------------+------------------+-------------+-------------------+-------------------------------------------------------------------------------------------------+
| Id | Vnf Product Name | Onboarding State | Usage State | Operational State | Links |
+--------------------------------------+------------------+------------------+-------------+-------------------+-------------------------------------------------------------------------------------------------+
| 156f1c4f-bfe2-492b-a079-a1bad32c0c3d | | PROCESSING | NOT_IN_USE | DISABLED | { |
| | | | | | "self": { |
| | | | | | "href": "/vnfpkgm/v1/vnf_packages/156f1c4f-bfe2-492b-a079-a1bad32c0c3d" |
| | | | | | }, |
| | | | | | "packageContent": { |
| | | | | | "href": "/vnfpkgm/v1/vnf_packages/156f1c4f-bfe2-492b-a079-a1bad32c0c3d/package_content" |
| | | | | | } |
| | | | | | } |
+--------------------------------------+------------------+------------------+-------------+-------------------+-------------------------------------------------------------------------------------------------+
$ openstack vnf package list
+--------------------------------------+------------------+------------------+-------------+-------------------+-------------------------------------------------------------------------------------------------+
| Id | Vnf Product Name | Onboarding State | Usage State | Operational State | Links |
+--------------------------------------+------------------+------------------+-------------+-------------------+-------------------------------------------------------------------------------------------------+
| 156f1c4f-bfe2-492b-a079-a1bad32c0c3d | Sample VNF | ONBOARDED | NOT_IN_USE | ENABLED | { |
| | | | | | "self": { |
| | | | | | "href": "/vnfpkgm/v1/vnf_packages/156f1c4f-bfe2-492b-a079-a1bad32c0c3d" |
| | | | | | }, |
| | | | | | "packageContent": { |
| | | | | | "href": "/vnfpkgm/v1/vnf_packages/156f1c4f-bfe2-492b-a079-a1bad32c0c3d/package_content" |
| | | | | | } |
| | | | | | } |
+--------------------------------------+------------------+------------------+-------------+-------------------+-------------------------------------------------------------------------------------------------+
+--------------------------------------+------------------+------------------+-------------+-------------------+
| Id | Vnf Product Name | Onboarding State | Usage State | Operational State |
+--------------------------------------+------------------+------------------+-------------+-------------------+
| e712a702-741f-4093-a971-b3ad69411ac1 | Sample VNF | ONBOARDED | NOT_IN_USE | ENABLED |
+--------------------------------------+------------------+------------------+-------------+-------------------+
Create & Instantiate VNF
------------------------
@ -427,14 +505,14 @@ Create VNF
.. code-block:: console
$ openstack vnf package show \
e712a702-741f-4093-a971-b3ad69411ac1 -c 'VNFD ID'
156f1c4f-bfe2-492b-a079-a1bad32c0c3d -c 'VNFD ID'
+---------+--------------------------------------+
| Field | Value |
+---------+--------------------------------------+
| VNFD ID | b1bb0ce7-ebca-4fa7-95ed-4840d70a1177 |
+---------+--------------------------------------+
#. Create VNF:
The "VNFD ID" ``b1bb0ce7-ebca-4fa7-95ed-4840d70a1177`` needs to be replaced
@ -442,24 +520,31 @@ Create VNF
.. code-block:: console
$ openstack vnflcm create \
b1bb0ce7-ebca-4fa7-95ed-4840d70a1177 --fit-width
$ openstack vnflcm create b1bb0ce7-ebca-4fa7-95ed-4840d70a1177
+-----------------------------+------------------------------------------------------------------------------------------------------------------+
| Field | Value |
+-----------------------------+------------------------------------------------------------------------------------------------------------------+
| ID | 810d8c9b-e467-4b06-9265-ac9dce015fce |
| Instantiation State | NOT_INSTANTIATED |
| Links | { |
| | "self": { |
| | "href": "http://localhost:9890/vnflcm/v1/vnf_instances/810d8c9b-e467-4b06-9265-ac9dce015fce" |
| | }, |
| | "instantiate": { |
| | "href": "http://localhost:9890/vnflcm/v1/vnf_instances/810d8c9b-e467-4b06-9265-ac9dce015fce/instantiate" |
| | } |
| | } |
| VNF Configurable Properties | |
| VNF Instance Description | |
| VNF Instance Name | vnf-810d8c9b-e467-4b06-9265-ac9dce015fce |
| VNF Product Name | Sample VNF |
| VNF Provider | Company |
| VNF Software Version | 1.0 |
| VNFD ID | b1bb0ce7-ebca-4fa7-95ed-4840d70a1177 |
| VNFD Version | 1.0 |
| vnfPkgId | |
+-----------------------------+------------------------------------------------------------------------------------------------------------------+
+--------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Field | Value |
+--------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+
| ID | 725f625e-f6b7-4bcd-b1b7-7184039fde45 |
| Instantiation State | NOT_INSTANTIATED |
| Links | instantiate=href=/vnflcm/v1/vnf_instances/725f625e-f6b7-4bcd-b1b7-7184039fde45/instantiate, |
| | self=href=/vnflcm/v1/vnf_instances/725f625e-f6b7-4bcd-b1b7-7184039fde45 |
| VNF Instance Description | None |
| VNF Instance Name | None |
| VNF Product Name | Sample VNF |
| VNF Provider | Company |
| VNF Software Version | 1.0 |
| VNFD ID | b1bb0ce7-ebca-4fa7-95ed-4840d70a1177 |
| VNFD Version | 1.0 |
+--------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+
Instantiate VNF
^^^^^^^^^^^^^^^
@ -481,6 +566,7 @@ Instantiate VNF
You can skip ``vimConnectionInfo`` only when you have the default VIM.
A sample ``<param-file>`` named as ``sample_param_file.json`` with
minimal parametes:
@ -488,27 +574,33 @@ Instantiate VNF
$ vi ./sample_param_file.json
- When using TOSCA, use the following parameters.
.. literalinclude:: ../../../samples/etsi_getting_started/tosca/lcm_instantiate_request/sample_param_file.json
:language: json
:language: json
- [This is UserData specific part] When using UserData, use the following parameters instead.
.. literalinclude:: ../../../samples/etsi_getting_started/userdata/lcm_instantiate_request/sample_param_file.json
:language: json
:language: json
``${network_uuid}``, ``${subnet_uuid}`` and ``${vim_uuid}`` should be
replaced with the uuid of the network to use, the uuid of the subnet to use
and the uuid of the VIM to use, respectively.
.. hint::
You can find uuids of the network and the corresponding subnet with this command [#f10]_:
You can find uuids of the network and the corresponding subnet with
`network command`_:
.. code-block:: console
$ openstack network list
#. Instantiate VNF:
The "ID of vnf instance" and "path to <param-file>" are needed to
@ -517,48 +609,126 @@ Instantiate VNF
.. code-block:: console
$ openstack vnflcm instantiate \
725f625e-f6b7-4bcd-b1b7-7184039fde45 ./sample_param_file.json
810d8c9b-e467-4b06-9265-ac9dce015fce ./sample_param_file.json
Instantiate request for VNF Instance 810d8c9b-e467-4b06-9265-ac9dce015fce has been accepted.
instantiate request for vnf instance 725f625e-f6b7-4bcd-b1b7-7184039fde45 has been accepted.
Check the details of the instantiated vnf.
.. code-block:: console
$ openstack vnflcm list
+--------------------------------------+------------------------------------------+---------------------+--------------+----------------------+------------------+--------------------------------------+
| ID | VNF Instance Name | Instantiation State | VNF Provider | VNF Software Version | VNF Product Name | VNFD ID |
+--------------------------------------+------------------------------------------+---------------------+--------------+----------------------+------------------+--------------------------------------+
| 810d8c9b-e467-4b06-9265-ac9dce015fce | vnf-810d8c9b-e467-4b06-9265-ac9dce015fce | INSTANTIATED | Company | 1.0 | Sample VNF | b1bb0ce7-ebca-4fa7-95ed-4840d70a1177 |
+--------------------------------------+------------------------------------------+---------------------+--------------+----------------------+------------------+--------------------------------------+
+--------------------------------------+-------------------+---------------------+--------------+----------------------+------------------+--------------------------------------+
| ID | VNF Instance Name | Instantiation State | VNF Provider | VNF Software Version | VNF Product Name | VNFD ID |
+--------------------------------------+-------------------+---------------------+--------------+----------------------+------------------+--------------------------------------+
| 725f625e-f6b7-4bcd-b1b7-7184039fde45 | None | INSTANTIATED | Company | 1.0 | Sample VNF | b1bb0ce7-ebca-4fa7-95ed-4840d70a1177 |
+--------------------------------------+-------------------+---------------------+--------------+----------------------+------------------+--------------------------------------+
$ openstack vnflcm show 810d8c9b-e467-4b06-9265-ac9dce015fce
+-----------------------------+----------------------------------------------------------------------------------------------------------------------+
| Field | Value |
+-----------------------------+----------------------------------------------------------------------------------------------------------------------+
| ID | 810d8c9b-e467-4b06-9265-ac9dce015fce |
| Instantiated Vnf Info | { |
| | "flavourId": "simple", |
| | "vnfState": "STARTED", |
| | "extCpInfo": [], |
| | "vnfcResourceInfo": [ |
| | { |
| | "id": "6894448f-4a88-45ec-801f-4ef455e8a613", |
| | "vduId": "VDU1", |
| | "computeResource": { |
| | "vimConnectionId": "662e5f4f-3b16-4ca6-b560-28b62dd0e13b", |
| | "resourceId": "cfb5d6de-90a1-433a-9af4-1159ca279e27", |
| | "vimLevelResourceType": "OS::Nova::Server" |
| | }, |
| | "storageResourceIds": [], |
| | "vnfcCpInfo": [ |
| | { |
| | "id": "b6dffe31-2e4b-44e6-8ddd-b94608a9210b", |
| | "cpdId": "CP1", |
| | "vnfExtCpId": null, |
| | "vnfLinkPortId": "5040ae0d-ef8b-4d12-b96b-d9d05a0ba7fe" |
| | } |
| | ] |
| | } |
| | ], |
| | "vnfVirtualLinkResourceInfo": [ |
| | { |
| | "id": "4b67e6f9-8133-4f7d-b384-abd64f9bcbac", |
| | "vnfVirtualLinkDescId": "internalVL1", |
| | "networkResource": { |
| | "vimConnectionId": "662e5f4f-3b16-4ca6-b560-28b62dd0e13b", |
| | "resourceId": "d04beb5f-b29a-4f7e-b32b-7ea669afa3eb", |
| | "vimLevelResourceType": "OS::Neutron::Net" |
| | }, |
| | "vnfLinkPorts": [ |
| | { |
| | "id": "5040ae0d-ef8b-4d12-b96b-d9d05a0ba7fe", |
| | "resourceHandle": { |
| | "vimConnectionId": "662e5f4f-3b16-4ca6-b560-28b62dd0e13b", |
| | "resourceId": "84edd7c7-a02f-4f25-be2a-a0ee5b1c8dc7", |
| | "vimLevelResourceType": "OS::Neutron::Port" |
| | }, |
| | "cpInstanceId": "b6dffe31-2e4b-44e6-8ddd-b94608a9210b" |
| | } |
| | ] |
| | } |
| | ], |
| | "vnfcInfo": [ |
| | { |
| | "id": "6c0ba2a3-3f26-4ba0-9b4f-db609b2e843c", |
| | "vduId": "VDU1", |
| | "vnfcState": "STARTED" |
| | } |
| | ], |
| | "additionalParams": {} |
| | } |
| Instantiation State | INSTANTIATED |
| Links | { |
| | "self": { |
| | "href": "http://localhost:9890/vnflcm/v1/vnf_instances/810d8c9b-e467-4b06-9265-ac9dce015fce" |
| | }, |
| | "terminate": { |
| | "href": "http://localhost:9890/vnflcm/v1/vnf_instances/810d8c9b-e467-4b06-9265-ac9dce015fce/terminate" |
| | }, |
| | "heal": { |
| | "href": "http://localhost:9890/vnflcm/v1/vnf_instances/810d8c9b-e467-4b06-9265-ac9dce015fce/heal" |
| | }, |
| | "changeExtConn": { |
| | "href": "http://localhost:9890/vnflcm/v1/vnf_instances/810d8c9b-e467-4b06-9265-ac9dce015fce/change_ext_conn" |
| | } |
| | } |
| VIM Connection Info | [ |
| | { |
| | "id": "e24f9796-a8e9-4cb0-85ce-5920dcddafa1", |
| | "vimId": "662e5f4f-3b16-4ca6-b560-28b62dd0e13b", |
| | "vimType": "ETSINFV.OPENSTACK_KEYSTONE.v_2", |
| | "interfaceInfo": {}, |
| | "accessInfo": {}, |
| | "extra": {} |
| | }, |
| | { |
| | "id": "67820f17-a82a-4e3a-b200-8ef119646749", |
| | "vimId": "662e5f4f-3b16-4ca6-b560-28b62dd0e13b", |
| | "vimType": "openstack", |
| | "interfaceInfo": {}, |
| | "accessInfo": {}, |
| | "extra": {} |
| | } |
| | ] |
| VNF Configurable Properties | |
| VNF Instance Description | |
| VNF Instance Name | vnf-810d8c9b-e467-4b06-9265-ac9dce015fce |
| VNF Product Name | Sample VNF |
| VNF Provider | Company |
| VNF Software Version | 1.0 |
| VNFD ID | b1bb0ce7-ebca-4fa7-95ed-4840d70a1177 |
| VNFD Version | 1.0 |
| metadata | tenant=admin |
| vnfPkgId | |
+-----------------------------+----------------------------------------------------------------------------------------------------------------------+
$ openstack vnflcm show \
725f625e-f6b7-4bcd-b1b7-7184039fde45 --fit-width
+--------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Field | Value |
+--------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+
| ID | 725f625e-f6b7-4bcd-b1b7-7184039fde45 |
| Instantiated Vnf Info | , extCpInfo='[]', flavourId='simple', vnfState='STARTED', vnfVirtualLinkResourceInfo='[{'id': '0163cea3-af88-4ef8-ae43-ef3e5e7e827d', |
| | 'vnfVirtualLinkDescId': 'internalVL1', 'networkResource': {'resourceId': '073c74b9-670d-4764-a933-6fe4f2f991c1', 'vimLevelResourceType': |
| | 'OS::Neutron::Net'}, 'vnfLinkPorts': [{'id': '3b667826-336c-4919-889e-e6c63d959ee6', 'resourceHandle': {'resourceId': |
| | '5d3255b5-e9fb-449f-9c5f-5242049ce2fa', 'vimLevelResourceType': 'OS::Neutron::Port'}, 'cpInstanceId': '3091f046-de63-44c8-ad23-f86128409b27'}]}]', |
| | vnfcResourceInfo='[{'id': '2a66f545-c90d-49e7-8f17-fb4e57b19c92', 'vduId': 'VDU1', 'computeResource': {'resourceId': |
| | '6afc547d-0e19-46fc-b171-a3d9a0a80513', 'vimLevelResourceType': 'OS::Nova::Server'}, 'storageResourceIds': [], 'vnfcCpInfo': [{'id': |
| | '3091f046-de63-44c8-ad23-f86128409b27', 'cpdId': 'CP1', 'vnfExtCpId': None, 'vnfLinkPortId': '3b667826-336c-4919-889e-e6c63d959ee6'}]}]' |
| Instantiation State | INSTANTIATED |
| Links | heal=href=/vnflcm/v1/vnf_instances/725f625e-f6b7-4bcd-b1b7-7184039fde45/heal, self=href=/vnflcm/v1/vnf_instances/725f625e-f6b7-4bcd-b1b7-7184039fde45, |
| | terminate=href=/vnflcm/v1/vnf_instances/725f625e-f6b7-4bcd-b1b7-7184039fde45/terminate |
| VIM Connection Info | [] |
| VNF Instance Description | None |
| VNF Instance Name | None |
| VNF Product Name | Sample VNF |
| VNF Provider | Company |
| VNF Software Version | 1.0 |
| VNFD ID | b1bb0ce7-ebca-4fa7-95ed-4840d70a1177 |
| VNFD Version | 1.0 |
+--------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+
Terminate & Delete VNF
----------------------
@ -571,12 +741,12 @@ Terminate VNF
.. code-block:: console
$ openstack vnflcm list
+--------------------------------------+------------------------------------------+---------------------+--------------+----------------------+------------------+--------------------------------------+
| ID | VNF Instance Name | Instantiation State | VNF Provider | VNF Software Version | VNF Product Name | VNFD ID |
+--------------------------------------+------------------------------------------+---------------------+--------------+----------------------+------------------+--------------------------------------+
| 810d8c9b-e467-4b06-9265-ac9dce015fce | vnf-810d8c9b-e467-4b06-9265-ac9dce015fce | INSTANTIATED | Company | 1.0 | Sample VNF | b1bb0ce7-ebca-4fa7-95ed-4840d70a1177 |
+--------------------------------------+------------------------------------------+---------------------+--------------+----------------------+------------------+--------------------------------------+
+--------------------------------------+-------------------+---------------------+--------------+----------------------+------------------+--------------------------------------+
| ID | VNF Instance Name | Instantiation State | VNF Provider | VNF Software Version | VNF Product Name | VNFD ID |
+--------------------------------------+-------------------+---------------------+--------------+----------------------+------------------+--------------------------------------+
| 725f625e-f6b7-4bcd-b1b7-7184039fde45 | None | INSTANTIATED | Company | 1.0 | Sample VNF | b1bb0ce7-ebca-4fa7-95ed-4840d70a1177 |
+--------------------------------------+-------------------+---------------------+--------------+----------------------+------------------+--------------------------------------+
#. Terminate VNF Instance:
@ -584,22 +754,21 @@ Terminate VNF
.. code-block:: console
$ openstack vnflcm terminate 725f625e-f6b7-4bcd-b1b7-7184039fde45
$ openstack vnflcm terminate 810d8c9b-e467-4b06-9265-ac9dce015fce
Terminate request for VNF Instance '810d8c9b-e467-4b06-9265-ac9dce015fce' has been accepted.
Terminate request for VNF Instance '725f625e-f6b7-4bcd-b1b7-7184039fde45' has been accepted.
Check the status of VNF Instance:
.. code-block:: console
$ openstack vnflcm list --fit-width
$ openstack vnflcm list
+--------------------------------------+------------------------------------------+---------------------+--------------+----------------------+------------------+--------------------------------------+
| ID | VNF Instance Name | Instantiation State | VNF Provider | VNF Software Version | VNF Product Name | VNFD ID |
+--------------------------------------+------------------------------------------+---------------------+--------------+----------------------+------------------+--------------------------------------+
| 810d8c9b-e467-4b06-9265-ac9dce015fce | vnf-810d8c9b-e467-4b06-9265-ac9dce015fce | NOT_INSTANTIATED | Company | 1.0 | Sample VNF | b1bb0ce7-ebca-4fa7-95ed-4840d70a1177 |
+--------------------------------------+------------------------------------------+---------------------+--------------+----------------------+------------------+--------------------------------------+
+----------------------+-------------------+---------------------+--------------+----------------------+------------------+-----------------------+
| ID | VNF Instance Name | Instantiation State | VNF Provider | VNF Software Version | VNF Product Name | VNFD ID |
+----------------------+-------------------+---------------------+--------------+----------------------+------------------+-----------------------+
| 725f625e-f6b7-4bcd-b | None | NOT_INSTANTIATED | Company | 1.0 | Sample VNF | b1bb0ce7-ebca-4fa7-95 |
| 1b7-7184039fde45 | | | | | | ed-4840d70a1177 |
+----------------------+-------------------+---------------------+--------------+----------------------+------------------+-----------------------+
Delete VNF
^^^^^^^^^^
@ -608,9 +777,9 @@ Delete VNF
.. code-block:: console
$ openstack vnflcm delete 725f625e-f6b7-4bcd-b1b7-7184039fde45
$ openstack vnflcm delete 810d8c9b-e467-4b06-9265-ac9dce015fce
Vnf instance '810d8c9b-e467-4b06-9265-ac9dce015fce' is deleted successfully
Vnf instance '725f625e-f6b7-4bcd-b1b7-7184039fde45' deleted successfully
Delete VNF Package
------------------
@ -622,47 +791,60 @@ Delete VNF Package
.. code-block:: console
$ openstack vnf package list
+--------------------------------------+------------------+------------------+-------------+-------------------+-------------------------------------------------------------------------------------------------+
| Id | Vnf Product Name | Onboarding State | Usage State | Operational State | Links |
+--------------------------------------+------------------+------------------+-------------+-------------------+-------------------------------------------------------------------------------------------------+
| 156f1c4f-bfe2-492b-a079-a1bad32c0c3d | Sample VNF | ONBOARDED | NOT_IN_USE | ENABLED | { |
| | | | | | "self": { |
| | | | | | "href": "/vnfpkgm/v1/vnf_packages/156f1c4f-bfe2-492b-a079-a1bad32c0c3d" |
| | | | | | }, |
| | | | | | "packageContent": { |
| | | | | | "href": "/vnfpkgm/v1/vnf_packages/156f1c4f-bfe2-492b-a079-a1bad32c0c3d/package_content" |
| | | | | | } |
| | | | | | } |
+--------------------------------------+------------------+------------------+-------------+-------------------+-------------------------------------------------------------------------------------------------+
+--------------------------------------+------------------+------------------+-------------+-------------------+
| Id | Vnf Product Name | Onboarding State | Usage State | Operational State |
+--------------------------------------+------------------+------------------+-------------+-------------------+
| e712a702-741f-4093-a971-b3ad69411ac1 | Sample VNF | ONBOARDED | NOT_IN_USE | ENABLED |
+--------------------------------------+------------------+------------------+-------------+-------------------+
Update the Operational State to ``DISABLED``:
.. code-block:: console
$ openstack vnf package update \
--operational-state 'DISABLED' \
e712a702-741f-4093-a971-b3ad69411ac1
$ openstack vnf package update --operational-state 'DISABLED' \
156f1c4f-bfe2-492b-a079-a1bad32c0c3d
+-------------------+----------+
| Field | Value |
+-------------------+----------+
| Operational State | DISABLED |
+-------------------+----------+
Check the Operational State to be changed:
.. code-block:: console
$ openstack vnf package list
+--------------------------------------+------------------+------------------+-------------+-------------------+-------------------------------------------------------------------------------------------------+
| Id | Vnf Product Name | Onboarding State | Usage State | Operational State | Links |
+--------------------------------------+------------------+------------------+-------------+-------------------+-------------------------------------------------------------------------------------------------+
| 156f1c4f-bfe2-492b-a079-a1bad32c0c3d | Sample VNF | ONBOARDED | NOT_IN_USE | DISABLED | { |
| | | | | | "self": { |
| | | | | | "href": "/vnfpkgm/v1/vnf_packages/156f1c4f-bfe2-492b-a079-a1bad32c0c3d" |
| | | | | | }, |
| | | | | | "packageContent": { |
| | | | | | "href": "/vnfpkgm/v1/vnf_packages/156f1c4f-bfe2-492b-a079-a1bad32c0c3d/package_content" |
| | | | | | } |
| | | | | | } |
+--------------------------------------+------------------+------------------+-------------+-------------------+-------------------------------------------------------------------------------------------------+
+--------------------------------------+------------------+------------------+-------------+-------------------+
| Id | Vnf Product Name | Onboarding State | Usage State | Operational State |
+--------------------------------------+------------------+------------------+-------------+-------------------+
| e712a702-741f-4093-a971-b3ad69411ac1 | Sample VNF | ONBOARDED | NOT_IN_USE | DISABLED |
+--------------------------------------+------------------+------------------+-------------+-------------------+
Delete the VNF Package:
.. code-block:: console
$ openstack vnf package delete e712a702-741f-4093-a971-b3ad69411ac1
$ openstack vnf package delete 156f1c4f-bfe2-492b-a079-a1bad32c0c3d
All specified vnf-package(s) deleted successfully
Trouble Shooting
----------------
@ -670,7 +852,7 @@ Trouble Shooting
.. code-block:: console
devstack tacker-conductor[8132]: 2020-05-25 09:17:12.976 TRACE oslo_messaging.rpc.server tacker.common.exceptions.VnfInstantiationFailed: Vnf instantiation failed for vnf ca2fe9cb-afba-40a5-aec6-b7ef643b0208, error: ERROR: HEAT-E99001 Service neutron is not available for resource type OS::Neutron::QoSPolicy, reason: Required extension qos in neutron service is not available.
Vnf instantiation failed for vnf 810d8c9b-e467-4b06-9265-ac9dce015fce, error: ERROR: HEAT-E99001 Service neutron is not available for resource type OS::Neutron::QoSPolicy, reason: Required extension qos in neutron service is not available.
#. Edit ``/etc/neutron/neutron.conf``:
@ -679,28 +861,33 @@ Trouble Shooting
$ sudo vi /etc/neutron/neutron.conf
.. code-block:: diff
- service_plugins = ovn-router,networking_sfc.services.flowclassifier.plugin.FlowClassifierPlugin,networking_sfc.services.sfc.plugin.SfcPlugin
+ service_plugins = ovn-router,networking_sfc.services.flowclassifier.plugin.FlowClassifierPlugin,networking_sfc.services.sfc.plugin.SfcPlugin,neutron.services.qos.qos_plugin.QoSPlugin,qos
#. Edit ``/etc/neutron/plugins/ml2/ml2_conf.ini``:
.. code-block:: console
$ sudo vi /etc/neutron/plugins/ml2/ml2_conf.ini
.. code-block:: diff
- extension_drivers = port_security
+ extension_drivers = port_security,qos
#. Restart neutron services:
.. code-block:: console
$ sudo systemctl restart devstack@q-*
- Error in networking-sfc
#. Disable networking-sfc by editting ``/etc/neutron/neutron.conf``:
@ -709,6 +896,7 @@ Trouble Shooting
$ sudo vi /etc/neutron/neutron.conf
.. code-block:: diff
- service_plugins = ovn-router,networking_sfc.services.flowclassifier.plugin.FlowClassifierPlugin,networking_sfc.services.sfc.plugin.SfcPlugin,neutron.services.qos.qos_plugin.QoSPlugin,qos
@ -719,31 +907,34 @@ Trouble Shooting
- [flowclassifier]
- drivers = ovs
#. Edit ``/etc/neutron/plugins/ml2/ml2_conf.ini``:
.. code-block:: console
$ sudo vi /etc/neutron/plugins/ml2/ml2_conf.ini
.. code-block:: diff
- [agent]
- extensions = sfc
#. Restart neutron services:
.. code-block:: console
$ sudo systemctl restart devstack@q-*
.. [#] https://docs.openstack.org/tacker/latest/user/etsi_vnf_deployment_as_vm_with_tosca.html
.. [#] https://docs.openstack.org/tacker/latest/user/etsi_vnf_deployment_as_vm_with_user_data.html
.. [#] https://opendev.org/openstack/tacker/src/branch/master/samples/etsi_getting_started/tosca
.. [#] https://opendev.org/openstack/tacker/src/branch/master/samples/etsi_getting_started/userdata
.. [#] https://docs.openstack.org/tacker/latest/install/index.html
.. [#] https://docs.openstack.org/liberty/install-guide-ubuntu/keystone-openrc.html
.. [#] https://docs.openstack.org/tacker/latest/cli/index.html
.. [#] https://forge.etsi.org/rep/nfv/SOL001
.. [#] https://docs.openstack.org/tacker/latest/user/vnfd-sol001.html
.. [#] https://docs.openstack.org/python-openstackclient/pike/cli/command-objects/network.html
.. _vim_config.yaml: https://opendev.org/openstack/tacker/src/branch/master/samples/etsi_getting_started/tosca/vim/vim_config.yaml
.. _samples/etsi_getting_started/tosca:
https://opendev.org/openstack/tacker/src/branch/master/samples/etsi_getting_started/tosca
.. _samples/etsi_getting_started/userdata:
https://opendev.org/openstack/tacker/src/branch/master/samples/etsi_getting_started/userdata
.. _Create OpenStack client environment scripts:
https://docs.openstack.org/keystone/latest/install/keystone-openrc-rdo.html
.. _vim_config.yaml:
https://opendev.org/openstack/tacker/src/branch/master/samples/etsi_getting_started/tosca/vim/vim_config.yaml
.. _SOL001: https://forge.etsi.org/rep/nfv/SOL001
.. _network command: https://docs.openstack.org/python-openstackclient/latest/cli/command-objects/network.html

View File

@ -1,6 +1,11 @@
======================
v1/v2 Tacker Use Cases
======================
===================
v1 Tacker Use Cases
===================
.. note::
This is a document for Tacker v1 API.
See :doc:`/user/v2/use_case_guide` for Tacker v2 API.
VNF
@ -25,7 +30,7 @@ Container
:maxdepth: 1
etsi_containerized_vnf_usage_guide
etsi_cnf_helm_v2
Scale
^^^^^
@ -76,14 +81,6 @@ VM
etsi_vnf_update
Container
~~~~~~~~~
.. toctree::
:maxdepth: 1
etsi_cnf_update
Change External VNF Connectivity
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -95,26 +92,6 @@ VM
etsi_vnf_change_external_vnf_connectivity
Change Current VNF Package
^^^^^^^^^^^^^^^^^^^^^^^^^^
VM
~~
.. toctree::
:maxdepth: 1
etsi_vnf_change_current_vnf_package
etsi_vnf_change_current_vnf_package_with_standard_user_data
coordinate_api_client_in_coordinatevnf_script
Container
~~~~~~~~~
.. toctree::
:maxdepth: 1
etsi_cnf_change_current_vnf_package
Error Handling
^^^^^^^^^^^^^^
@ -123,8 +100,6 @@ Error Handling
:maxdepth: 1
etsi_vnf_error_handling
db_sync_error_handling
placement_error_handling
.. TODO(h-asahina): add `Action Driver`
* https://etherpad.opendev.org/p/tacker-wallaby-revise-docs
@ -135,8 +110,8 @@ Management Driver
.. TODO(h-asahina): add `Overview`
* https://etherpad.opendev.org/p/tacker-wallaby-revise-docs
Kubernetes Cluster VNF (v1 API)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Kubernetes Cluster VNF
~~~~~~~~~~~~~~~~~~~~~~
.. toctree::
:maxdepth: 1
@ -147,48 +122,22 @@ Kubernetes Cluster VNF (v1 API)
mgmt_driver_deploy_k8s_pv_usage_guide
mgmt_driver_deploy_k8s_kubespary_usage_guide
Ansible Driver (v1 API)
~~~~~~~~~~~~~~~~~~~~~~~
Ansible Driver
~~~~~~~~~~~~~~
.. toctree::
:maxdepth: 1
mgmt_driver_for_ansible_driver_usage_guide
Container Update (v1/v2 API)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Container Update
~~~~~~~~~~~~~~~~
.. toctree::
:maxdepth: 1
mgmt_driver_for_container_update
FaultNotification AutoHealing (v2 API)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. toctree::
:maxdepth: 1
fault_notification_use_case_guide
Prometheus Plugin
^^^^^^^^^^^^^^^^^
.. toctree::
:maxdepth: 1
prometheus_plugin_use_case_guide
Container
~~~~~~~~~
.. toctree::
:maxdepth: 1
etsi_cnf_auto_scaling_pm
etsi_cnf_auto_scaling_pm_threshold
etsi_cnf_auto_healing_fm
VNF Package
___________

File diff suppressed because it is too large Load Diff

View File

@ -2,7 +2,14 @@
ETSI NFV-SOL Change External VNF Connectivity
=============================================
This document describes how to change external VNF connectivity in Tacker.
This document describes how to change external VNF connectivity
in Tacker v1 API.
.. note::
This is a document for Tacker v1 API.
See :doc:`/user/v2/vnf/chg_ext_conn` for Tacker v2 API.
Prerequisites
-------------
@ -13,13 +20,16 @@ The following packages should be installed:
* python-tackerclient
A default VIM should be registered according to
:doc:`../cli/cli-legacy-vim`.
:doc:`/cli/cli-legacy-vim`.
The VNF Package(sample_vnf_pkg.zip) used below is prepared
by referring to :doc:`./vnf-package`.
The VNF Package(sample_vnf_package_csar.zip) used below is prepared
by referring to :doc:`/user/vnf-package`.
Execute before "Terminate VNF" in the procedure of
:doc:`./etsi_vnf_deployment_as_vm_with_tosca`.
The procedure of prepare for scaling operation that from "register VIM" to
"Instantiate VNF", basically refer to
:doc:`/user/etsi_vnf_deployment_as_vm_with_user_data`.
This procedure uses an example using the sample VNF package.
Change External VNF Connectivity
@ -32,7 +42,7 @@ Assuming that the following VNF instance exists,
this instance will be changed.
Details of CLI commands are described in
:doc:`../cli/cli-etsi-vnflcm`.
:doc:`/cli/cli-etsi-vnflcm`.
For changing external VNF connectivity, you need to prepare a JSON-formatted
definition file before running command for changing the connectivity.
@ -41,60 +51,66 @@ definition file before running command for changing the connectivity.
.. code-block:: json
{
"extVirtualLinks": [
{
"id": "ce38f1e7-4aec-4325-bb78-9c4411f113b5",
"resourceId": "1a4054c8-dd6b-444b-9604-7a8fc8c1cc0c",
"extCps": [
"extVirtualLinks": [
{
"cpdId": "VDU2_CP2",
"cpConfig": [
{
"cpProtocolData": [
"id": "a96d2f5b-c01a-48e1-813c-76132965042c",
"resourceId": "3019b1e7-99d8-4748-97ac-104922bc78d9",
"vimConnectionId": "79a97d01-e5f3-4eaa-b2bc-8f513ecb8a56",
"extCps": [
{
"layerProtocol": "IP_OVER_ETHERNET",
"ipOverEthernet":
{
"ipAddresses": [
"cpdId": "VDU1_CP2",
"cpConfig": [
{
"type": "IPV4",
"fixedAddresses": ["22.22.2.200"],
"subnetId": "25f4a13f-0c20-4fff-85aa-5349fc4efee8"
"cpProtocolData": [
{
"layerProtocol": "IP_OVER_ETHERNET",
"ipOverEthernet": {
"ipAddresses": [
{
"type": "IPV4",
"subnetId": "43c8f5fa-fefd-4bd4-a0df-f985b6969339"
}
]
}
}
]
}
]
}
]
}
]
]
}
],
"vimConnectionInfo": [
{
"id": "79a97d01-e5f3-4eaa-b2bc-8f513ecb8a56",
"vimType": "ETSINFV.OPENSTACK_KEYSTONE.v_2",
"vimConnectionId": "79a97d01-e5f3-4eaa-b2bc-8f513ecb8a56",
"interfaceInfo": {
"endpoint": "http://127.0.0.1/identity"
},
"accessInfo": {
"username": "nfv_user",
"region": "RegionOne",
"password": "devstack",
"tenant": "1994d69783d64c00aadab564038c2fd7"
}
]
}
]
],
"additionalParams": {
"lcm-operation-user-data": "./UserData/lcm_user_data.py",
"lcm-operation-user-data-class": "SampleUserData"
}
],
"vimConnectionInfo": [
{
"id": "4405b1a4-d967-4f72-9bd5-12f2852bd56b",
"vimType": "ETSINFV.OPENSTACK_KEYSTONE.v_2",
"vimConnectionId": "4405b1a4-d967-4f72-9bd5-12f2852bd56b",
"interfaceInfo":
{
"endpoint": "http://127.0.0.1/identity"
},
"accessInfo":
{
"username": "nfv_user",
"region": "RegionOne",
"password": "devstack",
"tenant": "6bdc3a89b3ee4cef9ff1676a22ae7f3b"
}
}
]
}
.. note:: sample_param_file.json contains all the data of port resource information.
if no setting is contained, it is treated as a change in information.
.. note::
sample_param_file.json contains all the data of port resource information.
If no setting is contained, it is treated as a change in information.
.. note::
The change external VNF Connectivity operation can change the
``vimConnectionInfo`` associated with an existing VNF instance.
Even if change external VNF Connectivity operation specify multiple
@ -102,6 +118,7 @@ definition file before running command for changing the connectivity.
them will be used for life cycle management operations.
It is not possible to delete the key of registered ``vimConnectionInfo``.
How to Change the Specific Port Setting
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@ -129,21 +146,54 @@ Result:
+--------------------------------------+------------------------------------------+-----------------+
Port information before operation:
.. code-block:: console
$ openstack port list --name PORT_NAME
+--------------------------------------+-------------------------------------------------------------------------------------------+-------------------+---------------------------------------------------------------------------+--------+
| ID | Name | MAC Address | Fixed IP Addresses | Status |
+--------------------------------------+-------------------------------------------------------------------------------------------+-------------------+---------------------------------------------------------------------------+--------+
| 0988d9dc-97ba-43be-944d-185e316785f9 | vnflcm_0c3644ff-b207-4a6a-9d3a-d1295cda153a-VDU1_scale-3x6qwnzbj6ep- | fa:16:3e:fb:f9:87 | ip_address='22.22.1.16', subnet_id='d290cae3-0dbc-44a3-a043-1a50ded04a64' | ACTIVE |
| | gfrxqjt6nfqb-2ufs4pbsedui-VDU1_CP2-riva4ygcbnyz | | | |
+--------------------------------------+-------------------------------------------------------------------------------------------+-------------------+---------------------------------------------------------------------------+--------+
$ openstack stack resource list e9d4576f-950c-4076-a54d-35b5cf43ebdd -n 2 --filter name=VDU1_CP2
+---------------+--------------------------------------+-------------------+-----------------+----------------------+-----------------------------------------------------------------------------------------------+
| resource_name | physical_resource_id | resource_type | resource_status | updated_time | stack_name |
+---------------+--------------------------------------+-------------------+-----------------+----------------------+-----------------------------------------------------------------------------------------------+
| VDU1_CP2 | 0988d9dc-97ba-43be-944d-185e316785f9 | OS::Neutron::Port | CREATE_COMPLETE | 2023-12-28T02:32:04Z | vnflcm_0c3644ff-b207-4a6a-9d3a-d1295cda153a-VDU1_scale-3x6qwnzbj6ep-gfrxqjt6nfqb-2ufs4pbsedui |
+---------------+--------------------------------------+-------------------+-----------------+----------------------+-----------------------------------------------------------------------------------------------+
$ openstack stack resource show \
vnflcm_0c3644ff-b207-4a6a-9d3a-d1295cda153a-VDU1_scale-3x6qwnzbj6ep-gfrxqjt6nfqb-2ufs4pbsedui \
VDU1_CP2 -f json | jq .attributes.fixed_ips
[
{
"subnet_id": "d290cae3-0dbc-44a3-a043-1a50ded04a64",
"ip_address": "22.22.1.16"
}
]
See `Heat CLI reference`_ for details on Heat CLI commands.
Change External VNF Connectivity execution of the entire VNF:
.. code-block:: console
$ openstack vnflcm change-ext-conn VNF_INSTANCE_ID \
./sample_param_file.json
./sample_param_file.json
Result:
.. code-block:: console
Change External VNF Connectivity for VNF Instance 725f625e-f6b7-4bcd-b1b7-7184039fde45 has been accepted.
Change External VNF Connectivity for VNF Instance 0c3644ff-b207-4a6a-9d3a-d1295cda153a has been accepted.
.. note::
Create a parameter file that describes the resource information to be changed in advance.
@ -158,84 +208,72 @@ Result:
.. code-block:: console
+--------------------------------------+------------------------------------------+-----------------+
| ID | Stack Name | Stack Status |
+--------------------------------------+------------------------------------------+-----------------+
| ad077101-b093-4785-9ca5-cc7c1379bb10 | vnf-9e086f34-b3c9-4986-b5e5-609a5ac4c1f9 | UPDATE_COMPLETE |
+--------------------------------------+------------------------------------------+-----------------+
+--------------------------------------+---------------------------------------------+-----------------+
| ID | Stack Name | Stack Status |
+--------------------------------------+---------------------------------------------+-----------------+
| e9d4576f-950c-4076-a54d-35b5cf43ebdd | vnflcm_0c3644ff-b207-4a6a-9d3a-d1295cda153a | UPDATE_COMPLETE |
+--------------------------------------+---------------------------------------------+-----------------+
.. note::
'Stack Status' transitions to UPDATE_COMPLETE.
'Stack Status' transitions to UPDATE_COMPLETE.
Stack resource information:
.. code-block:: console
$ openstack stack resource list ad077101-b093-4785-9ca5-cc7c1379bb10 -n 2
$ openstack stack resource list e9d4576f-950c-4076-a54d-35b5cf43ebdd \
-n 2 --filter name=VDU1
Result:
.. code-block:: console
+----------------------+--------------------------------------+----------------------------+-----------------+----------------------+-----------------------------------------------------------------------------------------------------+
| resource_name | physical_resource_id | resource_type | resource_status | updated_time | stack_name |
+----------------------+--------------------------------------+----------------------------+-----------------+----------------------+-----------------------------------------------------------------------------------------------------+
| 6mvcg7rftabt | 29f94441-bc14-4342-92f3-01eed02babb1 | VDU1.yaml | UPDATE_COMPLETE | 2021-03-25T06:02:42Z | vnflcm_8f054b70-93e9-46d5-a3bb-6404b99f91fb-VDU1_scale_group-gjwwa6637ur2 |
| ijarluromf6z | 42b84c3e-c017-4386-9dfa-f366bef5f42b | VDU2.yaml | UPDATE_COMPLETE | 2021-03-25T06:03:23Z | vnflcm_8f054b70-93e9-46d5-a3bb-6404b99f91fb-VDU2_scale_group-kjap6b2asrne |
| xmexppdgpb3d | 2a534d04-2f6a-4dd8-ba05-d79e0ced46e8 | VDU2.yaml | UPDATE_COMPLETE | 2021-03-25T06:03:24Z | vnflcm_8f054b70-93e9-46d5-a3bb-6404b99f91fb-VDU2_scale_group-kjap6b2asrne |
+----------------------+--------------------------------------+----------------------------+-----------------+----------------------+-----------------------------------------------------------------------------------------------------+
+---------------+--------------------------------------+------------------+-----------------+----------------------+-----------------------------------------------------------------------------------------------+
| resource_name | physical_resource_id | resource_type | resource_status | updated_time | stack_name |
+---------------+--------------------------------------+------------------+-----------------+----------------------+-----------------------------------------------------------------------------------------------+
| VDU1 | f32848eb-598f-4158-8896-5ea9479456de | OS::Nova::Server | UPDATE_COMPLETE | 2023-12-28T07:12:36Z | vnflcm_0c3644ff-b207-4a6a-9d3a-d1295cda153a-VDU1_scale-3x6qwnzbj6ep-gfrxqjt6nfqb-2ufs4pbsedui |
+---------------+--------------------------------------+------------------+-----------------+----------------------+-----------------------------------------------------------------------------------------------+
Stack resource detailed information:
Port resource information:
.. code-block:: console
$ openstack stack resource show 42b84c3e-c017-4386-9dfa-f366bef5f42b VDU2_CP2 --fit-width
$ openstack port list --name PORT_NAME
+--------------------------------------+-------------------------------------------------------------------------------------------+-------------------+----------------------------------------------------------------------------+--------+
| ID | Name | MAC Address | Fixed IP Addresses | Status |
+--------------------------------------+-------------------------------------------------------------------------------------------+-------------------+----------------------------------------------------------------------------+--------+
| 8fcc7ddf-45cb-4ff6-a17f-4b18b9ab6a63 | vnflcm_0c3644ff-b207-4a6a-9d3a-d1295cda153a-VDU1_scale-3x6qwnzbj6ep- | fa:16:3e:75:50:e8 | ip_address='10.10.0.136', subnet_id='43c8f5fa-fefd-4bd4-a0df-f985b6969339' | ACTIVE |
| | gfrxqjt6nfqb-2ufs4pbsedui-VDU1_CP2-gy4cxuefplkg | | | |
+--------------------------------------+-------------------------------------------------------------------------------------------+-------------------+----------------------------------------------------------------------------+--------+
$ openstack stack resource list e9d4576f-950c-4076-a54d-35b5cf43ebdd -n 2 --filter name=VDU1_CP2
+---------------+--------------------------------------+-------------------+-----------------+----------------------+-----------------------------------------------------------------------------------------------+
| resource_name | physical_resource_id | resource_type | resource_status | updated_time | stack_name |
+---------------+--------------------------------------+-------------------+-----------------+----------------------+-----------------------------------------------------------------------------------------------+
| VDU1_CP2 | 8fcc7ddf-45cb-4ff6-a17f-4b18b9ab6a63 | OS::Neutron::Port | CREATE_COMPLETE | 2023-12-28T07:12:35Z | vnflcm_0c3644ff-b207-4a6a-9d3a-d1295cda153a-VDU1_scale-3x6qwnzbj6ep-gfrxqjt6nfqb-2ufs4pbsedui |
+---------------+--------------------------------------+-------------------+-----------------+----------------------+-----------------------------------------------------------------------------------------------+
$ openstack stack resource show \
vnflcm_0c3644ff-b207-4a6a-9d3a-d1295cda153a-VDU1_scale-3x6qwnzbj6ep-gfrxqjt6nfqb-2ufs4pbsedui \
VDU1_CP2 -f json | jq .attributes.fixed_ips
[
{
"subnet_id": "43c8f5fa-fefd-4bd4-a0df-f985b6969339",
"ip_address": "10.10.0.136"
}
]
Result:
.. note::
.. code-block:: console
+------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Field | Value |
+------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| attributes | {'id': '958d4fd4-f579-4936-8898-04b6ec521a56', 'name': 'vnflcm_8f054b70-93e9-46d5-a3bb-6404b99f91fb-VDU2_scale_group-kjap6b2asrne-ijarluromf6z-zci6ve7ul27n-VDU2_CP2-i2k7w5mbvt7h', 'network_id': |
| | 'b6cd5128-4dd8-4564-89b4-879db6e12ada', 'tenant_id': 'f76fec29816c470e92c9d88c529802b9', 'mac_address': 'fa:16:3e:f1:c9:93', 'admin_state_up': True, 'status': 'ACTIVE', 'device_id': '0edf0aa8-be46-41af- |
| | abd6-6ba8440f1247', 'device_owner': 'compute:nova', 'fixed_ips': [{'subnet_id': '25f4a13f-0c20-4fff-85aa-5349fc4efee8', 'ip_address': '22.22.2.200'}], 'allowed_address_pairs': [], 'extra_dhcp_opts': [], |
| | 'security_groups': ['20f992ca-ad73-4d41-a503-0ad5866f6a84'], 'description': '', 'binding:vnic_type': 'normal', 'binding:profile': {}, 'binding:host_id': 'tackerhost', 'binding:vif_type': 'ovs', |
| | 'binding:vif_details': {'connectivity': 'l2', 'port_filter': True, 'ovs_hybrid_plug': False, 'datapath_type': 'system', 'bridge_name': 'tacker_bridge'}, 'port_security_enabled': True, 'qos_policy_id': None, |
| | 'qos_network_policy_id': None, 'resource_request': None, 'tags': [], 'created_at': '2021-04-12T00:05:00Z', 'updated_at': '2021-04-12T00:10:00Z', 'revision_number': 4, 'project_id': |
| | 'f76fec29816c470e92c9d88c529802b9'} |
+------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
.. note:: you can check "fixed_ips" in attributes field.
Another way to check is by using "openstack port" command.
.. code-block:: console
$ openstack port list --sort-column Name --fit-width
Result:
.. code-block:: console
+--------------------------------------+-----------------------------------------------------------------------------------+-------------------+-----------------------------------------------------------------------------------+--------+
| ID | Name | MAC Address | Fixed IP Addresses | Status |
+--------------------------------------+-----------------------------------------------------------------------------------+-------------------+-----------------------------------------------------------------------------------+--------+
| 958d4fd4-f579-4936-8898-04b6ec521a56 | vnflcm_8f054b70-93e9-46d5-a3bb-6404b99f91fb-VDU2_scale_group-kjap6b2asrne- | fa:16:3e:f1:c9:93 | ip_address='22.22.2.200', subnet_id='25f4a13f-0c20-4fff-85aa-5349fc4efee8' | ACTIVE |
| | ijarluromf6z-zci6ve7ul27n-VDU2_CP2-i2k7w5mbvt7h | | | |
+--------------------------------------+-----------------------------------------------------------------------------------+-------------------+-----------------------------------------------------------------------------------+--------+
See `Heat CLI reference`_. for details on Heat CLI commands.
'subnet_id' has been changed from 'd290cae3-0dbc-44a3-a043-1a50ded04a64'
to '43c8f5fa-fefd-4bd4-a0df-f985b6969339'.
'ip_address' has been changed from '22.22.1.16' to '10.10.0.136'.
.. _NFV-SOL002 v2.6.1 : https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/002/02.06.01_60/gs_NFV-SOL002v020601p.pdf
.. _Change External VNF Connectivity API reference : https://docs.openstack.org/api-ref/orchestration/v1/index.html
.. _Heat CLI reference : https://docs.openstack.org/python-openstackclient/latest/cli/plugin-commands/heat.html

View File

@ -3,7 +3,13 @@ ETSI NFV-SOL VNF Deployment as VM with TOSCA
============================================
This document describes how to deploy VNF as VM with TOSCA
in Tacker using CLI commands.
in Tacker v1 API using CLI commands.
.. note::
This is a document for Tacker v1 API.
Please note that this is not supported by Tacker v2 API.
Overview
--------
@ -13,9 +19,9 @@ The diagram below shows an overview of the VNF deployment.
1. 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 contain ``VNFD``. The detailed explanation of ``VNFD`` can be found
in :doc:`./vnf-package`.
uploading a VNF Package and requesting ``create VNF``. The VNF Package
should contain ``VNFD``. The detailed explanation of ``VNFD`` can be found
in :doc:`/user/vnf-package`.
2. Request instantiate VNF
@ -25,17 +31,16 @@ The diagram below shows an overview of the VNF deployment.
3. Call OpenStack Heat API
Upon receiving a request from tacker-client, tacker-server redirects it to
tacker-conductor. In tacker-conductor, the request is redirected again 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
to the contents of the instantiate parameters. Then, OpenStack infra-driver
calls OpenStack Heat APIs to create a VM as a VNF.
4. Create a VM
OpenStack Heat creates a VM according to the API calls.
.. figure:: ../_images/etsi_vnf_deployment_as_vm_with_tosca.png
:align: left
.. figure:: /_images/etsi_vnf_deployment_as_vm_with_tosca.png
Prerequisites
@ -47,10 +52,98 @@ The following packages should be installed:
* python-tackerclient
A default VIM should be registered according to
:doc:`../cli/cli-legacy-vim`.
:doc:`/cli/cli-legacy-vim`.
The VNF Package(sample_vnf_pkg.zip) used below is prepared
by referring to :doc:`./vnf-package`.
As an example, you can register default VIM as follow.
.. code-block:: console
$ cat vim_config.yaml
auth_url: "http://192.168.56.10/identity"
username: "admin"
password: "devstack"
project_name: "admin"
domain_name: "default"
project_domain_name: "default"
user_domain_name: "default"
cert_verify: "True"
$ openstack vim register --config-file vim_config.yaml \
--is-default openstack-admin-vim
+----------------+-----------------------------------------------------+
| Field | Value |
+----------------+-----------------------------------------------------+
| auth_cred | { |
| | "username": "admin", |
| | "user_domain_name": "default", |
| | "cert_verify": "True", |
| | "project_id": null, |
| | "project_name": "admin", |
| | "project_domain_name": "default", |
| | "auth_url": "http://192.168.56.10/identity/v3", |
| | "key_type": "barbican_key", |
| | "secret_uuid": "***", |
| | "password": "***" |
| | } |
| auth_url | http://192.168.56.10/identity/v3 |
| created_at | 2023-12-21 07:39:09.617234 |
| description | |
| extra | |
| id | 662e5f4f-3b16-4ca6-b560-28b62dd0e13b |
| is_default | True |
| name | openstack-admin-vim |
| placement_attr | { |
| | "regions": [ |
| | "RegionOne" |
| | ] |
| | } |
| project_id | 1994d69783d64c00aadab564038c2fd7 |
| status | ACTIVE |
| type | openstack |
| updated_at | None |
| vim_project | { |
| | "name": "admin", |
| | "project_domain_name": "default" |
| | } |
+----------------+-----------------------------------------------------+
The VNF Package(sample_vnf_package_csar.zip) used below is prepared
by referring to :doc:`/user/vnf-package`.
As an example, you can create a VNF Package as follow.
.. code-block:: console
$ cd TACKER_ROOT/samples/etsi_getting_started/tosca/sample_vnf_package_csar
$ zip sample_vnf_package_csar.zip -r Definitions/ Files/ TOSCA-Metadata/
updating: Definitions/ (stored 0%)
updating: Definitions/sample_vnfd_types.yaml (deflated 71%)
updating: Definitions/etsi_nfv_sol001_vnfd_types.yaml (deflated 84%)
updating: Definitions/etsi_nfv_sol001_common_types.yaml (deflated 77%)
updating: Definitions/sample_vnfd_df_simple.yaml (deflated 66%)
updating: Definitions/sample_vnfd_top.yaml (deflated 55%)
updating: Files/ (stored 0%)
updating: Files/images/ (stored 0%)
updating: Files/images/cirros-0.5.2-x86_64-disk.img (deflated 3%)
updating: TOSCA-Metadata/ (stored 0%)
updating: TOSCA-Metadata/TOSCA.meta (deflated 15%)
$ ll
...
drwxr-xr-x 2 stack stack 4096 Dec 21 08:50 Definitions/
drwxr-xr-x 3 stack stack 4096 Dec 21 03:53 Files/
-rw-rw-r-- 1 stack stack 15761428 Dec 21 08:50 sample_vnf_package_csar.zip
drwxr-xr-x 2 stack stack 4096 Dec 21 07:41 TOSCA-Metadata/
.. note::
In this document, ``TACKER_ROOT`` is the root of tacker's repository on
the server.
After you have done the above, you will have the sample VNF package
`sample_vnf_package_csar.zip`.
VNF Deployment Procedure as VM
@ -59,7 +152,7 @@ VNF Deployment Procedure as VM
In order to deploy VNF as 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`.
:doc:`/cli/cli-etsi-vnfpkgm` and :doc:`/cli/cli-etsi-vnflcm`.
1. Create VNF Package Info
@ -76,17 +169,23 @@ Result:
.. code-block:: console
+-------------------+----------------------------------------------------------------------------------------------------+
| Field | Value |
+-------------------+----------------------------------------------------------------------------------------------------+
| ID | e712a702-741f-4093-a971-b3ad69411ac1 |
| Links | packageContent=href=/vnfpkgm/v1/vnf_packages/e712a702-741f-4093-a971-b3ad69411ac1/package_content, |
| | self=href=s/vnfpkgm/v1/vnf_packages/e712a702-741f-4093-a971-b3ad69411ac1 |
| Onboarding State | CREATED |
| Operational State | DISABLED |
| Usage State | NOT_IN_USE |
| User Defined Data | |
+-------------------+----------------------------------------------------------------------------------------------------+
+-------------------+-------------------------------------------------------------------------------------------------+
| Field | Value |
+-------------------+-------------------------------------------------------------------------------------------------+
| ID | 156f1c4f-bfe2-492b-a079-a1bad32c0c3d |
| Links | { |
| | "self": { |
| | "href": "/vnfpkgm/v1/vnf_packages/156f1c4f-bfe2-492b-a079-a1bad32c0c3d" |
| | }, |
| | "packageContent": { |
| | "href": "/vnfpkgm/v1/vnf_packages/156f1c4f-bfe2-492b-a079-a1bad32c0c3d/package_content" |
| | } |
| | } |
| Onboarding State | CREATED |
| Operational State | DISABLED |
| Usage State | NOT_IN_USE |
| User Defined Data | {} |
+-------------------+-------------------------------------------------------------------------------------------------+
After that, execute the following CLI command and confirm that
@ -99,7 +198,7 @@ VNF Package creation was successful.
.. code-block:: console
$ openstack vnf package show VNF_PACKAGE_ID \
-c 'Onboarding State' -c 'Operational State' -c 'Usage State'
-c 'Onboarding State' -c 'Operational State' -c 'Usage State'
Result:
@ -122,14 +221,14 @@ Execute the following CLI command to upload VNF Package.
.. code-block:: console
$ openstack vnf package upload --path sample_csar.zip VNF_PACKAGE_ID
$ openstack vnf package upload --path sample_vnf_package_csar.zip VNF_PACKAGE_ID
Result:
.. code-block:: console
Upload request for VNF package e712a702-741f-4093-a971-b3ad69411ac1 has been accepted.
Upload request for VNF package 156f1c4f-bfe2-492b-a079-a1bad32c0c3d has been accepted.
After that, execute the following CLI command and confirm that
@ -142,13 +241,15 @@ VNF Package uploading was successful.
'Create VNF Identifier'.
.. note::
The state of 'Onboarding State' changes in the order of
'UPLOADING', 'PROCESSING', 'ONBOARDED'.
The state of 'Onboarding State' changes in the order of
'UPLOADING', 'PROCESSING', 'ONBOARDED'.
.. code-block:: console
$ openstack vnf package show VNF_PACKAGE_ID \
-c 'Onboarding State' -c 'Operational State' -c 'Usage State' -c 'VNFD ID'
-c 'Onboarding State' -c 'Operational State' -c 'Usage State' -c 'VNFD ID'
Result:
@ -179,21 +280,29 @@ Result:
.. code-block:: console
+--------------------------+----------------------------------------------------------------------------------------------+
| Field | Value |
+--------------------------+----------------------------------------------------------------------------------------------+
| ID | 725f625e-f6b7-4bcd-b1b7-7184039fde45 |
| Instantiation State | NOT_INSTANTIATED |
| Links | instantiate=href=/vnflcm/v1/vnf_instances/725f625e-f6b7-4bcd-b1b7-7184039fde45/instantiate, |
| | self=href=/vnflcm/v1/vnf_instances/725f625e-f6b7-4bcd-b1b7-7184039fde45 |
| VNF Instance Description | None |
| VNF Instance Name | None |
| VNF Product Name | Sample VNF |
| VNF Provider | Company |
| VNF Software Version | 1.0 |
| VNFD ID | b1bb0ce7-ebca-4fa7-95ed-4840d70a1177 |
| VNFD Version | 1.0 |
+--------------------------+----------------------------------------------------------------------------------------------+
+-----------------------------+------------------------------------------------------------------------------------------------------------------+
| Field | Value |
+-----------------------------+------------------------------------------------------------------------------------------------------------------+
| ID | 810d8c9b-e467-4b06-9265-ac9dce015fce |
| Instantiation State | NOT_INSTANTIATED |
| Links | { |
| | "self": { |
| | "href": "http://localhost:9890/vnflcm/v1/vnf_instances/810d8c9b-e467-4b06-9265-ac9dce015fce" |
| | }, |
| | "instantiate": { |
| | "href": "http://localhost:9890/vnflcm/v1/vnf_instances/810d8c9b-e467-4b06-9265-ac9dce015fce/instantiate" |
| | } |
| | } |
| VNF Configurable Properties | |
| VNF Instance Description | |
| VNF Instance Name | vnf-810d8c9b-e467-4b06-9265-ac9dce015fce |
| VNF Product Name | Sample VNF |
| VNF Provider | Company |
| VNF Software Version | 1.0 |
| VNFD ID | b1bb0ce7-ebca-4fa7-95ed-4840d70a1177 |
| VNFD Version | 1.0 |
| vnfPkgId | |
+-----------------------------+------------------------------------------------------------------------------------------------------------------+
After that, execute the following CLI command and confirm that
@ -205,8 +314,7 @@ VNF instance creation was successful.
.. code-block:: console
$ openstack vnf package show VNF_PACKAGE_ID \
-c 'Usage State'
$ openstack vnf package show VNF_PACKAGE_ID -c 'Usage State'
Result:
@ -222,8 +330,7 @@ Result:
.. code-block:: console
$ openstack vnflcm show VNF_INSTANCE_ID \
-c 'Instantiation State'
$ openstack vnflcm show VNF_INSTANCE_ID -c 'Instantiation State'
Result:
@ -246,10 +353,12 @@ These parameters will be set in the body of the instantiate request.
Required parameter:
* flavourID
* flavourId
.. note::
Details of flavourID is described in :doc:`./vnfd-sol001`.
Details of flavourId is described in :doc:`/user/vnfd-sol001`.
Optional parameters:
@ -257,28 +366,35 @@ Optional parameters:
* extVirtualLinks
* extManagedVirtualLinks
* vimConnectionInfo
* localizationLanguage
* additionalParams
* extensions
.. note::
You can skip ``vimConnectionInfo`` only when you have
the default VIM described in :doc:`../cli/cli-legacy-vim`.
You can skip ``vimConnectionInfo`` only when you have
the default VIM described in :doc:`/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.
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.
Param file with only required parameters:
An example of a param file with only required parameters:
.. code-block:: console
{
"flavourId":"simple"
"flavourId": "simple"
}
Param file with optional parameters:
An example of a param file with optional parameters:
.. code-block:: console
@ -287,47 +403,89 @@ Param file with optional parameters:
"instantiationLevelId": "instantiation_level_1",
"extVirtualLinks": [
{
"id": "net0",
"resourceId": "4bf3e646-7a24-4f04-a985-d8f4bb1203de", #Set the uuid of the network to use
"id": "279b0e12-2cc7-48d3-89dc-c58369841763",
"vimConnectionId": "4db40866-054f-472d-b559-811e5aa7195c",
"resourceProviderId": "Company",
"resourceId": "6a3aeb3a-fb8b-4d27-a5f1-4f148aeb303f",
"extCps": [
{
"cpdId": "CP1",
"cpConfig": [
{
"cpdId": "VDU1_CP1",
"cpConfig": {
"VDU1_CP1": {
"parentCpConfigId": "a9d72e2b-9b2f-48b8-9ca0-217ab3ba6f33",
"cpProtocolData": [
{
"layerProtocol": "IP_OVER_ETHERNET"
"layerProtocol": "IP_OVER_ETHERNET",
"ipOverEthernet": {
"ipAddresses": [
{
"type": "IPV4",
"numDynamicAddresses": 1,
"subnetId": "649c956c-1516-4d92-a6bc-ce936d8a880d"
}
]
}
}
]
}
]
}
}
],
"extLinkPorts": [
{
"id": "2871f033-5e38-4f5f-af26-09c6390648a8",
"resourceHandle": {
"resourceId": "389ade82-7618-4b42-bc90-5ebbac0863cf"
}
}
]
}
],
"extManagedVirtualLinks": [
{
"id": "c381e923-6208-43ac-acc9-f3afec76535a",
"vnfVirtualLinkDescId": "internalVL1",
"vimConnectionId": "4db40866-054f-472d-b559-811e5aa7195c",
"resourceProviderId": "Company",
"resourceId": "9a94da3c-239f-469d-8cf9-5313a4e3961a",
"extManagedMultisiteVirtualLinkId": "f850522e-c124-4ed9-8027-f15abc22e21d"
}
],
"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
"id": "e24f9796-a8e9-4cb0-85ce-5920dcddafa1",
"vimId": "8a0fd79d-e224-4c27-85f5-ee79c6e0d870",
"vimType": "ETSINFV.OPENSTACK_KEYSTONE.v_2"
}
]
],
"localizationLanguage": "ja",
"additionalParams": {
"key": "value"
},
"extensions": {
"key": "value"
}
}
samlple_param_file.json used in this document is below.
.. literalinclude:: ../../../samples/etsi_getting_started/tosca/lcm_instantiate_request/sample_param_file.json
:language: json
Execute the following CLI command to instantiate VNF instance.
.. code-block:: console
$ openstack vnflcm instantiate VNF_INSTANCE_ID \
./sample_param_file.json
$ 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.
Instantiate request for VNF Instance 810d8c9b-e467-4b06-9265-ac9dce015fce has been accepted.
After that, execute the following CLI command and confirm that
@ -337,8 +495,7 @@ VNF instance instantiation was successful.
.. code-block:: console
$ openstack vnflcm show VNF_INSTANCE_ID \
-c 'Instantiation State'
$ openstack vnflcm show VNF_INSTANCE_ID -c 'Instantiation State'
Result:
@ -352,7 +509,7 @@ Result:
+---------------------+--------------+
5. Terminate VNF
1. Terminate VNF
^^^^^^^^^^^^^^^^
Execute the following CLI command to terminate the VNF instance.
@ -366,7 +523,7 @@ Result:
.. code-block:: console
Terminate request for VNF Instance '725f625e-f6b7-4bcd-b1b7-7184039fde45' has been accepted.
Terminate request for VNF Instance '810d8c9b-e467-4b06-9265-ac9dce015fce' has been accepted.
After that, execute the following CLI command and confirm that
@ -377,7 +534,7 @@ VNF instance termination was successful.
.. code-block:: console
$ openstack vnflcm show VNF_INSTANCE_ID \
-c 'Instantiation State'
-c 'Instantiation State'
Result:
@ -405,7 +562,7 @@ Result:
.. code-block:: console
Vnf instance '725f625e-f6b7-4bcd-b1b7-7184039fde45' deleted successfully
Vnf instance '810d8c9b-e467-4b06-9265-ac9dce015fce' is deleted successfully
After that, execute the following CLI command and confirm that
@ -417,7 +574,7 @@ VNF instance deletion was successful.
.. code-block:: console
$ openstack vnf package show VNF_PACKAGE_ID \
-c 'Usage State'
-c 'Usage State'
Result:
@ -440,4 +597,5 @@ Result:
.. code-block:: console
Can not find requested vnf instance: 725f625e-f6b7-4bcd-b1b7-7184039fde45
Can not find requested vnf instance: 810d8c9b-e467-4b06-9265-ac9dce015fce

View File

@ -3,14 +3,24 @@ 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.
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::
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].
This is a document for Tacker v1 API.
See :doc:`/user/v2/vnf/deployment_with_user_data/index`
for Tacker v2 API.
.. note::
Most of the content is the same as
:doc:`/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
--------
@ -20,9 +30,10 @@ The diagram below shows an overview of the VNF deployment.
1. 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 contain ``BaseHOT`` and ``UserData`` in addition to ``VNFD``. The
detailed explanation of these contents can be found in :doc:`./vnf-package`.
uploading a VNF Package and requesting ``create VNF``. The VNF Package
should contain ``BaseHOT`` and ``UserData`` in addition to ``VNFD``.
The detailed explanation of these contents can be found in
:doc:`/user/vnf-package`.
2. Request instantiate VNF
@ -34,15 +45,15 @@ The diagram below shows an overview of the VNF deployment.
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
of the instantiate parameters. Then, OpenStack infra-driver calls OpenStack
Heat APIs to create a VM as a VNF.
4. Create a VM
OpenStack Heat creates a VM according to the API calls.
.. figure:: ../_images/etsi_vnf_deployment_as_vm_with_user_data.png
:align: left
.. figure:: /_images/etsi_vnf_deployment_as_vm_with_user_data.png
Prerequisites
-------------
@ -53,16 +64,18 @@ The following packages should be installed:
* python-tackerclient
A default VIM should be registered according to
:doc:`../cli/cli-legacy-vim`.
:doc:`/cli/cli-legacy-vim`.
The VNF Package(sample_vnf_pkg.zip) used below is prepared
by referring to :doc:`./vnf-package`.
The VNF Package(sample_vnf_package_csar.zip) used below is prepared
by referring to :doc:`/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 :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:`/user/vnf-package`.
VNF Deployment Procedure as VM
@ -71,28 +84,29 @@ 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`.
: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`,
Many procedures are the same as
:doc:`/user/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`.
See procedure in :doc:`/user/etsi_vnf_deployment_as_vm_with_tosca`.
2. Upload VNF Package
^^^^^^^^^^^^^^^^^^^^^
See procedure in :doc:`./etsi_vnf_deployment_as_vm_with_tosca`.
See procedure in :doc:`/user/etsi_vnf_deployment_as_vm_with_tosca`.
3. Create VNF Identifier
^^^^^^^^^^^^^^^^^^^^^^^^
See procedure in :doc:`./etsi_vnf_deployment_as_vm_with_tosca`.
See procedure in :doc:`/user/etsi_vnf_deployment_as_vm_with_tosca`.
4. Instantiate VNF
@ -108,18 +122,21 @@ Required parameter:
* additionalParams
.. note::
Details of flavourId is described in :doc:`./vnfd-sol001`.
Details of flavourId is described in :doc:`/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
[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:
@ -129,17 +146,21 @@ Optional parameters:
* vimConnectionInfo
.. note::
You can skip ``vimConnectionInfo`` only when you have
the default VIM described in :doc:`../cli/cli-legacy-vim`.
You can skip ``vimConnectionInfo`` only when you have
the default VIM described in :doc:`/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.
Param file with only required parameters:
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:
.. code-block:: console
@ -151,7 +172,8 @@ Param file with only required parameters:
}
}
Param file with optional parameters:
An example of a param file with optional parameters:
.. code-block:: console
@ -203,19 +225,24 @@ Param file with optional parameters:
}
samlple_param_file.json used in this document is below.
.. literalinclude:: ../../../samples/etsi_getting_started/userdata/lcm_instantiate_request/sample_param_file.json
:language: json
Execute the following CLI command to instantiate the VNF instance.
.. code-block:: console
$ openstack vnflcm instantiate VNF_INSTANCE_ID \
./sample_param_file.json
$ 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.
Instantiate request for VNF Instance 810d8c9b-e467-4b06-9265-ac9dce015fce has been accepted.
After that, execute the following CLI command and confirm that
@ -225,8 +252,7 @@ VNF instance instantiation was successful.
.. code-block:: console
$ openstack vnflcm show VNF_INSTANCE_ID \
-c 'Instantiation State'
$ openstack vnflcm show VNF_INSTANCE_ID -c 'Instantiation State'
Result:
@ -243,14 +269,14 @@ Result:
5. Terminate VNF
^^^^^^^^^^^^^^^^
See procedure in :doc:`./etsi_vnf_deployment_as_vm_with_tosca`.
See procedure in :doc:`/user/etsi_vnf_deployment_as_vm_with_tosca`.
6. Delete VNF Identifier
^^^^^^^^^^^^^^^^^^^^^^^^
See procedure in :doc:`./etsi_vnf_deployment_as_vm_with_tosca`.
See procedure in :doc:`/user/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

View File

@ -2,7 +2,13 @@
ETSI NFV-SOL VNF error-handling
===============================
This document describes how to error-handling VNF in Tacker.
This document describes how to error-handling VNF in Tacker v1 API.
.. note::
This is a document for Tacker v1 API.
See :doc:`/user/v2/error_handling` for Tacker v2 API.
Prerequisites
-------------
@ -13,14 +19,17 @@ The following packages should be installed:
* python-tackerclient
A default VIM should be registered according to
:doc:`../cli/cli-legacy-vim`.
:doc:`/cli/cli-legacy-vim`.
The VNF Package(sample_vnf_pkg.zip) used below is prepared
by referring to :doc:`./vnf-package`.
The VNF Package(sample_vnf_package_csar.zip) used below is prepared
by referring to :doc:`/user/vnf-package`.
Execute up to "Instantiate VNF" in the procedure of
:doc:`./etsi_vnf_deployment_as_vm_with_tosca`.
In other words, the procedure after "Terminate VNF" is not executed.
The procedure of prepare for healing operation that from "register VIM" to
"Instantiate VNF", basically refer to
:doc:`/user/etsi_vnf_deployment_as_vm_with_tosca` or
:doc:`/user/etsi_vnf_deployment_as_vm_with_user_data`.
This procedure uses an example using the sample VNF package.
VNF Error-handling Procedures
@ -30,7 +39,7 @@ As mentioned in Prerequisites, the VNF must be created
before performing error-handling.
Details of CLI commands are described in
:doc:`../cli/cli-etsi-vnflcm`.
:doc:`/cli/cli-etsi-vnflcm`.
There are some operations to error-handling VNF.
@ -46,17 +55,10 @@ First, the method of specifying the ID will be described.
Identify VNF_LCM_OP_OCC_ID
~~~~~~~~~~~~~~~~~~~~~~~~~~
To identify the VNF_LCM_OP_OCC_ID, you can get with the following ways.
* to check with CLI
* to check with notification API body
You can choose both ways.
This case uses openstack CLI:
The VNF_LCM_OP_OCC_ID can be obtained via CLI.
Details of CLI commands are described in
:doc:`../cli/cli-etsi-vnflcm`.
:doc:`/cli/cli-etsi-vnflcm`.
Before checking the "VNF_LCM_OP_OCC_ID", you should get VNF_INSTANCE_ID first.
@ -69,232 +71,49 @@ Result:
.. code-block:: console
+--------------------------------------+-----------------+--------------------------------------+-----------------+
| ID | Operation State | VNF Instance ID | Operation |
+--------------------------------------+-----------------+--------------------------------------+-----------------+
| 304538dd-d754-4661-9f17-5496dab9693d | FAILED_TEMP | 3aa5c054-c162-4d5e-9808-0bc30f92a4c7 | INSTANTIATE |
+--------------------------------------+-----------------+--------------------------------------+-----------------+
For this case, check notification API body:
In checking with Notification API, you should execute the following steps:
* Create a new subscription
* Execute LCM operations, such as 'Creates a new VNF instance resource'.
The procedure for executing the API using the curl command is shown below.
First, the method of generating Keystone-tokens will be described.
See `Keystone API reference`_. for details on Keystone APIs.
For **<username>** and **<password>**, **<project_name>**,
set values according to your environment.
Prepare get_token.json file to get token:
.. code-block:: json
{
"auth": {
"identity": {
"methods": [
"password"
],
"password": {
"user": {
"name": "<username>",
"password": "<password>",
"domain": {
"name": "Default"
}
}
}
},
"scope": {
"project": {
"name": "<project_name>",
"domain": {
"name": "Default"
}
}
}
}
}
Get token:
.. code-block:: console
$ curl -i -X POST -H "Content-Type: application/json" -d @./get_token.json "$OS_AUTH_URL/v3/auth/tokens"
Result:
.. code-block:: console
HTTP/1.1 201 CREATED
Date: Tue, 17 Nov 2020 08:01:44 GMT
Server: Apache/2.4.41 (Ubuntu)
Content-Type: application/json
Content-Length: 7187
X-Subject-Token: gAAAAABfs4No8WVYIPagnJvnnImNHq_918oLgOiJwSXqXGJKfv_FEcgfeZajIl0NCk7Pr6YMn1Sa96ZhOnWioKGrOxBSEGVxgYqBFx3bFfKAHVmzgoEaN6zfHZvbm1QJgoeg1QV5i-VjfeeQRWZptYqd3yWMLzrWSfVBER9pL-nRi0CvMXJM0yE
Vary: X-Auth-Token
x-openstack-request-id: req-6b19a1ee-0eb0-4aa8-97e7-c54d750c9b64
Connection: close
...snip response-body...
Set the value of **X-Subject-Token** included in the above result to
the environment variable **$OS_AUTH_TOKEN**.
.. code-block:: console
$ export OS_AUTH_TOKEN="gAAAAABfs4No8WVYIPagnJvnnImNHq_918oLgOiJwSXqXGJKfv_FEcgfeZajIl0NCk7Pr6YMn1Sa96ZhOnWioKGrOxBSEGVxgYqBFx3bFfKAHVmzgoEaN6zfHZvbm1QJgoeg1QV5i-VjfeeQRWZptYqd3yWMLzrWSfVBER9pL-nRi0CvMXJM0yE"
Create subscription:
.. code-block:: console
$ curl -g -i -X POST http://127.0.0.1:9890/vnflcm/v1/subscriptions \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "X-Auth-Token: $OS_AUTH_TOKEN" \
-d '{"callbackUri": "http://127.0.0.1/"}'
Result:
.. code-block:: console
HTTP/1.1 201 Created
Content-Length: 199
Location: http://localhost:9890//vnflcm/v1/subscriptions/5bd3b81d-a6e9-45e7-922e-adc26328322d
Content-Type: application/json
X-Openstack-Request-Id: req-5f98782d-ca47-4144-a413-bd9641302f77
Date: Mon, 21 Dec 2020 08:21:47 GMT
{"id": "5bd3b81d-a6e9-45e7-922e-adc26328322d", "callbackUri": "http://127.0.0.1/", "_links": {"self": {"href": "http://localhost:9890//vnflcm/v1/subscriptions/5bd3b81d-a6e9-45e7-922e-adc26328322d"}}}
Show subscription:
.. code-block:: console
$ curl -g -i -X GET http://127.0.0.1:9890/vnflcm/v1/subscriptions/{subscriptionId} \
-H "Accept: application/json" \
-H "X-Auth-Token: $OS_AUTH_TOKEN"
Result:
.. code-block:: console
HTTP/1.1 200 OK
Content-Length: 213
Content-Type: application/json
X-Openstack-Request-Id: req-2d7503dc-1f75-40de-9d75-7c01180aee89
Date: Mon, 21 Dec 2020 08:22:59 GMT
{"id": "5bd3b81d-a6e9-45e7-922e-adc26328322d", "filter": {}, "callbackUri": "http://127.0.0.1/", "_links": {"self": {"href": "http://localhost:9890//vnflcm/v1/subscriptions/5bd3b81d-a6e9-45e7-922e-adc26328322d"}}}
Show VNF LCM operation occurrence:
.. code-block:: console
$ curl -g -i -X GET http://127.0.0.1:9890/vnflcm/v1/vnf_lcm_op_occs/{vnfLcmOpOccId} \
-H "Accept: application/json" \
-H "X-Auth-Token: $OS_AUTH_TOKEN"
Result:
.. code-block:: console
HTTP/1.1 200 OK
Content-Length: 3082
Content-Type: application/json
X-Openstack-Request-Id: req-d0720ffc-e7ee-4ee2-af61-a9a4a91c67cb
Date: Mon, 21 Dec 2020 08:30:25 GMT
{"id": "e3dc7530-e699-46ed-b65e-32911af1e414", "operationState": "FAILED_TEMP", "stateEnteredTime": "2020-12-21 06:52:06+00:00",
...snip response-body...
$ openstack vnflcm op list
+--------------------------------------+-----------------+--------------------------------------+-------------+
| ID | Operation State | VNF Instance ID | Operation |
+--------------------------------------+-----------------+--------------------------------------+-------------+
| c7afb90a-351b-4d33-a945-8f937deeadb4 | FAILED_TEMP | d45ae5cb-121b-4420-bc97-6a00f5fa63b6 | INSTANTIATE |
+--------------------------------------+-----------------+--------------------------------------+-------------+
Error-handling can be executed only when **operationState** is **FAILED_TMP**.
With the above LCM operation trigger, 'Notification' is sent to
the **callbackUri** set in 'Create a new subscription'.
If the Subscription is registered, the above operation trigger
that caused the FAILED_TEMP send a 'Notification' to the **callbackUri**
of the Subscription.
**vnfLcmOpOccId** included in this 'Notification' corresponds
to VNF_LCM_OP_OCC_ID.
See `VNF LCM v1 API`_ and `VNF LCM v2 API`_
for details on the APIs used here.
See `VNF LCM v1 API`_ for details on the APIs used here.
Rollback VNF LCM Operation
~~~~~~~~~~~~~~~~~~~~~~~~~~
.. note::
Rollback of Scale-Out has a difference in operation result between v1 and v2.
In v1, the oldest VNFc(VM) is deleted. In v2, the newest VNFc(VM) is deleted.
.. list-table::
:widths: 10 40 15 15 10 10
:widths: 10 40 15 15
:header-rows: 1
* - LCM Operation
- Description of Rollback
- Precondition
- Postcondition
- Support in v1
- Support in v2
* - Instantiate
- | VNFM removes all VMs and resources.
| e.g. Tacker executes Heat stack-delete for deletion of the target VM.
- FAILED_TEMP
- ROLLED_BACK or FAILED_TEMP
- X
- X
* - Scale-out
- | VNFM reverts changes of VMs and resources specified in the middle of scale-out operation.
| There are differences in the operation results of v1 and v2. See note.
| As a result, the oldest VNFc(VM) is deleted.
| e.g. Tacker reverts desired_capacity and executes Heat stack-update.
- FAILED_TEMP
- ROLLED_BACK or FAILED_TEMP
- X
- X
* - Modify
- VNFM reverts the update of the VNF instance information.
- FAILED_TEMP
- ROLLED_BACK or FAILED_TEMP
-
- X
* - Change external connectivity
- | VNFM reverts changes of the external connectivity for VNF instances.
| e.g. Tacker reverts stack parameters and executes Heat stack-update.
- FAILED_TEMP
- ROLLED_BACK or FAILED_TEMP
-
- X
* - Change Current VNF Package
- | VNFM reverts changes of current vnf package for VNF instances.
| e.g. Tacker reverts stack parameters and executes Heat stack-update.
- FAILED_TEMP
- ROLLED_BACK or FAILED_TEMP
-
- X
.. note::
| In some cases, Rollback of Change external connectivity cannot recover
the IP address and Port Id of virtual resources.
| If the operation fails before performing VIM processing: updating stack,
the IP address and Port Id will be recovered by its rollback operation.
| Otherwise, dynamic IP address and Port Id are not recovered
by rollback operation.
This manual describes the following operations as use cases for
rollback operations.
@ -315,7 +134,8 @@ Result:
.. code-block:: console
Failed to delete vnf instance with ID '3aa5c054-c162-4d5e-9808-0bc30f92a4c7': Vnf 3aa5c054-c162-4d5e-9808-0bc30f92a4c7 in status ERROR. Cannot delete while the vnf is in this state.
Failed to delete vnf instance with ID 'd45ae5cb-121b-4420-bc97-6a00f5fa63b6': Vnf d45ae5cb-121b-4420-bc97-6a00f5fa63b6 in status ERROR. Cannot delete while the vnf is in this state.
Failed to delete 1 of 1 vnf instances.
Therefore, "Rollback VNF lifecycle management operation" with
@ -330,7 +150,7 @@ Result:
.. code-block:: console
Rollback request for LCM operation 304538dd-d754-4661-9f17-5496dab9693d has been accepted
Rollback request for LCM operation c7afb90a-351b-4d33-a945-8f937deeadb4 has been accepted
If "Rollback VNF lifecycle management operation" is successful,
@ -345,64 +165,45 @@ Result:
.. code-block:: console
Vnf instance '3aa5c054-c162-4d5e-9808-0bc30f92a4c7' deleted successfully
Vnf instance 'd45ae5cb-121b-4420-bc97-6a00f5fa63b6' is deleted successfully
Fail VNF LCM Operation
~~~~~~~~~~~~~~~~~~~~~~
.. list-table::
:widths: 10 40 15 15 10 10
:widths: 10 40 15 15
:header-rows: 1
* - LCM Operation
- Description of Fail
- Precondition
- Postcondition
- Support in v1
- Support in v2
* - Instantiate
- Tacker simply changes LCM operation state to "FAILED" on Tacker-DB.
- FAILED_TEMP
- FAILED
- X
- X
* - Terminate
- Tacker simply changes LCM operation state to "FAILED" on Tacker-DB.
- FAILED_TEMP
- FAILED
- X
- X
* - Heal
- Tacker simply changes LCM operation state to "FAILED" on Tacker-DB.
- FAILED_TEMP
- FAILED
- X
- X
* - Scale
- Tacker simply changes LCM operation state to "FAILED" on Tacker-DB.
- FAILED_TEMP
- FAILED
- X
- X
* - Modify
- Tacker simply changes LCM operation state to "FAILED" on Tacker-DB.
- FAILED_TEMP
- FAILED
- X
- X
* - Change external connectivity
- Tacker simply changes LCM operation state to "FAILED" on Tacker-DB.
- FAILED_TEMP
- FAILED
- X
- X
* - Change Current VNF Package
- Tacker simply changes LCM operation state to "FAILED" on Tacker-DB.
- FAILED_TEMP
- FAILED
-
- X
This manual describes the following operations as use cases for
fail operations.
@ -423,7 +224,8 @@ Result:
.. code-block:: console
Failed to delete vnf instance with ID '3aa5c054-c162-4d5e-9808-0bc30f92a4c7': Vnf 3aa5c054-c162-4d5e-9808-0bc30f92a4c7 in status ERROR. Cannot delete while the vnf is in this state.
Failed to delete vnf instance with ID 'd45ae5cb-121b-4420-bc97-6a00f5fa63b6': Vnf d45ae5cb-121b-4420-bc97-6a00f5fa63b6 in status ERROR. Cannot delete while the vnf is in this state.
Failed to delete 1 of 1 vnf instances.
Therefore, "Fail VNF lifecycle management operation" with
@ -438,7 +240,59 @@ Result:
.. code-block:: console
Fail request for LCM operation 304538dd-d754-4661-9f17-5496dab9693d has been accepted
+-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Field | Value |
+-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Error | { |
| | "title": "", |
| | "status": 500, |
| | "detail": "ProblemDetails(created_at=<?>,deleted=0,deleted_at=<?>,detail='Vnf instantiation wait failed for vnf d45ae5cb-121b-4420-bc97-6a00f5fa63b6, error: VNF Create Resource CREATE failed: ResourceInError: |
| | resources.VDU1.resources.ril4bssciahp.resources.VDU1: Went to status ERROR due to \"Message: Build of instance 6dacc4a4-948f-4f40-97cf-2caeecbba013 aborted: privsep helper command exited non-zero (1), Code: |
| | 500\"',status=500,title='',updated_at=<?>)" |
| | } |
| ID | c7afb90a-351b-4d33-a945-8f937deeadb4 |
| Is Automatic Invocation | False |
| Is Cancel Pending | False |
| Links | { |
| | "self": { |
| | "href": "http://localhost:9890/vnflcm/v1/vnf_lcm_op_occs/c7afb90a-351b-4d33-a945-8f937deeadb4" |
| | }, |
| | "vnfInstance": { |
| | "href": "http://localhost:9890/vnflcm/v1/vnf_instances/d45ae5cb-121b-4420-bc97-6a00f5fa63b6" |
| | }, |
| | "retry": { |
| | "href": "http://localhost:9890/vnflcm/v1/vnf_lcm_op_occs/c7afb90a-351b-4d33-a945-8f937deeadb4/retry" |
| | }, |
| | "rollback": { |
| | "href": "http://localhost:9890/vnflcm/v1/vnf_lcm_op_occs/c7afb90a-351b-4d33-a945-8f937deeadb4/rollback" |
| | }, |
| | "grant": { |
| | "href": "http://localhost:9890/vnflcm/v1/vnf_lcm_op_occs/c7afb90a-351b-4d33-a945-8f937deeadb4/grant" |
| | }, |
| | "fail": { |
| | "href": "http://localhost:9890/vnflcm/v1/vnf_lcm_op_occs/c7afb90a-351b-4d33-a945-8f937deeadb4/fail" |
| | } |
| | } |
| Operation | INSTANTIATE |
| Operation State | FAILED |
| Start Time | 2023-12-27 07:05:59+00:00 |
| State Entered Time | 2024-01-18 01:40:55.105358+00:00 |
| VNF Instance ID | d45ae5cb-121b-4420-bc97-6a00f5fa63b6 |
| grantId | None |
| operationParams | "{\"flavourId\": \"simple\", \"instantiationLevelId\": \"instantiation_level_1\", \"extVirtualLinks\": [{\"id\": \"91bcff6d-4703-4ba9-b1c2-009e6db92a9c\", \"resourceId\": \"3019b1e7-99d8-4748-97ac-104922bc78d9\", |
| | \"vimConnectionId\": \"79a97d01-e5f3-4eaa-b2bc-8f513ecb8a56\", \"extCps\": [{\"cpdId\": \"VDU1_CP1\", \"cpConfig\": [{\"linkPortId\": \"6b7c0b3a-cc2d-4b94-9f6f-81df69a7cc2f\"}]}, {\"cpdId\": \"VDU2_CP1\", \"cpConfig\": |
| | [{\"linkPortId\": \"02d867e7-b955-4b4a-b92f-c78c7ede63bf\"}]}], \"extLinkPorts\": [{\"id\": \"6b7c0b3a-cc2d-4b94-9f6f-81df69a7cc2f\", \"resourceHandle\": {\"vimConnectionId\": \"79a97d01-e5f3-4eaa-b2bc-8f513ecb8a56\", |
| | \"resourceId\": \"972a375d-921f-46f5-bfdb-19af95fc49e1\"}}, {\"id\": \"02d867e7-b955-4b4a-b92f-c78c7ede63bf\", \"resourceHandle\": {\"vimConnectionId\": \"79a97d01-e5f3-4eaa-b2bc-8f513ecb8a56\", \"resourceId\": |
| | \"b853b5c5-cd97-4dfb-8750-cac6e5c62477\"}}]}, {\"id\": \"a96d2f5b-c01a-48e1-813c-76132965042c\", \"resourceId\": \"589a045a-65d9-4f4d-a9b3-35aa655374d0\", \"vimConnectionId\": \"79a97d01-e5f3-4eaa-b2bc-8f513ecb8a56\", |
| | \"extCps\": [{\"cpdId\": \"VDU1_CP2\", \"cpConfig\": [{\"cpProtocolData\": [{\"layerProtocol\": \"IP_OVER_ETHERNET\", \"ipOverEthernet\": {\"ipAddresses\": [{\"type\": \"IPV4\", \"fixedAddresses\": [\"22.22.1.10\"], |
| | \"subnetId\": \"d290cae3-0dbc-44a3-a043-1a50ded04a64\"}]}}]}]}, {\"cpdId\": \"VDU2_CP2\", \"cpConfig\": [{\"cpProtocolData\": [{\"layerProtocol\": \"IP_OVER_ETHERNET\", \"ipOverEthernet\": {\"ipAddresses\": [{\"type\": |
| | \"IPV4\", \"fixedAddresses\": [\"22.22.1.20\"], \"subnetId\": \"d290cae3-0dbc-44a3-a043-1a50ded04a64\"}]}}]}]}]}], \"extManagedVirtualLinks\": [{\"id\": \"8f9d8da0-2386-4f00-bbb0-860f50d32a5a\", \"vnfVirtualLinkDescId\": |
| | \"internalVL1\", \"resourceId\": \"0e498d08-ed3a-4212-83e0-1b6808f6fcb6\"}, {\"id\": \"11d68761-aab7-419c-955c-0c6497f13692\", \"vnfVirtualLinkDescId\": \"internalVL2\", \"resourceId\": \"38a8d4ba- |
| | ac1b-41a2-a92b-ff2a3e5e9b12\"}], \"vimConnectionInfo\": [{\"id\": \"79a97d01-e5f3-4eaa-b2bc-8f513ecb8a56\", \"vimType\": \"ETSINFV.OPENSTACK_KEYSTONE.v_2\", \"vimConnectionId\": \"79a97d01-e5f3-4eaa-b2bc-8f513ecb8a56\", |
| | \"interfaceInfo\": {\"endpoint\": \"http://127.0.0.1/identity\"}, \"accessInfo\": {\"username\": \"nfv_user\", \"region\": \"RegionOne\", \"password\": \"devstack\", \"tenant\": \"1994d69783d64c00aadab564038c2fd7\"}}], |
| | \"additionalParams\": {\"lcm-operation-user-data\": \"./UserData/lcm_user_data.py\", \"lcm-operation-user-data-class\": \"SampleUserData\"}}" |
| resourceChanges | {} |
+-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
If "Fail VNF lifecycle management operation" is successful,
@ -453,64 +307,45 @@ Result:
.. code-block:: console
Vnf instance '3aa5c054-c162-4d5e-9808-0bc30f92a4c7' deleted successfully
Vnf instance 'd45ae5cb-121b-4420-bc97-6a00f5fa63b6' is deleted successfully
Retry VNF LCM Operation
~~~~~~~~~~~~~~~~~~~~~~~
.. list-table::
:widths: 10 40 15 15 10 10
:widths: 10 40 15 15
:header-rows: 1
* - LCM Operation
- Description of Fail
- Precondition
- Postcondition
- Support in v1
- Support in v2
* - Instantiate
- VNFM retries a Instantiate operation.
- FAILED_TEMP
- COMPLETED or FAILED_TEMP
- X
- X
* - Terminate
- VNFM retries a Terminate operation.
- FAILED_TEMP
- COMPLETED or FAILED_TEMP
- X
- X
* - Heal
- VNFM retries a Heal operation.
- FAILED_TEMP
- COMPLETED or FAILED_TEMP
- X
- X
* - Scale
- VNFM retries a Scale operation.
- FAILED_TEMP
- COMPLETED or FAILED_TEMP
- X
- X
* - Modify
- VNFM retries a Modify operation.
- FAILED_TEMP
- COMPLETED or FAILED_TEMP
- X
- X
* - Change external connectivity
- VNFM retries a Change external connectivity operation.
- FAILED_TEMP
- COMPLETED or FAILED_TEMP
- X
- X
* - Change Current VNF Package
- VNFM retries a Change Current VNF Package operation.
- FAILED_TEMP
- COMPLETED or FAILED_TEMP
-
- X
This manual describes the following operations as use cases for
retry operations.
@ -533,193 +368,11 @@ Result:
.. code-block:: console
Retry request for LCM operation 304538dd-d754-4661-9f17-5496dab9693d has been accepted
Retry request for LCM operation c7afb90a-351b-4d33-a945-8f937deeadb4 has been accepted
If "Retry VNF lifecycle management operation" is successful,
then another LCM can be operational.
Error-handling of MgmtDriver
----------------------------
This section only applies to the `VNF LCM v2 API`_.
Error-handling includes Retry, Rollback and Fail operations.
* For the fail operation, it will not perform LCM when it is executed,
so there is no need to use MgmtDriver.
* For the retry operation, it will perform the LCM again when it is executed,
so as long as the LCM is configured with MgmtDriver, the MgmtDriver will
also be called during the retry operation, and no additional configuration
is required.
* For the rollback operation,
because there is no definition of ``rollback_start`` and ``rollback_end`` in
``6.7 Interface Types`` of `NFV-SOL001 v3.3.1`_, so when the rollback
operation is performed, MgmtDriver will not be called.
The VNFD in the VNF Package must be modified before calling MgmtDriver in the
rollback operation.
.. note::
In the MgmtDriver, the user saves the data that needs to be kept
when the LCM fails in the ``user_script_err_handling_data`` variable.
It is saved in the corresponding VNF_LCM_OP_OCC, and can be viewed through
`Show VNF LCM OP OCC`_.
During error-handling (retry or rollback), use the data in the
``user_script_err_handling_data`` variable to perform corresponding
processing.
Modifications of VNF Package
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Users need to make the following modifications when creating a `VNF Package`_.
The rollback operation currently supports multiple `LCM operations`_.
The following takes the rollback operations of instantiate and scale-out
as examples to demonstrate how to modify VNFD.
.. note::
The following provides the sample files ``v2_sample2_df_simple.yaml`` and
``v2_sample2_types.yaml`` that need to be modified, which are stored in
the Definitions directory of the VNF Package.
* ``v2_sample2_df_simple.yaml`` corresponds to
`Topology Template Files`_ in VNFD.
* ``v2_sample2_types.yaml`` corresponds to
`User defined types definition file`_ in VNFD.
* In ``v2_sample2_df_simple.yaml``, ``xxx_rollback_start`` and
``xxx_rollback_end`` need to be added under
``topology_template.node_templates.VNF.interfaces.Vnflcm``.
The following is the content of ``v2_sample2_df_simple.yaml``, the unmodified
part is replaced by "``...``" :
.. code-block:: yaml
topology_template:
...
node_templates:
VNF:
type: company.provider.VNF
properties:
flavour_description: A simple flavour
interfaces:
Vnflcm:
instantiate_start:
implementation: mgmt-driver-script
instantiate_end:
implementation: mgmt-driver-script
heal_start:
implementation: mgmt-driver-script
heal_end:
implementation: mgmt-driver-script
scale_start:
implementation: mgmt-driver-script
scale_end:
implementation: mgmt-driver-script
terminate_start:
implementation: mgmt-driver-script
terminate_end:
implementation: mgmt-driver-script
change_external_connectivity_start:
implementation: mgmt-driver-script
change_external_connectivity_end:
implementation: mgmt-driver-script
modify_information_start:
implementation: mgmt-driver-script
modify_information_end:
implementation: mgmt-driver-script
instantiate_rollback_start:
implementation: mgmt-driver-script
instantiate_rollback_end:
implementation: mgmt-driver-script
scale_rollback_start:
implementation: mgmt-driver-script
scale_rollback_end:
implementation: mgmt-driver-script
artifacts:
mgmt-driver-script:
description: Sample MgmtDriver Script
type: tosca.artifacts.Implementation.Python
file: ../Scripts/mgmt_driver_script.py
.. note::
If some definitions of ``xxx_start`` and ``xxx_end`` are added in VNFD,
corresponding ``xxx_start`` and ``xxx_end`` functions must also be
added in MgmtDriver.
* In ``v2_sample2_types.yaml``, the definition of ``interface_types`` needs to
be added, and the definition of ``type`` needs to be modified under
``node_types.company.provider.VNF.interfaces.Vnflcm``.
The following is the content of ``v2_sample2_types.yaml``, the unmodified
part is replaced by "``...``" :
.. code-block:: yaml
interface_types:
sample.test.Vnflcm:
derived_from: tosca.interfaces.nfv.Vnflcm
instantiate_start:
description: Invoked before instantiate
instantiate_end:
description: Invoked after instantiate
heal_start:
description: Invoked before heal
heal_end:
description: Invoked after heal
scale_start:
description: Invoked before scale
scale_end:
description: Invoked after scale
terminate_start:
description: Invoked before terminate
terminate_end:
description: Invoked after terminate
change_external_connectivity_start:
description: Invoked before change_external_connectivity
change_external_connectivity_end:
description: Invoked after change_external_connectivity
modify_information_start:
description: Invoked before modify_information
modify_information_end:
description: Invoked after modify_information
instantiate_rollback_start:
description: Invoked before instantiate_rollback
instantiate_rollback_end:
description: Invoked after instantiate_rollback
scale_rollback_start:
description: Invoked before scale_rollback
scale_rollback_end:
description: Invoked after scale_rollback
node_types:
company.provider.VNF:
...
interfaces:
Vnflcm:
type: sample.test.Vnflcm
After the above modification, MgmtDriver can also be called in error-handling.
.. note::
In the process of error-handling, the specific action of MgmtDriver
needs to be customized by the user or provider.
.. _VNF LCM v1 API : https://docs.openstack.org/api-ref/nfv-orchestration/v1/vnflcm.html
.. _VNF LCM v2 API : https://docs.openstack.org/api-ref/nfv-orchestration/v2/vnflcm.html
.. _Keystone API reference : https://docs.openstack.org/api-ref/identity/v3/#password-authentication-with-scoped-authorization
.. _NFV-SOL001 v3.3.1 : https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/001/03.03.01_60/gs_nfv-sol001v030301p.pdf
.. _Show VNF LCM OP OCC : https://docs.openstack.org/api-ref/nfv-orchestration/v2/vnflcm.html#show-vnf-lcm-operation-occurrence-v2
.. _VNF Package : https://docs.openstack.org/tacker/latest/user/vnf-package.html
.. _LCM operations : https://docs.openstack.org/tacker/latest/user/etsi_vnf_error_handling.html#rollback-vnf-lcm-operation
.. _User defined types definition file : https://docs.openstack.org/tacker/latest/user/vnfd-sol001.html#user-defined-types-definition-file
.. _Topology Template Files : https://docs.openstack.org/tacker/latest/user/vnfd-sol001.html#topology-template-file-with-deployment-flavour
.. _VNF LCM v1 API: https://docs.openstack.org/api-ref/nfv-orchestration/v1/vnflcm.html

View File

@ -2,7 +2,13 @@
ETSI NFV-SOL VNF Healing
========================
This document describes how to heal VNF in Tacker.
This document describes how to heal VNF in Tacker v1 API.
.. note::
This is a document for Tacker v1 API.
See :doc:`/user/v2/vnf/heal/index` for Tacker v2 API.
Overview
--------
@ -17,17 +23,16 @@ The diagram below shows an overview of the VNF healing.
2. Call OpenStack Heat API
Upon receiving a request from tacker-client, tacker-server redirects it to
tacker-conductor. In tacker-conductor, the request is redirected again 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
to the contents of the instantiate parameters. Then, OpenStack infra-driver
calls OpenStack Heat APIs.
3. Re-create VMs
OpenStack Heat re-creates VMs according to the API calls.
.. figure:: ../_images/etsi_vnf_healing.png
:align: left
.. figure:: /_images/etsi_vnf_healing.png
Prerequisites
@ -39,14 +44,17 @@ The following packages should be installed:
* python-tackerclient
A default VIM should be registered according to
:doc:`../cli/cli-legacy-vim`.
:doc:`/cli/cli-legacy-vim`.
The VNF Package(sample_vnf_pkg.zip) used below is prepared
by referring to :doc:`./vnf-package`.
The VNF Package(sample_vnf_package_csar.zip) used below is prepared
by referring to :doc:`/user/vnf-package`.
Execute up to "Instantiate VNF" in the procedure of
:doc:`./etsi_vnf_deployment_as_vm_with_tosca`.
In other words, the procedure after "Terminate VNF" is not executed.
The procedure of prepare for healing operation that from "register VIM" to
"Instantiate VNF", basically refer to
:doc:`/user/etsi_vnf_deployment_as_vm_with_tosca` or
:doc:`/user/etsi_vnf_deployment_as_vm_with_user_data`.
This procedure uses an example using the sample VNF package.
Healing Target VNF Instance
@ -64,193 +72,525 @@ Result:
.. code-block:: console
+--------------------------+-------------------------------------------------------------------------------------------------+
| Field | Value |
+--------------------------+-------------------------------------------------------------------------------------------------+
| ID | 9e086f34-b3c9-4986-b5e5-609a5ac4c1f9 |
| Instantiated Vnf Info | { |
| | "flavourId": "simple", |
| | "vnfState": "STARTED", |
| | "extCpInfo": [ |
| | { |
| | "id": "241e6022-c9be-4ad6-b7a7-ecb32de20475", |
| | "cpdId": "CP1", |
| | "extLinkPortId": null, |
| | "associatedVnfcCpId": "b07ba349-1366-4d14-91e9-07842cdfa7ab", |
| | "cpProtocolInfo": [ |
| | { |
| | "layerProtocol": "IP_OVER_ETHERNET" |
| | } |
| | ] |
| | } |
| | ], |
| | "extVirtualLinkInfo": [ |
| | { |
| | "id": "net0", |
| | "resourceHandle": { |
| | "vimConnectionId": null, |
| | "resourceId": "1948231e-bbf0-4ff9-a692-40f8d6d5c90d", |
| | "vimLevelResourceType": null |
| | } |
| | } |
| | ], |
| | "vnfcResourceInfo": [ |
| | { |
| | "id": "b07ba349-1366-4d14-91e9-07842cdfa7ab", |
| | "vduId": "VDU1", |
| | "computeResource": { |
| | "vimConnectionId": "13bef9df-7c54-4b37-9da0-1256953e7f60", |
| | "resourceId": "794b9460-d799-4398-98a4-413fb04d2051", |
| | "vimLevelResourceType": "OS::Nova::Server" |
| | }, |
| | "storageResourceIds": [], |
| | "vnfcCpInfo": [ |
| | { |
| | "id": "f7297196-a024-4a90-9393-aadeb7de1fb3", |
| | "cpdId": "CP1", |
| | "vnfExtCpId": null, |
| | "vnfLinkPortId": "cf733c70-8dc2-46b8-8d76-2ebd0bb5bd07", |
| | "cpProtocolInfo": [ |
| | { |
| | "layerProtocol": "IP_OVER_ETHERNET" |
| | } |
| | ] |
| | }, |
| | { |
| | "id": "f3851831-ed25-4e73-b913-6725085c7484", |
| | "cpdId": "CP2", |
| | "vnfExtCpId": null, |
| | "vnfLinkPortId": "8cc28f47-ee72-420e-b4e8-26913d60bf55" |
| | } |
| | ] |
| | }, |
| | { |
| | "id": "aae43bc1-a54e-46e8-9371-59c1ef5fc84d", |
| | "vduId": "VDU2", |
| | "computeResource": { |
| | "vimConnectionId": "13bef9df-7c54-4b37-9da0-1256953e7f60", |
| | "resourceId": "20e10aed-16e9-4f7c-ad0c-1e885cc1200e", |
| | "vimLevelResourceType": "OS::Nova::Server" |
| | }, |
| | "storageResourceIds": [ |
| | "21703823-33b3-4f06-a52c-28b455146a4a" |
| | ], |
| | "vnfcCpInfo": [ |
| | { |
| | "id": "d0088ed3-1639-4f3b-a369-3baae7e86540", |
| | "cpdId": "CP3", |
| | "vnfExtCpId": null, |
| | "vnfLinkPortId": "d5fe9f7b-f50d-49dc-a3c8-ded2843005e4" |
| | } |
| | ] |
| | } |
| | ], |
| | "vnfVirtualLinkResourceInfo": [ |
| | { |
| | "id": "45588051-a413-41a0-a55c-b31fb50fb351", |
| | "vnfVirtualLinkDescId": "internalVL2", |
| | "networkResource": { |
| | "vimConnectionId": "13bef9df-7c54-4b37-9da0-1256953e7f60", |
| | "resourceId": "f45802ae-7fff-4c6e-b62f-3d55baec4c6b", |
| | "vimLevelResourceType": "OS::Neutron::Net" |
| | }, |
| | "vnfLinkPorts": [ |
| | { |
| | "id": "8cc28f47-ee72-420e-b4e8-26913d60bf55", |
| | "resourceHandle": { |
| | "vimConnectionId": "13bef9df-7c54-4b37-9da0-1256953e7f60", |
| | "resourceId": "e020ad8f-3f85-4d13-98c1-3ea476bf2d1a", |
| | "vimLevelResourceType": "OS::Neutron::Port" |
| | }, |
| | "cpInstanceId": "f3851831-ed25-4e73-b913-6725085c7484" |
| | }, |
| | { |
| | "id": "d5fe9f7b-f50d-49dc-a3c8-ded2843005e4", |
| | "resourceHandle": { |
| | "vimConnectionId": "13bef9df-7c54-4b37-9da0-1256953e7f60", |
| | "resourceId": "8f1588e5-4410-40eb-84ee-28336a6a0212", |
| | "vimLevelResourceType": "OS::Neutron::Port" |
| | }, |
| | "cpInstanceId": "d0088ed3-1639-4f3b-a369-3baae7e86540" |
| | } |
| | ] |
| | }, |
| | { |
| | "id": "66f3fa97-4046-4fa4-b1ff-19295501021f", |
| | "vnfVirtualLinkDescId": "net0", |
| | "networkResource": { |
| | "vimConnectionId": null, |
| | "resourceId": "1948231e-bbf0-4ff9-a692-40f8d6d5c90d", |
| | "vimLevelResourceType": "OS::Neutron::Net" |
| | }, |
| | "vnfLinkPorts": [ |
| | { |
| | "id": "cf733c70-8dc2-46b8-8d76-2ebd0bb5bd07", |
| | "resourceHandle": { |
| | "vimConnectionId": "13bef9df-7c54-4b37-9da0-1256953e7f60", |
| | "resourceId": "1db39a17-bbae-4074-8623-8a8026b51647", |
| | "vimLevelResourceType": "OS::Neutron::Port" |
| | }, |
| | "cpInstanceId": "f7297196-a024-4a90-9393-aadeb7de1fb3" |
| | } |
| | ] |
| | } |
| | ], |
| | "virtualStorageResourceInfo": [ |
| | { |
| | "id": "21703823-33b3-4f06-a52c-28b455146a4a", |
| | "virtualStorageDescId": "VirtualStorage", |
| | "storageResource": { |
| | "vimConnectionId": "13bef9df-7c54-4b37-9da0-1256953e7f60", |
| | "resourceId": "c6231ea2-6a90-4ba4-b38b-778a5d7110ee", |
| | "vimLevelResourceType": "OS::Cinder::Volume" |
| | } |
| | } |
| | ], |
| | "vnfcInfo": [ |
| | { |
| | "id": "4c999b33-3004-4b44-a826-49d07f5becb9", |
| | "vduId": "VDU1", |
| | "vnfcState": "STARTED" |
| | }, |
| | { |
| | "id": "d8f83af0-1b4d-4f57-b53c-fd028849be8f", |
| | "vduId": "VDU2", |
| | "vnfcState": "STARTED" |
| | } |
| | ], |
| | "additionalParams": {} |
| | } |
| Instantiation State | INSTANTIATED |
| Links | { |
| | "self": { |
| | "href": "/vnflcm/v1/vnf_instances/9e086f34-b3c9-4986-b5e5-609a5ac4c1f9" |
| | }, |
| | "terminate": { |
| | "href": "/vnflcm/v1/vnf_instances/9e086f34-b3c9-4986-b5e5-609a5ac4c1f9/terminate" |
| | }, |
| | "heal": { |
| | "href": "/vnflcm/v1/vnf_instances/9e086f34-b3c9-4986-b5e5-609a5ac4c1f9/heal" |
| | }, |
| | "changeExtConn": { |
| | "href": "/vnflcm/v1/vnf_instances/9e086f34-b3c9-4986-b5e5-609a5ac4c1f9/change_ext_conn" |
| | } |
| | } |
| VIM Connection Info | [] |
| VNF Instance Description | None |
| VNF Instance Name | vnf-9e086f34-b3c9-4986-b5e5-609a5ac4c1f9 |
| VNF Product Name | Sample VNF |
| VNF Provider | Company |
| VNF Software Version | 1.0 |
| VNFD ID | b1bb0ce7-ebca-4fa7-95ed-4840d70a1177 |
| VNFD Version | 1.0 |
| vnfPkgId | |
+--------------------------+-------------------------------------------------------------------------------------------------+
+-----------------------------+----------------------------------------------------------------------------------------------------------------------+
| Field | Value |
+-----------------------------+----------------------------------------------------------------------------------------------------------------------+
| ID | c3f9c200-7f52-42c5-9c64-6032faa3faf8 |
| Instantiated Vnf Info | { |
| | "flavourId": "simple", |
| | "vnfState": "STARTED", |
| | "scaleStatus": [ |
| | { |
| | "aspectId": "worker_instance", |
| | "scaleLevel": 0 |
| | } |
| | ], |
| | "extCpInfo": [ |
| | { |
| | "id": "d7c14d6f-3bac-4e11-a512-5101b4933545", |
| | "cpdId": "VDU1_CP1", |
| | "extLinkPortId": null, |
| | "associatedVnfcCpId": "b0f677ce-93db-416a-839b-998707338d14", |
| | "cpProtocolInfo": [] |
| | }, |
| | { |
| | "id": "e3513495-c555-4a1f-a9cc-07a0feae2720", |
| | "cpdId": "VDU2_CP1", |
| | "extLinkPortId": null, |
| | "associatedVnfcCpId": "9da6945b-d9a3-4001-a03a-7b239b7e7084", |
| | "cpProtocolInfo": [] |
| | }, |
| | { |
| | "id": "53c187aa-d05c-4995-9518-3119ac02ee66", |
| | "cpdId": "VDU1_CP2", |
| | "extLinkPortId": null, |
| | "associatedVnfcCpId": "b0f677ce-93db-416a-839b-998707338d14", |
| | "cpProtocolInfo": [ |
| | { |
| | "layerProtocol": "IP_OVER_ETHERNET", |
| | "ipOverEthernet": { |
| | "macAddress": null, |
| | "ipAddresses": [ |
| | { |
| | "type": "IPV4", |
| | "subnetId": "d290cae3-0dbc-44a3-a043-1a50ded04a64", |
| | "isDynamic": false, |
| | "addresses": [ |
| | "22.22.1.10" |
| | ] |
| | } |
| | ] |
| | } |
| | } |
| | ] |
| | }, |
| | { |
| | "id": "9fcec4e1-e808-4dc6-b048-79ec88d0aa40", |
| | "cpdId": "VDU2_CP2", |
| | "extLinkPortId": null, |
| | "associatedVnfcCpId": "9da6945b-d9a3-4001-a03a-7b239b7e7084", |
| | "cpProtocolInfo": [ |
| | { |
| | "layerProtocol": "IP_OVER_ETHERNET", |
| | "ipOverEthernet": { |
| | "macAddress": null, |
| | "ipAddresses": [ |
| | { |
| | "type": "IPV4", |
| | "subnetId": "d290cae3-0dbc-44a3-a043-1a50ded04a64", |
| | "isDynamic": false, |
| | "addresses": [ |
| | "22.22.1.20" |
| | ] |
| | } |
| | ] |
| | } |
| | } |
| | ] |
| | } |
| | ], |
| | "extVirtualLinkInfo": [ |
| | { |
| | "id": "91bcff6d-4703-4ba9-b1c2-009e6db92a9c", |
| | "resourceHandle": { |
| | "vimConnectionId": "79a97d01-e5f3-4eaa-b2bc-8f513ecb8a56", |
| | "resourceId": "3019b1e7-99d8-4748-97ac-104922bc78d9", |
| | "vimLevelResourceType": null |
| | }, |
| | "extLinkPorts": [ |
| | { |
| | "id": "6b7c0b3a-cc2d-4b94-9f6f-81df69a7cc2f", |
| | "resourceHandle": { |
| | "vimConnectionId": "79a97d01-e5f3-4eaa-b2bc-8f513ecb8a56", |
| | "resourceId": "972a375d-921f-46f5-bfdb-19af95fc49e1", |
| | "vimLevelResourceType": null |
| | }, |
| | "cpInstanceId": "9fcec4e1-e808-4dc6-b048-79ec88d0aa40" |
| | }, |
| | { |
| | "id": "02d867e7-b955-4b4a-b92f-c78c7ede63bf", |
| | "resourceHandle": { |
| | "vimConnectionId": "79a97d01-e5f3-4eaa-b2bc-8f513ecb8a56", |
| | "resourceId": "b853b5c5-cd97-4dfb-8750-cac6e5c62477", |
| | "vimLevelResourceType": null |
| | }, |
| | "cpInstanceId": "9fcec4e1-e808-4dc6-b048-79ec88d0aa40" |
| | } |
| | ] |
| | }, |
| | { |
| | "id": "a96d2f5b-c01a-48e1-813c-76132965042c", |
| | "resourceHandle": { |
| | "vimConnectionId": "79a97d01-e5f3-4eaa-b2bc-8f513ecb8a56", |
| | "resourceId": "589a045a-65d9-4f4d-a9b3-35aa655374d0", |
| | "vimLevelResourceType": null |
| | } |
| | } |
| | ], |
| | "extManagedVirtualLinkInfo": [ |
| | { |
| | "id": "8f9d8da0-2386-4f00-bbb0-860f50d32a5a", |
| | "vnfVirtualLinkDescId": "internalVL1", |
| | "networkResource": { |
| | "vimConnectionId": null, |
| | "resourceId": "0e498d08-ed3a-4212-83e0-1b6808f6fcb6", |
| | "vimLevelResourceType": "OS::Neutron::Net" |
| | }, |
| | "vnfLinkPorts": [ |
| | { |
| | "id": "f5de777b-22e9-480a-a044-5359cc8b6263", |
| | "resourceHandle": { |
| | "vimConnectionId": "c637c425-62e8-432f-94f4-bff8d3323e29", |
| | "resourceId": "ddb45b78-385d-4c18-aec3-10bf6bafb840", |
| | "vimLevelResourceType": "OS::Neutron::Port" |
| | }, |
| | "cpInstanceId": "a98f1c4b-f4c9-4603-8813-4a9dbb003950" |
| | }, |
| | { |
| | "id": "d754bcb0-5ab4-4715-9469-e946ec69733e", |
| | "resourceHandle": { |
| | "vimConnectionId": "c637c425-62e8-432f-94f4-bff8d3323e29", |
| | "resourceId": "29de4ae6-1004-4607-9023-818efacba3ce", |
| | "vimLevelResourceType": "OS::Neutron::Port" |
| | }, |
| | "cpInstanceId": "c408c3a8-924b-4570-a896-ddb5bd56d14a" |
| | } |
| | ] |
| | }, |
| | { |
| | "id": "11d68761-aab7-419c-955c-0c6497f13692", |
| | "vnfVirtualLinkDescId": "internalVL2", |
| | "networkResource": { |
| | "vimConnectionId": null, |
| | "resourceId": "38a8d4ba-ac1b-41a2-a92b-ff2a3e5e9b12", |
| | "vimLevelResourceType": "OS::Neutron::Net" |
| | }, |
| | "vnfLinkPorts": [ |
| | { |
| | "id": "1b664cfb-6c8b-4f02-a535-f683fe414e31", |
| | "resourceHandle": { |
| | "vimConnectionId": "c637c425-62e8-432f-94f4-bff8d3323e29", |
| | "resourceId": "2215cb28-9876-4c43-a71d-c63ae42a7ab4", |
| | "vimLevelResourceType": "OS::Neutron::Port" |
| | }, |
| | "cpInstanceId": "f16e20d7-cb86-4b4d-a4fa-f27802eaf628" |
| | }, |
| | { |
| | "id": "65c35b4c-1a8b-4495-a396-73d09f4cebea", |
| | "resourceHandle": { |
| | "vimConnectionId": "c637c425-62e8-432f-94f4-bff8d3323e29", |
| | "resourceId": "0019f288-38b3-4247-89fc-51ecf7663401", |
| | "vimLevelResourceType": "OS::Neutron::Port" |
| | }, |
| | "cpInstanceId": "269b2b44-7577-45b5-8038-1e67d34dea41" |
| | } |
| | ] |
| | } |
| | ], |
| | "vnfcResourceInfo": [ |
| | { |
| | "id": "b0f677ce-93db-416a-839b-998707338d14", |
| | "vduId": "VDU1", |
| | "computeResource": { |
| | "vimConnectionId": "c637c425-62e8-432f-94f4-bff8d3323e29", |
| | "resourceId": "2bd41386-1971-425c-9f27-310c7a4d6181", |
| | "vimLevelResourceType": "OS::Nova::Server" |
| | }, |
| | "storageResourceIds": [], |
| | "vnfcCpInfo": [ |
| | { |
| | "id": "c86cef0a-150d-4eff-a21f-a48c6fcfa258", |
| | "cpdId": "VDU1_CP1", |
| | "vnfExtCpId": "6b7c0b3a-cc2d-4b94-9f6f-81df69a7cc2f", |
| | "vnfLinkPortId": "f2105dd9-fed4-43dd-8d74-fcf0199cb716" |
| | }, |
| | { |
| | "id": "426c0473-2de1-42dc-ae1f-ff4cf4d8b29b", |
| | "cpdId": "VDU1_CP2", |
| | "vnfExtCpId": null, |
| | "vnfLinkPortId": "9925668e-ceea-45ef-817a-25d19572a494", |
| | "cpProtocolInfo": [ |
| | { |
| | "layerProtocol": "IP_OVER_ETHERNET", |
| | "ipOverEthernet": { |
| | "macAddress": null, |
| | "ipAddresses": [ |
| | { |
| | "type": "IPV4", |
| | "subnetId": "d290cae3-0dbc-44a3-a043-1a50ded04a64", |
| | "isDynamic": false, |
| | "addresses": [ |
| | "22.22.1.10" |
| | ] |
| | } |
| | ] |
| | } |
| | } |
| | ] |
| | }, |
| | { |
| | "id": "a98f1c4b-f4c9-4603-8813-4a9dbb003950", |
| | "cpdId": "VDU1_CP3", |
| | "vnfExtCpId": null, |
| | "vnfLinkPortId": "f5de777b-22e9-480a-a044-5359cc8b6263" |
| | }, |
| | { |
| | "id": "f16e20d7-cb86-4b4d-a4fa-f27802eaf628", |
| | "cpdId": "VDU1_CP4", |
| | "vnfExtCpId": null, |
| | "vnfLinkPortId": "1b664cfb-6c8b-4f02-a535-f683fe414e31" |
| | }, |
| | { |
| | "id": "89dd97c3-ef2d-4df5-a18a-f542e573a5bd", |
| | "cpdId": "VDU1_CP5", |
| | "vnfExtCpId": null, |
| | "vnfLinkPortId": "1a8d6c49-40bb-4f24-96e7-6efba6001671" |
| | } |
| | ] |
| | }, |
| | { |
| | "id": "9da6945b-d9a3-4001-a03a-7b239b7e7084", |
| | "vduId": "VDU2", |
| | "computeResource": { |
| | "vimConnectionId": "c637c425-62e8-432f-94f4-bff8d3323e29", |
| | "resourceId": "777515dd-35c9-4f06-ad6b-f79323097e0f", |
| | "vimLevelResourceType": "OS::Nova::Server" |
| | }, |
| | "storageResourceIds": [], |
| | "vnfcCpInfo": [ |
| | { |
| | "id": "12ea4352-66a5-47a4-989f-d4d06d5bab1a", |
| | "cpdId": "VDU2_CP1", |
| | "vnfExtCpId": "02d867e7-b955-4b4a-b92f-c78c7ede63bf", |
| | "vnfLinkPortId": "6043706d-6173-40ef-8bc5-519868ce9fe4" |
| | }, |
| | { |
| | "id": "b6a56d88-da99-4036-872f-f10759b00ed8", |
| | "cpdId": "VDU2_CP2", |
| | "vnfExtCpId": null, |
| | "vnfLinkPortId": "bfd0d3ad-1f9c-4102-b446-c7f33881b136", |
| | "cpProtocolInfo": [ |
| | { |
| | "layerProtocol": "IP_OVER_ETHERNET", |
| | "ipOverEthernet": { |
| | "macAddress": null, |
| | "ipAddresses": [ |
| | { |
| | "type": "IPV4", |
| | "subnetId": "d290cae3-0dbc-44a3-a043-1a50ded04a64", |
| | "isDynamic": false, |
| | "addresses": [ |
| | "22.22.1.20" |
| | ] |
| | } |
| | ] |
| | } |
| | } |
| | ] |
| | }, |
| | { |
| | "id": "c408c3a8-924b-4570-a896-ddb5bd56d14a", |
| | "cpdId": "VDU2_CP3", |
| | "vnfExtCpId": null, |
| | "vnfLinkPortId": "d754bcb0-5ab4-4715-9469-e946ec69733e" |
| | }, |
| | { |
| | "id": "269b2b44-7577-45b5-8038-1e67d34dea41", |
| | "cpdId": "VDU2_CP4", |
| | "vnfExtCpId": null, |
| | "vnfLinkPortId": "65c35b4c-1a8b-4495-a396-73d09f4cebea" |
| | }, |
| | { |
| | "id": "bb1ed2d3-da19-4b45-b326-cf9e76fd788a", |
| | "cpdId": "VDU2_CP5", |
| | "vnfExtCpId": null, |
| | "vnfLinkPortId": "46cd8f09-d877-491b-8928-345ec6461637" |
| | } |
| | ] |
| | } |
| | ], |
| | "vnfVirtualLinkResourceInfo": [ |
| | { |
| | "id": "b3244c22-2365-476e-bc7b-40cbaee45ce1", |
| | "vnfVirtualLinkDescId": "internalVL1", |
| | "networkResource": { |
| | "vimConnectionId": null, |
| | "resourceId": "0e498d08-ed3a-4212-83e0-1b6808f6fcb6", |
| | "vimLevelResourceType": "OS::Neutron::Net" |
| | }, |
| | "vnfLinkPorts": [ |
| | { |
| | "id": "f5de777b-22e9-480a-a044-5359cc8b6263", |
| | "resourceHandle": { |
| | "vimConnectionId": "c637c425-62e8-432f-94f4-bff8d3323e29", |
| | "resourceId": "ddb45b78-385d-4c18-aec3-10bf6bafb840", |
| | "vimLevelResourceType": "OS::Neutron::Port" |
| | }, |
| | "cpInstanceId": "a98f1c4b-f4c9-4603-8813-4a9dbb003950" |
| | }, |
| | { |
| | "id": "d754bcb0-5ab4-4715-9469-e946ec69733e", |
| | "resourceHandle": { |
| | "vimConnectionId": "c637c425-62e8-432f-94f4-bff8d3323e29", |
| | "resourceId": "29de4ae6-1004-4607-9023-818efacba3ce", |
| | "vimLevelResourceType": "OS::Neutron::Port" |
| | }, |
| | "cpInstanceId": "c408c3a8-924b-4570-a896-ddb5bd56d14a" |
| | } |
| | ] |
| | }, |
| | { |
| | "id": "c9182342-bfc4-4ba8-9e26-02fd0565db4d", |
| | "vnfVirtualLinkDescId": "internalVL2", |
| | "networkResource": { |
| | "vimConnectionId": null, |
| | "resourceId": "38a8d4ba-ac1b-41a2-a92b-ff2a3e5e9b12", |
| | "vimLevelResourceType": "OS::Neutron::Net" |
| | }, |
| | "vnfLinkPorts": [ |
| | { |
| | "id": "1b664cfb-6c8b-4f02-a535-f683fe414e31", |
| | "resourceHandle": { |
| | "vimConnectionId": "c637c425-62e8-432f-94f4-bff8d3323e29", |
| | "resourceId": "2215cb28-9876-4c43-a71d-c63ae42a7ab4", |
| | "vimLevelResourceType": "OS::Neutron::Port" |
| | }, |
| | "cpInstanceId": "f16e20d7-cb86-4b4d-a4fa-f27802eaf628" |
| | }, |
| | { |
| | "id": "65c35b4c-1a8b-4495-a396-73d09f4cebea", |
| | "resourceHandle": { |
| | "vimConnectionId": "c637c425-62e8-432f-94f4-bff8d3323e29", |
| | "resourceId": "0019f288-38b3-4247-89fc-51ecf7663401", |
| | "vimLevelResourceType": "OS::Neutron::Port" |
| | }, |
| | "cpInstanceId": "269b2b44-7577-45b5-8038-1e67d34dea41" |
| | } |
| | ] |
| | }, |
| | { |
| | "id": "81ed1791-a1c2-46fb-a999-dd9d601b06ec", |
| | "vnfVirtualLinkDescId": "internalVL3", |
| | "networkResource": { |
| | "vimConnectionId": null, |
| | "resourceId": "", |
| | "vimLevelResourceType": null |
| | }, |
| | "vnfLinkPorts": [ |
| | { |
| | "id": "1a8d6c49-40bb-4f24-96e7-6efba6001671", |
| | "resourceHandle": { |
| | "vimConnectionId": "c637c425-62e8-432f-94f4-bff8d3323e29", |
| | "resourceId": "84d7fc8c-fb52-4593-875b-bf303ec5fc8c", |
| | "vimLevelResourceType": "OS::Neutron::Port" |
| | }, |
| | "cpInstanceId": "89dd97c3-ef2d-4df5-a18a-f542e573a5bd" |
| | }, |
| | { |
| | "id": "46cd8f09-d877-491b-8928-345ec6461637", |
| | "resourceHandle": { |
| | "vimConnectionId": "c637c425-62e8-432f-94f4-bff8d3323e29", |
| | "resourceId": "65650d05-a562-4c5f-84d2-e9304ef68377", |
| | "vimLevelResourceType": "OS::Neutron::Port" |
| | }, |
| | "cpInstanceId": "bb1ed2d3-da19-4b45-b326-cf9e76fd788a" |
| | } |
| | ] |
| | }, |
| | { |
| | "id": "1d1a0824-5c4d-461e-9a29-5e72db1e5855", |
| | "vnfVirtualLinkDescId": "91bcff6d-4703-4ba9-b1c2-009e6db92a9c", |
| | "networkResource": { |
| | "vimConnectionId": "79a97d01-e5f3-4eaa-b2bc-8f513ecb8a56", |
| | "resourceId": "3019b1e7-99d8-4748-97ac-104922bc78d9", |
| | "vimLevelResourceType": "OS::Neutron::Net" |
| | }, |
| | "vnfLinkPorts": [ |
| | { |
| | "id": "f2105dd9-fed4-43dd-8d74-fcf0199cb716", |
| | "resourceHandle": { |
| | "vimConnectionId": "c637c425-62e8-432f-94f4-bff8d3323e29", |
| | "resourceId": "f0cf8bfd-261a-4c54-b783-42cce6d90859", |
| | "vimLevelResourceType": "OS::Neutron::Port" |
| | }, |
| | "cpInstanceId": "c86cef0a-150d-4eff-a21f-a48c6fcfa258" |
| | }, |
| | { |
| | "id": "6043706d-6173-40ef-8bc5-519868ce9fe4", |
| | "resourceHandle": { |
| | "vimConnectionId": "c637c425-62e8-432f-94f4-bff8d3323e29", |
| | "resourceId": "6a349003-66a1-4bfa-bd4b-83705957482a", |
| | "vimLevelResourceType": "OS::Neutron::Port" |
| | }, |
| | "cpInstanceId": "12ea4352-66a5-47a4-989f-d4d06d5bab1a" |
| | } |
| | ] |
| | }, |
| | { |
| | "id": "d8fc6199-c9d6-4e74-b896-c44018fa4382", |
| | "vnfVirtualLinkDescId": "a96d2f5b-c01a-48e1-813c-76132965042c", |
| | "networkResource": { |
| | "vimConnectionId": "79a97d01-e5f3-4eaa-b2bc-8f513ecb8a56", |
| | "resourceId": "589a045a-65d9-4f4d-a9b3-35aa655374d0", |
| | "vimLevelResourceType": "OS::Neutron::Net" |
| | }, |
| | "vnfLinkPorts": [ |
| | { |
| | "id": "9925668e-ceea-45ef-817a-25d19572a494", |
| | "resourceHandle": { |
| | "vimConnectionId": "c637c425-62e8-432f-94f4-bff8d3323e29", |
| | "resourceId": "53700068-3c4b-444b-b4eb-bbaa887a0e28", |
| | "vimLevelResourceType": "OS::Neutron::Port" |
| | }, |
| | "cpInstanceId": "426c0473-2de1-42dc-ae1f-ff4cf4d8b29b" |
| | }, |
| | { |
| | "id": "bfd0d3ad-1f9c-4102-b446-c7f33881b136", |
| | "resourceHandle": { |
| | "vimConnectionId": "c637c425-62e8-432f-94f4-bff8d3323e29", |
| | "resourceId": "136f1448-feb7-480d-8d92-15d7e4d02f37", |
| | "vimLevelResourceType": "OS::Neutron::Port" |
| | }, |
| | "cpInstanceId": "b6a56d88-da99-4036-872f-f10759b00ed8" |
| | } |
| | ] |
| | } |
| | ], |
| | "vnfcInfo": [ |
| | { |
| | "id": "b9b73267-40ce-468f-87ab-a6653cee664f", |
| | "vduId": "VDU1", |
| | "vnfcState": "STARTED" |
| | }, |
| | { |
| | "id": "1842c052-b6af-45bb-b976-f99cd1212182", |
| | "vduId": "VDU2", |
| | "vnfcState": "STARTED" |
| | } |
| | ], |
| | "additionalParams": { |
| | "lcm-operation-user-data": "./UserData/lcm_user_data.py", |
| | "lcm-operation-user-data-class": "SampleUserData" |
| | } |
| | } |
| Instantiation State | INSTANTIATED |
| Links | { |
| | "self": { |
| | "href": "http://localhost:9890/vnflcm/v1/vnf_instances/c3f9c200-7f52-42c5-9c64-6032faa3faf8" |
| | }, |
| | "terminate": { |
| | "href": "http://localhost:9890/vnflcm/v1/vnf_instances/c3f9c200-7f52-42c5-9c64-6032faa3faf8/terminate" |
| | }, |
| | "heal": { |
| | "href": "http://localhost:9890/vnflcm/v1/vnf_instances/c3f9c200-7f52-42c5-9c64-6032faa3faf8/heal" |
| | }, |
| | "changeExtConn": { |
| | "href": "http://localhost:9890/vnflcm/v1/vnf_instances/c3f9c200-7f52-42c5-9c64-6032faa3faf8/change_ext_conn" |
| | } |
| | } |
| VIM Connection Info | [ |
| | { |
| | "id": "79a97d01-e5f3-4eaa-b2bc-8f513ecb8a56", |
| | "vimId": null, |
| | "vimType": "ETSINFV.OPENSTACK_KEYSTONE.v_2", |
| | "interfaceInfo": { |
| | "endpoint": "http://127.0.0.1/identity" |
| | }, |
| | "accessInfo": { |
| | "region": "RegionOne", |
| | "tenant": "1994d69783d64c00aadab564038c2fd7", |
| | "password": "devstack", |
| | "username": "nfv_user" |
| | }, |
| | "extra": {} |
| | }, |
| | { |
| | "id": "700a68db-0789-49e0-97d5-9824d5eeb272", |
| | "vimId": "c637c425-62e8-432f-94f4-bff8d3323e29", |
| | "vimType": "openstack", |
| | "interfaceInfo": {}, |
| | "accessInfo": {}, |
| | "extra": {} |
| | } |
| | ] |
| VNF Configurable Properties | |
| VNF Instance Description | |
| VNF Instance Name | vnf-c3f9c200-7f52-42c5-9c64-6032faa3faf8 |
| VNF Product Name | Sample VNF |
| VNF Provider | Company |
| VNF Software Version | 1.0 |
| VNFD ID | b1bb0ce7-ebca-4fa7-95ed-4840d7000321 |
| VNFD Version | 1.0 |
| metadata | tenant=nfv |
| vnfPkgId | |
+-----------------------------+----------------------------------------------------------------------------------------------------------------------+
.. note::
The value set for 'VNF Instance Name' corresponds to 'Stack Name'
managed by Heat.
In this manual, it corresponds to **vnf-9e086f34-b3c9-4986-b5e5-609a5ac4c1f9**.
The value set for 'VNF Instance Name' corresponds to 'Stack Name'
managed by Heat.
In this manual, it corresponds to **vnf-c3f9c200-7f52-42c5-9c64-6032faa3faf8**.
VNF Healing Procedure
@ -260,7 +600,7 @@ As mentioned in **Prerequisites** and **Healing target VNF instance**,
the VNF must be instantiated before healing.
Details of CLI commands are described in
:doc:`../cli/cli-etsi-vnflcm`.
:doc:`/cli/cli-etsi-vnflcm`.
There are two main methods for VNF healing.
@ -268,47 +608,11 @@ There are two main methods for VNF healing.
* Healing specified with VNFC instances
.. note::
A VNFC is a 'VNF Component', and one VNFC basically
corresponds to one VDU in the VNF.
For more information on VNFC, see `NFV-SOL002 v2.6.1`_.
A VNFC is a 'VNF Component', and one VNFC basically
corresponds to one VDU in the VNF.
For more information on VNFC, see `NFV-SOL002 v2.6.1`_.
The client can specify the target resources for healing
with two parameters in the API request.
- *vnfcInstanceId* is a list which indicates VNFC instances
for which a healing action is requested.
- *all* indicates whether network resources and storage resources
are included in the heal target. This is set in the attribute
of *additionalParams*.
With the combination of these parameters,
Tacker supports the following patterns of healing.
- Pattern A. *vnfcInstanceId* is included in the request.
- Pattern A-1. *all = False* is included in the request or *all* is not
included in the request.
- Only specified VNFC instances are healed.
- Pattern A-2. *all = True* are included in the request.
- Specified VNFC instances and storage resources are healed.
- Pattern B. *vnfcInstanceId* is not included in the request.
- Pattern B-1. *all = False* is included in the request or *all* is not
included in the request.
- All VNFC instances included in the VNF instance are healed.
- Pattern B-2. *all = True* are included in the request.
- All resources included in the VNF instance are healed.
It includes VNFC instances, network resources, and storage resources
but not external virtual networks.
.. note::
*all* option is not supported by the version 1 API.
How to Heal of the Entire VNF
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@ -339,11 +643,11 @@ Result:
.. code-block:: console
+--------------------------------------+------------------------------------------+-----------------+
| ID | Stack Name | Stack Status |
+--------------------------------------+------------------------------------------+-----------------+
| 5322e9c4-b5ac-439e-8ed4-d0710816f318 | vnf-9e086f34-b3c9-4986-b5e5-609a5ac4c1f9 | CREATE_COMPLETE |
+--------------------------------------+------------------------------------------+-----------------+
+--------------------------------------+---------------------------------------------+-----------------+
| ID | Stack Name | Stack Status |
+--------------------------------------+---------------------------------------------+-----------------+
| 00d1871d-4acc-4d6b-99bc-cc68ad0b8a6a | vnflcm_c3f9c200-7f52-42c5-9c64-6032faa3faf8 | CREATE_COMPLETE |
+--------------------------------------+---------------------------------------------+-----------------+
Healing execution of the entire VNF:
@ -357,7 +661,7 @@ Result:
.. code-block:: console
Heal request for VNF Instance 9e086f34-b3c9-4986-b5e5-609a5ac4c1f9 has been accepted.
Heal request for VNF Instance 0c3644ff-b207-4a6a-9d3a-d1295cda153a has been accepted.
Stack information after healing:
@ -371,15 +675,16 @@ Result:
.. code-block:: console
+--------------------------------------+------------------------------------------+-----------------+
| ID | Stack Name | Stack Status |
+--------------------------------------+------------------------------------------+-----------------+
| ad077101-b093-4785-9ca5-cc7c1379bb10 | vnf-9e086f34-b3c9-4986-b5e5-609a5ac4c1f9 | CREATE_COMPLETE |
+--------------------------------------+------------------------------------------+-----------------+
+--------------------------------------+---------------------------------------------+-----------------+
| ID | Stack Name | Stack Status |
+--------------------------------------+---------------------------------------------+-----------------+
| c220dd92-034e-4e7f-bea3-e5e7e95b145c | vnflcm_c3f9c200-7f52-42c5-9c64-6032faa3faf8 | CREATE_COMPLETE |
+--------------------------------------+---------------------------------------------+-----------------+
.. note::
'ID' has changed from the ID before healing.
'Stack Status' transitions to CREATE_COMPLETE.
'ID' has changed from the ID before healing.
'Stack Status' transitions to CREATE_COMPLETE.
How to Heal Specified with VNFC Instances
@ -389,18 +694,21 @@ Extract the value of vnfcResourceInfo -> id from 'Instantiated Vnf Info'
in **Healing target VNF instance**.
This is the VNFC instance ID.
This manual shows an example of healing VDU1 as VNFC.
In this manual, **b07ba349-1366-4d14-91e9-07842cdfa7ab** corresponds to
the ``VNFC_instance_ID`` of VDU1.
.. code-block:: console
.. note:: In the case of version 1 API,
``VNFC_INSTANCE_ID`` is ``instantiatedVnfInfo.vnfcResourceInfo.id``.
In the case of version 2 API,
``VNFC_INSTANCE_ID`` is ``instantiatedVnfInfo.vnfcInfo.id``.
$ openstack vnflcm show c3f9c200-7f52-42c5-9c64-6032faa3faf8 \
-f json | jq '."Instantiated Vnf Info".vnfcResourceInfo[].id'
"b0f677ce-93db-416a-839b-998707338d14"
"9da6945b-d9a3-4001-a03a-7b239b7e7084"
This manual shows an example of healing VDU1 as VNFC.
In this manual, **b0f677ce-93db-416a-839b-998707338d14** corresponds to
the VNFC instance ID of VDU1.
When healing specified with VNFC instances, the following
APIs are executed from Tacker to Heat.
See `Heat API reference`_. for details on Heat APIs.
See `Heat API reference`_ for details on Heat APIs.
* stack resource mark unhealthy
* stack update
@ -410,11 +718,12 @@ resource_status of VDU1 before and after healing.
This is to confirm that the resource ID of this VDU1 has changed
before and after healing, and that the re-creation has been
completed successfully.
See `Heat CLI reference`_. for details on Heat CLI commands.
See `Heat CLI reference`_ for details on Heat CLI commands.
.. note::
Note that 'vnfc-instance-id' managed by Tacker and
'physical-resource-id' managed by Heat are different.
Note that 'vnfc-instance-id' managed by Tacker and
'physical-resource-id' managed by Heat are different.
VDU1 information before healing:
@ -422,7 +731,7 @@ VDU1 information before healing:
.. code-block:: console
$ openstack stack resource show HEAT_STACK_ID \
VDU_NAME -c physical_resource_id -c resource_status
VDU_NAME -c physical_resource_id -c resource_status
Result:
@ -432,7 +741,7 @@ Result:
+----------------------+--------------------------------------+
| Field | Value |
+----------------------+--------------------------------------+
| physical_resource_id | b3393a22-a064-43d0-b021-e8549a62b366 |
| physical_resource_id | 6b89f9c9-ebd8-49ca-8e2c-c01838daeb95 |
| resource_status | CREATE_COMPLETE |
+----------------------+--------------------------------------+
@ -441,27 +750,27 @@ Healing execution of VDU1:
.. code-block:: console
$ openstack vnflcm heal VNF_INSTANCE_ID \
--vnfc-instance VNFC_INSTANCE_ID
$ openstack vnflcm heal VNF_INSTANCE_ID --vnfc-instance VNFC_INSTANCE_ID
Result:
.. code-block:: console
Heal request for VNF Instance 9e086f34-b3c9-4986-b5e5-609a5ac4c1f9 has been accepted.
Heal request for VNF Instance c3f9c200-7f52-42c5-9c64-6032faa3faf8 has been accepted.
.. note::
It is possible to specify multiple VNFC instance IDs in '--vnfc-instance' option.
It is possible to specify multiple VNFC instance IDs in '--vnfc-instance' option.
VDU1 information before healing:
VDU1 information after healing:
.. code-block:: console
$ openstack stack resource show HEAT_STACK_ID \
VDU_NAME -c physical_resource_id -c resource_status
VDU_NAME -c physical_resource_id -c resource_status
Result:
@ -471,13 +780,15 @@ Result:
+----------------------+--------------------------------------+
| Field | Value |
+----------------------+--------------------------------------+
| physical_resource_id | 794b9460-d799-4398-98a4-413fb04d2051 |
| resource_status | CREATE_COMPLETE |
| physical_resource_id | 6b89f9c9-ebd8-49ca-8e2c-c01838daeb95 |
| resource_status | UPDATE_COMPLETE |
+----------------------+--------------------------------------+
.. note::
'physical_resource_id' has changed from the ID before healing.
'resource_status' transitions to CREATE_COMPLETE.
'physical_resource_id' has not changed from the ID before healing.
'resource_status' transitions to UPDATE_COMPLETE.
.. _NFV-SOL002 v2.6.1 : https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/002/02.06.01_60/gs_NFV-SOL002v020601p.pdf

View File

@ -2,7 +2,13 @@
ETSI NFV-SOL VNF Scaling
========================
This document describes how to scale VNF in Tacker.
This document describes how to scale VNF in Tacker v1 API.
.. note::
This is a document for Tacker v1 API.
See :doc:`/user/v2/vnf/scale/index` for Tacker v2 API.
Overview
--------
@ -17,22 +23,23 @@ The diagram below shows an overview of the VNF scaling.
2. Call OpenStack Heat API
Upon receiving a request from tacker-client, tacker-server redirects it to
tacker-conductor. In tacker-conductor, the request is redirected again 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
to the contents of the instantiate parameters. Then, OpenStack infra-driver
calls OpenStack Heat APIs.
3. Change the number of VMs
OpenStack Heat change the number of VMs according to the API calls.
.. figure:: ../_images/etsi_vnf_scaling.png
:align: left
.. figure:: /_images/etsi_vnf_scaling.png
.. note:: Scale API version 1 supports is_reverse option.
Scale-in operation with this option deletes VNF from the last
registered VM. Scale API version 2 does not support this option
because it deletes VM in this order by default.
.. note::
Scale API version 1 supports is_reverse option.
Scale-in operation with this option deletes VNF from the last
registered VM.
Prerequisites
@ -44,15 +51,16 @@ The following packages should be installed:
* python-tackerclient
A default VIM should be registered according to
:doc:`../cli/cli-legacy-vim`.
:doc:`/cli/cli-legacy-vim`.
The VNF Package(sample_vnf_pkg.zip) used below is prepared
by referring to :doc:`./vnf-package`.
The VNF Package(sample_vnf_package_csar.zip) used below is prepared
by referring to :doc:`/user/vnf-package`.
Execute up to "Instantiate VNF" in the procedure of
:doc:`./etsi_vnf_deployment_as_vm_with_tosca` or
:doc:`./etsi_vnf_deployment_as_vm_with_user_data`.
In other words, the procedure after "Terminate VNF" is not executed.
The procedure of prepare for scaling operation that from "register VIM" to
"Instantiate VNF", basically refer to
:doc:`/user/etsi_vnf_deployment_as_vm_with_user_data`.
This procedure uses an example using the sample VNF package.
VNF Scaling Procedure
@ -62,7 +70,7 @@ As mentioned in Prerequisites, the VNF must be instantiated
before performing scaling.
Details of CLI commands are described in
:doc:`../cli/cli-etsi-vnflcm`.
:doc:`/cli/cli-etsi-vnflcm`.
There are two main methods for VNF scaling.
@ -92,21 +100,6 @@ corresponds to ASPECT_ID.
vdu_profile:
min_number_of_instances: 1
max_number_of_instances: 3
capabilities:
virtual_compute:
properties:
requested_additional_capabilities:
properties:
requested_additional_capability_name: m1.tiny
support_mandatory: true
target_performance_parameters:
entry_schema: test
virtual_memory:
virtual_mem_size: 512 MB
virtual_cpu:
num_virtual_cpu: 1
virtual_local_storage:
- size_of_storage: 3 GB
...snip VNFD...
@ -167,7 +160,9 @@ corresponds to ASPECT_ID.
...snip VNFD...
.. note:: See `NFV-SOL001 v2.6.1`_ annex A.6 for details about ASPECT_ID.
.. note::
See `NFV-SOL001 v2.6.1`_ annex A.6 for details about ASPECT_ID.
How to Scale Out VNF
@ -191,13 +186,13 @@ Result:
.. code-block:: console
+--------------------------------------+-----------------------------------------------------------------------------------------------------+-----------------+--------------------------------------+
| ID | Stack Name | Stack Status | Parent |
+--------------------------------------+-----------------------------------------------------------------------------------------------------+-----------------+--------------------------------------+
| 43b183c8-53cc-430f-b4e8-b0e1adc4e702 | vnflcm_edd306c3-647c-412c-a033-74aa40118038-VDU1_scale_group-5w6gwjuqjpsx-rlitsss7zfsx-oa4wsjz5yfcf | CREATE_COMPLETE | b96169b5-d692-4b5c-81b2-86010775180e |
| b96169b5-d692-4b5c-81b2-86010775180e | vnflcm_edd306c3-647c-412c-a033-74aa40118038-VDU1_scale_group-5w6gwjuqjpsx | CREATE_COMPLETE | 6f48a8cf-0acb-4271-ae72-562c903f5381 |
| 6f48a8cf-0acb-4271-ae72-562c903f5381 | vnflcm_edd306c3-647c-412c-a033-74aa40118038 | CREATE_COMPLETE | None |
+--------------------------------------+-----------------------------------------------------------------------------------------------------+-----------------+--------------------------------------+
+--------------------------------------+-----------------------------------------------------------------------------------------------+-----------------+--------------------------------------+
| ID | Stack Name | Stack Status | Parent |
+--------------------------------------+-----------------------------------------------------------------------------------------------+-----------------+--------------------------------------+
| 3315a9f5-9c55-45ec-8b52-91875856c6e6 | vnflcm_0c3644ff-b207-4a6a-9d3a-d1295cda153a-VDU1_scale-3x6qwnzbj6ep | CREATE_COMPLETE | e9d4576f-950c-4076-a54d-35b5cf43ebdd |
| 1b0bd450-3154-4301-b004-46a8b21152c1 | vnflcm_0c3644ff-b207-4a6a-9d3a-d1295cda153a-VDU1_scale-3x6qwnzbj6ep-gfrxqjt6nfqb-2ufs4pbsedui | CREATE_COMPLETE | 3315a9f5-9c55-45ec-8b52-91875856c6e6 |
| e9d4576f-950c-4076-a54d-35b5cf43ebdd | vnflcm_0c3644ff-b207-4a6a-9d3a-d1295cda153a | CREATE_COMPLETE | None |
+--------------------------------------+-----------------------------------------------------------------------------------------------+-----------------+--------------------------------------+
Scale-out VNF can be executed by the following CLI command.
@ -211,7 +206,7 @@ Result:
.. code-block:: console
Scale request for VNF Instance edd306c3-647c-412c-a033-74aa40118038 has been accepted.
Scale request for VNF Instance 0c3644ff-b207-4a6a-9d3a-d1295cda153a has been accepted.
Stack information after scale-out:
@ -225,45 +220,55 @@ Result:
.. code-block:: console
+--------------------------------------+-----------------------------------------------------------------------------------------------------+-----------------+--------------------------------------+
| ID | Stack Name | Stack Status | Parent |
+--------------------------------------+-----------------------------------------------------------------------------------------------------+-----------------+--------------------------------------+
| 44c364a0-1928-4717-bd95-43a74a5fe520 | vnflcm_edd306c3-647c-412c-a033-74aa40118038-VDU1_scale_group-5w6gwjuqjpsx-prjzcxxskx4i-bwx6egqcdlqg | CREATE_COMPLETE | b96169b5-d692-4b5c-81b2-86010775180e |
| 43b183c8-53cc-430f-b4e8-b0e1adc4e702 | vnflcm_edd306c3-647c-412c-a033-74aa40118038-VDU1_scale_group-5w6gwjuqjpsx-rlitsss7zfsx-oa4wsjz5yfcf | UPDATE_COMPLETE | b96169b5-d692-4b5c-81b2-86010775180e |
| b96169b5-d692-4b5c-81b2-86010775180e | vnflcm_edd306c3-647c-412c-a033-74aa40118038-VDU1_scale_group-5w6gwjuqjpsx | UPDATE_COMPLETE | 6f48a8cf-0acb-4271-ae72-562c903f5381 |
| 6f48a8cf-0acb-4271-ae72-562c903f5381 | vnflcm_edd306c3-647c-412c-a033-74aa40118038 | CREATE_COMPLETE | None |
+--------------------------------------+-----------------------------------------------------------------------------------------------------+-----------------+--------------------------------------+
+--------------------------------------+-----------------------------------------------------------------------------------------------+-----------------+--------------------------------------+
| ID | Stack Name | Stack Status | Parent |
+--------------------------------------+-----------------------------------------------------------------------------------------------+-----------------+--------------------------------------+
| 909dc6a6-f60a-4410-84a1-9cfbfb788be1 | vnflcm_0c3644ff-b207-4a6a-9d3a-d1295cda153a-VDU1_scale-3x6qwnzbj6ep-cvfcy4h2rmuh-6zmqn6ason36 | CREATE_COMPLETE | 3315a9f5-9c55-45ec-8b52-91875856c6e6 |
| 3315a9f5-9c55-45ec-8b52-91875856c6e6 | vnflcm_0c3644ff-b207-4a6a-9d3a-d1295cda153a-VDU1_scale-3x6qwnzbj6ep | UPDATE_COMPLETE | e9d4576f-950c-4076-a54d-35b5cf43ebdd |
| 1b0bd450-3154-4301-b004-46a8b21152c1 | vnflcm_0c3644ff-b207-4a6a-9d3a-d1295cda153a-VDU1_scale-3x6qwnzbj6ep-gfrxqjt6nfqb-2ufs4pbsedui | UPDATE_COMPLETE | 3315a9f5-9c55-45ec-8b52-91875856c6e6 |
| e9d4576f-950c-4076-a54d-35b5cf43ebdd | vnflcm_0c3644ff-b207-4a6a-9d3a-d1295cda153a | CREATE_COMPLETE | None |
+--------------------------------------+-----------------------------------------------------------------------------------------------+-----------------+--------------------------------------+
Stack details:
.. code-block:: console
$ openstack stack resource list b96169b5-d692-4b5c-81b2-86010775180e
$ openstack stack resource list 3315a9f5-9c55-45ec-8b52-91875856c6e6
+---------------+--------------------------------------+---------------+-----------------+----------------------+
| resource_name | physical_resource_id | resource_type | resource_status | updated_time |
+---------------+--------------------------------------+---------------+-----------------+----------------------+
| rlitsss7zfsx | 43b183c8-53cc-430f-b4e8-b0e1adc4e702 | VDU1.yaml | UPDATE_COMPLETE | 2021-01-06T05:24:50Z |
| prjzcxxskx4i | 44c364a0-1928-4717-bd95-43a74a5fe520 | VDU1.yaml | CREATE_COMPLETE | 2021-01-06T05:24:49Z |
| gfrxqjt6nfqb | 1b0bd450-3154-4301-b004-46a8b21152c1 | VDU1.yaml | UPDATE_COMPLETE | 2023-12-28T02:36:50Z |
| cvfcy4h2rmuh | 909dc6a6-f60a-4410-84a1-9cfbfb788be1 | VDU1.yaml | CREATE_COMPLETE | 2023-12-28T02:36:50Z |
+---------------+--------------------------------------+---------------+-----------------+----------------------+
$ openstack stack resource list 43b183c8-53cc-430f-b4e8-b0e1adc4e702
+----------------+--------------------------------------+------------------------+-----------------+----------------------+
| resource_name | physical_resource_id | resource_type | resource_status | updated_time |
+----------------+--------------------------------------+------------------------+-----------------+----------------------+
| VDU1 | 82fd8c7d-7a55-449e-b563-457c6c59e9ac | OS::Nova::Server | CREATE_COMPLETE | 2021-01-06T05:15:35Z |
+----------------+--------------------------------------+------------------------+-----------------+----------------------+
$ openstack stack resource list 1b0bd450-3154-4301-b004-46a8b21152c1
+---------------+--------------------------------------+-------------------+-----------------+----------------------+
| resource_name | physical_resource_id | resource_type | resource_status | updated_time |
+---------------+--------------------------------------+-------------------+-----------------+----------------------+
| VDU1 | f32848eb-598f-4158-8896-5ea9479456de | OS::Nova::Server | CREATE_COMPLETE | 2023-12-28T02:32:04Z |
| VDU1_CP4 | e21dc5cc-eb46-4cf9-a352-7aa3cf659af7 | OS::Neutron::Port | CREATE_COMPLETE | 2023-12-28T02:32:04Z |
| VDU1_CP2 | 0988d9dc-97ba-43be-944d-185e316785f9 | OS::Neutron::Port | CREATE_COMPLETE | 2023-12-28T02:32:04Z |
| VDU1_CP3 | d125eec4-4e85-43cb-9887-cd5373b0abae | OS::Neutron::Port | CREATE_COMPLETE | 2023-12-28T02:32:04Z |
| VDU1_CP5 | 16e66a58-c75c-4afe-be4f-e7eaafdfa506 | OS::Neutron::Port | CREATE_COMPLETE | 2023-12-28T02:32:04Z |
| VDU1_CP1 | d581db6b-eac8-49cf-99e0-3c494450b33b | OS::Neutron::Port | CREATE_COMPLETE | 2023-12-28T02:32:04Z |
+---------------+--------------------------------------+-------------------+-----------------+----------------------+
$ openstack stack resource list 44c364a0-1928-4717-bd95-43a74a5fe520
+----------------+--------------------------------------+------------------------+-----------------+----------------------+
| resource_name | physical_resource_id | resource_type | resource_status | updated_time |
+----------------+--------------------------------------+------------------------+-----------------+----------------------+
| VDU1 | 073fc301-49a5-41ff-953f-5fa6736414ed | OS::Nova::Server | CREATE_COMPLETE | 2021-01-06T05:24:49Z |
+----------------+--------------------------------------+------------------------+-----------------+----------------------+
$ openstack stack resource list 909dc6a6-f60a-4410-84a1-9cfbfb788be1
+---------------+--------------------------------------+-------------------+-----------------+----------------------+
| resource_name | physical_resource_id | resource_type | resource_status | updated_time |
+---------------+--------------------------------------+-------------------+-----------------+----------------------+
| VDU1 | e92cb6ca-72bb-46c8-91f1-531eb1d01315 | OS::Nova::Server | CREATE_COMPLETE | 2023-12-28T02:36:52Z |
| VDU1_CP4 | 838a673d-d684-4eaa-92ff-78f1d145b4e1 | OS::Neutron::Port | CREATE_COMPLETE | 2023-12-28T02:36:52Z |
| VDU1_CP2 | e10f8b96-7e90-4232-b8aa-ec72b9a39d55 | OS::Neutron::Port | CREATE_COMPLETE | 2023-12-28T02:36:52Z |
| VDU1_CP3 | 40960abd-5a3d-439f-8f2d-4ad70b5eb1ea | OS::Neutron::Port | CREATE_COMPLETE | 2023-12-28T02:36:52Z |
| VDU1_CP5 | b71a8b32-5ce4-48fb-9cf5-8bb6328b3679 | OS::Neutron::Port | CREATE_COMPLETE | 2023-12-28T02:36:52Z |
| VDU1_CP1 | 35344427-eff6-47e3-820b-11782996e805 | OS::Neutron::Port | CREATE_COMPLETE | 2023-12-28T02:36:52Z |
+---------------+--------------------------------------+-------------------+-----------------+----------------------+
It can be seen that the child-stack (ID: 44c364a0-1928-4717-bd95-43a74a5fe520)
with the parent-stack (ID: b96169b5-d692-4b5c-81b2-86010775180e)
It can be seen that the child-stack (ID: 909dc6a6-f60a-4410-84a1-9cfbfb788be1)
with the parent-stack (ID: 3315a9f5-9c55-45ec-8b52-91875856c6e6)
is increased by the scaling out operation.
@ -288,14 +293,14 @@ Result:
.. code-block:: console
+--------------------------------------+-----------------------------------------------------------------------------------------------------+-----------------+--------------------------------------+
| ID | Stack Name | Stack Status | Parent |
+--------------------------------------+-----------------------------------------------------------------------------------------------------+-----------------+--------------------------------------+
| 44c364a0-1928-4717-bd95-43a74a5fe520 | vnflcm_edd306c3-647c-412c-a033-74aa40118038-VDU1_scale_group-5w6gwjuqjpsx-prjzcxxskx4i-bwx6egqcdlqg | CREATE_COMPLETE | b96169b5-d692-4b5c-81b2-86010775180e |
| 43b183c8-53cc-430f-b4e8-b0e1adc4e702 | vnflcm_edd306c3-647c-412c-a033-74aa40118038-VDU1_scale_group-5w6gwjuqjpsx-rlitsss7zfsx-oa4wsjz5yfcf | UPDATE_COMPLETE | b96169b5-d692-4b5c-81b2-86010775180e |
| b96169b5-d692-4b5c-81b2-86010775180e | vnflcm_edd306c3-647c-412c-a033-74aa40118038-VDU1_scale_group-5w6gwjuqjpsx | UPDATE_COMPLETE | 6f48a8cf-0acb-4271-ae72-562c903f5381 |
| 6f48a8cf-0acb-4271-ae72-562c903f5381 | vnflcm_edd306c3-647c-412c-a033-74aa40118038 | CREATE_COMPLETE | None |
+--------------------------------------+-----------------------------------------------------------------------------------------------------+-----------------+--------------------------------------+
+--------------------------------------+-----------------------------------------------------------------------------------------------+-----------------+--------------------------------------+
| ID | Stack Name | Stack Status | Parent |
+--------------------------------------+-----------------------------------------------------------------------------------------------+-----------------+--------------------------------------+
| 909dc6a6-f60a-4410-84a1-9cfbfb788be1 | vnflcm_0c3644ff-b207-4a6a-9d3a-d1295cda153a-VDU1_scale-3x6qwnzbj6ep-cvfcy4h2rmuh-6zmqn6ason36 | CREATE_COMPLETE | 3315a9f5-9c55-45ec-8b52-91875856c6e6 |
| 3315a9f5-9c55-45ec-8b52-91875856c6e6 | vnflcm_0c3644ff-b207-4a6a-9d3a-d1295cda153a-VDU1_scale-3x6qwnzbj6ep | UPDATE_COMPLETE | e9d4576f-950c-4076-a54d-35b5cf43ebdd |
| 1b0bd450-3154-4301-b004-46a8b21152c1 | vnflcm_0c3644ff-b207-4a6a-9d3a-d1295cda153a-VDU1_scale-3x6qwnzbj6ep-gfrxqjt6nfqb-2ufs4pbsedui | UPDATE_COMPLETE | 3315a9f5-9c55-45ec-8b52-91875856c6e6 |
| e9d4576f-950c-4076-a54d-35b5cf43ebdd | vnflcm_0c3644ff-b207-4a6a-9d3a-d1295cda153a | CREATE_COMPLETE | None |
+--------------------------------------+-----------------------------------------------------------------------------------------------+-----------------+--------------------------------------+
Scale-in VNF can be executed by the following CLI command.
@ -309,7 +314,7 @@ Result:
.. code-block:: console
Scale request for VNF Instance edd306c3-647c-412c-a033-74aa40118038 has been accepted.
Scale request for VNF Instance 0c3644ff-b207-4a6a-9d3a-d1295cda153a has been accepted.
Stack information after scale-in:
@ -323,18 +328,18 @@ Result:
.. code-block:: console
+--------------------------------------+-----------------------------------------------------------------------------------------------------+-----------------+--------------------------------------+
| ID | Stack Name | Stack Status | Parent |
+--------------------------------------+-----------------------------------------------------------------------------------------------------+-----------------+--------------------------------------+
| 44c364a0-1928-4717-bd95-43a74a5fe520 | vnflcm_edd306c3-647c-412c-a033-74aa40118038-VDU1_scale_group-5w6gwjuqjpsx-prjzcxxskx4i-bwx6egqcdlqg | UPDATE_COMPLETE | b96169b5-d692-4b5c-81b2-86010775180e |
| b96169b5-d692-4b5c-81b2-86010775180e | vnflcm_edd306c3-647c-412c-a033-74aa40118038-VDU1_scale_group-5w6gwjuqjpsx | UPDATE_COMPLETE | 6f48a8cf-0acb-4271-ae72-562c903f5381 |
| 6f48a8cf-0acb-4271-ae72-562c903f5381 | vnflcm_edd306c3-647c-412c-a033-74aa40118038 | CREATE_COMPLETE | None |
+--------------------------------------+-----------------------------------------------------------------------------------------------------+-----------------+--------------------------------------+
+--------------------------------------+-----------------------------------------------------------------------------------------------+-----------------+--------------------------------------+
| ID | Stack Name | Stack Status | Parent |
+--------------------------------------+-----------------------------------------------------------------------------------------------+-----------------+--------------------------------------+
| 909dc6a6-f60a-4410-84a1-9cfbfb788be1 | vnflcm_0c3644ff-b207-4a6a-9d3a-d1295cda153a-VDU1_scale-3x6qwnzbj6ep-cvfcy4h2rmuh-6zmqn6ason36 | UPDATE_COMPLETE | 3315a9f5-9c55-45ec-8b52-91875856c6e6 |
| 3315a9f5-9c55-45ec-8b52-91875856c6e6 | vnflcm_0c3644ff-b207-4a6a-9d3a-d1295cda153a-VDU1_scale-3x6qwnzbj6ep | UPDATE_COMPLETE | e9d4576f-950c-4076-a54d-35b5cf43ebdd |
| e9d4576f-950c-4076-a54d-35b5cf43ebdd | vnflcm_0c3644ff-b207-4a6a-9d3a-d1295cda153a | CREATE_COMPLETE | None |
+--------------------------------------+-----------------------------------------------------------------------------------------------+-----------------+--------------------------------------+
There were two child-stacks(ID: 44c364a0-1928-4717-bd95-43a74a5fe520
and ID: 43b183c8-53cc-430f-b4e8-b0e1adc4e702) with
a parent-stack(ID: b96169b5-d692-4b5c-81b2-86010775180e),
There were two child-stacks(ID: 1b0bd450-3154-4301-b004-46a8b21152c1
and ID: 909dc6a6-f60a-4410-84a1-9cfbfb788be1) with
a parent-stack(ID: 3315a9f5-9c55-45ec-8b52-91875856c6e6),
it can be seen that one of them is decreased by the scale-in operation.

View File

@ -2,7 +2,13 @@
ETSI NFV-SOL VNF Update
=======================
This document describes how to update VNF in Tacker.
This document describes how to update VNF in Tacker v1 API.
.. note::
This is a document for Tacker v1 API.
See :doc:`/user/v2/vnf/update` for Tacker v2 API.
Prerequisites
-------------
@ -13,13 +19,13 @@ The following packages should be installed:
* python-tackerclient
A default VIM should be registered according to
:doc:`../cli/cli-legacy-vim`.
:doc:`/cli/cli-legacy-vim`.
The VNF Package(sample_vnf_pkg.zip) used below is prepared
by referring to :doc:`./vnf-package`.
The VNF Package(sample_vnf_package_csar.zip) used below is prepared
by referring to :doc:`/user/vnf-package`.
Execute before "Instantiate VNF" in the procedure of
:doc:`./etsi_vnf_deployment_as_vm_with_tosca`.
:doc:`/user/etsi_vnf_deployment_as_vm_with_tosca`.
VNF Update Procedures
@ -29,7 +35,7 @@ As mentioned in Prerequisites, the VNF must be created
before performing update.
Details of CLI commands are described in
:doc:`../cli/cli-etsi-vnflcm`.
:doc:`/cli/cli-etsi-vnflcm`.
For update VNF instance, you need to prepare a JSON-formatted definition file.
@ -39,7 +45,9 @@ For update VNF instance, you need to prepare a JSON-formatted definition file.
"vnfInstanceName": "sample"
}
.. note::
sample_param_file.json contains the VNF name as an example.
For v1 update operation, the following attributes of
``VnfInfoModificationRequest`` are not supported.
@ -50,14 +58,6 @@ For update VNF instance, you need to prepare a JSON-formatted definition file.
* vnfcInfoModifications
* vimConnectionInfo
.. note::
The v2 update operation can change the ``vimConnectionInfo``
associated with an existing VNF instance.
Even if update operation specify multiple ``vimConnectionInfo``
associated with one VNF instance, only one of them will be used for life
cycle management operations.
It is not possible to delete the key of registered ``vimConnectionInfo``.
How to Update VNF
~~~~~~~~~~~~~~~~~
@ -78,11 +78,11 @@ Result:
.. code-block:: console
+-------------------+-------+
| Field | Value |
+-------------------+-------+
| VNF Instance Name | None |
+-------------------+-------+
+-------------------+------------------------------------------+
| Field | Value |
+-------------------+------------------------------------------+
| VNF Instance Name | vnf-810d8c9b-e467-4b06-9265-ac9dce015fce |
+-------------------+------------------------------------------+
Update VNF can be executed by the following CLI command.
@ -96,9 +96,11 @@ Result:
.. code-block:: console
Update vnf:c64ea0fd-a90c-4754-95f4-dc0751db519d
Update vnf:810d8c9b-e467-4b06-9265-ac9dce015fce
.. note::
Create a parameter file that describes the resource information to be
changed in advance.
@ -114,25 +116,18 @@ Result:
.. code-block:: console
+-------------------+---------+
| Field | Value |
+-------------------+---------+
| VNF Instance Name | sample |
+-------------------+---------+
+-------------------+--------+
| Field | Value |
+-------------------+--------+
| VNF Instance Name | sample |
+-------------------+--------+
You can confirm that the VNF Instance Name has been changed by the update
operation.
If the ``vnfdId`` is not changed by update operation, the current value
shall be updated using the request parameter.
The following attributes are updated by performing JSON Merge Patch with the
values set in the request parameter to the current values.
* vnfConfigurableProperties
* metadata
* extensions
If the ``vnfdId`` is requested to be changed by v1 update operation, the
following attributes of VNF instance shall be updated in addition to those

View File

@ -24,6 +24,7 @@ Getting Started
.. toctree::
:maxdepth: 2
v2/getting_started/index
etsi_getting_started
@ -33,5 +34,6 @@ Use Case Guide
.. toctree::
:maxdepth: 3
v2/use_case_guide
etsi_use_case_guide
encrypt_vim_auth_with_barbican

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 20 KiB

View File

@ -0,0 +1,736 @@
===============================================================
ETSI NFV-SOL CNF Auto Healing With Prometheus via FM Interfaces
===============================================================
This document describes how to auto heal CNF in Tacker v2 API with
Prometheus via Fault Management Interfaces.
Overview
--------
Using the Fault Management interfaces, there are two ways to implement
auto heal, Polling Mode and Notification Mode.
The diagram below shows an overview of the CNF auto healing.
1. Create FM subscription(Notification Mode)
NFVO sends a request to Tacker to create a FM subscription.
2. Collect metrics
Prometheus collects metrics and decides whether triggering alert
is needed or not.
3. POST alert
Prometheus sends alerts to Tacker.
4. Convert alert to alarm
Tacker receives informed alerts, converts them to alarms, and saves
them to Tacker DB.
5. Get Alarms and return result(Polling Mode)
NFVO sends a request at regular intervals to get the alarm in
the Tacker. Tacker searches Tacker DB with the query condition
specified by NFVO, and returns the alarm that matches the
condition to NFVO.
6. Send alarm notification(Notification Mode)
VnffmDriver finds all FM subscriptions in the DB and matches the
alerts to them. If there is a FM subscription that can match
successfully, the alarm is sent to the specified path of the
NFVO. If the match is not successful, the processing ends.
7. Heal
NFVO recognizes the failure of the CNF from the alarm and sends
a heal request to the Tacker.
8. Call Kubernetes API
In tacker-conductor, the request is redirected again to an
appropriate infra-driver (in this case Kubernetes infra-driver)
according to the contents of the instantiate parameters. Then,
Kubernetes infra-driver calls Kubernetes APIs.
9. Create a new pod
Kubernetes Master adds the number of Pods according to the
API calls.
10. Delete the old pod
Kubernetes Master deletes the number of Pods according to the
API calls.
.. figure:: img/auto_heal_fm.svg
Prerequisites
-------------
* The following packages should be installed:
* tacker
* python-tackerclient
At least one VNF instance with status of ``INSTANTIATED`` is required.
You can refer to :doc:`/user/v2/cnf/deployment/index` for the
procedure to instantiate VNF.
The VNF Package used can refer to `the sample`_.
* The following third-party services should be installed
* NFVO
* Prometheus(including Alertmanager)
Each operator has its own NFVO, there is no restriction here, as long as
it conforms to `ETSI NFV-SOL 002 v3.3.1`_ and `ETSI NFV-SOL 003 v3.3.1`_,
it can be used.
For the installation of Prometheus and Alertmanager, please refer to
the `Prometheus official website`_.
How to configure Prometheus Plugin
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The Prometheus Plugin is disabled by default in Tacker.
For it to work, we need to find ``fault_management`` in
``tacker.conf`` and change its value to ``True``.
.. code-block:: console
$ vi /etc/tacker/tacker.conf
...
[prometheus_plugin]
fault_management = True
[v2_vnfm]
# Enable https access to notification server from Tacker (boolean value)
notification_verify_cert = true
...
After modifying the configuration file, don't forget to restart the
Tacker service to take effect.
.. code-block:: console
$ sudo systemctl stop devstack@tacker
$ sudo systemctl restart devstack@tacker-conductor
$ sudo systemctl start devstack@tacker
How to configure Prometheus
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Unlike auto scale via PM interfaces, auto heal via FM interfaces does not
need to login Prometheus server via SSH to modify its configuration.
Users need to manually modify the configuration file of Prometheus, and
then it will monitor the specified resources.
For the setting method of Prometheus configuration file, please refer to
`Prometheus Configuration`_ for details.
The following is the content of a sample ``prometheus.yml``:
.. code-block:: yaml
global:
scrape_interval: 15s
evaluation_interval: 15s
alerting:
alertmanagers:
- static_configs:
- targets:
- <IP of Alertmanager>:9093
rule_files:
- "tacker-samplevnf-rules.yaml"
scrape_configs:
- job_name: "kube-state-metrics"
static_configs:
- targets: ["<IP of Kubernetes>:<port of metrics>"]
The following is the content of a sample ``tacker-samplevnf-rules.json``:
.. code-block:: yaml
groups:
- name: example
rules:
- alert: KubePodCrashLooping
annotations:
probable_cause: The server cannot be connected.
fault_type: Server Down
fault_details: fault details
expr: |
rate(kube_pod_container_status_restarts_total{job="kube-state-metrics"}[10m]) * 60 * 5 > 0
for: 5m
labels:
receiver_type: tacker
function_type: vnffm
vnf_instance_id: <VNF instance ID>
perceived_severity: WARNING
event_type: EQUIPMENT_ALARM
The following is the content of a sample ``alertmanager.yml``:
.. code-block:: yaml
route:
group_by: ['cluster']
group_wait: 30s
group_interval: 2m
repeat_interval: 1h
receiver: 'web.boo'
routes:
- match:
alertname: KubePodCrashLooping
receiver: 'web.boo'
receivers:
- name: 'web.boo'
webhook_configs:
- url: 'http://<IP of Tacker>:9890/alert'
inhibit_rules:
- source_match:
severity: 'critical'
target_match:
severity: 'warning'
equal: ['dev', 'instance']
How does NFVO Auto Heal CNF
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Through the FM interfaces, there are two modes to auto heal the CNF.
Polling Mode
^^^^^^^^^^^^
This mode is where NFVO actively sends a get alarms request to Tacker
at an interval.
According to the content of the response, confirm the VNFC instance ID
of the CNF in which the problem occurred.
The following is an example of a response to a get alarms request:
.. code-block:: json
[
{
"id": "de8e74e8-1845-40dd-892c-cb7a67c26f9f",
"managedObjectId": "c21fd71b-2866-45f6-89d0-70c458a5c32e",
"vnfcInstanceIds": [
"VDU1-curry-probe-test001-798d577c96-5624p"
],
"alarmRaisedTime": "2023-12-08T13:16:30Z",
"alarmChangedTime": "",
"alarmClearedTime": "",
"alarmAcknowledgedTime": "",
"ackState": "UNACKNOWLEDGED",
"perceivedSeverity": "CRITICAL",
"eventTime": "2023-12-08T13:16:00Z",
"eventType": "PROCESSING_ERROR_ALARM",
"faultType": "fault_type",
"probableCause": "Process Terminated",
"isRootCause": "false",
"correlatedAlarmIds": [],
"faultDetails": [
"fingerprint: 5ee739bb8840a190",
"detail: fault_details"
],
"_links": {
"self": {
"href": "http://127.0.0.1:9890/vnffm/v1/alarms/de8e74e8-1845-40dd-892c-cb7a67c26f9f"
},
"objectInstance": {
"href": "http://127.0.0.1:9890/vnflcm/v2/vnf_instances/c21fd71b-2866-45f6-89d0-70c458a5c32e"
}
}
}
]
.. note::
The value of ``managedObjectId`` is the VNF instance ID.
The value of ``vnfcInstanceIds`` is the VNFC instance IDs.
Then send a heal request specifying the VNFC instance ID to Tacker.
The format of the heal request can refer to `heal request`_.
Notification Mode
^^^^^^^^^^^^^^^^^
This mode is that NFVO will create a FM subscription on Tacker.
In this FM subscription, multiple filter conditions can be set, so that
the VNF instance that has been instantiated in Tacker can be matched.
Create FM subscription can be executed by the following CLI command.
.. code-block:: console
$ openstack vnffm sub create sample_param_file.json --os-tacker-api-version 2
The content of the sample ``sample_param_file.json`` in this document is
as follows:
.. code-block:: json
{
"filter": {
"vnfInstanceSubscriptionFilter": {
"vnfdIds": [
"4d5ffa3b-9dde-45a9-a805-659dc8df0c02"
],
"vnfProductsFromProviders": [
{
"vnfProvider": "Company",
"vnfProducts": [
{
"vnfProductName": "Sample VNF",
"versions": [
{
"vnfSoftwareVersion": 1.0,
"vnfdVersions": [1.0, 2.0]
}
]
}
]
}
],
"vnfInstanceIds": [
"aad7d2fe-ed51-47da-a20d-7b299860607e"
],
"vnfInstanceNames": [
"test"
]
},
"notificationTypes": [
"AlarmNotification"
],
"faultyResourceTypes": [
"COMPUTE"
],
"perceivedSeverities": [
"WARNING"
],
"eventTypes": [
"EQUIPMENT_ALARM"
],
"probableCauses": [
"The server cannot be connected."
]
},
"callbackUri": "http://127.0.0.1:9890/vnffm/v1/subscriptions/407cb9c5-60f2-43e8-a43a-925c0323c3eb",
"authentication": {
"authType": [
"BASIC",
"OAUTH2_CLIENT_CREDENTIALS",
"OAUTH2_CLIENT_CERT"
],
"paramsBasic": {
"userName": "nfvo",
"password": "nfvopwd"
},
"paramsOauth2ClientCredentials": {
"clientId": "auth_user_name",
"clientPassword": "auth_password",
"tokenEndpoint": "token_endpoint"
},
"paramsOauth2ClientCert": {
"clientId": "auth_user_name",
"certificateRef": {
"type": "x5t#S256",
"value": "certificate_fingerprint"
},
"tokenEndpoint": "token_endpoint"
}
}
}
Here is an example of create FM subscription:
.. code-block:: console
$ openstack vnffm sub create sample_param_file.json --os-tacker-api-version 2
+--------------+-----------------------------------------------------------------------------------------------------+
| Field | Value |
+--------------+-----------------------------------------------------------------------------------------------------+
| Callback Uri | http://127.0.0.1:9890/vnffm/v1/subscriptions/407cb9c5-60f2-43e8-a43a-925c0323c3eb |
| Filter | { |
| | "vnfInstanceSubscriptionFilter": { |
| | "vnfdIds": [ |
| | "4d5ffa3b-9dde-45a9-a805-659dc8df0c02" |
| | ], |
| | "vnfProductsFromProviders": [ |
| | { |
| | "vnfProvider": "Company", |
| | "vnfProducts": [ |
| | { |
| | "vnfProductName": "Sample VNF", |
| | "versions": [ |
| | { |
| | "vnfSoftwareVersion": "1.0", |
| | "vnfdVersions": [ |
| | "1.0", |
| | "2.0" |
| | ] |
| | } |
| | ] |
| | } |
| | ] |
| | } |
| | ], |
| | "vnfInstanceIds": [ |
| | "aad7d2fe-ed51-47da-a20d-7b299860607e" |
| | ], |
| | "vnfInstanceNames": [ |
| | "test" |
| | ] |
| | }, |
| | "notificationTypes": [ |
| | "AlarmNotification" |
| | ], |
| | "faultyResourceTypes": [ |
| | "COMPUTE" |
| | ], |
| | "perceivedSeverities": [ |
| | "WARNING" |
| | ], |
| | "eventTypes": [ |
| | "EQUIPMENT_ALARM" |
| | ], |
| | "probableCauses": [ |
| | "The server cannot be connected." |
| | ] |
| | } |
| ID | a7a18ac6-a668-4d94-8ba0-f04c20cfeacd |
| Links | { |
| | "self": { |
| | "href": "http://127.0.0.1:9890/vnffm/v1/subscriptions/407cb9c5-60f2-43e8-a43a-925c0323c3eb" |
| | } |
| | } |
+--------------+-----------------------------------------------------------------------------------------------------+
After the FM subscription is created, whenever Prometheus sends an alert
to Tacker, Tacker will find a matching FM subscription based on the
information in the alert.
The following is an example of the request body that Prometheus sends
an alert:
.. code-block:: json
{
"receiver": "receiver",
"status": "firing",
"alerts": [
{
"status": "firing",
"labels": {
"receiver_type": "tacker",
"function_type": "vnffm",
"vnf_instance_id": "c21fd71b-2866-45f6-89d0-70c458a5c32e",
"pod": "VDU1-curry-probe-test001-798d577c96-5624p",
"perceived_severity": "CRITICAL",
"event_type": "PROCESSING_ERROR_ALARM"
},
"annotations": {
"fault_type": "fault_type",
"probable_cause": "Process Terminated",
"fault_details": "fault_details"
},
"startsAt": "2023-12-08T13:16:00Z",
"endsAt": "0001-01-01T00:00:00Z",
"generatorURL": "http://192.168.121.35:9090/graph?g0.expr=up%7Bjob%3D%22node%22%7D+%3D%3D+0&g0.tab=1",
"fingerprint": "5ee739bb8840a190"
}
],
"groupLabels": {},
"commonLabels": {
"alertname": "NodeInstanceDown",
"job": "node"
},
"commonAnnotations": {
"description": "sample"
},
"externalURL": "http://192.168.121.35:9093",
"version": "4",
"groupKey": "{}:{}",
"truncatedAlerts": 0
}
Finally, a notification is sent to the Callback Uri (i.e. NFVO) in the FM
subscription. NFVO sends a heal request to Tacker according to the
content in the notification.
The format of the heal request can refer to `heal request`_.
The following is an example of the request body that Tacker sends
a notification: