An Introduction to OpenStack Heat


Published on

Miratis specialist Dina Belova gives you an introduction to OpenStack's new orchestration project, OpenStack Heat.

Published in: Technology, Business

An Introduction to OpenStack Heat

  1. 1. Diving intoHeatMirantis, 2013Dina Belova
  2. 2. ● Orchestration service for OpenStack (officiallysupports Grizzly release)● Uses templating mechanism● Controls complex groups of cloud resources● Huge potential and multiple use cases● More than 20 active contributorsWhat is Heat?
  3. 3. ● AWS CloudFormation● TOSCA:Topology andOrchestrationSpecification forCloudApplicationsHeat ideas and standards
  4. 4. Stack - group of connected cloud resources (VM, volumes,networks, etc.)● Autoscaling● HA mechanism for the different levels (services runninginside an instance, individual instances, stacks)● Nested stacksHeat basics. Stack
  5. 5. Heat basics. Template● Stacks are created from templates● Heat templates have the same structure andabstractions as AWS CloudFormation templates● Resource mapping in the next OpenStack release● Templates are well integrated with Chef andPuppet
  6. 6. Heat Roadmap (Havanna)● Parallel source creation● Improve networking / Quantum support● Rollings updates● Support for extended template language● Add AutoScaling API actions● Move to Ceilometer formetrics / monitoring / alarms
  7. 7. Heat Roadmap (Havanna)● More improvements for stacks updating● Improved security● Native for OpenStack resource types (resourcemapping)● Add suspend / resume stack actions● Configurable LoadBalancer (LBaaS)
  8. 8. Already in Heat● Nested stacks● High Availability (HA) for different resource levels● Associate users with templates using Keystone● Get boto (Python programming languageinterface to Amazon Web Services) working withHeat● API rework to align AWS specification
  9. 9. Heat Basic WorkFlowOpenStackStackVM VMVMHeat CLItoolsHeatDBHeat APICloudWatchAPIHeat EngineMQ Watcher TaskScaling PolicyAuto Scaling Group
  10. 10. Heat API● heat-api (OpenStack native REST API) or heat-api-cfn (provides AWS Query API)● Communicates with Heat Engine and tells it whatactions to do
  11. 11. Heat Engine● Does all the orchestration work● Layer on which resource integration isimplemented● Contains abstractions to use Auto Scaling andHigh Availability
  12. 12. Heat CloudWatch API● Ideologically refers to AWS CloudWatch service(gets metrics from stacks)● Will be replaced by Ceilometer● Used for Auto Scaling
  13. 13. Heat CLI tools● heatclient uses Heat REST API● heat-cfn uses Heat CloudFormation compatibleAPI (deprecated)
  14. 14. Heat Auto Scaling Principles● Agents are installed to the VMs. They send VMtelemetry to the monitoring componentperiodically● Monitoring component (Heat CloudWatch) isresponsible for the communication between VMsand Heat● Core functionality (implemented in Heat Engine)provides the scaling itself
  15. 15. Installation● Heat + DevStack● Heat + Ubuntu● Heat + Fedora
  16. 16. CLI (Heat Client)event-list List events for a stack.event-show Describe the event.resource-list Show list of resources belonging to a stack.resource-metadata List resource metadata.resource-show Describe the resource.stack-create Create the stack.stack-delete Delete the stack.stack-list List the users stacks.stack-show Describe the stack.stack-update Update the stack.template-show Get the template for the specified stack.template-validate Validate a template with Display help about this program or one of itssubcommands.
  17. 17. Try Heat + DevStackLaunch a stack:heat stack-create teststack-u <template_to_use> -P "InstanceType=m1.large; DBUsername=wp; DBPassword=verybadpassword; KeyName=heat_key; LinuxDistribution=F17"Example of template to use address:
  18. 18. Get stacks listheat stack-listIf everything is nice after stack creation+--------------------------------------+------------+-----------------+----------------------+| id | stack_name | stack_status | creation_time |+--------------------------------------+------------+-----------------+----------------------+| 70296f8e-f301-465f-8b42-1aa3f95c42f6 | teststack | CREATE_COMPLETE | 2013-05-29T07:39:57Z |+--------------------------------------+------------+-----------------+----------------------+If something goes wrong+--------------------------------------+------------+---------------+----------------------+| id | stack_name | stack_status | creation_time |+--------------------------------------+------------+---------------+----------------------+| 70296f8e-f301-465f-8b42-1aa3f95c42f6 | teststack | CREATE_FAILED | 2013-05-29T07:39:57Z |+--------------------------------------+------------+---------------+----------------------+
  19. 19. Delete stackheat stack-delete 70296f8e-f301-465f-8b42-1aa3f95c42f6+--------------------------------------+------------+--------------------+----------------------+| id | stack_name | stack_status | creation_time |+--------------------------------------+------------+--------------------+----------------------+| 70296f8e-f301-465f-8b42-1aa3f95c42f6 | teststack | DELETE_IN_PROGRESS | 2013-05-29T07:38:11Z |+--------------------------------------+------------+--------------------+----------------------+
  20. 20. Template structure● Description● Parameters● Mappings● Resources● Outputs{"AWSTemplateFormatVersion" : "version date","Description" : "Valid JSON strings up to 4K","Parameters" : {set of parameters},"Mappings" : {set of mappings},"Resources" : {set of resources},"Outputs" : {set of outputs}}
  21. 21. Template elements exampleDescription"Description" : "Template to test something important"Parameters"Parameters": {"InstanceType" : {"Description" : "Test instance type","Type" : "String","Default" : "m1.small","AllowedValues" : ["m1.small", "m1.medium"]}}
  22. 22. Template elements exampleMappings"Mappings" : {"AWSInstanceType2Arch" : {"m1.tiny" : { "Arch" : "32" },"m1.small" : { "Arch" : "64" },"m1.medium" : { "Arch" : "64" },"m1.large" : { "Arch" : "64" },"m1.xlarge" : { "Arch" : "64" }}}
  23. 23. Template elements exampleResources"Resources" : {"network": {"Type": "OS::Quantum::Net","Properties": {"name": "the_network"}},"unnamed_network": {"Type": "OS::Quantum::Net"},}
  24. 24. Template elements exampleOutputs"Outputs" : {"the_network_status" : {"Value" : { "Fn::GetAtt" : [ "network", "status" ]},"Description" : "Status of network"},"port_device_owner" : {"Value" : { "Fn::GetAtt" : [ "port","device_owner"]},"Description" : "Device owner of the port"}}
  25. 25. Useful links●●●●
  26. 26. Thank you for the