18
Cloud Application Management in Practice Alex Heneveld / @ahtweetin OpenStack Design Summit 17 April 2013

Cloud Application Management in Practice - OpenStack Summit Lightning Talk

Embed Size (px)

DESCRIPTION

a quick intro to deploying and managing some complex applications in the cloud illustration of how the brooklyn.io open source project and autonomic management ideas handle cloudera hadoop, marklogic xml big data, and betfair's appcloud

Citation preview

Page 1: Cloud Application Management in Practice - OpenStack Summit Lightning Talk

Cloud Application Management in Practice

Alex Heneveld / @ahtweetinOpenStack Design Summit

17 April 2013

Page 2: Cloud Application Management in Practice - OpenStack Summit Lightning Talk

© 2013 Cloudsoft Corporation

http://brooklyncentral.github.com

2

Page 3: Cloud Application Management in Practice - OpenStack Summit Lightning Talk

03/26/13Strictly Confidential © 2013 Cloudsoft Corporation

Uses

3

Page 4: Cloud Application Management in Practice - OpenStack Summit Lightning Talk

03/26/13Strictly Confidential © 2013 Cloudsoft Corporation

Uses

4

Page 5: Cloud Application Management in Practice - OpenStack Summit Lightning Talk

03/26/13Strictly Confidential © 2013 Cloudsoft Corporation

Uses

5

Page 6: Cloud Application Management in Practice - OpenStack Summit Lightning Talk

03/26/13Strictly Confidential © 2013 Cloudsoft Corporation

Betfair

6

Page 7: Cloud Application Management in Practice - OpenStack Summit Lightning Talk

03/26/13Strictly Confidential © 2013 Cloudsoft Corporation

Betfair

7

Page 8: Cloud Application Management in Practice - OpenStack Summit Lightning Talk

03/26/13Strictly Confidential © 2013 Cloudsoft Corporation 8

Autonomic Management (M-A-P-E)

Monitor

Analyze Plan

ExecuteState

Sensors Effectors

EnrichDelegate

Autonomic Manager*

Sensors Effectors

Escalate

Managed Element

*An autonomic manager can be a managed element

Page 9: Cloud Application Management in Practice - OpenStack Summit Lightning Talk

03/26/13Strictly Confidential © 2013 Cloudsoft Corporation 9

Hierarchical Autonomic Management

Granularity can be anything from individual application to overall control plane

Page 10: Cloud Application Management in Practice - OpenStack Summit Lightning Talk

03/26/13Strictly Confidential © 2013 Cloudsoft Corporation

Multi-Tier Application

Load Balanced Cluster

Cluster

Multi-Tier Application

10

OS

MySQL

OS

NGINX

OS

JBoss7Server

OS

JBoss7Server…

Need to update targets to match cluster

Need to publish MySQL URL for cluster

Need to specify autoscaling policy

There has to be a better way than scripting …

Page 11: Cloud Application Management in Practice - OpenStack Summit Lightning Talk

03/26/13Strictly Confidential © 2013 Cloudsoft Corporation

MyWebCluster – Topology

11

MyWebCluster

ControlledDynamicWebAppCluster

DynamicWebAppCluster

JBoss7Server

NGINX

MySQL

JBoss7Server

Concrete Entities

Abstract Entities

Managed Elements - AMP proxies for real world components

Autonomic Managers - AMP specific constructs or building blocks

Here we explicitly model the app’s organizational structure

MySQL and NGINX could be swapped out for their clustered variants

Page 12: Cloud Application Management in Practice - OpenStack Summit Lightning Talk

03/26/13Strictly Confidential © 2013 Cloudsoft Corporation

MyWebCluster – Blueprint

12

Auto Scaler Policy[targets]

MyWebCluster

ControlledDynamicWebAppCluster

DynamicWebAppCluster

JBoss7Server

NGINX

MySQL

JBoss7Server

Policies Attached to entities they effect but can subscribe to any sensor

[targets] is a built in policy whereas the auto scaling policy is explicitly added

An application blueprint is completely portable

Page 13: Cloud Application Management in Practice - OpenStack Summit Lightning Talk

03/26/13Strictly Confidential © 2013 Cloudsoft Corporation

MyWebCluster – Customization

13

…JBoss7Server

NGINX

MySQL

JBoss7Server

Auto Scaler Policy[targets]

MyWebCluster

ControlledDynamicWebAppCluster

DynamicWebAppCluster

JBoss7Server

NGINX

MySQL

JBoss7Server

Drivers Customer specific implementations (Bash, Puppet, Chef etc.)

The pluggable driver mechanism is an elegant way to customize a blueprint for a particular environment

Page 14: Cloud Application Management in Practice - OpenStack Summit Lightning Talk

03/26/13Strictly Confidential © 2013 Cloudsoft Corporation

MyWebCluster – Instantiation

14

Location

OS

OS

OS

… OS

…JBoss7Server

NGINX

MySQL

JBoss7Server

+

Auto Scaler Policy[targets]

MyWebCluster

ControlledDynamicWebAppCluster

DynamicWebAppCluster

JBoss7Server

NGINX

MySQL

JBoss7Server

Instances Location dependent – can be virtual machine, LXC etc.

Page 15: Cloud Application Management in Practice - OpenStack Summit Lightning Talk

© 2013 Cloudsoft Corporation

Powerful GUI and RESTful API

15

Page 16: Cloud Application Management in Practice - OpenStack Summit Lightning Talk

© 2013 Cloudsoft Corporation 16

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)); }}

Page 17: Cloud Application Management in Practice - OpenStack Summit Lightning Talk

© 2013 Cloudsoft Corporation 17

A DSL — Heat, CAMP, TOSCA, more ...

name: "three tier app"components: hello_war: # no type content: hello.war requires: com.example.java:WarContainer: initialSize: 3 fulfillment: frontend com.example.java:Autoscaler: metric: request.latency max: 120ms hello_sql: content: hello.sql type: com.example.database:Schema # here, type of component defined requires: backend frontend: # "platform component" implied by WarDeplReq above requires: database: # frontend type must recognise a named "database" req mode: CDI # assume that req supports various injection modes fulfillment: backend

Page 18: Cloud Application Management in Practice - OpenStack Summit Lightning Talk

© 2013 Cloudsoft Corporation

What Next?

• DSL UNCONFERENCE tomorrow 2.20pm

• Community at http://brooklyncentral.github.com• IRC at #brooklyncentral

18