AWS elastic beanstalk

932 views

Published on

A 101 level talk about that AWS Elastic Beanstalk is and how it can be used to deploy simple applications. Presented to the Sydney AWS users group.

Published in: Engineering, Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
932
On SlideShare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
18
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

AWS elastic beanstalk

  1. 1. AWS Elastic Beanstalk Amazon's Intro to PaaS
  2. 2. Tiered Infrastructure Offerings 1. Cloud Formation a. IaaS, first step towards PaaS b. Allows creation of Stacks within an autoscaling group 2. Elastic Beanstalk a. True PaaS b. A bit simplistic: several standard stacks offered with limited customization ability c. Very easy and fast to set up 3. OpsWorks a. Very complete PaaS solution b. For when a bespoke platform is an absolute must
  3. 3. Elastic Beanstalk Quick Overview
  4. 4. Supported Solution Stacks Linux: • Deployment with eb tool from git • EC2 instances running Linux + Apache • Ruby: Rails/Passenger + Sinatra • Python: Django + Flask • PHP: CakePHP + Symphony • Java: Tomcat Windows: • Deployment through MS Visual Studio with AWS Toolkit or by hand with Microsoft WebDeploy .zip files • EC2 instances running Windows 2008 R2 and IIS 7.5
  5. 5. Supported Databases DB Support is done through Amazon's RDS This means that all of the three different DB engines are supported: 1. MySQL 2. Oracle (BYOL & Amazon Provided) 3. MS SQL
  6. 6. Anatomy of an EB Application
  7. 7. Putting it all together - configuration Basic Configuration ~/app/.elasticbeanstalk/config [global] [branches] [branch:branch01] [branch:branch02] ~/app/.elasticbeanstalk/options.${env} [aws:elasticbeanstalk:application:environ ment] [aws:rds:dbinstance] [aws:elasticbeanstalk:hostmanager] [aws:autoscaling:launchconfiguration] [aws:autoscaling:asg] [aws:elasticbeanstalk:application] [aws:elasticbeanstalk:monitoring] [aws:elasticbeanstalk:sns:topics] Extensions ~/app/.ebextensions/*.config # "Infra" extensions Packages Sources Files Users Groups Commands Services # App extensions Container_commands Option_settings # Environment extensions Resources
  8. 8. Putting it all together - execution 1.eb init 1.eb start 1.git aws.push - not to be confused with git push
  9. 9. Putting it all together - maintenance When environment configuration changes: eb update When deploying new code / adding extensions: git aws.push Progress update: eb status
  10. 10. Benefits and Use Cases • Smaller / simpler apps where code is pretty standard • Extremely fast provisioning time • Proof against spikes thanks to autoscaling • Bespoke code + standard platform = (almost) zero time to production • Can work in conjunction with other AWS services
  11. 11. Interesting Problems - part 1 How do we manage branching in git and environments in Elastic Beanstalk? Easy solution: EB offers branch - to - environment mappings Defined in ~/app/.elasticbeanstalk/config
  12. 12. Interesting Problems - part 1 git://myapp branch:developer01 branch:developer02 branch:master branch:staging ~/myapp eb-environment:production eb-environment:staging eb-environment:uat
  13. 13. Interesting Problems - part 2 How to run cron jobs? • Ruby app requires rake to run regularly • Several EC2 instances, but only one database • Autoscaling challenges • Every instance identical - same crontab • Solutions: o Use Message Queuing (SNS) - a bit too complex o Don't use cron - yeah right, and get devs to change the code? o Leader election together with ELB: simple, foolproof

×