(Cloud) Services:An Introduction to TOSCA
(Topology and Orchestration Specification for Cloud Services)
Gerd BreiterFrank LeymannSimon Moser
Thomas Spatzier
Caution: Terminology
SOA and Systems Management…
…use the terms “service”, “composition”, “orchestration”,… differently
…at least with different foci
3
Terminology: Service
“Service” means different things In SOA: Any kind of (reasonably coarse-grained)
application function Interesting discussion: what is an application? It depends on the
domain… In Systems Management: Any kind of resource and
appropriate actions required to support business with IT Interesting discussion: systems management is an application too.
Thus, the SOA notion of service applies too – but that might get confusing at this point in time
4
Terminology: Orchestration
“Orchestration” means different things In SOA: the aggregation of application functions into
higher level business functions In Systems Management: the proper sequencing of
individual management tasks to manage complex IT artifacts
YES: both can be done with the same underlying technology (BPMN, BPEL,…) but the focus is very different
5
Terminology: Composition
“Composition” means different things In SOA/SCA: the aggregation of application functions and
their relations for the purpose of proper deployment In Systems Management: the “parts tree” of complex IT
artifacts for the purpose of setting up the artifacts correctly, as well as the processes for ensuring the appropriate continuous management of the artifacts
6
Imagine…
…that you have a nice application that you want to be able to be hosted in different clouds
Why do you want that? Because you don’t want to be locked into the platform of a
single cloud provider, or Because you start in your own private cloud and want to
be able to move it to public cloud or to some community cloud or to hybrid cloud
8
CloudProvider A
CloudProvider B
3. Move (i.e. Provision)
1. Provision& Manage
4. Use
5. Manage
Thus, the Scenario is:Moving Cloud Applications
9
2. Use
What are the Technical Problems?
No interoperable description exists of what your application is and what it requires Virtual images do not suffice at all
They are “just” snapshots of the actual state of your application
Another provider might not have a clue how to install, deploy, run & manage your application Deep detailed skills about the application and its
underlying stack is needed that “arbitrary” providers typically don’t have
10
What Is “(Cloud) Service Template” All About?
A new language (“metamodel”) to specify the building blocks of your application the management functions these
building blocks offer to be managed
the relations between these building blocks
Collection of node types and relationship types(for reuse purposes)
the procedures to follow in order to manage your application as a whole
11
NodeTypes
Rel.shipTypes
Plans
Topology(Template)
(Clo
ud) S
ervi
ce T
empl
ate
GroupTemplate
Graphical Representation
12
Prop
ertie
s Interfaces
NodeTemplate
Topology Template
type for
Node Type
Relationship Template
Service TemplateNode Types
Plans
type for
Prop
ertie
s Relationship TypeRelationship Types
GroupTemplate
…and With Angular Brackets…
14
<ServiceTemplate …> <Extensions/>? <Import />*
<Types/>?
( <TopologyTemplate/>
| <TopologyTemplateReference/>)?
<NodeTypes/>?
<RelationshipTypes/>?
<Plans/>? </ServiceTemplate>
Example: High Level View
15
WebSphereCell
DB2 Server
WebSphereProcessServer
BPEL Files
EJBs
WSDL Files
uses
implementedby
deployedOn
requires
requires
deployedOn
deployedOn…and this is a bit more clomplex…
Node Template
Relationship Template
Example: WebSphere Cell Refined
16
WebSphere Cell
IHSNode
WAS NDDeployMgr
Node
WAS NDManaged
Node
Application Server
Instance
Cluster
DB2 Server
DB2 Database Instance
"cluster""database"
1..*
1..*
exists
Properties, e.g.:ports, servername, weight
Properties, e.g.:WAS install location, Profile name, Node name
WebSphereCell
DB2 Server
Example: Overall Topology Template
17
WebSphere Cell
IHSNode
WAS NDDeployMgr
Node
WAS NDManaged Node
Application Server Instance
Cluster
DB2 Server
DB2 Database Instance
1..*
1..*
WebSphereProcessServer
BPEL Files
EJBs
WSDL Files
Example: Amazon
18
WebSphereCell
DB2 Server
WebSphereProcessServer
BPEL Files
EJBs
WSDL Files
uses
implementedby
deployedOn
requires
requires
deployedOn
deployedOn
Amazon
…Which is the “Interoperable Service Templates” Scenario (see later)
19
WebSphereCell
DB2 Server
WebSphereProcessServer
BPEL Files
EJBs
WSDL Files
Amazon
Example: Amazon – Refined Scenario
20
WebSphereCell
DB2 Server(WAS Data)
WebSphereProcessServer
BPEL Files
EJBs
WSDL Filesuses
Implemented by deployedOn
requires
requires
Amazon
DB2 Server(Application
Data)
requires
WebSphereCell
deployedOn
On Premise
Example: Amazon – Refined Scenario(Details)
21
WebSphereCell
DB2 Server(WAS Data)
WebSphereProcessServer
BPEL Files
EJBs
WSDL Filesuses
Implemented by deployedOn
requires
requires
Amazon
DB2 Server(Application
Data)
requires
WebSphereCell
deployedOn
On Premise
The Web Services required by the BPEL processes are hosted on premise
The EJBs (e.g.) implementing the Web Services are deployed on WebSphere hosted on premise
The application data of the WS/EJBs are stored in DB2 on premise
This ensures compliance with data privacy/confidentiality rules
Process Server etc is installed and managed at Amazon’s EC2
The corresponding middleware is provided as AMIs
The process models are deployed on Process Server
Process Server maintains state data in DB2 also running in EC2
Example: Reusing Existing Services
22
Only the processes and required middleware is managed on a “known” cloud
The Web Services needed by the BPEL processes are reused “wherever” they are
The existing Web Services are bound to the BPEL process by the established mechanisms
Specifying binding details can be part of the build plan of the application’s Service Template (.ste)
WebSphereCell
DB2 Server
WebSphereProcessServer
BPEL Files
WSDL Files
uses
deployedOn
requires
requires
deployedOn
WS1
WS2
WSn
…
„somewhere1“
„somewhere2“
„somewheren“
boun
d to
Example: SAP
23
Netweaver
Oracle
SAP Workflow
BPEL Files
EJB
WSDL Files
uses
implementedby
deployedOn
requires
requires
deployedOn
deployedOn
SAP
Example: Microsoft
24
.Net
SQL Server
BizTalk
BPEL Files
.NetAssemblies
WSDL Files
uses
implementedby
deployedOn
requires
requires
deployedOn
deployedOn
Azure
Example: Different Hosters of a Particular Application
25
Netweaver
Oracle
SAP Workflow
BPEL Files
EJB
WSDL Files
uses
implementedby
deployedOn
requires
requires
deployedOn
deployedOn
IBM
AT&T
T-Systems
...
…Which is the “Market for Cloud Applications” Scenario (see later)
26
Netweaver
Oracle
SAP Workflow
BPEL Files
EJB
WSDL Files
uses
implementedby
deployedOn
requires
requires
deployedOn
deployedOn
IBM
AT&T
T-Systems
...
Sample:Websphere Management Plans
27
Provision Dmgr
Enable Admin
Security
Start Dmgr
Create Cluster
Provision Managed Node
Federate Node
DeployMon. Agent
Create Cluster
Members
Provision IHS Node
Deploy Mon. Agent
(IHS)Start IHS Configure
WebserverStart
Cluster
Deploy Monitoring
Agent (Dmgr)
Provision Managed Node
Federate Node
DeployMon. Agent
Create Cluster
Members
Start Cluster
Unfederate Node Reconfigure
Webserver
RemoveMon. Agent
Deprovision Managed Node
InitialProvisioning
Add Nodes
Remove Nodes
How Plans and Nodes Fit Together
Task of a plan refers to interface of a topology node
Topology node specifies all interfaces offered to manage it
Interface is bound to a concrete implementation
Implementation already available at providers side, or Implementation is copied from somewhere, or A standardized Cloud Interface (Iaas, PaaS, SaaS) is used,
or ...
28
WebSphere Cell …
Create Cluster
… …
Script- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
…refers to…
…bound to…
A Caveat!
The “(Cloud) Service Template” spec is not (!) about standardizing topologies and plans for a series of concrete products
The “(Cloud) Service Template” spec is (!) about standardizing the language that can be used to precisely describe topologies and plans for concrete products
Various products (i.e. their topologies and plans) can be standardized base on that at a later time By various domain experts, vendors,…
29
Baseline
TOSCA is modular and composable
It does not reinvent the wheel, i.e. it uses existing standards wherever possible E.g. WSDL, BPMN, OVF,…
30
CloudProvider A
CloudProvider B
4. Move
Service Template
Service InstanceService Instance
Service Template
1. Build
2. Use 3. Want Use
5. Build
6. Use
Scenario 1:Mobility of Cloud Applications
32
Important Note
TOSCA deals with interoperability of Service Templates here
I.e. portability of the ingredients of an IT Service (especially the code artifacts) is not addressed by TOSCA
Similarly, mobility of data used by a corresponding service instance is not in the scope of TOSCA
33
ServiceCatalog
1. Create
2. Publish
3. Browseand Select
4. Provision
5. Use
Service Template
Service Instance
Scenario 2: Creating a Market For Cloud Applications
34
CloudProvider A
Realized By
Implemented As
CloudProvider C
CloudProvider B
Scenario 3:Interoperable Service Compositions
35
Scenario 4:Using OVF Packages
36
Note: only subtree of servicedefinition relates to OVF, othersubtrees/nodes can point toshared resources (e.g. DB2,…)
<ovf:Envelope ... > <ovf:VirtualSystemCollection...>
<ovf:VirtualSystem ... > ... <ovf:ProductSection ... > ... </ovf:ProductSection ... > ... </ovf:VirtualSystem>
<ovf:VirtualSystem ... > ... </ovf:VirtualSystem>
...
</ovf:VirtualSystemCollection></ovf:Envelope>
Refined View
37
How ...
----
----
----
----
----
----
----
----
----
OVF OV
FOVF
With ...Scripts WorkflowsEAR (EJBs,…)BPEL
The images of the middleware (DB2, Websphere,…) required to run the application
The business logic of the application, e.g. EJBs, JSPs, JPEG,…
The business processes of the application (BPEL, BPMN, Human Tasks,…)
(Existing) scripts used by task of plans to manage the cloud application
(Existing) workflows used by subprocess-tasks of plans
Service
Cloud Management & Orchestration
38
SaaS
Server Server Storage
AppSrv DB
Application
PaaS
IaaS is maturing. Evolution of standards like OVF or defacto standards like EC2 or S3 enable growth of ecosystems.
PaaS offerings exist (e.g. MicroSoft Azure), but are restricted solely to the PaaS layer.
SaaS offerings exist (e.g Google Apps), but as standalone offerings restricted to the SaaS layer.
Interfaces between PaaS and IaaS starting to evolve.
Components in a composite service can come from one Cloud, multiple Clouds, or can be non-Cloud resources (e.g. existing company LDAP or private DBs).
Man
agem
ent
Scop
e
Management Functionality
Deploy, Decommission
Start, Stop, Resize
Management Plans covering the complete service life cylce.
IaaS
Cloud
Management & Orchestration
Ingredients of a Service Template
40
Prop
ertie
s Interfaces
NodeTemplate
Topology Template
type for
Node Type
Relationship Template
Service TemplateNode Types
Plans
type for
Prop
ertie
s Relationship TypeRelationship Types
GroupTemplate
Structure of .ste Document
41
<ServiceTemplate id="ID" name="string" targetNamespace="anyURI"> <Extensions/>? <Import />* <Types/>? ( <TopologyTemplate/>| <TopologyTemplateReference/>)? <NodeTypes/>? <RelationshipTypes/>?
<Plans/>? </ServiceTemplate>
Topology Template
Node Types
Relationship Types
Plans
Node Types: Overall Structure
42
<NodeTypes>? <NodeType id="ID" name="string">+ <NodeTypeProperties element="Qname"? type="QName"?/>? <DerivedFrom nodeTypeRef="QName"/>?
<InstanceStates/>? <Interfaces/>? <DeploymentArtifacts/>? <Policies/>? </NodeType> </NodeTypes>
Prop
ertie
s Interface
Node TypeNode Types
Interfaces of Node Types
43
<Interfaces>? <Interface>+ ( <WSDL portType="QName“ operation="NCName">+ | <REST method="GET | PUT | POST | DELETE" requestURI="anyURI" requestPayload="QName"? responsePayload="QName"?>+ | <Operation name="NCame">+ <InputParameters>? <InputParamter name="string" type="string" required="yes|no">+ </InputParameters> <OutputParameters>? <OutputParamter name="string" type="string">+ </OutputParameters> <Implementations> <Implementation implementationID="anyURI"? language="anyURI"?>+ ( <ImplementationProper>? code </ImplementationProper> | <ImplementationReference ref="anyURI"/>? ) <Implementation> </Implementations> </Operation> ) </Interface> </Interfaces>
Interfaces
Deployment Artfactsof Node Types
44
<DeploymentArtifacts>? <DeploymentArtifact name="string" type="anyURI">+ artifact specific content </DeploymentArtifact></DeploymentArtifacts>
Policies of Node Types
45
<Policies>? <Policy name="string" type="anyURI">+ policy specific content </Policy> </Policies>
Example: Node Types
<ServiceTemplate name="myService" targetNamespace="http://www.ibm.com/sample"> <NodeTypes> <NodeType name="Project"> <documentation xml:lang="EN"> A reusable definition of a node type supporting the creation of new projects. </documentation> <NodeTypeProperties element="ProjectProperties"/>
<InstanceStates> <InstanceState state="www.my.com/active"/> <InstanceState state="www.my.com/onHalt"/> </InstanceStates>
...
...<Interfaces> <Interface> <Operation name="CreateProject"> <InputParameters> <InputParamter name="ProjectName" type="string"/> <InputParamter name="Owner" type="string"/> <InputParamter name="AccountID" type="string"/> </InputParameters> <Implementations> <Implementation> ... </Implementation> </Implementations> </Operation> </Interface> </Interfaces> </NodeType> </NodeTypes> </ServiceTemplate>>
Relationship Types
47
<RelationshipTypes> <RelationshipType id="ID" name="string" semantics="anyURI" cascadingDeletion="yes|no">+ <RelationshipTypeProperties element="QName"? type="QName"?/>?
<InstanceStates>? <InstanceState state="anyURI">+ </InstanceStates> </RelationshipType> </RelationshipTypes>
Prop
ertie
s Relationship TypeRelationship Types
Example: Relationship Types
<RelationshipTypes> <RelationshipType name="processDeployedOn" semantics="www.my.com/RelSemantics/procDeployedOn" cascadingDeletion="yes"> <RelationshipTypeProperties element="ProcessDeployedOnProperties"/> <InstanceStates> <InstanceState state="www.my.com/successfullyDeployed"/> <InstanceState state="www.my.com/failed"/> </InstanceStates>
</RelationshipType> </RelationshipTypes>
<TopologyTemplate id="ID" name="string"?> ( <NodeTemplate/> | <RelationshipTemplate/> | <GroupTemplate/> )+ </TopologyTemplate>^
Topology Template
49
Node Template
…type for…
Relationship Template
…type for…
GroupTemplate
Topology Template (cont.)
50
<TopologyTemplate id="ID" name="NCName"> ( <NodeTemplate id="ID" name="string" nodeType="QName" minInstances="int"? maxInstances="int|string"?>+ <PropertyDefaults>? XMLDocument </PropertyDefaults> <PropertyConstraints>? <PropertyConstraint property="string" constraintType="anyURI">+ constraint? </PropertyConstraint> </PropertyConstraints> <Policies/>? <EnvironmentConstraints>? <EnvironmentConstraint constraintType="anyURI">+ constraint type specific content? </EnvironmentConstraint> </EnvironmentConstraints> <DeploymentArtifacts/>? </NodeTemplate> | <RelationshipTemplate/> | <GroupTemplate/> )+ </TopologyTemplate>
Node Template
…type for…
Relationship Template
…type for…
GroupTemplate
Topology Template (cont.)
51
<TopologyTemplate id="ID" name="NCName"> ( <NodeTemplate/> | <RelationshipTemplate id="ID" name="string" relationshipType="QName">+ <SourceNodeElement id="IDREF"/> ( <TargetNodeElement id="IDREF"/> | <TargetNodeTemplateReference name="QName"/> ) <PropertyDefaults/>? <RelationshipConstraints>? <RelationshipConstraint constraintType="anyURI">+ constraint? </RelationshipConstraint> </RelationshipConstraints> </RelationshipTemplate> | <GroupTemplate/> )+ </TopologyTemplate>
Node Template
…type for…
Relationship Template
…type for…
GroupTemplate
Topology Template (cont.)
52
<TopologyTemplate id="ID" name="NCName"> ( <NodeTemplate/> | <RelationshipTemplate/> | <GroupTemplate id="ID" name="string"? minInstances="int"? maxInstances="int|string"?> ( <NodeTemplate ... /> | <RelationshipTemplate ... /> | <GroupTemplate ... /> )+ <Policies/> </GroupTemplate> )+ </TopologyTemplate>
Node Template
…type for…
Relationship Template
…type for…
GroupTemplate
Example: Service Topology Template
<ServiceTemplate name="myService" targetNamespace="http://www.ibm.com/sample" xmlns:abc="http://www.ibm.com/sample"> <Import namespace="http://www.ibm.com/sample" importType=" http://www.example.org/STE"/> <TopologyTemplate name="VirtualServerProject"> <NodeTemplate id="myProject" nodeType="abc:Project"> <PropertyDefaults> <ProjectProperties> <Owner>Frank</Owner> <ProjectName>Thomas’ favorite project</ProjectName> </ProjectProperties> </PropertyDefaults> <NodeTemplate/>
<NodeTemplate id="myVirtualServer" nodeType="abc:VirtualServer" minInstances="0" maxInstances="unbounded"/> ...
…
<RelationshipTemplates> <RelationshipTemplate name="myRelationship" relationshipType="contains"> <SourceNodeElement id="myProject"/> <TargetNodeElement id="myVirtualServer"/> </RelationshipTemplate> </RelationshipTemplates> </TopologyTemplate> </ServiceTemplate>
53
Plans
54
<Plans> <Plan id="ID" name="string"? planType="anyURI" languageUsed="anyURI">+ <PreCondition expressionLanguage="anyURI">? condition </PreCondition> ( <PlanModel> actual plan </PlanModel> | <PlanModelReference reference="anyURI"/> ) </Plan> </Plans>
Plans
Example: Plans
...
<Plan id="RemoveApplication" planType= "http://www.example.org/STE/PlanTypes/TerminatioPlan" languageUsed= "http://docs.oasis-open.org/wsbpel/…/executable"> <PlanModelReference reference="prj:RemoveApp"/> </Plan> </Plans>
<Plans> <Plan id="DeployApplication" name="Sample Application Build Plan" planType= "http://www.example.org/STE/PlanTypes/BuildPlan" languageUsed="http://www.omg.org/spec/BPMN/2.0/"> <PreCondition expressionLanguage="www.my.com/text">? Run only if funding is available </PreCondition> <PlanModel> <process name="DeployNewApplication" id="p1"> <task id="t1" name="CreateAccount"/> <task id="t2" name="AcquireNetworkAddresses" isSequential="false" loopDataInput="t2Input.LoopCounter"/> <sequenceFlow id="s1" targetRef="t2" sourceRef="t1"/> ... </process> </PlanModel>
...
Sample Node Type: SuperStorage
<xs:element name="StorageProperties"> <xs:complexType> <xs:sequence> <xs:element name="TotalStorageAmount" type="xs:string"/> <xs:element name="IPAddress" type="xs:string"/> … </xs:sequence> </xs:complexType> </xs:element>
<NodeType name="SuperStorage"> <NodeTypeProperties element="StorageProperties"/> <Interface> <Operation name="CreateStorageContainer"> <REST method="POST" … <Operation name="AddFile"> <REST method="PUT" … … </Interface> </NodeType>
Vendor „BestStorageVendor“ Sells ist Devices with Corresponding Node Template
BestStorageVendor defines Node Template to specify its BestStorageDevice based on former Node Type
Vendor sets Properties that are known from the outset TotalStorageAmount is known IPAddress is set during installation/deployment
Implementation of interface is referenced from Node Template
<NodeTemplate name="BestStorageDevice" nodeType="SuperStorage"> <PropertyDefaults> <TotalStorageAmount>1000TB</TotalStorageAmount> </PropertyDefaults>
<DeploymentArtifacts> <DeploymentArtifact name="InterfaceImplementation" type="WARref">
... </DeploymentArtifact> </DeploymentArtifacts>
</NodeTemplate>
Customer Deploys New Device
.......
.....
Service Template Deployment Artifacts
StorageAPI.war
…
TOSCAContainer
TOSCADatabase
1
2
3
StorageAPI.war
1. IPAddress-Property of Device is set2. StorageAPI.war is deployed
• IP address of Servlet Container is set3. IP-Address of Servlet Container becomes HOST header for REST API
Tasks of Plans are Deployed
BestStorageDevice
…
CreateStorage
… …
1. refers to…
3. values from…
TOSCADatabase
<NodeTemplate name="BestStorageDevice" nodeType="SuperStorage"> <PropertyDefaults> <TotalStorageAmount>1000TB</TotalStorageAmount> </PropertyDefaults> <NodeType name="SuperStorage"> <Interface> <Operation name="CreateStorageContainer"> <REST method="POST" …
CreateStorageContainer
StorageAPI.war
2. requires data…
4. locates code…