VNF resources in terms of CPU core and memory are hardcoded in VNFD template through image flavor settings. This result in either provisioning VNF for typical usage or for maximum usage. The former leads to service disruption when load exceeds provisioned capacity. And the later leads to underutilized resources and waste during normal system load. So tacker provides a way to seamlessly scale the number of VNFs on demand either manually or automatically.
Tacker defines TOSCA schema for the scaling policy as given below:
tosca.policies.tacker.Scaling:
  derived_from: tosca.policies.Scaling
  description: Defines policy for scaling the given targets.
  properties:
    increment:
      type: integer
      required: true
      description: Number of nodes to add or remove during the scale out/in.
    targets:
      type: list
      entry_schema:
        type: string
      required: true
      description: List of Scaling nodes.
    min_instances:
      type: integer
      required: true
      description: Minimum number of instances to scale in.
    max_instances:
      type: integer
      required: true
      description: Maximum number of instances to scale out.
    default_instances:
      type: integer
      required: true
      description: Initial number of instances.
    cooldown:
      type: integer
      required: false
      default: 120
      description: Wait time (in seconds) between consecutive scaling
      operations. During the cooldown period, scaling action will be ignored
Following TOSCA snippet shows the scaling policy used in VNFD, in which vdu1 and vdu2 are already defined VDUs.
policies:
   sp1:
     type: tosca.policies.tacker.Scaling
     description: Simple VDU scaling
     properties:
        min_instances: 1
        max_instances: 3
        default_instances: 2
        increment: 1
        targets: [vdu1, vdu2]
Once OpenStack/Devstack along with Tacker has been successfully installed, deploy a sample scaling template from location given below: https://github.com/openstack/tacker/tree/master/samples/tosca-templates/vnfd
Refer the ‘Getting Started’ link below on how to create a VNFD and deploy a VNF: https://docs.openstack.org/tacker/latest/install/getting_started.html
Tacker provides following CLI for scaling.
Here,
For example, to scale-out policy ‘sp1’ defined above, this cli could be used as below:
Tacker provides following REST API for scaling.
POST on v1.0/vnfs/<vnf-id>/actions
with body
{“scale”: { “type”: “<type>”, “policy” : “<scaling-policy-name>”}}
Here,
Response http status codes:
During the scaling operation, the VNF will be moving in below state transformations:
Following features are not supported with scaling:
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.