Jump to: navigation, search

Difference between revisions of "Heat/Blueprints/ScalableResourceGroup"

 
(18 intermediate revisions by the same user not shown)
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 identified with their index.<br />
+
Heat Resource Group types provide a convenient way to create several instances of identically configured nested resource maintain the size and readability of heat templates.<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.<br />
+
Heat provides for two types of resource groups:<br />
OS::Heat::AutoScalingGroup/Policy provides for a resource group that can change in size(scale) by receiving signals controlling the size change. <br />
+
(1) OS::Heat::ResourceGroup: <br />
There are some cloud applications that need a scalable resource group with the added ability to specify the exact resources to add or remove from the group.
+
- Provides the ability to access a single resource attributes with the resource index. <br />
 +
- Provides an index_var variable that resources use to be replaced with resource index.  <br />
 +
- Possible change of group size by changing count property and update the parent stack. <br />
 +
 
 +
(2) OS::Heat::AutoScalingGroup/Policy:<br />
 +
- Dynamic change of group size triggered by signals. <br />
 +
- Policy defining characteristics of scale operation (size of adjustment, size of adjustment, cool down period). <br />
 +
- Group changes size by performing nested stack update. <br />
 +
 +
Some cloud applications need a resource group type features allowing for finer control over resources in the group:<br />
 +
- Ability of removal or addition of specific resources- can be used for the recreation of a specific resource(healing). <br />
 +
It also allows for vnf controlled deloading sequence during scale-in operation.<br />
 +
- Scale by changing number of resources in the group- this is needed to respond to change in workload.<br /> 
  
 
== Release Note ==
 
== Release Note ==
Line 14: Line 26:
  
 
== 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) Add(Remove) specific resources 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 />
+
3) Scale out(in) by adjusting the group size (with a certain increment) when user defined triggers are met.<br />
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.<br />
+
1) Healing a (failed) resource by removing/adding the nested resource in the group. The recreated resource maintains the same resource index.<br />
2) Create new resources in increments when certain triggers are met.<br />
+
2) Scale out by adding a number of resources to the group.<br />
3) Remove a number resources according to a predefined criteria(increasing or decreasing order of age or index).<br />
+
3) Scale in by removing 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) Scale out by adding specific resources to the group when certain criteria met(ex. increase in workload). <br />
 +
5) Scale in by selecting certain resources for removal according to a workload(ex. vnf) defined de-loading criteria.<br />
  
 
== Assumptions ==
 
== Assumptions ==
Line 30: Line 42:
  
 
== 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.  
+
    Resource definition for the resources in the group.  
    Required property.
+
    Required property.
    Can be updated without replacement.
+
    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.  
+
    A variable that this resource will use to replace with the current index of a given resource in the group.  
    Updates cause replacement.
+
    Updates cause replacement.
    Optional property, defaults to “%index%”.
+
    Optional property, defaults to “%index%”.
  
     '''MAX_SIZE''': Integer
+
     initial_size: Integer
    Maximum number of resources in the group.
+
    Initial number of resources in the group at creation time.
    Optional Property
+
    Optional property, defaults to 1.
    Updates can cause creation/deletion of some resources according to de-grow policy
+
    The value must be at least 0.
    '''INIT_SIZE''': Integer
 
    Initial number of resources in the group at creation time.
 
    Optional property.
 
    Default value is 1.
 
  
     '''MIN_SIZE''': Integer
+
     max_size: Integer
    Min number of resources in the group.
+
    Maximum number of resources in the group.
    Optional property.
+
    Optional Property, defaults to 1.
    Updates can cause creation/deletion of some resources according to de-grow policy
+
    Updates can cause creation/deletion of some resources according to scale_in_criteria/scale_in_order.
 +
    The value must be at least 0.
  
  '''DEGROW_Policy''':String
+
    min_size: Integer
  Controls which resources to remove when during de-grow.
+
    Minimum number of resources in the group.
  Optional property.
+
    Optional property, defaults to 1.
  Possible Values: "Index" or "Age"
+
    Updates can cause addition/removal of resources according to scale_in_criteria/scale_in_order.
  Default: "Index"
+
    The value must be at least 0, less than or equal to max_size.
  
   '''DEGROW_Order''':String
+
   scale_in_criteria:String
  Optional property.
+
    Removal criteria of resources in the group.
  Possible Values: "Increasing" or "Decreasing"
+
    Optional property, defaults to "Index".
  Default: "Decreasing"
+
    Possible Values: "Index" or "Age"
  
ScalableResourceGroup class inherits from ResourceGroup:
+
  scale_in_order:String
    - Provide handle_signal implementation to receive signals to add/delete and grow/degrow signals.
+
    Removal order of resources in the group according to the specified criteria.
    - Override create/validate/update/delete handlers.
+
    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:
 +
      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.

Latest revision as of 16:53, 10 August 2015

< Heat Launchpad Entry: HeatSpec:ScalableResourceGroup
Created: 26 July 2015
Contributors: Ahmed El-Khouly

Summary

Heat Resource Group types provide a convenient way to create several instances of identically configured nested resource maintain the size and readability of heat templates.
Heat provides for two types of resource groups:
(1) OS::Heat::ResourceGroup:
- Provides the ability to access a single resource attributes with the resource index.
- Provides an index_var variable that resources use to be replaced with resource index.
- Possible change of group size by changing count property and update the parent stack.

(2) OS::Heat::AutoScalingGroup/Policy:
- Dynamic change of group size triggered by signals.
- Policy defining characteristics of scale operation (size of adjustment, size of adjustment, cool down period).
- Group changes size by performing nested stack update.

Some cloud applications need a resource group type features allowing for finer control over resources in the group:
- Ability of removal or addition of specific resources- can be used for the recreation of a specific resource(healing).
It also allows for vnf controlled deloading sequence during scale-in operation.
- Scale by changing number of resources in the group- this is needed to respond to change in workload.

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) Add(Remove) specific resources within the group by specifying the indices of involved resources.
3) Scale out(in) by adjusting the group size (with a certain increment) when user defined triggers are met.

User Stories

1) Healing a (failed) resource by removing/adding the nested resource in the group. The recreated resource maintains the same resource index.
2) Scale out by adding a number of resources to the group.
3) Scale in by removing a number of resources according to a predefined criteria(increasing or decreasing order of age or index).
4) Scale out by adding specific resources to the group when certain criteria met(ex. increase in workload).
5) Scale in by selecting certain resources for removal according to a workload(ex. vnf) defined de-loading criteria.

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:

     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.