Openstack Heat & How Autoscaling works
@Openstack chennai meetup Aug 2015
Jayaprakash
Technical Lead, Product Development
jayaprakash.r@cloudenablers.com
Beny Raja
Technical Lead, DevOps
benyraja.j@cloudenablers.com
Overview
â—Ź Heat is the orchestration component of Openstack.
Template-driven engine that allows us to describe
and automate the deployment of infrastructure &
application
â—Ź Extended capabilities such as Nested stacks,
Resource Groups, Auto scaling, Software
deployment using configuration management tools
like puppet
Services
â—Ź Heat - CLI which communicates with heat-api
â—Ź Heat-api - REST based service which sends api
requests to heat-engine via RPC
â—Ź Heat-engine - Orchestrates openstack resources
â—Ź Heat-api-cfn - REST based service which sends
api requests to heat-engine via RPC
Heat Architecture
HOT Template structure
â—Ź heat_template_version
â—Ź description
â—Ź parameter_groups
â—Ź parameters
â—Ź input
â—Ź resources
â—Ź output
Reference:
http://docs.openstack.org/developer/heat/template_guide/hot_spec
.html
HOT Template
Develop your own Resource Plugins
● Plugin Life cycle –
Create,Update,Suspend,Delete,Resume
● Registering resource plugin name –
OS::Nova::Workload
â—Ź Properties & Attributes
● Handler Methods – handle_create, handle_update,
handle_delete...
â—Ź Configure heat to register new plugins and restart
heat-engine service
Reference:
http://docs.openstack.org/developer/heat/pluginguide.html
Heat - Standalone Mode
â—Ź Orchestrate Multi openstack setups
â—Ź Standalone mode configuration in heat.conf
â—‹ [paste_deploy]
flavor = standalone
â—‹ [authpassword]
multi_cloud = true
allowed_auth_uris =
http://192.168.1.171:5000/v2.0,
http://192.168.1.223:5000/v2.0
â—Ź Heat cli to access remote openstack
heat --os-no-client-auth --os-username admin --os-password
openstack --os-tenant-name admin --os-auth-url
http://192.168.1.223:5000/v2.0 --heat-url
http://192.168.1.10:8004/v1/98073903698740af87fb57ca9e41eed5
Autoscaling
â—Ź To maintain application availability and allows you
to scale the capacity up or down automatically
according to conditions you define
â—Ź Automatically increase the number of instances
during demand spikes to maintain performance
â—Ź Heat & Ceilometer are the components used to
implement Autoscaling in Openstack
Autoscaling workflow
Ceilometer Alarm Resource
Autoscaling Group Resource
lb_server.yaml
Alarm Action URL
â—Ź Heat engine server address
â—Ź Stack id & name
â—Ź Scaling resource id & name
● URL params – Timestamp, Signature, Access key
http://192.168.1.142:8000/v1/signal/arn:openstack:heat::<stack_id
>:stacks/test_stack/<resource_id>/resources/scaleup_policy?Time
stamp=&SignatureMethod=HmacSHA256&AWSAccessKeyId=fa7
1fad02e974f4f8a21265c58bacf0f&SignatureVersion=2&Signature=
poYnVLF9mLEGjBXbjT63svjCnymnhrLP9chFPHiyVoo%3D
References
â—Ź http://docs.openstack.org/developer/heat/template
_guide/hot_spec.html
â—Ź https://wiki.openstack.org/wiki/Heat
â—Ź https://github.com/openstack/heat-templates
â—Ź https://wiki.openstack.org/wiki/Heat/Blueprints/heat
-multicloud
â—Ź http://developer.openstack.org/api-ref-
orchestration-v1.html
Thank You

Openstack Heat & How Autoscaling works

  • 1.
    Openstack Heat &How Autoscaling works @Openstack chennai meetup Aug 2015 Jayaprakash Technical Lead, Product Development [email protected] Beny Raja Technical Lead, DevOps [email protected]
  • 2.
    Overview â—Ź Heat isthe orchestration component of Openstack. Template-driven engine that allows us to describe and automate the deployment of infrastructure & application â—Ź Extended capabilities such as Nested stacks, Resource Groups, Auto scaling, Software deployment using configuration management tools like puppet
  • 3.
    Services â—Ź Heat -CLI which communicates with heat-api â—Ź Heat-api - REST based service which sends api requests to heat-engine via RPC â—Ź Heat-engine - Orchestrates openstack resources â—Ź Heat-api-cfn - REST based service which sends api requests to heat-engine via RPC
  • 4.
  • 5.
    HOT Template structure â—Źheat_template_version â—Ź description â—Ź parameter_groups â—Ź parameters â—Ź input â—Ź resources â—Ź output Reference: http://docs.openstack.org/developer/heat/template_guide/hot_spec .html
  • 6.
  • 7.
    Develop your ownResource Plugins ● Plugin Life cycle – Create,Update,Suspend,Delete,Resume ● Registering resource plugin name – OS::Nova::Workload ● Properties & Attributes ● Handler Methods – handle_create, handle_update, handle_delete... ● Configure heat to register new plugins and restart heat-engine service Reference: http://docs.openstack.org/developer/heat/pluginguide.html
  • 8.
    Heat - StandaloneMode â—Ź Orchestrate Multi openstack setups â—Ź Standalone mode configuration in heat.conf â—‹ [paste_deploy] flavor = standalone â—‹ [authpassword] multi_cloud = true allowed_auth_uris = http://192.168.1.171:5000/v2.0, http://192.168.1.223:5000/v2.0 â—Ź Heat cli to access remote openstack heat --os-no-client-auth --os-username admin --os-password openstack --os-tenant-name admin --os-auth-url http://192.168.1.223:5000/v2.0 --heat-url http://192.168.1.10:8004/v1/98073903698740af87fb57ca9e41eed5
  • 9.
    Autoscaling â—Ź To maintainapplication availability and allows you to scale the capacity up or down automatically according to conditions you define â—Ź Automatically increase the number of instances during demand spikes to maintain performance â—Ź Heat & Ceilometer are the components used to implement Autoscaling in Openstack
  • 10.
  • 11.
  • 12.
  • 13.
    Alarm Action URL ●Heat engine server address ● Stack id & name ● Scaling resource id & name ● URL params – Timestamp, Signature, Access key http://192.168.1.142:8000/v1/signal/arn:openstack:heat::<stack_id >:stacks/test_stack/<resource_id>/resources/scaleup_policy?Time stamp=&SignatureMethod=HmacSHA256&AWSAccessKeyId=fa7 1fad02e974f4f8a21265c58bacf0f&SignatureVersion=2&Signature= poYnVLF9mLEGjBXbjT63svjCnymnhrLP9chFPHiyVoo%3D
  • 14.
    References â—Ź http://docs.openstack.org/developer/heat/template _guide/hot_spec.html â—Ź https://wiki.openstack.org/wiki/Heat â—Źhttps://github.com/openstack/heat-templates â—Ź https://wiki.openstack.org/wiki/Heat/Blueprints/heat -multicloud â—Ź http://developer.openstack.org/api-ref- orchestration-v1.html
  • 15.