Difference between revisions of "Heat/Blueprints/FlexibleResourceGroup"
Line 5: | Line 5: | ||
== Summary == | == Summary == | ||
− | OS::Heat::ResourceGroup provides a way to create several instances of identically configured nested resource; resources within the group are identifiable with with their index. | + | OS::Heat::ResourceGroup provides a way to create several instances of identically configured nested resource; resources within the group are identifiable with with their index.<br /> |
− | OS::Heat::ResourceGroup can only change number of resources in the group by changing the count property in the Heat template and perform a stack update of on the root stack. | + | OS::Heat::ResourceGroup can only change number of resources in the group by changing the count property in the Heat template and perform a stack update of on the root stack.<br /> |
− | OS::Heat::AutoScalingGroup/Policy provides for a resource group that can change in size(scale) by receiving signals controlling the size change. | + | OS::Heat::AutoScalingGroup/Policy provides for a resource group that can change in size(scale) by receiving signals controlling the size change. <br /> |
− | There are some cloud applications that need a scalable resource group with the added ability to specify the exact resources to be add or removed from the group | + | There are some cloud applications that need a scalable resource group with the added ability to specify the exact resources to be add or removed from the group. |
== Release Note == | == Release Note == | ||
Line 15: | Line 15: | ||
== Rationale == | == Rationale == | ||
Some cloud applications need a new resource group with the following characteristics: | Some cloud applications need a new resource group with the following characteristics: | ||
− | 1) Create an initial number of identically configured nested resources. | + | 1) Create an initial number of identically configured nested resources.<br /> |
− | 2) Identify resources within the group using the index with the ability to specify a variable to be replaced by the index. | + | 2) Identify resources within the group using the index with the ability to specify a variable to be replaced by the index.<br /> |
− | 3) Add/Remove specific resource within the group by specifying the indices of involved resources. | + | 3) Add/Remove specific resource within the group by specifying the indices of involved resources.<br /> |
− | 4) Grow/shrink the group size (with a certain increment) when user defined triggers are met. | + | 4) Grow/shrink the group size (with a certain increment) when user defined triggers are met.<br /> |
== User Stories == | == User Stories == | ||
− | 1) Recreate a (failed) resource by adding/deleting the corresponding nested resource in the group. | + | 1) Recreate a (failed) resource by adding/deleting the corresponding nested resource in the group.<br /> |
− | 2) Create new resources in increments when certain triggers are met. | + | 2) Create new resources in increments when certain triggers are met.<br /> |
− | 3) Remove a number resources according to a predefined criteria(increasing or decreasing order of age or index). | + | 3) Remove a number resources according to a predefined criteria(increasing or decreasing order of age or index).<br /> |
− | 4) Specify which resources to remove due to low load periods. | + | 4) Specify which resources to remove due to low load periods.<br /> |
== Assumptions == | == Assumptions == | ||
Line 30: | Line 30: | ||
== Design == | == Design == | ||
− | + | 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. | Resource definition for the resources in the group. | ||
Line 66: | Line 66: | ||
Default: "Decreasing" | Default: "Decreasing" | ||
− | + | ScalableResourceGroup class inherits from ResourceGroup: | |
- Provide handle_signal implementation to receive signals to add/delete and grow/degrow signals. | - Provide handle_signal implementation to receive signals to add/delete and grow/degrow signals. | ||
- Override create/validate/update/delete handlers. | - Override create/validate/update/delete handlers. |
Latest revision as of 15:41, 24 July 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 are identifiable with with their index.
OS::Heat::ResourceGroup can only change number of resources in the group by changing the count property in the Heat template and perform a stack update of on the root stack.
OS::Heat::AutoScalingGroup/Policy provides for a resource group that can change in size(scale) by receiving signals controlling the size change.
There are some cloud applications that need a scalable resource group with the added ability to specify the exact resources to be add or removed from the group.
Release Note
TBD
Rationale
Some cloud applications need a new resource group with the following characteristics:
1) Create an initial number of identically configured nested resources.
2) Identify resources 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) Grow/shrink 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) Create new resources in increments when certain triggers are met.
3) Remove a number resources according to a predefined criteria(increasing or decreasing order of age or index).
4) Specify which resources to remove due to low load periods.
Assumptions
None.
Design
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%”.
MAX_SIZE: Integer Maximum number of resources in the group. Optional Property Updates can cause creation/deletion of some resources according to de-grow policy INIT_SIZE: Integer Initial number of resources in the group at creation time. Optional property. Default value is 1.
MIN_SIZE: Integer Min number of resources in the group. Optional property. Updates can cause creation/deletion of some resources according to de-grow policy
DEGROW_Policy:String Controls which resources to remove when during de-grow. Optional property. Possible Values: "Index" or "Age" Default: "Index"
DEGROW_Order:String Optional property. Possible Values: "Increasing" or "Decreasing" Default: "Decreasing"
ScalableResourceGroup class inherits from ResourceGroup:
- Provide handle_signal implementation to receive signals to add/delete and grow/degrow signals. - Override create/validate/update/delete handlers.