Se ha denunciado esta presentación.
Utilizamos tu perfil de LinkedIn y tus datos de actividad para personalizar los anuncios y mostrarte publicidad más relevante. Puedes cambiar tus preferencias de publicidad en cualquier momento.
Application Management 
with Apache Brooklyn 
Alex Heneveld @ahtweetin 
CTO & Co-Founder, Cloudsoft 
Committer, Apache Bro...
© 2014 Cloudsoft Corporation 
Mission 
2 
!! 
Simplify application deployment and management 
with composable blueprints, ...
The Brooklyn Approach 
Blueprints
The Brooklyn Approach 
push-button deployment
The Brooklyn Approach 
ongoing management
The Brooklyn Approach 
open extensible framework
Benefits — Agility
Benefits — Reliability 
autonomic 
management 
built-in!
Benefits — Transparency
Benefits — Community
name: MyWebCluster 
© 2014 Cloudsoft Corporation 
Multi-Tier Application — Blueprint YAML 
11 
services: 
- type: WebAppCl...
name: MyWebCluster 
services: 
- type: WebAppCluster 
brooklyn.config: 
wars.root: hello-db.war 
http.port: 8080+ 
java.sy...
name: MyWebCluster 
services: 
- type: WebAppCluster 
brooklyn.config: 
wars.root: hello-db.war 
http.port: 8080+ 
java.sy...
© 2014 Cloudsoft Corporation 
More Blueprint YAML — Cassandra Cluster 
14 
name: cassandra-cluster-app 
! 
services: 
- ty...
© 2014 Cloudsoft Corporation 
MyWebCluster 
15 
[targets] Auto Scaler Policy 
… 
MyWebCluster 
ControlledDynamicWebAppClus...
Define New Blueprint 
public class MyWebCluster extends AbstractApplication 
implements MyWebClusterConstants { 
@Override...
Create App Tier 
public class MyWebCluster extends AbstractApplication 
implements MyWebClusterConstants { 
@Override 
pub...
Configure App Tier 
Type to enter 
Type to enter text 
public class MyWebCluster extends AbstractApplication 
implements M...
© 2014 Cloudsoft Corporation 
Add DB Tier 
public class MyWebCluster extends AbstractApplication 
implements MyWebClusterC...
© 2014 Cloudsoft Corporation 
Wire up App and DB Tiers 
public class MyWebCluster extends AbstractApplication 
implements ...
© 2014 Cloudsoft Corporation 
Introduce Elasticity in App Tier 
public class MyWebCluster extends AbstractApplication 
imp...
© 2014 Cloudsoft Corporation 
Customize Elasticity in App Tier 
public class MyWebCluster extends AbstractApplication 
imp...
© 2014 Cloudsoft Corporation 
Add Policies and KPI’s 
public class MyWebCluster extends AbstractApplication 
implements My...
© 2014 Cloudsoft Corporation 
Test New Blueprint 
24
Próxima SlideShare
Cargando en…5
×

Cloud Application Blueprints with Apache Brooklyn by Alex Henevald

1.134 visualizaciones

Publicado el

So you have your cloud running, what now? Extend the devops agility from infrastructure to applications by learning how to use Brooklyn, the Apache-incubating project for application management. Create blueprints for applications to enable one-click deployment into Cloudstack, Docker, localhost, or other targets. Leverage your favourite server management tools, from Bash to Chef. Automatically change the deployment after it's deployed. Attach policies to support scaling, failover, and alerting in the way your application needs.

In this session we'll show how with just a few lines of YAML, you can build powerful application blueprints by composing pre-existing components, from polyglot web stacks to big data tools such as Riak. We'll also cover defining new blueprints using custom scripts, configuring machine selection and runtime policies, and managing new locations such as Clocker -- the cloud of docker.

About Alex Henevald

Alex brings twenty years experience designing software solutions in the enterprise, start-up, and academic sectors. Most recently Alex was with Enigmatec Corporation where he led the development of what is now the Monterey® Middleware Platform™. Previous to that, he founded PocketWatch Systems, commercialising results from his doctoral research. Alex holds a PhD (Informatics) and an MSc (Cognitive Science) from the University of Edinburgh and an AB (Mathematics) from Princeton University. Alex was both a USA Today Academic All-Star and a Marshall Scholar.

Publicado en: Tecnología
  • Sé el primero en comentar

  • Sé el primero en recomendar esto

Cloud Application Blueprints with Apache Brooklyn by Alex Henevald

  1. 1. Application Management with Apache Brooklyn Alex Heneveld @ahtweetin CTO & Co-Founder, Cloudsoft Committer, Apache Brooklyn Build-a-Cloud Day Vegas, Oct 2014
  2. 2. © 2014 Cloudsoft Corporation Mission 2 !! Simplify application deployment and management with composable blueprints, leveraging the best tools for server config, cloud, and monitoring. ! Apache Brooklyn is the only autonomic open source multi-cloud application management platform. !
  3. 3. The Brooklyn Approach Blueprints
  4. 4. The Brooklyn Approach push-button deployment
  5. 5. The Brooklyn Approach ongoing management
  6. 6. The Brooklyn Approach open extensible framework
  7. 7. Benefits — Agility
  8. 8. Benefits — Reliability autonomic management built-in!
  9. 9. Benefits — Transparency
  10. 10. Benefits — Community
  11. 11. name: MyWebCluster © 2014 Cloudsoft Corporation Multi-Tier Application — Blueprint YAML 11 services: - type: WebAppCluster brooklyn.config: wars.root: hello-db.war http.port: 8080+ java.sysprops: db.url: $brooklyn:component("db"). attributeWhenReady("database.url") - type: MySqlNode id: db brooklyn.config: creation.script: hello-db.sql
  12. 12. name: MyWebCluster services: - type: WebAppCluster brooklyn.config: wars.root: hello-db.war http.port: 8080+ java.sysprops: db.url: $brooklyn:component("db"). attributeWhenReady("database.url") policies: - type: AutoScaler sensor: webapp.reqs.sec range: [100,200] © 2014 Cloudsoft Corporation Multi-Tier Application — Blueprint YAML 12 - type: MySqlNode id: db brooklyn.config: creation.script: hello-db.sql
  13. 13. name: MyWebCluster services: - type: WebAppCluster brooklyn.config: wars.root: hello-db.war http.port: 8080+ java.sysprops: db.url: $brooklyn:component("db"). attributeWhenReady("database.url") policies: - type: AutoScaler sensor: webapp.reqs.sec range: [100,200] © 2014 Cloudsoft Corporation Multi-Tier Application — Blueprint YAML 13 - type: MySqlNode id: db brooklyn.config: creation.script: hello-db.sql location: jclouds:cloudstack:http://10.4.88.16:9999/client/api
  14. 14. © 2014 Cloudsoft Corporation More Blueprint YAML — Cassandra Cluster 14 name: cassandra-cluster-app ! services: - type: brooklyn.entity.nosql.cassandra.CassandraCluster name: Cassandra Cluster brooklyn.config: cluster.initial.size: 5 cluster.initial.quorumSize: 3 provisioning.properties: minCores: 4 minRam: 8192 ! location: softlayer:sjc01
  15. 15. © 2014 Cloudsoft Corporation MyWebCluster 15 [targets] Auto Scaler Policy … MyWebCluster ControlledDynamicWebAppCluster DynamicWebAppCluster JBoss7Server NGINX MySQL JBoss7Server
  16. 16. Define New Blueprint public class MyWebCluster extends AbstractApplication implements MyWebClusterConstants { @Override public void init() { !!! // TODO build the application !! ! } } Type to enter text © 2014 Cloudsoft Corporation 16
  17. 17. Create App Tier public class MyWebCluster extends AbstractApplication implements MyWebClusterConstants { @Override public void init() { !!! JBoss7Server web = addChild( EntitySpecs.spec(JBoss7Server.class) Type to enter text .configure(JavaWebAppService.ROOT_WAR, getConfig(WAR_PATH)) ); ! ! } } Type to enter © 2014 Cloudsoft Corporation 17
  18. 18. Configure App Tier Type to enter Type to enter text public class MyWebCluster extends AbstractApplication implements MyWebClusterConstants { @Override public void init() { !!! JBoss7Server web = addChild( EntitySpecs.spec(JBoss7Server.class) .configure(JavaWebAppService.ROOT_WAR, getConfig(WAR_PATH)) .configure(WebAppService.HTTP_PORT, PortRanges.fromString("8080+")) ); ! } } © 2014 Cloudsoft Corporation 18
  19. 19. © 2014 Cloudsoft Corporation Add DB Tier public class MyWebCluster extends AbstractApplication implements MyWebClusterConstants { @Override public void init() { MySqlNode mysql = addChild( EntitySpecs.spec(MySqlNode.class) .configure(MySqlNode.CREATION_SCRIPT_URL, getConfig(DB_SETUP_SQL_URL)) ); ! JBoss7Server web = addChild( EntitySpecs.spec(JBoss7Server.class) .configure(JavaWebAppService.ROOT_WAR, getConfig(WAR_PATH)) .configure(WebAppService.HTTP_PORT, PortRanges.fromString("8080+")) ); ! } } Type to enter Type to enter text
  20. 20. © 2014 Cloudsoft Corporation Wire up App and DB Tiers public class MyWebCluster extends AbstractApplication implements MyWebClusterConstants { @Override public void init() { MySqlNode mysql = addChild( EntitySpecs.spec(MySqlNode.class) .configure(MySqlNode.CREATION_SCRIPT_URL, getConfig(DB_SETUP_SQL_URL)) ); ! JBoss7Server web = addChild( EntitySpecs.spec(JBoss7Server.class) .configure(JavaWebAppService.ROOT_WAR, getConfig(WAR_PATH)) .configure(WebAppService.HTTP_PORT, PortRanges.fromString("8080+")) .configure(JavaEntityMethods.javaSysProp("brooklyn.example.db.url"), formatString("jdbc:%s%s?user=%s&password=%s", attributeWhenReady(mysql, MySqlNode.MYSQL_URL), DB_TABLE, DB_USERNAME, DB_PASSWORD)) ); ! } } Type to enter Type to enter text
  21. 21. © 2014 Cloudsoft Corporation Introduce Elasticity in App Tier public class MyWebCluster extends AbstractApplication implements MyWebClusterConstants { @Override public void init() { MySqlNode mysql = addChild( EntitySpecs.spec(MySqlNode.class) .configure(MySqlNode.CREATION_SCRIPT_URL, getConfig(DB_SETUP_SQL_URL)) ); ! ControlledDynamicWebAppCluster web = addChild( EntitySpecs.spec(ControlledDynamicWebAppCluster.class) .configure(JavaWebAppService.ROOT_WAR, getConfig(WAR_PATH)) .configure(WebAppService.HTTP_PORT, PortRanges.fromString("8080+")) .configure(JavaEntityMethods.javaSysProp("brooklyn.example.db.url"), formatString("jdbc:%s%s?user=%s&password=%s", attributeWhenReady(mysql, MySqlNode.MYSQL_URL), DB_TABLE, DB_USERNAME, DB_PASSWORD)) ); ! } } Type to enter text Type to enter text Type to enter Type
  22. 22. © 2014 Cloudsoft Corporation Customize Elasticity in App Tier public class MyWebCluster extends AbstractApplication implements MyWebClusterConstants { @Override public void init() { MySqlNode mysql = addChild( EntitySpecs.spec(MySqlNode.class) .configure(MySqlNode.CREATION_SCRIPT_URL, getConfig(DB_SETUP_SQL_URL)) ); ! ControlledDynamicWebAppCluster web = addChild( EntitySpecs.spec(ControlledDynamicWebAppCluster.class) .configure(JavaWebAppService.ROOT_WAR, getConfig(WAR_PATH)) .configure(WebAppService.HTTP_PORT, PortRanges.fromString("8080+")) .configure(JavaEntityMethods.javaSysProp("brooklyn.example.db.url"), formatString("jdbc:%s%s?user=%s&password=%s", attributeWhenReady(mysql, MySqlNode.MYSQL_URL), DB_TABLE, DB_USERNAME, DB_PASSWORD)) .configure(DynamicCluster.INITIAL_SIZE, 2) ); } } Type to enter text Type to enter text Type to enter Type Type to enter
  23. 23. © 2014 Cloudsoft Corporation Add Policies and KPI’s 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()); ! Type to enter text Type to enter text Type to enter Type Type to enter text Type to enter addEnricher(SensorPropagatingEnricher.newInstanceListeningTo(web, ROOT_URL, REQUESTS_PER_SECOND_IN_WINDOW, REQUEST_LATENCY_IN_SECONDS_IN_WINDOW)); } }
  24. 24. © 2014 Cloudsoft Corporation Test New Blueprint 24

×