15
Openstack Heat & How Autoscaling works @Openstack chennai meetup Aug 2015 Jayaprakash Technical Lead, Product Development [email protected] Beny Raja Technical Lead, DevOps [email protected]

Openstack Heat & How Autoscaling works

Embed Size (px)

Citation preview

Page 1: Openstack Heat & How Autoscaling works

Openstack Heat & How Autoscaling works@Openstack chennai meetup Aug 2015

JayaprakashTechnical Lead, Product [email protected]

Beny RajaTechnical Lead, DevOps

[email protected]

Page 2: Openstack Heat & How Autoscaling works

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

Page 3: Openstack Heat & How Autoscaling works

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

Page 4: Openstack Heat & How Autoscaling works

Heat Architecture

Page 5: Openstack Heat & How Autoscaling works

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

Page 6: Openstack Heat & How Autoscaling works

HOT Template

Page 7: Openstack Heat & How Autoscaling works

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

Page 8: Openstack Heat & How Autoscaling works

Heat - Standalone Mode● Orchestrate Multi openstack setups● Standalone mode configuration in heat.conf

○ [paste_deploy]flavor = standalone

○ [authpassword]multi_cloud = trueallowed_auth_uris =

http://192.168.1.171:5000/v2.0, http://192.168.1.223:5000/v2.0

● Heat cli to access remote openstackheat --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 stack-list

Page 9: Openstack Heat & How Autoscaling works

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

Page 10: Openstack Heat & How Autoscaling works

Autoscaling workflow

Page 11: Openstack Heat & How Autoscaling works

Ceilometer Alarm Resource

Page 12: Openstack Heat & How Autoscaling works

Autoscaling Group Resourcelb_server.yaml

Page 13: Openstack Heat & How Autoscaling works

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?Timestamp=&SignatureMethod=HmacSHA256&AWSAccessKeyId=fa71fad02e974f4f8a21265c58bacf0f&SignatureVersion=2&Signature=poYnVLF9mLEGjBXbjT63svjCnymnhrLP9chFPHiyVoo%3D

Page 14: Openstack Heat & How Autoscaling works

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

Page 15: Openstack Heat & How Autoscaling works

Thank You