Jump to: navigation, search

Difference between revisions of "Heat/Blueprints/ScalableResourceGroup"

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 can be accessed with their index.<br />
+
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.<br />
 
OS::Heat::ResourceGroup can only scale by changing the count property followed by a stack update of the root stack.<br />
 
OS::Heat::ResourceGroup can only scale by changing the count property followed by a stack update of the root stack.<br />
 
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).  <br />
 
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).  <br />
 
   
 
   
Some cloud application needs a resource group with the following features: <br />
+
Some cloud applications need a resource group type that can change size and with the added ability of removal or addition of specific resources. <br />
(1) Dynamically change group members by specifying a resource(resource index) to be added(removed) to(from) the group. <br />
 
(2) Dynamically scale up or down. <br />
 
  
These features can be realized by doing nested stack update (without the need for root stack update). <br />
 
  
 
== Release Note ==
 
== Release Note ==
Line 19: Line 16:
  
 
== Rationale ==
 
== Rationale ==
Some cloud applications need a new resource group with the following characteristics:<br />
+
Some cloud applications need a new resource group with the following features:<br />
 
1) Create an initial number of identically configured nested resources.<br />
 
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.<br />
+
2) Address single resource 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.<br />
+
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.<br />
+
4) Scale out(in) by adjusting 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.<br />
 
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.<br />
+
2) Add new resources to group when certain criteria met(ex. increase in workload).<br />
3) Remove a number resources according to a predefined criteria(increasing or decreasing order of age or index).<br />
+
3) Remove a number of 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.<br />
+
4) Specify certain resources for removal.<br />
  
 
== Assumptions ==
 
== Assumptions ==
Line 45: Line 42:
 
     Updates cause replacement.
 
     Updates cause replacement.
 
     Optional property, defaults to “%index%”.
 
     Optional property, defaults to “%index%”.
 +
 +
    '''INIT_SIZE''': Integer
 +
    Initial number of resources in the group at creation time.
 +
    Optional property.
 +
    Default value is 1.
  
 
     '''MAX_SIZE''': Integer
 
     '''MAX_SIZE''': Integer
Line 50: Line 52:
 
     Optional Property
 
     Optional Property
 
     Updates can cause creation/deletion of some resources according to de-grow policy
 
     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_SIZE''': Integer
Line 60: Line 58:
 
     Updates can cause creation/deletion of some resources according to de-grow policy
 
     Updates can cause creation/deletion of some resources according to de-grow policy
  
   '''DEGROW_Policy''':String
+
   ''SCALE_IN_CRITERIA''':String
   Controls which resources to remove when during de-grow.
+
   Specifies criteria for removal of resources form the group.
 
   Optional property.
 
   Optional property.
 
   Possible Values: "Index" or "Age"
 
   Possible Values: "Index" or "Age"
 
   Default: "Index"
 
   Default: "Index"
  
   '''DEGROW_Order''':String
+
   '''SCALE_IN_ORDER''':String
 +
  Specifies order for removal of resources form the group according to the specified criteria.
 
   Optional property.
 
   Optional property.
 
   Possible Values: "Increasing" or "Decreasing"
 
   Possible Values: "Increasing" or "Decreasing"

Revision as of 15:17, 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

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%”.
   INIT_SIZE: Integer
   Initial number of resources in the group at creation time.
   Optional property.
   Default value is 1.
   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
   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
  SCALE_IN_CRITERIA':String
  Specifies criteria for removal of resources form the group.
  Optional property.
  Possible Values: "Index" or "Age"
  Default: "Index"
  SCALE_IN_ORDER:String
  Specifies order for removal of resources form the group according to the specified criteria.
  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.