template languages for openstack - heat and tosca
TRANSCRIPT
Template Languages for OpenStack
Shay Naeh and Yaron Parasol
About Us
• Shay Naeh – Senior Solution Architect, GigaSpaces
• Yaron Parasol – VP of Product, GigaSpaces– @yaronpar on twitter
Meet the Cast
• HOT – Heat Orchestration Template– Declarative– YAML
• TOSCA– Topology & Orchestration Standard for Cloud
Application– Declarative & Imperative– XML and now YAML
History
• HOT– Came to replace Cloud Formation syntax– Main use case in mind – Infrastructure creation– Following the Cloud Formation limited model
• TOSCA– Application centric by design– Automation of any production process
Similarities
• Similar structure:– Description– Input parameters– Components graph– Output parameters
• Components Design– Component is an object of type– It has dependencies on other components– It has configuration / initial state in the format of
properties
Mutual Influences
• TOSCA adopted HOT Input and Output parameters (coming from Cloud Formation)
• HOT added software_config provider to describe application stack explicitly
• HOT adopted TOSCA relationship syntax and semantics
Differences• Lifecycle
– HOT has limited lifecycle events model• post create hook for installation
– TOSCA using interfaces has lifecycle hooks for node and for relationship node
• Wiring and Validation - Requirements and Capabilities– HOT doesn’t have wiring beyond explicit relationship and parameters injection through
user data– TOSCA – has the mechanism of requirements and capabilities for fine grained wiring
and validations
• Support of Workflows– HOT is 100% declarative. The WF is hardcoded into Heat engine– TOSCA using interfaces allow for any imperative workflow as the driver of processes
(No hard coded processes)
Putting it all together
• TOSCA to HOT translator project:– Developed outside of stackforge but coming in soon– Contributors: IBM, GigaSpaces, Huawei and others – Allow users to describe their stack in TOSCA and use
HEAT• Cloudify – Holistic approach to application
automation on Openstack– Uses TOSCA (currently TOSCA like) templates– Soon to use HEAT to orchestrate infrastructure– Adds: Monitoring, Log collection, Analytics, workflows
DEEP DIVE
Topology
Infrastructure
Middleware
Application
Host Host Network
Apache Tomcat MySQL
Mod_proxy WAR Schema
TOSCA in a Nutshell
Sugar CRM Example
HOT
Type
Lang
uage
Type
sTe
mpl
ates
OS::Nova::Server OS::Heat::software_config
Sugar_CRM_VM Sugar_CRM_App
Sugar_CRM_DB
apache
mySQL
RelationshipScript
Depends_on
Hosted_on
Connects_to
TOSCA Input
Hot Input
TOSCA Node
HOT Component & Resource
TOSCA Requirements
TOSCA Relationship
HOT Relationships
DEMO
Heat Template
Heat Topology View
Apache Server DB Server
NodeJS
NodeCellerMongoDB
TOSCA (Like) Example• App Network• App Subnet• App Port• Security Group• Apache Floating IP• Router Gateway
• Data Network• Data Subnet• Data Port• Security Group
Router
Monitoring, Logging CI
Network View
Topology View
TOSCA (Like) Blueprint
References
• Wine cellar example– https://github.com/cloudify-cosmo/
cloudify-nodecellar-openstack• Cloudify 3– http://getcloudify.org