(Cloud) Services:
An Introduction to TOSCA
(Topology and Orchestration Specification for Cloud Services)
Gerd
Breiter
Frank Leymann
Simon Moser
Thomas
Spatzier
Terminology
2
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
Conceptual Overview
7
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
Cloud
Provider A
Cloud
Provider 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
Node
Types
Rel.ship
Types
Plans
Topology
(Template)
(Cloud) Service Template
Group
Template
Graphical Representation
12
Properties
Interfaces
Node
Template
Topology Template
type for
Node Type
Relationship
Template
Service Template
Node Types
Plans
type for
Properties
Relationship Type
Relationship Types
Group
Template
…and More Colorful…
13
Topology
Plans
…and With Angular Brackets…
14
<
ServiceTemplate
…
>
<Extensions/>?
<Import />*
<Types/>?
(
<
TopologyTemplate
/>
|
<
TopologyTemplateReference
/>
)?
<
NodeTypes
/>?
<
RelationshipTypes
/>?
<Plans/>?
</
ServiceTemplate
>
Example: High Level View
15
WebSphere
Cell
DB2 Server
WebSphere
Process
Server
BPEL Files
EJBs
WSDL Files
uses
implemented
by
deployedOn
requires
requires
deployedOn
deployedOn
…and this is
a bit more
clomplex
…
Node Template
Relationship Template
Example:
WebSphere
Cell Refined
16
WebSphere
Cell
IHS
Node
WAS ND
DeployMgr
Node
WAS ND
Managed
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
WebSphere
Cell
DB2 Server
Example: Overall Topology Template
17
WebSphere
Cell
IHS
Node
WAS ND
DeployMgr
Node
WAS ND
Managed
Node
Application
Server Instance
Cluster
DB2 Server
DB2 Database
Instance
1..*
1..*
WebSphere
Process
Server
BPEL Files
EJBs
WSDL Files
Example: Amazon
18
WebSphere
Cell
DB2 Server
WebSphere
Process
Server
BPEL Files
EJBs
WSDL Files
uses
implemented
by
deployedOn
requires
requires
deployedOn
deployedOn
Amazon
…Which is the “Interoperable Service Templates” Scenario
(see later)
19
WebSphere
Cell
DB2 Server
WebSphere
Process
Server
BPEL Files
EJBs
WSDL Files
Amazon
Example: Amazon
–
Refined Scenario
20
WebSphere
Cell
DB2 Server
(WAS Data)
WebSphere
Process
Server
BPEL Files
EJBs
WSDL Files
uses
Implemented by
deployedOn
requires
requires
Amazon
DB2 Server
(
Application
Data
)
requires
WebSphere
Cell
deployedOn
On
Premise
Example: Amazon
–
Refined Scenario
(Details)
21
WebSphere
Cell
DB2 Server
(WAS Data)
WebSphere
Process
Server
BPEL Files
EJBs
WSDL Files
uses
Implemented by
deployedOn
requires
requires
Amazon
DB2 Server
(
Applicatio
nData
)
requires
WebSphere
Cell
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)
WebSphere
Cell
DB2 Server
WebSphere
Process
Server
BPEL Files
WSDL Files
uses
deployedOn
requires
requires
deployedOn
WS
1
WS
2
WS
n
…
„somewhere
1
“
„somewhere
2
“
„
somewhere
n
“
bound to
Example: SAP
23
Netweaver
Oracle
SAP
Workflow
BPEL Files
EJB
WSDL Files
uses
implemented
by
deployedOn
requires
requires
deployedOn
deployedOn
SAP
Example: Microsoft
24
.Net
SQL Server
BizTalk
BPEL Files
.Net
Assemblies
WSDL Files
uses
implemented
by
deployedOn
requires
requires
deployedOn
deployedOn
Azure
Example: Different
Hosters
of a Particular Application
25
Netweaver
Oracle
SAP
Workflow
BPEL Files
EJB
WSDL Files
uses
implemented
by
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
implemented
by
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
Deploy
Mon. Agent
Create
Cluster
Members
Provision
IHS
Node
Deploy
Mon. Agent
(IHS)
Start IHS
Configure
Webserver
Start
Cluster
Deploy
Monitoring
Agent
(
Dmgr
)
Provision
Managed
Node
Federate
Node
Deploy
Mon. Agent
Create
Cluster
Members
Start
Cluster
Unfederate
Node
Reconfigure
Webserver
Remove
Mon. Agent
Deprovision
Managed
Node
Initial
Provisioning
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
Motivation
31
Cloud
Provider A
Cloud
Provider B
4. Move
Service Template
Service Instance
Service 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
Template
s
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
Service
Catalog
1. Create
2. Publish
3. Browse
and Select
4. Provision
5. Use
Service Template
Service Instance
Scenario 2:
Creating a Market For Cloud Applications
34
Cloud
Provider A
Realized By
Implemented As
Cloud
Provider C
Cloud
Provider B
Scenario 3:
Interoperable Service Compositions
35
Scenario 4:
Using OVF Packages
36
Note
: only subtree of service
definition relates to OVF, other
subtrees/nodes can point to
shared 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
OVF
OVF
With ...
Scripts
Workflows
EAR (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).
Management
Scope
Management Functionality
Deploy,
Decommission
Start,
Stop,
Resize
Management Plans
covering
the
complete service life
cylce
.
IaaS
Cloud
Management & Orchestration
Service Template: Specification Overview
39
Ingredients of a Service Template
40
Properties
Interfaces
Node
Template
Topology Template
type for
Node Type
Relationship
Template
Service Template
Node Types
Plans
type for
Properties
Relationship Type
Relationship Types
Group
Template
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
>
Properties
Interface
Node Type
Node 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
Artfacts
of 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
>
Properties
Relationship Type
Relationship 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…
Group
Template
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…
Group
Template
Topology Template (cont.)
51
<
TopologyTemplate
id="ID" name="
NCName
">
(
<
NodeTemplate
/
>
|
<
RelationshipTemplate
id="ID" name="string"
relationshipType
="
QName
">+
<
SourceNodeElement
id="IDREF"/>
( <
TargetNodeElement
id="IDREF"/>
|
<
TargetNodeTemplate
Reference
name="
QName
"/>
)
<
PropertyDefaults
/>?
<
RelationshipConstraints
>?
<
RelationshipConstraint
constraintType
="
anyURI
">+
constraint
?
</
RelationshipConstraint
>
</
RelationshipConstraints
>
</
RelationshipTemplate
>
|
<
GroupTemplate
/>
)+
</
TopologyTemplate
>
Node Template
…type for…
Relationship
Template
…type for…
Group
Template
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…
Group
Template
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
>
...
Scenario
56
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
Storage
API.war
…
TOSCA
Container
TOSCA
Database
1
2
3
Storage
API.war
1.
IPAddress
-
Property of Device is set
2.
StorageAPI.war
is deployed
•
IP address of Servlet Container is set
3.
IP
-
Address of Servlet Container becomes HOST header for REST API
Tasks of Plans are Deployed
Best
Storage
Device
…
Create
Storage
…
…
1. refers to…
3. values from…
TOSCA
Database
<NodeTemplate name="BestStorageDevice" nodeType="SuperStorage"
>
<PropertyDefaults>
<TotalStorageAmount>1000TB</TotalStorageAmount>
</PropertyDefaults>
<NodeType name="SuperStorage">
<Interface>
<Operation name="CreateStorageContainer">
<REST method="POST"
…
CreateStorageContainer
Storage
API.war
2. requires data…
4. locates code…
End of Document
61
Enter the password to open this PDF file:
File name:
-
File size:
-
Title:
-
Author:
-
Subject:
-
Keywords:
-
Creation Date:
-
Modification Date:
-
Creator:
-
PDF Producer:
-
PDF Version:
-
Page Count:
-
Preparing document for printing…
0%
Comments 0
Log in to post a comment