Post on 22-Nov-2014
description
Cloud Application Management in Practice
Alex Heneveld / @ahtweetinOpenStack Design Summit
17 April 2013
© 2013 Cloudsoft Corporation
http://brooklyncentral.github.com
2
03/26/13Strictly Confidential © 2013 Cloudsoft Corporation
Uses
3
03/26/13Strictly Confidential © 2013 Cloudsoft Corporation
Uses
4
03/26/13Strictly Confidential © 2013 Cloudsoft Corporation
Uses
5
03/26/13Strictly Confidential © 2013 Cloudsoft Corporation
Betfair
6
03/26/13Strictly Confidential © 2013 Cloudsoft Corporation
Betfair
7
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
03/26/13Strictly Confidential © 2013 Cloudsoft Corporation 9
Hierarchical Autonomic Management
Granularity can be anything from individual application to overall control plane
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 …
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
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
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
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.
© 2013 Cloudsoft Corporation
Powerful GUI and RESTful API
15
© 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)); }}
© 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
© 2013 Cloudsoft Corporation
What Next?
• DSL UNCONFERENCE tomorrow 2.20pm
• Community at http://brooklyncentral.github.com• IRC at #brooklyncentral
18