Orchestration using Heat - GitHub...
Transcript of Orchestration using Heat - GitHub...
![Page 1: Orchestration using Heat - GitHub Pagesopenstackpakistan.github.io/web/resources/orchestration_with_open... · What are we going to do today? •What is Orchestration and Why we do](https://reader034.fdocuments.in/reader034/viewer/2022051723/5abe89e17f8b9add5f8ca8da/html5/thumbnails/1.jpg)
Orchestration with Openstack HeatWhy ‘Heat’? It makes the clouds rise!
February 25, 2016
Hassaan Ali [email protected]
1
![Page 2: Orchestration using Heat - GitHub Pagesopenstackpakistan.github.io/web/resources/orchestration_with_open... · What are we going to do today? •What is Orchestration and Why we do](https://reader034.fdocuments.in/reader034/viewer/2022051723/5abe89e17f8b9add5f8ca8da/html5/thumbnails/2.jpg)
What are we going to do today?
• What is Orchestration and Why we do it?
• Heat Orchestration Template
• Architecture of Heat
• Heat Workflow
• Working with Heat
• Heat Use cases
2
![Page 3: Orchestration using Heat - GitHub Pagesopenstackpakistan.github.io/web/resources/orchestration_with_open... · What are we going to do today? •What is Orchestration and Why we do](https://reader034.fdocuments.in/reader034/viewer/2022051723/5abe89e17f8b9add5f8ca8da/html5/thumbnails/3.jpg)
Orchestration
3
![Page 4: Orchestration using Heat - GitHub Pagesopenstackpakistan.github.io/web/resources/orchestration_with_open... · What are we going to do today? •What is Orchestration and Why we do](https://reader034.fdocuments.in/reader034/viewer/2022051723/5abe89e17f8b9add5f8ca8da/html5/thumbnails/4.jpg)
Orchestration (In Computing)
"Orchestration" is the "automated arrangement, coordination, and management of complex computer systems“ (Wikipedia)
4
![Page 5: Orchestration using Heat - GitHub Pagesopenstackpakistan.github.io/web/resources/orchestration_with_open... · What are we going to do today? •What is Orchestration and Why we do](https://reader034.fdocuments.in/reader034/viewer/2022051723/5abe89e17f8b9add5f8ca8da/html5/thumbnails/5.jpg)
Heat
• Heat provides a mechanism for orchestrating OpenStack resources through the use of modular templates
• Heat allows you to spin up multiple instances, logical networks, and other cloud services in an automated fashion
5
![Page 6: Orchestration using Heat - GitHub Pagesopenstackpakistan.github.io/web/resources/orchestration_with_open... · What are we going to do today? •What is Orchestration and Why we do](https://reader034.fdocuments.in/reader034/viewer/2022051723/5abe89e17f8b9add5f8ca8da/html5/thumbnails/6.jpg)
Openstack Logical Architecture
6
![Page 7: Orchestration using Heat - GitHub Pagesopenstackpakistan.github.io/web/resources/orchestration_with_open... · What are we going to do today? •What is Orchestration and Why we do](https://reader034.fdocuments.in/reader034/viewer/2022051723/5abe89e17f8b9add5f8ca8da/html5/thumbnails/7.jpg)
Heat Basics - Template
• Templates aka HOT are written in YAML syntax
• Templates define a stack
• Stack – group of connected cloud resources (VMs, Volumes, networks etc.)
• Heat templates have the same structure & abstractions as AWS CloudFormation templates
7
![Page 8: Orchestration using Heat - GitHub Pagesopenstackpakistan.github.io/web/resources/orchestration_with_open... · What are we going to do today? •What is Orchestration and Why we do](https://reader034.fdocuments.in/reader034/viewer/2022051723/5abe89e17f8b9add5f8ca8da/html5/thumbnails/8.jpg)
HOT – Basic Format
8
![Page 9: Orchestration using Heat - GitHub Pagesopenstackpakistan.github.io/web/resources/orchestration_with_open... · What are we going to do today? •What is Orchestration and Why we do](https://reader034.fdocuments.in/reader034/viewer/2022051723/5abe89e17f8b9add5f8ca8da/html5/thumbnails/9.jpg)
Heat Architecture
Heat CLI tools
9
![Page 10: Orchestration using Heat - GitHub Pagesopenstackpakistan.github.io/web/resources/orchestration_with_open... · What are we going to do today? •What is Orchestration and Why we do](https://reader034.fdocuments.in/reader034/viewer/2022051723/5abe89e17f8b9add5f8ca8da/html5/thumbnails/10.jpg)
Heat Architecture
Heat CLI tools
10
• Heat-api (Openstack native REST API) or heat-api-cfn(provides AWS Query API)
• Communicates with Heat Engine via AMQP and tells it what actions to perform
• This can be initiated from using Heat CLI tools or Horizon Dashboard
![Page 11: Orchestration using Heat - GitHub Pagesopenstackpakistan.github.io/web/resources/orchestration_with_open... · What are we going to do today? •What is Orchestration and Why we do](https://reader034.fdocuments.in/reader034/viewer/2022051723/5abe89e17f8b9add5f8ca8da/html5/thumbnails/11.jpg)
Heat Architecture
11
• Core part – Does all theorchestration work
• Layer on which resourceintegration is implemented
• Contains abstractions to useAuto Scaling & HA
![Page 12: Orchestration using Heat - GitHub Pagesopenstackpakistan.github.io/web/resources/orchestration_with_open... · What are we going to do today? •What is Orchestration and Why we do](https://reader034.fdocuments.in/reader034/viewer/2022051723/5abe89e17f8b9add5f8ca8da/html5/thumbnails/12.jpg)
Heat Orchestration Workflow
?
12
![Page 13: Orchestration using Heat - GitHub Pagesopenstackpakistan.github.io/web/resources/orchestration_with_open... · What are we going to do today? •What is Orchestration and Why we do](https://reader034.fdocuments.in/reader034/viewer/2022051723/5abe89e17f8b9add5f8ca8da/html5/thumbnails/13.jpg)
How to monitor the
created stack?
13
![Page 14: Orchestration using Heat - GitHub Pagesopenstackpakistan.github.io/web/resources/orchestration_with_open... · What are we going to do today? •What is Orchestration and Why we do](https://reader034.fdocuments.in/reader034/viewer/2022051723/5abe89e17f8b9add5f8ca8da/html5/thumbnails/14.jpg)
Ceilometer
• Not a part of Heat – A separate Openstack component
• Provides a framework for metering and monitoring in Openstack cloud
• Meters and Monitors all resources
• Generates Alarms to create more resources
• An alarm allows Ceilometer to POST to a URL when a metric matches certain values
14
![Page 15: Orchestration using Heat - GitHub Pagesopenstackpakistan.github.io/web/resources/orchestration_with_open... · What are we going to do today? •What is Orchestration and Why we do](https://reader034.fdocuments.in/reader034/viewer/2022051723/5abe89e17f8b9add5f8ca8da/html5/thumbnails/15.jpg)
Ceilometer
15
![Page 16: Orchestration using Heat - GitHub Pagesopenstackpakistan.github.io/web/resources/orchestration_with_open... · What are we going to do today? •What is Orchestration and Why we do](https://reader034.fdocuments.in/reader034/viewer/2022051723/5abe89e17f8b9add5f8ca8da/html5/thumbnails/16.jpg)
Creating Single Instance with HOT
16
![Page 17: Orchestration using Heat - GitHub Pagesopenstackpakistan.github.io/web/resources/orchestration_with_open... · What are we going to do today? •What is Orchestration and Why we do](https://reader034.fdocuments.in/reader034/viewer/2022051723/5abe89e17f8b9add5f8ca8da/html5/thumbnails/17.jpg)
Works fine but we want to write portable, reusable templates that do not hardcode information about your local environment
17
![Page 18: Orchestration using Heat - GitHub Pagesopenstackpakistan.github.io/web/resources/orchestration_with_open... · What are we going to do today? •What is Orchestration and Why we do](https://reader034.fdocuments.in/reader034/viewer/2022051723/5abe89e17f8b9add5f8ca8da/html5/thumbnails/18.jpg)
Templates: Parameters
To create a heat stack, parameters can be specified:
18
![Page 19: Orchestration using Heat - GitHub Pagesopenstackpakistan.github.io/web/resources/orchestration_with_open... · What are we going to do today? •What is Orchestration and Why we do](https://reader034.fdocuments.in/reader034/viewer/2022051723/5abe89e17f8b9add5f8ca8da/html5/thumbnails/19.jpg)
Adding a script to run at Instance Launch
19
![Page 20: Orchestration using Heat - GitHub Pagesopenstackpakistan.github.io/web/resources/orchestration_with_open... · What are we going to do today? •What is Orchestration and Why we do](https://reader034.fdocuments.in/reader034/viewer/2022051723/5abe89e17f8b9add5f8ca8da/html5/thumbnails/20.jpg)
Environment Files
• An environment file is a YAML file with a parameters section containing values for parameters declared in your template:
• To create a heat stack in CLI using environment file:
20
![Page 21: Orchestration using Heat - GitHub Pagesopenstackpakistan.github.io/web/resources/orchestration_with_open... · What are we going to do today? •What is Orchestration and Why we do](https://reader034.fdocuments.in/reader034/viewer/2022051723/5abe89e17f8b9add5f8ca8da/html5/thumbnails/21.jpg)
List User’s Stacks
21
![Page 22: Orchestration using Heat - GitHub Pagesopenstackpakistan.github.io/web/resources/orchestration_with_open... · What are we going to do today? •What is Orchestration and Why we do](https://reader034.fdocuments.in/reader034/viewer/2022051723/5abe89e17f8b9add5f8ca8da/html5/thumbnails/22.jpg)
Templates: Outputs
• Sometimes we want to extract information about a stack:
• These outputs can be retrieved via heat output-list and heat output-show commands:
22
![Page 23: Orchestration using Heat - GitHub Pagesopenstackpakistan.github.io/web/resources/orchestration_with_open... · What are we going to do today? •What is Orchestration and Why we do](https://reader034.fdocuments.in/reader034/viewer/2022051723/5abe89e17f8b9add5f8ca8da/html5/thumbnails/23.jpg)
Using Heat from Dashboard
23
![Page 24: Orchestration using Heat - GitHub Pagesopenstackpakistan.github.io/web/resources/orchestration_with_open... · What are we going to do today? •What is Orchestration and Why we do](https://reader034.fdocuments.in/reader034/viewer/2022051723/5abe89e17f8b9add5f8ca8da/html5/thumbnails/24.jpg)
24
![Page 25: Orchestration using Heat - GitHub Pagesopenstackpakistan.github.io/web/resources/orchestration_with_open... · What are we going to do today? •What is Orchestration and Why we do](https://reader034.fdocuments.in/reader034/viewer/2022051723/5abe89e17f8b9add5f8ca8da/html5/thumbnails/25.jpg)
25
![Page 26: Orchestration using Heat - GitHub Pagesopenstackpakistan.github.io/web/resources/orchestration_with_open... · What are we going to do today? •What is Orchestration and Why we do](https://reader034.fdocuments.in/reader034/viewer/2022051723/5abe89e17f8b9add5f8ca8da/html5/thumbnails/26.jpg)
Heat Use Case: Stack Deployment
26
![Page 27: Orchestration using Heat - GitHub Pagesopenstackpakistan.github.io/web/resources/orchestration_with_open... · What are we going to do today? •What is Orchestration and Why we do](https://reader034.fdocuments.in/reader034/viewer/2022051723/5abe89e17f8b9add5f8ca8da/html5/thumbnails/27.jpg)
Heat Use Case: Stack Deployment
27
![Page 28: Orchestration using Heat - GitHub Pagesopenstackpakistan.github.io/web/resources/orchestration_with_open... · What are we going to do today? •What is Orchestration and Why we do](https://reader034.fdocuments.in/reader034/viewer/2022051723/5abe89e17f8b9add5f8ca8da/html5/thumbnails/28.jpg)
Heat Use Case: Stack Deployment
28
![Page 29: Orchestration using Heat - GitHub Pagesopenstackpakistan.github.io/web/resources/orchestration_with_open... · What are we going to do today? •What is Orchestration and Why we do](https://reader034.fdocuments.in/reader034/viewer/2022051723/5abe89e17f8b9add5f8ca8da/html5/thumbnails/29.jpg)
Heat Use Case: Auto Scaling
• There are number of resources associated with auto scaling:• AUTO SCALING GROUP- a group that can scale an arbitrary set of heat
resources.
• SCALING POLICY- defines an action that Heat can take on an Auto Scaling Group. Does nothing by itself; creates an endpoint for external triggers.
• CEILOMETER ALARM – generate an alarm when a defined threshold is reached and report it to the Heat Engine in order to take action
29
![Page 30: Orchestration using Heat - GitHub Pagesopenstackpakistan.github.io/web/resources/orchestration_with_open... · What are we going to do today? •What is Orchestration and Why we do](https://reader034.fdocuments.in/reader034/viewer/2022051723/5abe89e17f8b9add5f8ca8da/html5/thumbnails/30.jpg)
Auto Scaling Group
30
6
![Page 31: Orchestration using Heat - GitHub Pagesopenstackpakistan.github.io/web/resources/orchestration_with_open... · What are we going to do today? •What is Orchestration and Why we do](https://reader034.fdocuments.in/reader034/viewer/2022051723/5abe89e17f8b9add5f8ca8da/html5/thumbnails/31.jpg)
Heat Use Case: Auto Scaling
31
Instance
![Page 32: Orchestration using Heat - GitHub Pagesopenstackpakistan.github.io/web/resources/orchestration_with_open... · What are we going to do today? •What is Orchestration and Why we do](https://reader034.fdocuments.in/reader034/viewer/2022051723/5abe89e17f8b9add5f8ca8da/html5/thumbnails/32.jpg)
Scaling Policy
32
This template does nothing by itself unless an alarm is triggered
![Page 33: Orchestration using Heat - GitHub Pagesopenstackpakistan.github.io/web/resources/orchestration_with_open... · What are we going to do today? •What is Orchestration and Why we do](https://reader034.fdocuments.in/reader034/viewer/2022051723/5abe89e17f8b9add5f8ca8da/html5/thumbnails/33.jpg)
Heat Use Case: Auto Scaling
33
Instance
![Page 34: Orchestration using Heat - GitHub Pagesopenstackpakistan.github.io/web/resources/orchestration_with_open... · What are we going to do today? •What is Orchestration and Why we do](https://reader034.fdocuments.in/reader034/viewer/2022051723/5abe89e17f8b9add5f8ca8da/html5/thumbnails/34.jpg)
Ceilometer Alarm
This resource will notify the scaling policy resource. The scaling policy resource will increase the number of the resources defined in the scaling
group. 34
![Page 35: Orchestration using Heat - GitHub Pagesopenstackpakistan.github.io/web/resources/orchestration_with_open... · What are we going to do today? •What is Orchestration and Why we do](https://reader034.fdocuments.in/reader034/viewer/2022051723/5abe89e17f8b9add5f8ca8da/html5/thumbnails/35.jpg)
Heat Use Case: Auto Scaling
35
Instance
![Page 36: Orchestration using Heat - GitHub Pagesopenstackpakistan.github.io/web/resources/orchestration_with_open... · What are we going to do today? •What is Orchestration and Why we do](https://reader034.fdocuments.in/reader034/viewer/2022051723/5abe89e17f8b9add5f8ca8da/html5/thumbnails/36.jpg)
Heat Use Case: Auto Scaling
36
![Page 37: Orchestration using Heat - GitHub Pagesopenstackpakistan.github.io/web/resources/orchestration_with_open... · What are we going to do today? •What is Orchestration and Why we do](https://reader034.fdocuments.in/reader034/viewer/2022051723/5abe89e17f8b9add5f8ca8da/html5/thumbnails/37.jpg)
Heat Use Case: Auto Scaling
37
![Page 38: Orchestration using Heat - GitHub Pagesopenstackpakistan.github.io/web/resources/orchestration_with_open... · What are we going to do today? •What is Orchestration and Why we do](https://reader034.fdocuments.in/reader034/viewer/2022051723/5abe89e17f8b9add5f8ca8da/html5/thumbnails/38.jpg)
Useful Links
• http://docs.openstack.org/developer/heat/
• https://wiki.openstack.org/wiki/Heat
• https://github.com/openstack/heat
• https://github.com/openstack/heat-templates
38
![Page 39: Orchestration using Heat - GitHub Pagesopenstackpakistan.github.io/web/resources/orchestration_with_open... · What are we going to do today? •What is Orchestration and Why we do](https://reader034.fdocuments.in/reader034/viewer/2022051723/5abe89e17f8b9add5f8ca8da/html5/thumbnails/39.jpg)
Thank you!
Now you are ready to orchestrate your application in Openstack
For questions/queries related to Heat or Orchestration in general, please shoot an email at: [email protected]
39