2013 04-specs-camp-tosca-heat-brooklyn

2,567 views

Published on

slides from unconference talk today (18 Apr 2013) with a quick overview of Oasis TOSCA, Oasis CAMP, and OpenStack Heat, and how they can align around a DSL. see also http://adrianotto.com/2013/04/what-is-camp/ and https://wiki.openstack.org/wiki/Heat/DSL .

Published in: Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,567
On SlideShare
0
From Embeds
0
Number of Embeds
7
Actions
Shares
0
Downloads
96
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

2013 04-specs-camp-tosca-heat-brooklyn

  1. 1. CAMP, TOSCA, and Heat: Three Sides of a CoinAlex Heneveld / @ahtweetin // April 2013
  2. 2. Agenda• CAMP • An API to facilitate portability and PaaS adoption • “a generic application and platform management API that is language, framework, and platform neutral”• TOSCA • A description format to enable portable implementations • “a language to describe [...] semi-automatic creation and management of application layer services [as] components and their relationships”• Heat• Brooklyn• ... and a DSL !© 2013 Cloudsoft Corporation 2
  3. 3. Oasis CAMP Cloud Application Management Platform http://www.oasis-open.org/committees/camp/ www.cloudspecs.org© 2013 Cloudsoft Corporation 3
  4. 4. CAMP Key Concepts• ComponentTemplates are pieces available in the Platform • PlatformComponentTemplates are supplied by the platform — for instance a Database or a Web Server Cluster • ApplicationComponentTemplates are artifacts uploaded — a WAR file, database schema, or script file • Requirement and Capability instances determine the wiring• AssemblyTemplates are the apps available • at runtime, instantiated to make Assembly instances (comprised of ApplicationComponents and PlatformComponents) • Sensors and Operations available on all of these• The Platform Deployment Package (PDP) defines new AT’s • a ZIP file POSTed by the consumer • containing app artifacts and a descriptor file specifying the components and their requirements — in a way that the Platform can then wire up© 2013 Cloudsoft Corporation 4
  5. 5. CAMP REST/JSON PLATFORM resource { "uri": URI, "name": "Web SuperPaaS", GET /camp/1.0/ "type": "Platform", "tags": [ String, + ], ? "assemblyTemplates": [ Link + ], ? "assemblies": [ Link + ], ? "platformComponentTemplates": [ Link + ], ? "capabilities": [Link + ], ? } GET ASSEMBLY TEMPLATE resource { "uri": URI, "name": "JEE AppServer tier plus SQL DB", "type": "AssemblyTemplate", "requirements": [ Link + ], ? "applicationComponentTemplates": [ Link + ], ? "platformComponentTemplates": [ Link + ], ? }© 2013 Cloudsoft Corporation 5
  6. 6. Oasis TOSCA Topology and Orchestration Specification for Cloud Applications http://www.oasis-open.org/committees/tosca/© 2013 Cloudsoft Corporation 6
  7. 7. TOSCA Key Concepts Modeling Topologies with TOSCA Slide origin: IBM Service  Topologies  are  described  using  the  TOSCA  “Meta-model”: Nodes Relationships  Represent Components of an application or service  Represent the logical Relationships between and their Properties. Example nodes include: nodes – Infrastructure: Compute, Network, Storage, etc. – e.g.  “hostedOn”,  “connectsTo”,  etc. – Platform: OS, VM, DB, Web Server, etc.  Describes the valid Source and Target nodes they – Granular: functional Libraries, Modules, etc. are designed to couple  Include Operations which are the management – e.g. source  “web application”  node  is  designed   functions for the node to  “connectTo”  a  target  “database”  node – e.g. deploy(), start(), stop(), connect(), etc.  Have their own Properties and Constraints  Export their dependencies on other nodes as Requirement and Capabilities Artifacts Service Templates  Group the nodes and relationships that make up  Describe Installables and Executables required to a  service’s  topology instantiate and manage a service. Currently, they include: – Allowing modeling of sub-topologies  Implementation Artifacts:  Service Templates “look  like  nodes” enabling: – Executables or Plans that implement  a  Node’s    Composition of applications from one or more or  Relationship’s  Operations (e.g. a Bash script) service templates  Deployment Artifacts:  Substitution of abstract Node types with – Installables of the components (e.g. a TAR file) available service templates of the same type A  service’s  Topology Model is included in a TOSCA Service Template which is packaged and shared, along with all dependent artifacts, as a TOSCA Cloud Service Archive (CSAR)© 2013 Cloudsoft Corporation 7
  8. 8. TOSCA Example Slide origin: TOSCA Spec <Definitions id="PayrollDefinitions" targetNamespace="http://www.example.com/ste" xmlns:pay="http://www.example.com/ste/Types"> <Import namespace="http://www.example.com/ste/Types" location="http://.../PayrollTypes.tosca" importType=" http://docs.oasis-open.org/tosca/ns/2011/12"/> <ServiceTemplate id="Payroll" name="Payroll Service Template"> <TopologyTemplate ID="PayrollTemplate"> <NodeTemplate id="Payroll Application" type="pay:ApplicationNodeType"> <DeploymentArtifacts> <DeploymentArtifact name="PayrollEAR" type="http://..../CSARref"> EARs/Payroll.ear </DeploymentArtifact> </DeploymentArtifacts> </NodeTemplate> <NodeTemplate id="Application Server" type="pay:ApplicationServerNodeType"> <DeploymentArtifacts> <DeploymentArtifact name="ApplicationServerImage" type="http://.../AMIref"> ami-edf2cf99 </DeploymentArtifact> </DeploymentArtifacts> </NodeTemplate> <RelationshipTemplate id="deployed_on" type="pay:deployed_on"> <SourceElement ref="Payroll Application"/> <TargetElement ref="Application Server"/> </RelationshipTemplate> </TopologyTemplate> </ServiceTemplate> </Definitions>© 2013 Cloudsoft Corporation 8
  9. 9. CAMP + TOSCA© 2013 Cloudsoft Corporation 9
  10. 10. CAMP API + = + TOSCA impl© 2013 Cloudsoft Corporation 10
  11. 11. CAMP Open + = App TOSCA Platform© 2013 Cloudsoft Corporation 11
  12. 12. Concept Alignment TOSCA CAMP CSAR PDP describes what to deploy wraps CSAR, gives API to install NodeTemplate, TopologyTemplate PlatformComponent(Template) the heart of TOSCA — an API for managing — but silent about the orchestration to build them how they are built and where they come from ServiceTemplate Assembly(Template) ArtifactTemplate ApplicationComponent(Template) Requirements and Capabilities Requirements and Capabilities Relationships Requirement fulfilment Plans and Policies more PlatformComponent(Template)s Properties and Operations Attributes, Sensors, and Operations© 2013 Cloudsoft Corporation 12
  13. 13. OpenStack Heat http://wiki.openstack.org/Heat© 2013 Cloudsoft Corporation 13
  14. 14. Heat• We all know Heat (and that warm feeling it gives us), but one brief view:• Vocabulary: • Resources are items natively available from OpenStack • Stacks are composites of these resources and/or other stacks• Has: • API — proprietary but isomorphic to a subset of CAMP • DSL — currently based on AWS CloudFormation but evolving© 2013 Cloudsoft Corporation 14
  15. 15. Project BROOKLYN http://brooklyncentral.github.com/© 2013 Cloudsoft Corporation 15
  16. 16. http://brooklyncentral.github.comBrooklyn has been doing thiskind of stuff over in Java-land. © 2013 Cloudsoft Corporation 16
  17. 17. http://brooklyncentral.github.comComplex stuff too!© 2013 Cloudsoft Corporation 17
  18. 18. Active Modelling and ManagementSome good (and bad) practices can be learned! Location + MyWebCluster MySQL ControlledDynamicWebAppCluster MySQL OS [targets] Auto Scaler Policy NGINX DynamicWebAppCluster NGINX OS JBoss7Server … JBoss7Server JBoss7Server … JBoss7Server OS … OS Strictly Confidential © 2013 Cloudsoft Corporation 03/26/13 18
  19. 19. Java Library public class MyWebCluster extends AbstractApplication implements MyWebClusterConstants { @Override public void init() { MySqlNode mysql = ...; ControlledDynamicWebAppCluster web = ...; web.addEnricher(HttpLatencyDetector.builder().url(ROOT_URL). rollup(10, SECONDS).build()); web.getCluster().addPolicy(AutoScalerPolicy.builder(). metric(REQUESTS_PER_SECOND_IN_WINDOW_PER_NODE). metricRange(10, 100).sizeRange(2, 5).build()); addEnricher(SensorPropagatingEnricher.newInstanceListeningTo(web, ROOT_URL, REQUESTS_PER_SECOND_IN_WINDOW, REQUEST_LATENCY_IN_SECONDS_IN_WINDOW)); } }© 2013 Cloudsoft Corporation 19
  20. 20. Conclusion they all need a nice DSL https://wiki.openstack.org/wiki/Heat/DSL/© 2013 Cloudsoft Corporation 20

×