Difference between revisions of "Heat/Blueprints/ScalableResourceGroup"
Line 32: | Line 32: | ||
== Design == | == Design == | ||
− | Define a new heat resource type: OS::HEAT::ScalableResourceGroup with the following properties: | + | (1) Define a new heat resource type: OS::HEAT::ScalableResourceGroup with the following properties: |
resource_def : Map | resource_def : Map | ||
− | + | Resource definition for the resources in the group. | |
− | + | Required property. | |
− | + | Can be updated without replacement. | |
index_var : String | index_var : String | ||
− | + | A variable that this resource will use to replace with the current index of a given resource in the group. | |
− | + | Updates cause replacement. | |
− | + | Optional property, defaults to “%index%”. | |
initial_size: Integer | initial_size: Integer | ||
− | + | Initial number of resources in the group at creation time. | |
− | + | Optional property, defaults to 1. | |
− | + | The value must be at least 0. | |
max_size: Integer | max_size: Integer | ||
− | + | Maximum number of resources in the group. | |
− | + | Optional Property, defaults to 1. | |
− | + | Updates can cause creation/deletion of some resources according to scale_in_criteria/scale_in_order. | |
− | + | The value must be at least 0. | |
min_size: Integer | min_size: Integer | ||
− | + | Minimum number of resources in the group. | |
− | + | Optional property, defaults to 1. | |
− | + | Updates can cause addition/removal of resources according to scale_in_criteria/scale_in_order. | |
− | + | The value must be at least 0, less than or equal to max_size. | |
scale_in_criteria:String | scale_in_criteria:String | ||
− | + | Removal criteria of resources in the group. | |
− | + | Optional property, defaults to "Index". | |
− | + | Possible Values: "Index" or "Age" | |
− | |||
scale_in_order:String | scale_in_order:String | ||
− | + | Removal order of resources in the group according to the specified criteria. | |
− | + | Optional property, defaults to "Decreasing". | |
− | + | Possible Values: "Increasing" or "Decreasing" | |
− | |||
− | ScalableResourceGroup class inherits from ResourceGroup: | + | scale_batch_size:Integer |
− | - | + | Number of resources to be added/removed simultaneously. |
− | + | Optional property, defaults to 1. | |
+ | Possible Values: "Increasing" or "Decreasing" | ||
+ | |||
+ | scale_batch_pause:Integer | ||
+ | Number of seconds between batches. | ||
+ | Optional property, defaults to 0. | ||
+ | |||
+ | (2) Introduce ScalableResourceGroup class inherits from ResourceGroup. | ||
+ | The new class adds a signal handler for signals with the following specification: | ||
+ | - signal handler for signals with the following structure: | ||
+ | command: String | ||
+ | Actions to perform on the group. | ||
+ | Possible Values: "ADD", "REMOVE", RECREATE, "SCALE_OUT", "SCALE_OUT" | ||
+ | |||
+ | parameters: depends on the command | ||
+ | - ADD/REMOVE/RECREATE parameters: | ||
+ | resources: List of Integers | ||
+ | list of resource indices to add, remove or recreate | ||
+ | |||
+ | - SCALE_OUT/SCALE_IN parameters: | ||
+ | scale_size: Integer | ||
+ | Size adjustment. | ||
+ | Value Must be positive. |
Revision as of 16:06, 10 August 2015
< Heat
Launchpad Entry: HeatSpec:ScalableResourceGroup
Created: 26 July 2015
Contributors: Ahmed El-Khouly
Summary
OS::Heat::ResourceGroup provides a way to create several instances of identically configured nested resource; resources within the group can be addressed with their resource index.
OS::Heat::ResourceGroup can only scale by changing the count property followed by a stack update of the root stack.
OS::Heat::AutoScalingGroup/Policy also provide a way to create several instances identically configured nested resources with the added ability of changing size(scale) when the accompanying AutoScalingPolicy receives a signal. Auto-scaling policy defines characteristics of the scale operation (size of adjustment, size of adjustment, cool down period).
Some cloud applications need a resource group type that can change size and with the added ability of removal or addition of specific resources.
Release Note
TBD
Rationale
Some cloud applications need a new resource group with the following features:
1) Create an initial number of identically configured nested resources.
2) Address single resource within the group using the index with the ability to specify a variable to be replaced by the index.
3) Add(Remove) specific resource within the group by specifying the indices of involved resources.
4) Scale out(in) by adjusting the group size (with a certain increment) when user defined triggers are met.
User Stories
1) Recreate a (failed) resource by adding/deleting the corresponding nested resource in the group.
2) Add new resources to group when certain criteria met(ex. increase in workload).
3) Remove a number of resources according to a predefined criteria(increasing or decreasing order of age or index).
4) Specify certain resources for removal.
Assumptions
None.
Design
(1) Define a new heat resource type: OS::HEAT::ScalableResourceGroup with the following properties:
resource_def : Map Resource definition for the resources in the group. Required property. Can be updated without replacement.
index_var : String A variable that this resource will use to replace with the current index of a given resource in the group. Updates cause replacement. Optional property, defaults to “%index%”.
initial_size: Integer Initial number of resources in the group at creation time. Optional property, defaults to 1. The value must be at least 0.
max_size: Integer Maximum number of resources in the group. Optional Property, defaults to 1. Updates can cause creation/deletion of some resources according to scale_in_criteria/scale_in_order. The value must be at least 0.
min_size: Integer Minimum number of resources in the group. Optional property, defaults to 1. Updates can cause addition/removal of resources according to scale_in_criteria/scale_in_order. The value must be at least 0, less than or equal to max_size.
scale_in_criteria:String Removal criteria of resources in the group. Optional property, defaults to "Index". Possible Values: "Index" or "Age"
scale_in_order:String Removal order of resources in the group according to the specified criteria. Optional property, defaults to "Decreasing". Possible Values: "Increasing" or "Decreasing"
scale_batch_size:Integer Number of resources to be added/removed simultaneously. Optional property, defaults to 1. Possible Values: "Increasing" or "Decreasing"
scale_batch_pause:Integer Number of seconds between batches. Optional property, defaults to 0.
(2) Introduce ScalableResourceGroup class inherits from ResourceGroup.
The new class adds a signal handler for signals with the following specification: - signal handler for signals with the following structure: command: String Actions to perform on the group. Possible Values: "ADD", "REMOVE", RECREATE, "SCALE_OUT", "SCALE_OUT"
parameters: depends on the command - ADD/REMOVE/RECREATE parameters: resources: List of Integers list of resource indices to add, remove or recreate - SCALE_OUT/SCALE_IN parameters: scale_size: Integer Size adjustment. Value Must be positive.