AWS Update | London - Elastic Beanstalk
Upcoming SlideShare
Loading in...5
×
 

AWS Update | London - Elastic Beanstalk

on

  • 2,558 views

We are excited to continue our work on BeanStalk with the introduction of a range of great new features. If you are a Python shop you'll learn how BeanStalk now supports Python containers and the ...

We are excited to continue our work on BeanStalk with the introduction of a range of great new features. If you are a Python shop you'll learn how BeanStalk now supports Python containers and the Django and Flask frameworks. Hear about BeanStalk integration with RDS and how custom configuration of containers is possible through simple configuration files.

Statistics

Views

Total Views
2,558
Views on SlideShare
2,368
Embed Views
190

Actions

Likes
4
Downloads
30
Comments
0

2 Embeds 190

http://www.scoop.it 189
http://webcache.googleusercontent.com 1

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

AWS Update | London - Elastic Beanstalk AWS Update | London - Elastic Beanstalk Presentation Transcript

  • Amazon Web Services Update | LondonNovember 2012
  • Elastic Bean StalkQuickly deploy and manage apps in AWS…
  • Elastic Bean StalkApplication package is deployed into Beanstalk
  • Elastic Bean Stalk Which creates the container in EC2 User Application Application Service HTTP ServiceLanguage Interpreter Operating System Host
  • Elastic Bean StalkBeanstalk takes care of the environment…
  • Elastic Bean Stalk…adding Elastic Load Balancer…
  • Elastic Bean Stalk …Auto Scaling groups
  • Elastic Bean Stalk …and launching instances
  • Elastic Bean Stalk…all wired into the Beanstalk framework
  • Elastic Bean Stalk…and published under a CNAME
  • Elastic Bean Stalk…with logs and app versions held in S3
  • What about the container?
  • Elastic Bean Stalk …into a range of containers.Net PHP Java
  • Elastic Bean Stalk Adding new containers…Ruby + Python
  • Elastic Bean Stalk Containers… User Application Application Service HTTP ServiceLanguage Interpreter Operating System Host
  • Elastic Bean Stalk …Python mod-wsgi & apache User ApplicationApplication Service Apache mod_wsgi Python Operating System Host
  • Elastic Bean Stalk …Python mod-wsgi & apache requirements.txtDjango==1.4.1 Flask==0.9
  • Elastic Bean Stalk Containers… User Application Application Service HTTP ServiceLanguage Interpreter Operating System Host
  • Elastic Bean Stalk Passenger & Nginx… User ApplicationApplication Service Nginx passenger Ruby Operating System Host
  • Elastic Bean Stalk Passenger & Nginx…Classic rails MVC Bare-metal routes (non-MVC)
  • What about the data?
  • D.I.Y
  • Elastic Bean Stalk Adding new containers…Ruby + Python + Java
  • Elastic Bean Stalk Adding new containers…Ruby + Python + Java RDS
  • Option tocreate RDS at application launch:
  • Grab connection details for use:String dbName =System.getProperty("RDS_DB_NAME");String userName = System.getProperty("RDS_USERNAME");String password = System.getProperty("RDS_PASSWORD");String hostname = System.getProperty("RDS_HOSTNAME");String port = System.getProperty("RDS_PORT");
  • Grab connection details from os.environ’simport osif RDS_HOSTNAME in os.environ: DATABASES = { default: { ENGINE: django.db.backends.mysql, NAME: os.environ[RDS_DB_NAME], USER: os.environ[RDS_USER], PASSWORD’: os.environ[RDS_PASSWORD], HOST: os.environ[RDS_HOSTNAME], PORT: os.environ[RDS_PORT], }}
  • Add “.ebextensions” directory Add “python.config” filecommands: syncdb: command: "django-admin.py syncdb --noinput" leader_only: trueoption_settings: "aws:elasticbeanstalk:application:python:environment": DJANGO_SETTINGS_MODULE: "mysite.settings" "aws:elasticbeanstalk:container:python": WSGIPath: "mysite/wsgi.py"
  • RDS populated from Django model (use Django Evolution etc to upate when model changes)commands: syncdb: command: "django-admin.py syncdb --noinput" leader_only: trueoption_settings: "aws:elasticbeanstalk:application:python:environment": DJANGO_SETTINGS_MODULE: "mysite.settings" "aws:elasticbeanstalk:container:python": WSGIPath: "mysite/wsgi.py"
  • Update database.yml to include generated RDSdetails:production: adapter: mysql2 encoding: utf8 database: <%= ENV[RDS_DB_NAME] %> username: <%= ENV[RDS_USERNAME] %> password: <%= ENV[RDS_PASSWORD] %> host: <%= ENV[RDS_HOSTNAME] %> port: <%= ENV[RDS_PORT] %>
  • Add “.ebextensions” directory Add “.config” file# Configure third-party service credentials# Run rake tasks before an application deploymentcontainer_commands: 01deploy: command: rake my_deployment_tasks# in environment variables:option_settings: - option_name: AIRBRAKE_API_KEY value: MYAPIKEY
  • RDS populated from rails model# Configure third-party service credentials# Run rake tasks before an application deploymentcontainer_commands: 01deploy: command: rake my_deployment_tasks# in environment variables:option_settings: - option_name: AIRBRAKE_API_KEY value: MYAPIKEY
  • Rails rake Git Beanstalk RDSDjango syncdb
  • Container config .ebextensions Git Beanstalk RDSLanguage/ver Configuration/co sions mmands
  • .ebextensions Java, Python & Ruby container configurationpackagesDownload and install pre-packaged applications and components using apt, yum,rubygems, python, and rpmsourcesDownload an archive file and unpack it in a target directory on the EC2 instance(e.g from S3). Supported formats are tar, tar+gzip, tar+bz2 and zipfilesCreate files on the EC2 instanceUsers/groupsCreate Linux/UNIX users/groups on the EC2 instance
  • .ebextensions Java, Python & Ruby container configurationpackages packages:Download and install pre-packagedyum: applications and components using apt, yum,rubygems, python, and rpm package1: [3.2.1]sources package2: [1.0] rpm:Download an archive file and unpack it in a target directory on the EC2 instance package3(e.g from S3). Supported formats are tar, tar+gzip, tar+bz2 and zipfilesCreate files on the EC2 instanceUsers/groupsCreate Linux/UNIX users/groups on the EC2 instance
  • .ebextensions Java, Python & Ruby container configurationpackagesDownload and install pre-packaged applications and components using apt, yum,rubygems, python, and rpm sources:sources /home/myfiles: https://s3.amazonaws.com/bucket/myfDownload an archive file and unpack it in a target directory on the EC2 instance iles.zip(e.g from S3). Supported formats are tar, tar+gzip, tar+bz2 and zipfilesCreate files on the EC2 instanceUsers/groupsCreate Linux/UNIX users/groups on the EC2 instance
  • .ebextensions Java, Python & Ruby container configurationpackages files:Download and install pre-packaged“/home/ec2-user/myfile” : applications and components using apt, yum, mode: "000777"rubygems, python, and rpm owner: ec2-user group: ec2-usersources source: http://foo.bar/myfileDownload an archive file and unpack it in a target directory on the EC2 instance “/home/ec2-user/myfile2” :(e.g from S3). Supported formats are tar, tar+gzip, tar+bz2 and zip mode: “000777” owner: ec2-userfiles group: ec2-userCreate files on the EC2 instance content: | # this is my file # with contentUsers/groupsCreate Linux/UNIX users/groups on the EC2 instance
  • .ebextensions Java, Python & Ruby container configurationpackages users:Download and install pre-packaged - myuser : and components using apt, yum, applicationsrubygems, python, and rpm groups: - group1sources - group2 uid: 50Download an archive file and unpack it in a target directory on the EC2 instance(e.g from S3). Supported formats are tar,homedir: tar+bz2 and zip tar+gzip, “/tmp”files groups: - group1 : 45Create files on the EC2 instance - group2 : 99 - group3Users/groupsCreate Linux/UNIX users/groups on the EC2 instance
  • .ebextensions Java, Python & Ruby container configurationcommandExecute commands on the EC2 instancecontainer_commandsExecute commands for your containerservicesDefine which services should be started or stopped when the instance is launchedincluding dependencies that require Beanstalk to execute a restartoption_settingsDefine container settings that get passed in as environment variables on yourAmazon EC2 instances
  • .ebextensions Java, Python & Ruby container configurationcommand commands:Execute commands on the EC2 instance myscript:container_commands command: myscript.py cwd: /home/ec2-userExecute commands for your container env:services a: bDefine which services should be started or stopped when the instance is launchedincluding dependencies that require Beanstalk to execute a restartoption_settingsDefine container settings that get passed in as environment variables on yourAmazon EC2 instances
  • .ebextensions Java, Python & Ruby container configurationcommandExecute commands on the EC2 instance container_commands:container_commands replace-config-label:Execute commands for your containercommand: cp .ebextensions/server.xmlservices /etc/tomcat7/server.xmlDefine which services should be started or stopped when the instance is launchedincluding dependencies that require Beanstalk to execute a restartoption_settingsDefine container settings that get passed in as environment variables on yourAmazon EC2 instances
  • .ebextensions Java, Python & Ruby container configurationcommandExecute commands on the EC2 instancecontainer_commands services:Execute commands for your container sysvinit:services - myservice:Define which services should be started or stopped when the instance is launched enabled: trueincluding dependencies that require Beanstalk to execute a restart ensureRunning: trueoption_settingsDefine container settings that get passed in as environment variables on yourAmazon EC2 instances
  • .ebextensions Java, Python & Ruby container configurationcommand option_settings:Execute commands on the EC2 instance - namespace: aws:elasticbeanstalk:container:tomcontainer_commands cat:jvmoptionsExecute commands for your container option_name: Xmx value: 256mservices - option_name: AWS_SECRET_KEYDefine which services should be started or stopped when the instance is launched value:including dependencies that require Beanstalk to execute a restart wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMoption_settings PLEKEY - option_name: AWS_ACCESS_KEY_IDDefine container settings that get passed in as environment variables on your value: AKIAIOSFODNN7EXAMPLEAmazon EC2 instances
  • VPC
  • Elastic Bean Stalk Deploy apps inside a Virtual Private Cloud Launch apps into a VPCLaunch “private” Deeper networking applications control
  • Elastic Bean Stalk Additional required optionsVPCIdContains the ID of the VPCSubnetsContains the ID of the Auto Scaling group subnetELBSubnetsContains the ID of the subnet for the elastic loadbalancerSecurityGroupsContains the ID of the security group.
  • VPC ID
  • VPC ID Auto-scaling subnet
  • VPC ID Auto-scaling subnetELBSubnet
  • SummaryNew Python & Ruby containers Beanstalk integrates with RDS Beanstalk in VPC
  • http://aws.amazon.com/ela sticbeanstalk