Policies

You define the auto scaling policies as sections inside the policies: section of the template and give them unique label names. In those policies you define the measurements and criteria which trigger the actions you wish to be performed.

Policies are defined with a section name, a type, measurement, criterion, and actions.

Attention

It is not recommended to “share” measurement, criterion, and actions with other policies defined in the template. Each policy you define in a template should have their own set of measurement, criterion, and actions.

section name

You specify a section name for your policy which must be unique in the template and is referenced in a group.

Example: scale_up_on_cpu:

Type

The type: specifies the type of policy. There is currently only one auto scaling policy type.

  • type: dcm.policy.types.BasicPolicy

Measurement

Measurements are where you define properties for Dell Cloud Manager to use to determine when to perform the actions you define in the policy.

In the policy you define a measurement: statement which references a measurements section in the template which contains the measurement definitions.

  • measurement: - References a measurements section in the template by it’s section name.
Example: measurement: your-measurement-section

Criterion

Criteria are where you define how to evaluate the measurements in determining when to trigger an action.

In the policy you define a criterion: statement which references a criteria section in the template which contains the criteria definitions.

  • criterion: - References a criteria section in the template by it’s section name.
Example: criterion: your-criteria-section

Actions

Actions are where you define what actions you want Dell Cloud Manager to perform.

In the policy you define a actions statement which references one or more actions sections which contains the actions definitions.

  • actions - References one or more actions sections in the template by their section name.

Example: actions:[ your-action-section ]

Note

Multiple actions are supported ( e.g. actions:[action1, action2, etc.] ).

Example

    policies:
    # This scale up policy will perform a scale up when the last 3 periods of idle time reported are all < 20%
      scale_up_on_cpu:
        type: dcm.policy.types.BasicPolicy
        actions: [scale_up]                  # The scale_up action is defined in the actions: section of the template
        measurement: cpu_idle_time           # The cpu_idle_time label is defined in the measurements: section of the template
        criterion: less_than_20              # The less_than_20 is a label defined in the criteria: section of the template

    # This scale down policy will perform a scale down when the last 2 periods of idle time reported are all > 80%
      scale_down_on_cpu:
        type: dcm.policy.types.BasicPolicy
        actions: [scale_down]                # The scale_down action is defined in the actions: section of the template
        measurement: cpu_idle_time           # The cpu_idle_time label is defined in the measurements: section of the template
        criterion: more_than_80              # The more_than_80 is a label defined in the criteria: section of the template