Deploy, Manage, and Scale Your Apps with OpsWorks and Elastic Beanstalk
-
Upload
amazon-web-services -
Category
Technology
-
view
506 -
download
1
description
Transcript of Deploy, Manage, and Scale Your Apps with OpsWorks and Elastic Beanstalk
© 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified, or distributed in whole or in part without the express consent of Amazon.com, Inc.
Deploy, Manage, and Scale Your Apps
with OpsWorks and Elastic Beanstalk
Chris Barclay Evan Brown
Product Manager Community Manager
July 10, 2014
What you will learn in this session
• How to choose among the AWS services that
can help you run applications more easily
• How to get an application running using AWS
Elastic Beanstalk and AWS OpsWorks
• How to use AWS CloudFormation templates to
document, version control, and share your
application configuration
1. Make dough
2. Roll and cut the dough
3. Separate donuts from holes
4. Let the dough rise
5. Prepare the glaze
6. Frying time!
7. Let them dry
8. Apply glaze
9. Add sprinkles (optional)
It’s not just deployments…
• How do I scale my environment?
• What is i-dc4297f2 used for?
• How do I know when my application is
unhealthy?
• Where do I get logs?
• Who has SSH access?
You need to
deliver resilient
applications with
less work
Source: http://xkcd.com/844/
Elastic Beanstalk OpsWorks CloudFormation
Application Container Application Automation Templated Provisioning
Jane Doe, Elastic Beanstalk developer
Jane Doe, Elastic Beanstalk developer
• Developer
• Builds web apps, APIs, and handles some
background processing workloads
• Needs some flexibility to customize her app
environments
• Wants simple API to monitor, view logs, scale,
and deploy her apps
The demonstration
• A PHP application that
stores text messages in
a database
• Uses Elastic Load
Balancing and Amazon
RDS
Load-based Auto scaling
PHP
App
Server
PHP
App
Server
PHP
App
Server
Demo time
• Checkout app from GitHub
• Integrate with the eb command line tool
• Deploy from the command line
• View the console
• Change, commit, and deploy
Elastic Beanstalk Supports…
Java PHP Python Ruby .NET Node.js
Deploy Your App for Test
Alert
Log
Mon
Ap
p
AZ
http://your-app.elasticbeanstalk.com
Deploy Your App for Scale
Alert
Log
Mon
Ap
p
AZ
EL
B
http://your-app.elasticbeanstalk.com
Deploy Your Background Processing App
Alert
Log
Mon
Ap
p
AZ
SQS QueueProducers
Deploy With Tools You Know
Deploy With Tools You Know
Deploy With Tools You Know
Alert
Log
Mon
Ap
p
AZ
EL
B
http://your-app.elasticbeanstalk.com
Customize Your Servers, Simply
Customize Your Servers, Simply
Store Sensitive Config, Safely
Alert
Log
Mon
Ap
p
AZ
EL
B
http://your-app.elasticbeanstalk.com
import os
some_var=os.environ.get(‘API_CREDS’)
String some_var = System.getProperty(‘API_CREDS’)
NameValueCollection appConfig = ConfigurationManager.AppSettings;
String param = appConfig[”API_CREDS"];
Python
Java
C#
Store Sensitive Config, Safely
Alert
Log
Mon
Ap
p
AZ
EL
B
http://your-app.elasticbeanstalk.com
import os
some_var=os.environ.get(‘API_CREDS’)
String some_var = System.getProperty(‘API_CREDS’)
NameValueCollection appConfig = ConfigurationManager.AppSettings;
string param = appConfig[”API_CREDS"];
Python
Java
C#
Store Sensitive Config, Safely
Alert
Log
Mon
Ap
p
AZ
EL
B
http://your-app.elasticbeanstalk.com
import os
some_var=os.environ.get(‘API_CREDS’)
String some_var = System.getProperty(‘API_CREDS’)
NameValueCollection appConfig = ConfigurationManager.AppSettings;
string param = appConfig[”API_CREDS"];
Python
Java
C#
John Doe, OpsWorks Developer
John Doe, OpsWorks Developer
• Developer
• Builds apps with broad architectural patterns
and software, e.g. MongoDB and Solr
• Needs a high degree of flexibility to customize
app environments
• Wants APIs to control all aspects of application
operations including deployments and scaling
Benefits
• Any architecture
• Configuration as code
• Automation to run at scale
• Control any component
Dynamic Configuration
Dynamic Configuration
Dynamic Configuration
Dynamic Configuration
Dynamic Configuration
Dynamic Configuration
Dynamic Configuration
Recipes in action
Recipe
+
Metadata
=
Command
execute “mysql-connect” do
command “/usr/bin/mysql
-u#{node[:deploy][:myphpapp][:database][:username]}
-p#{node[:deploy][:myphpapp][:database][:password]}
#{node[:deploy][:myphpapp][:database][:database]}
…
“deploy”: {
“myphpapp”: {
“database”: {
“username”: “root”,
“password”: “abcxyz”,
…
“/usr/bin/mysql -uroot –pabcxyz myphpapp …
The demonstration
• The same application
demonstrated with
Elastic Beanstalk
• Also uses Ganglia for
application monitoring Load-based Auto scaling
PHP
App
Server
PHP
App
Server
PHP
App
Server
Ganglia
Server
Demo time
• Model application using layers and apps
• Customize configuration using recipes
• Deployment options
• Review logs
• Manage user permissions
AWS CloudFormation: Model Your App
• Document, version control, and share your
applications and infrastructure as a JSON
document
• Provision app and other AWS resources (VPC,
DynamoDB, etc) from a template
• Repeatable, reliable deployments for
test/dev/prod in any AWS Region
Elastic Beanstalk or OpsWorks Resource
Ap
pE
LB
AZ
your-app.elasticbeanstalk.com
Alert
Log
Mon
Database Resources
Users Table
(DynamoDB)
MySQL Primary
(RDS)
Ap
pE
LB
AZ
your-app.elasticbeanstalk.com
Alert
Log
Mon
Object Storage and Security Resources
Users Table
(DynamoDB)
MySQL Primary
(RDS)
App Storage
(S3)
IAM Instance Profile
Ap
pE
LB
AZ
your-app.elasticbeanstalk.com
Alert
Log
Mon
Deployed as a CloudFormation Stack
Users Table
(DynamoDB)
MySQL Primary
(RDS)
App Storage
(S3)
IAM Instance Profile
Ap
pE
LB
AZ
your-app.elasticbeanstalk.com
Alert
Log
Mon
Modeled in a Template File
Users Table
(DynamoDB)
MySQL Primary
(RDS)
App Storage
(S3)
IAM Instance Profile
Ap
pE
LB
AZ
your-app.elasticbeanstalk.com
Alert
Log
Mon
CloudFormation
Template
What we discussed
• How to choose among the AWS services that
can help you run applications more easily
• How to get an application running using AWS
Elastic Beanstalk and AWS OpsWorks
• How to use AWS CloudFormation templates to
document, version control, and share your
application configuration
Learn MoreGet started with Elastic Beanstalk
http://amzn.to/1dh8QkU
Follow us @aws_eb
Get started with OpsWorks
http://amzn.to/1bSHOPN
Follow us @AWSOpsWorks
Get started with CloudFormation
http://amzn.to/1m11Z3K
Follow us at @AWSCloudFormer
Thank You!