orchestrating cloud applications with tosca

39
@ArthurBerezin Director of Product - Cloudify, GigaSpaces Orchestrating Cloud Applications with TOSCA OpenStack TLV Meetup 5 August 2015

Upload: arthur-berezin

Post on 15-Aug-2015

70 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Orchestrating Cloud Applications With TOSCA

@ArthurBerezin

Director of Product - Cloudify,

GigaSpaces

Orchestrating Cloud Applications with TOSCA

OpenStack TLV Meetup5 August 2015

Page 2: Orchestrating Cloud Applications With TOSCA

Agenda

● Cloud Applications● TOSCA (Topology & Orchestration Specification of Cloud Application)

● Cloudify

Page 3: Orchestrating Cloud Applications With TOSCA

About Me

Director of Product - Cloudify, GigaSpaces

I come from

● OpenStack Product Manager @Red Hat ● DevOps @LivePerson● Linux Services, Field

and Support @Matrix

Page 4: Orchestrating Cloud Applications With TOSCA

About Me

Director of Product - Cloudify, GigaSpaces - 1 Month In

Where do I come from

● OpenStack Product Manager @Red Hat ● DevOps @LivePerson● Linux Services, Field

and Support @Matrix

Page 5: Orchestrating Cloud Applications With TOSCA

Cloud Native and

Cloud Aware Applications

Vision

Open Source Open

Standard

Trend Aware

Page 6: Orchestrating Cloud Applications With TOSCA

*-as-a-ServiceAutomation

Page 7: Orchestrating Cloud Applications With TOSCA

*-as-a-ServiceAutomation

Awareness Reaction to Self

Page 8: Orchestrating Cloud Applications With TOSCA

What It Really Takes to

Deploy and Manage Apps

Provision

Install

Configure

Deploy

Monitor

Scale

Page 9: Orchestrating Cloud Applications With TOSCA

Large Parts Are Mostly Manual

Real Time Analytics

Correlate with

Historical Events

Feedback

Execute Policy

Send Metrics

Setup Monitoring and Alerts

Deploy and Configure Applications

Setup Machine, Network, Storage

Push updates

Collect and Analyze LogsTroubleshoot

Measure performance against expected SLA’s

Set and tune Alerts thresholds

Match Policy to Incident

Page 10: Orchestrating Cloud Applications With TOSCA

The Impact of Human

Errors

80% of

outages impacting mission-critical services will be caused by people and process issues

50% of those outages will

be caused by change/configuration/release integration

and hand-off issues

Page 11: Orchestrating Cloud Applications With TOSCA

What is TOSCA?

Topology & Orchestration Specification of Cloud Application

By OASIS – Sponsored by IBM, CA, Rackspace, Red Hat, Huawei and others

Page 12: Orchestrating Cloud Applications With TOSCA

What is TOSCA?

• Goal: cross-cloud, cross-tool orchestration of applications on the Cloud

• Status: – Version 1 approved (XML ☹)

– Version 2 (YAML!) in design

Page 13: Orchestrating Cloud Applications With TOSCA

Why TOSCA?

• Open Standard

• Can Describe– Any Topology

– Any Automation Process

• (Theoretically) portable between Clouds and Tools

Page 14: Orchestrating Cloud Applications With TOSCA

The TOSCA Building Blocks

Application Topologies

Workflows

Policies

Page 15: Orchestrating Cloud Applications With TOSCA

A Topology

Page 16: Orchestrating Cloud Applications With TOSCA

A Topology

Page 17: Orchestrating Cloud Applications With TOSCA

What’s in TOSCA Topology?

• Inputs and outputs

• Types, nodes and interfaces

• Relationships

• Requirements and capabilities

Page 18: Orchestrating Cloud Applications With TOSCA

Input and Outputs

• A way to parameterize blueprints and let them declare runtime computed values (URLs, passwords, etc.)

Page 19: Orchestrating Cloud Applications With TOSCA

Inputs and Outputsinputs: cloudstack_api_url: default: '' type: string cloudstack_key: default: '' type: string cloudstack_secret: default: '' type: string...

outputs: endpoint: description: Web application endpoint value: ip_address: { get_attribute: [ nodejs_vm, ip ] } port: { get_property: [ nodecellar_app, base_port ] }

Page 20: Orchestrating Cloud Applications With TOSCA

Types & Nodes• Each component in the topology is a node:

• For example, a VM is a node, a Webserver is a Node• The node holds the configuration (properties) and the relationships to

other nodes

• A node has a type• The type is where the lifecycle interface operations are defined• The type specified the properties schema

• Default lifecycle operations are:• create, configure, start, stop, delete

Page 21: Orchestrating Cloud Applications With TOSCA

Type Example

21

Can be scripts or references to Python

functions implemented by plugins

Page 22: Orchestrating Cloud Applications With TOSCA

Relationships

• There are 3 types of relationships:• depends_on – which is the base type• conataind_in – a component is hosted / contained / deployed within another• connected_to – a component needs to establish a connection to another and

therefore this needs to be configured

• The relationship can define operation to be applied on the source of the target instances

22

Page 23: Orchestrating Cloud Applications With TOSCA

Relationships

• Possible operations on each:• preconfigure – before node configure is called• postconfigure – after node configure is called but before start• establish – after start when connection needs to be established• unlink – remove the connection

23

Page 24: Orchestrating Cloud Applications With TOSCA

Relationship Example

Can be scripts or references to Python

functions implemented by plugins

24

Page 25: Orchestrating Cloud Applications With TOSCA

Requirements and Capabilities

Page 26: Orchestrating Cloud Applications With TOSCA

One Way of Putting This

Nodecellar_app IS CONNECTED to mongod

Page 27: Orchestrating Cloud Applications With TOSCA

Another Way of Putting This

Nodecellar_app NEEDS a database of type

‘MongoDB’

Page 28: Orchestrating Cloud Applications With TOSCA

Requirements and Capabilities

• Relationships will soon be replaced by a more declarative model created by the latest TOSCA work draft

• “This type needs a database connection” instead of “This node is connected to a node that happens to be a database”

• Cloudify to follow once spec approved

Page 29: Orchestrating Cloud Applications With TOSCA

Requirements and Capabilities

• A node type declares a certain capability

• Another type in a blueprint declares that it requires this capability

• A node in a blueprint can also declare that it needs a capability

Page 30: Orchestrating Cloud Applications With TOSCA

Requirements and Capabilitiestosca.nodes.Database: derived_from: tosca.nodes.Root properties: db_user: type: string db_password: type: string db_port: type: integer db_name: type: string description: the logical name of the database capabilities: - database_endpoint: tosca.capabilities.DatabaseEndpoint ...

Page 31: Orchestrating Cloud Applications With TOSCA

Requirements and Capabilities

... node_templates: wordpress: type: tosca.nodes.WebApplication.WordPress requirements: - host: webserver - database_endpoint: mysql_database

Page 32: Orchestrating Cloud Applications With TOSCA

Workflows

• TOSCA 1.0 – Workflows (Plans) are in any WF language. – Strong preference for BPMN 2.0

• TOSCA 2.0 – No change

• Cloudify 3 take – Workflows are currently python based– Tinkering with a more declarative approach

(OpenStack Mistral?)

Page 33: Orchestrating Cloud Applications With TOSCA

Policies

• Still not defined by TOSCA, under discussion

• Cloudify 3 – YAML mostly, uses Riemann.io under the hood

– You can create very sophisticated custom policies, in Clojure…

Page 34: Orchestrating Cloud Applications With TOSCA

Putting it all together

• TOSCA Template (Blueprint in Cloudify) contains:

– Application Topology• Nodes

– Interfaces and operations

– Properties

– Relationships

– Workflows (install, uninstall, scale out, CD)

– Policies (scale trigger, recovery trigger)

Page 35: Orchestrating Cloud Applications With TOSCA

Cloudify

Provision

ConfigureMonitor

Manage

Can be used as a command line tool or as a managed service

Monitoring & Alarming

CM Infrastructure

TOSCABlueprint

Page 36: Orchestrating Cloud Applications With TOSCA

Cloudify

Provision

ConfigureMonitor

Manage

Can be used as a command line tool or as a managed service

Monitoring & Alarming

CM Infrastructure

TOSCABlueprint

Page 37: Orchestrating Cloud Applications With TOSCA

The Only Constant Is Change!

Web 2.0 > ITIL > SOA > Virtualization > Public Clouds > SaaS > IaaS > PaaS > Docker Docker Docker.. > Kubernentes > What’s next to come?

Page 38: Orchestrating Cloud Applications With TOSCA

Thank You!

Page 39: Orchestrating Cloud Applications With TOSCA

References

• TOSCA Spec:https://www.oasis-open.org/committees/tosca/

• Cloudify home: getcloudify.org • Github: github.com/cloudify-cosmo