Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Dead-SimpleDeployment<br />Headache Free<br />Java Web Applications<br />In The Cloud<br />
Abstract<br />The cloud has promised a lot to Java Web developers but has delivered on only some of the hype. Many issues ...
Speaker Bio<br />Craig S. Dickson is a software engineering professional with over 15 years of experience. He has proven l...
Presentation Outline<br />What are the common problems related to developing and deploying a Java web app?<br />How does A...
The Downsides of being an Enterprise Java Engineer<br />Topic<br />craigsdickson.com<br />
Early Stage Development<br />Goal: isolated self-contained local development, quick code-test-code cycles<br />How to demo...
What about Test and Stage? <br />Goal: quick, consistent, production-like environment provisioning<br />Enough resources t...
What about Production?<br />Goal: minimize cost, high availability, high reliability, monitoring, automated zero downtime ...
How does Elastic Beanstalk address these problems?<br />Topic<br />craigsdickson.com<br />
What is Elastic Beanstalk?<br />Platform-as-a-Service (PaaS) offering from Amazon Web Services (AWS)<br />Built on top of ...
PaaS on top of IaaS<br />craigsdickson.com<br />
EB Components<br />craigsdickson.com<br />
EB Runtime Architecture<br />craigsdickson.com<br />
Elastic Beanstalk Management Console<br />Demo<br />craigsdickson.com<br />
Deploying Your First Elastic Beanstalk Application<br />Demo<br />craigsdickson.com<br />
Currently Supported Platforms<br />Application Servers<br />Tomcat 6<br />Tomcat 7<br />OS<br />Amazon Linux 32 and 64bit ...
Logging<br />Configured to use java.util.logging by default<br />Can use a meta-framework like SLF4J<br />Standard Tomcat ...
Database Integration<br />EB does not directly manage your databases<br />Can use the Amazon SimpleDB<br />Can also use Am...
Monitoring and Notification<br />Uses Amazon CloudWatch (CW) to monitor your environment<br />Can trigger scaling events b...
Auto-Scale<br />Based on CW events, your environment can be scaled up or down automatically<br />Can configure what CW eve...
Environment Hot Swap<br />Imagine you have an existing EB production environment<br />Now you have a new version ready to ...
Managing Elastic Beanstalk Environments<br />Demo<br />craigsdickson.com<br />
How much do I have to change my development process?<br />Topic<br />craigsdickson.com<br />
Developing for EB<br />Java WAR files only<br />Stick to the standard JavaEE rules<br />don’t read/write the local file sy...
Eclipse Integration<br />Eclipse plugin to integrate with EB<br />Create new Applications and Environments right from Ecli...
First Elastic Beanstalk Application in Eclipse<br />Demo<br />craigsdickson.com<br />
Locally Testing an Elastic Beanstalk Application in Eclipse<br />Demo<br />craigsdickson.com<br />
Deploying To Elastic Beanstalk from Eclipse<br />Demo<br />craigsdickson.com<br />
Command Line & Maven Options<br />All EB functions are available through a command line API<br />Maven plugin written by A...
Which of my Existing Applications will work on Elastic Beanstalk?<br />Topic<br />craigsdickson.com<br />
What applications work on EB?<br />craigsdickson.com<br />
Custom Amazon Machine Image (AMI)<br />Category D applications from the previous slide, need / want to access local resour...
How much is it going to cost me?<br />Topic<br />craigsdickson.com<br />
Cost Sources<br />EB itself is FREE!<br />Pay as you go - for all other AWS services<br />EC2 for running environments<br ...
Example Price Breakdown<br />Adapted from: http://aws.amazon.com/elasticbeanstalk/#pricing<br />craigsdickson.com<br />
Are there alternatives toElastic Beanstalk thatI should consider?<br />Topic<br />craigsdickson.com<br />
Virtualization<br />Can’t I just get the same benefits with an in-house virtualization solution?<br />Still need to setup ...
Other PaaS Vendors<br />Isn’t this just the same thing that other PaaS vendors already do?<br />EB allows low level system...
Summary<br />Amazon Elastic Beanstalk is a PaaS solution built on top of the existing Amazon IaaS solutions<br />Currently...
Next Steps<br />Sign up for an EB account and deploy the sample application<br />http://aws.amazon.com/elasticbeanstalk/<b...
Questions?<br />Craig S. Dickson<br />Email - craig@craigsdickson.com<br />Blog - http://craigsdickson.com<br />LinkedIn –...
Upcoming SlideShare
Loading in …5
×

Dead-Simple Deployment: Headache-Free Java Web Applications in the Cloud

4,464 views

Published on

I presented this at JavaOne 2011 on October 6th. It discusses some of the problems related to environment provisioning that enterprise Java developers face and how the new Platform-as-a-Service (PaaS) product from Amazon Web Services called Elastic Beanstalk can solve some of those problems.

Published in: Technology
  • Be the first to comment

Dead-Simple Deployment: Headache-Free Java Web Applications in the Cloud

  1. 1. Dead-SimpleDeployment<br />Headache Free<br />Java Web Applications<br />In The Cloud<br />
  2. 2. Abstract<br />The cloud has promised a lot to Java Web developers but has delivered on only some of the hype. Many issues still exist that have the ability to kill many a project. Elastic Beanstalk, a Web service announced by Amazon in early 2011, takes the cloud to the next level for Java Web applications. It aims to eliminate the remaining issues the cloud presents. No hardware purchases? Check! Low setup costs? Check! No software installation? Check! Automatic resource scaling? Check! Resource monitoring? Check! This presentation takes a deep dive into Amazon's Elastic Beanstalk service, including what problems it can help solve and opportunities it provides to deliver better Java Web applications.<br />craigsdickson.com<br />
  3. 3. Speaker Bio<br />Craig S. Dickson is a software engineering professional with over 15 years of experience. He has proven leadership experience in both domestic and multi-national start-up and Fortune 500 corporations in the United States, Australia and Europe. <br />Craig specializes in enterprise Java development and cloud architecture and holds multiple certifications including Sun Certified Architect for JavaEE and Certified ScrumMaster. Craig brings specific expertise in enterprise software architecture and design, refining development processes and building development teams around Agile software engineering principles. <br />Educated in Australia, Craig holds a BSc(Hons) in Computer Science. He is based in Huntington Beach, CA, and Brisbane, Australia. <br />craigsdickson.com<br />
  4. 4. Presentation Outline<br />What are the common problems related to developing and deploying a Java web app?<br />How does Amazon Elastic Beanstalk (EB) attempt to address those problems?<br />Do I have to change how I write my Java apps?<br />What existing applications will work on EB?<br />How much does EB cost?<br />What are the alternatives to EB?<br />craigsdickson.com<br />
  5. 5. The Downsides of being an Enterprise Java Engineer<br />Topic<br />craigsdickson.com<br />
  6. 6. Early Stage Development<br />Goal: isolated self-contained local development, quick code-test-code cycles<br />How to demonstrate an individual’s work?<br />How to demonstrate combined work?<br />What about clients outside your firewall?<br />How to push quick (automated) updates?<br />craigsdickson.com<br />
  7. 7. What about Test and Stage? <br />Goal: quick, consistent, production-like environment provisioning<br />Enough resources to set up 2 more environments?<br />Enough resources to make them production-like?<br />What if your testers are not local?<br />A clean environment for each round of tests?<br />Will QA get angry if I run performance tests?<br />craigsdickson.com<br />
  8. 8. What about Production?<br />Goal: minimize cost, high availability, high reliability, monitoring, automated zero downtime upgrades<br />How do I migrate from staging to the production environment?<br />What if it’s a success, how do I handle the traffic?<br />What if it is a bomb, what do I do with all this hardware?<br />It’s 2am, is my application up and running?<br />The network card on one of my servers just died, how long will it take to replace?<br />craigsdickson.com<br />
  9. 9. How does Elastic Beanstalk address these problems?<br />Topic<br />craigsdickson.com<br />
  10. 10. What is Elastic Beanstalk?<br />Platform-as-a-Service (PaaS) offering from Amazon Web Services (AWS)<br />Built on top of existing AWS infrastructure<br />Launched January 2011, still officially Beta<br />First (and currently only) supported application architecture is Java Web Applications on Tomcat<br />Ruby rumored to be next language to be supported<br />craigsdickson.com<br />
  11. 11. PaaS on top of IaaS<br />craigsdickson.com<br />
  12. 12. EB Components<br />craigsdickson.com<br />
  13. 13. EB Runtime Architecture<br />craigsdickson.com<br />
  14. 14. Elastic Beanstalk Management Console<br />Demo<br />craigsdickson.com<br />
  15. 15. Deploying Your First Elastic Beanstalk Application<br />Demo<br />craigsdickson.com<br />
  16. 16. Currently Supported Platforms<br />Application Servers<br />Tomcat 6<br />Tomcat 7<br />OS<br />Amazon Linux 32 and 64bit versions<br />RHEL / CentOS based<br />binary compatibility with RHEL 5<br />Only interesting if you intend to use SSH<br />craigsdickson.com<br />
  17. 17. Logging<br />Configured to use java.util.logging by default<br />Can use a meta-framework like SLF4J<br />Standard Tomcat logs are created (catalina.out etc)<br />Can view snapshot of logs from management console<br />Can be rotated out to S3 hourly<br />Can SSH to instances to view live logs<br />craigsdickson.com<br />
  18. 18. Database Integration<br />EB does not directly manage your databases<br />Can use the Amazon SimpleDB<br />Can also use Amazon RDS<br />Can also use an RDBMS running on an Amazon EC2 instance<br />Can also use a non-Amazon based database<br />Pass JDBC connection info to app through console<br />craigsdickson.com<br />
  19. 19. Monitoring and Notification<br />Uses Amazon CloudWatch (CW) to monitor your environment<br />Can trigger scaling events based on metrics<br />cpu utilization<br />network traffic, etc.<br />EB adds a health check feature on top of CW<br />Must have at least 1 URL that can be accessed without security<br />Uses Amazon SNS to publish events<br />scaling up / down<br />health check failures<br />craigsdickson.com<br />
  20. 20. Auto-Scale<br />Based on CW events, your environment can be scaled up or down automatically<br />Can configure what CW events trigger scaling<br />Can set minimum and maximum instance counts<br />Can control up / down instance increment<br />Also can control how scaling events are generated<br />craigsdickson.com<br />
  21. 21. Environment Hot Swap<br />Imagine you have an existing EB production environment<br />Now you have a new version ready to go live sitting in another EB environment (e.g. staging)<br />EB supports URL Swapping<br />staging becomes production and production becomes staging<br />Results in zero application downtime<br />craigsdickson.com<br />
  22. 22. Managing Elastic Beanstalk Environments<br />Demo<br />craigsdickson.com<br />
  23. 23. How much do I have to change my development process?<br />Topic<br />craigsdickson.com<br />
  24. 24. Developing for EB<br />Java WAR files only<br />Stick to the standard JavaEE rules<br />don’t read/write the local file system etc<br />Code for a clustered environment<br />Connections to external resources<br />configure via AWS management console<br />craigsdickson.com<br />
  25. 25. Eclipse Integration<br />Eclipse plugin to integrate with EB<br />Create new Applications and Environments right from Eclipse<br />Deploy new Versions just by deploying to EB instead of a local Tomcat<br />First time deployment can take several minutes<br />Rapid code-test-code cycles should still be done locally<br />Careful about deleting the wrong environment<br />craigsdickson.com<br />
  26. 26. First Elastic Beanstalk Application in Eclipse<br />Demo<br />craigsdickson.com<br />
  27. 27. Locally Testing an Elastic Beanstalk Application in Eclipse<br />Demo<br />craigsdickson.com<br />
  28. 28. Deploying To Elastic Beanstalk from Eclipse<br />Demo<br />craigsdickson.com<br />
  29. 29. Command Line & Maven Options<br />All EB functions are available through a command line API<br />Maven plugin written by Aldrin Leal<br />http://beanstalker.ingenieux.com.br/<br />Wraps entire EB command line API<br />Excellent for faking EB support in other IDEs (Netbeans etc)<br />Excellent for command-line builds, continuous integration (Jenkins) etc<br />craigsdickson.com<br />
  30. 30. Which of my Existing Applications will work on Elastic Beanstalk?<br />Topic<br />craigsdickson.com<br />
  31. 31. What applications work on EB?<br />craigsdickson.com<br />
  32. 32. Custom Amazon Machine Image (AMI)<br />Category D applications from the previous slide, need / want to access local resources and/or files<br />Jenkins is an excellent example of this type<br />Needs Maven, Ant and other tools to be available<br />Needs to write build logs, archive artifacts etc<br />Start with base EB AMI, then customize<br />Specify your own AMI ID in the Environment Configuration<br />craigsdickson.com<br />
  33. 33. How much is it going to cost me?<br />Topic<br />craigsdickson.com<br />
  34. 34. Cost Sources<br />EB itself is FREE!<br />Pay as you go - for all other AWS services<br />EC2 for running environments<br />S3 for storing the versions of the application<br />Elastic Load Balancer instance and data charges<br />EBS to back the EC2 instance plus for any custom AMIs you create<br />Outbound traffic<br />craigsdickson.com<br />
  35. 35. Example Price Breakdown<br />Adapted from: http://aws.amazon.com/elasticbeanstalk/#pricing<br />craigsdickson.com<br />
  36. 36. Are there alternatives toElastic Beanstalk thatI should consider?<br />Topic<br />craigsdickson.com<br />
  37. 37. Virtualization<br />Can’t I just get the same benefits with an in-house virtualization solution?<br />Still need to setup the OS and Tomcat environment at least once.<br />What about security and other updates?<br />Can the in-house scale appropriately / automatically?<br />craigsdickson.com<br />
  38. 38. Other PaaS Vendors<br />Isn’t this just the same thing that other PaaS vendors already do?<br />EB allows low level system access<br />Some PaaS vendors are running on AWS infrastructure anyway<br />If you need more than a Tomcat environment right now, then other vendors may be the way to go<br />JavaEE server, Ruby, PHP etc<br />craigsdickson.com<br />
  39. 39. Summary<br />Amazon Elastic Beanstalk is a PaaS solution built on top of the existing Amazon IaaS solutions<br />Currently offers Tomcat 6 & 7 environments<br />Often requires no modification to existing code<br />Has good tooling support<br />Can be extended through low-level system access<br />Solves many day-to-day problems for developers<br />craigsdickson.com<br />
  40. 40. Next Steps<br />Sign up for an EB account and deploy the sample application<br />http://aws.amazon.com/elasticbeanstalk/<br />Join the EB community forum<br />https://forums.aws.amazon.com/forum.jspa?forumID=86<br />Check EB related resources on my blog<br />http://craigsdickson.com/tag/elastic-beanstalk/<br />craigsdickson.com<br />
  41. 41. Questions?<br />Craig S. Dickson<br />Email - craig@craigsdickson.com<br />Blog - http://craigsdickson.com<br />LinkedIn – http://bit.ly/csd-li<br />Twitter – http://bit.ly/csd-tw<br />craigsdickson.com<br />

×