Merge "Fix miscellaneous bugs found in VNF scaling guide"

This commit is contained in:
Zuul 2020-11-26 15:50:47 +00:00 committed by Gerrit Code Review
commit 9e08ffb31c

View File

@ -17,13 +17,13 @@
VNF scaling VNF scaling
=========== ===========
VNF resources in terms of CPU core and memory are hardcoded in VNFD template VNF resources in terms of CPU core and memory are hardcoded in the VNFD
through image flavor settings. This result in either provisioning VNF for template through image flavor settings. This results in either provisioning
typical usage or for maximum usage. The former leads to service disruption VNF for typical usage or for maximum usage. The former leads to service
when load exceeds provisioned capacity. And the later leads to underutilized disruption when the load exceeds provisioned capacity. And the latter leads
resources and waste during normal system load. So tacker provides a to underutilized resources and waste during normal system load. So Tacker
way to seamlessly scale the number of VNFs on demand either manually or provides a way to seamlessly scale the number of VNFs on demand either
automatically. manually or automatically.
TOSCA schema for scaling policy TOSCA schema for scaling policy
@ -70,28 +70,20 @@ Tacker defines TOSCA schema for the scaling policy as given below:
Sample TOSCA with scaling policy Sample TOSCA with scaling policy
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Following TOSCA snippet shows the scaling policy used in VNFD, in which vdu1 The following TOSCA snippet shows the scaling policy used in VNFD, in which
and vdu2 are already defined VDUs. vdu1 and vdu2 are already defined VDUs.
.. code-block:: yaml .. code-block:: yaml
policies: policies:
- sp1: - sp1:
type: tosca.policies.tacker.Scaling type: tosca.policies.tacker.Scaling
description: Simple VDU scaling description: Simple VDU scaling
targets: [vdu1, vdu2] targets: [vdu1, vdu2]
properties: properties:
min_instances: 1 min_instances: 1
max_instances: 3 max_instances: 3
default_instances: 2 default_instances: 2
increment: 1 increment: 1
Deploying scaling TOSCA template using Tacker Deploying scaling TOSCA template using Tacker
@ -100,11 +92,10 @@ Deploying scaling TOSCA template using Tacker
Once OpenStack/Devstack along with Tacker has been successfully installed, Once OpenStack/Devstack along with Tacker has been successfully installed,
deploy a sample scaling template from location given deploy a sample scaling template from location given
below: below:
https://github.com/openstack/tacker/tree/master/samples/tosca-templates/vnfd https://opendev.org/openstack/tacker/src/branch/master/samples/tosca-templates/vnfd
Refer the 'Getting Started' link below on how to create a VNFD and deploy a How to create a VNFD and deploy a VNF refer to
VNF: :doc:`../install/getting_started`.
https://docs.openstack.org/tacker/latest/install/getting_started.html
How to scale VNF using CLI How to scale VNF using CLI
@ -112,12 +103,10 @@ How to scale VNF using CLI
Tacker provides following CLI for scaling. Tacker provides following CLI for scaling.
.. code-block::console .. code-block:: console
**openstack vnf scale --vnf-id <vnf-id>** $ openstack vnf scale --vnf-id <vnf-id> --vnf-name <vnf name> \
**--vnf-name <vnf name>** --scaling-policy-name <policy name> --scaling-type <type>
**--scaling-policy-name <policy name>**
**--scaling-type <type>**
Here, Here,
@ -126,14 +115,13 @@ Here,
* vnf-id - scaling VNF id * vnf-id - scaling VNF id
* vnf-name - scaling VNF name * vnf-name - scaling VNF name
For example, to scale-out policy 'sp1' defined above, this cli could be used For example, to scale-out policy 'sp1' defined above, this command could be
as below: used as below:
.. code-block::console .. code-block:: console
**openstack vnf scale --vnf-name sample-vnf** $ openstack vnf scale --vnf-name sample-vnf --scaling-policy-name sp1 \
**--scaling-policy-name sp1** --scaling-type out
**--scaling-type out**
How to scale VNF using REST API How to scale VNF using REST API
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@ -144,9 +132,9 @@ Tacker provides following REST API for scaling.
with body with body
.. code-block::json .. code-block:: json
**{"scale": { "type": "<type>", "policy" : "<scaling-policy-name>"}}** {"scale": { "type": "<type>", "policy" : "<scaling-policy-name>"}}
Here, Here,