Skip to content

Scaling a service

Thomas Soenen edited this page Aug 28, 2019 · 3 revisions

When the MANO Framework is used as part of the 5GTANGO Service Platform, please use the Gatekeeper component to make service scaling requests. When using the MANO Framework in its standalone setup, it might be useful to use the sonmano library to interact with it.

To communicate directly with the MANO Framework, one needs to connect to the RabbitMQ message bus.

Scale out

To scale out a running service, send a message on the service.instance.scale topic. This message requires the following header fields:

  • app_id: to indicate the sender of the message
  • correlation_id: a correlation id for the message
  • reply_to: the topic on which the sender expects a response, in this case service.instance.scale

The payload of the request is a yaml encoded dictionary that should include the following fields:

  • scaling_type : 'ADD_VNF'
  • service_instance_uuid: The id of the service that requires scaling
  • vnfd_uuid: The id of the VNFD of the VNF that requires additional instances
  • number_of_instances: The number of additional instances

Example:

scaling_type: 'ADD_VNF'
service_instance_uuid: 33b4d018-d19c-46b0-9aad-c1e0cb54c4d5
vnfd_uuid: 9c4d18c2-a31c-43b6-bda5-f9976a88ab2d
number_of_instances: 3

The MANO Framework will send two responses to this message on the same topic. A first response directly after receiving the request, to indicate that it was received, and whether the workflow was started. This message will have the following headers:

  • app_id: To indicate which MANO Framework plugin responded
  • correlation_id: The same correlation id as in the request

The payload of the message is a yaml encoded dictionary with the following fields:

  • status: either SCALING or ERROR, to indicate whether the workflow was started or rejected
  • error: None in case of no error, a string when there was an error

If the status in this message was SCALING, the MANO Framework will send an additional message at the end of the workflow. This message will have the following headers:

  • app_id: To indicate which MANO Framework plugin (the SLM) responded
  • correlation_id: The same correlation id as in the request

The payload of the message is a yaml encoded dictionary with the following fields:

  • workflow: addvnf
  • status: READY | ERROR
  • error: null | string to indicate possible error
  • duration: Duration of the scaling workflow
  • nsr: The NSR
  • vnfrs: List of VNFRs

Scale in

To scale in a running service, send a message on the service.instance.scale topic. This message requires the following header fields:

  • app_id: to indicate the sender of the message
  • correlation_id: a correlation id for the message
  • reply_to: the topic on which the sender expects a response, in this case service.instance.scale

The payload of the request is a yaml encoded dictionary that should include the following fields:

  • scaling_type : 'REMOVE_VNF'
  • service_instance_uuid: The id of the service that requires scaling
  • vnfd_uuid: The id of the VNFD of the VNF that needs to be removed
  • vnf_uuid: The id of the VNF that needs to be removed
  • number_of_instances: The number of instances to remove (only with vnfd_uuid, not with vnf_uuid)

Exactly one of vnfd_uuid and `vnf_uuid should be present.

Example:

scaling_type: 'REMOVE_VNF'
service_instance_uuid: 33b4d018-d19c-46b0-9aad-c1e0cb54c4d5
vnfd_uuid: 9c4d18c2-a31c-43b6-bda5-f9976a88ab2d
number_of_instances: 2

The MANO Framework will send two responses to this message on the same topic. A first response directly after receiving the request, to indicate that it was received, and whether the workflow was started. This message will have the following headers:

  • app_id: To indicate which MANO Framework plugin responded
  • correlation_id: The same correlation id as in the request

The payload of the message is a yaml encoded dictionary with the following fields:

  • status: either SCALING or ERROR, to indicate whether the workflow was started or rejected
  • error: None in case of no error, a string when there was an error

If the status in this message was SCALING, the MANO Framework will send an additional message at the end of the workflow. This message will have the following headers:

  • app_id: To indicate which MANO Framework plugin responded
  • correlation_id: The same correlation id as in the request

The payload of the message is a yaml encoded dictionary with the following fields:

  • workflow: removevnf`
  • status: READY | ERROR
  • error: null | string to indicate possible error
  • duration: Duration of the scaling workflow
  • nsr: The NSR
  • vnfrs: List of VNFRs
Clone this wiki locally