deploy, manage, and scale your apps with opsworks and elastic beanstalk
DESCRIPTION
AWS offers a number of services that help you easily deploy and run applications in the cloud. Come to this session to learn how to choose among these options. Through interactive demonstrations, this session will show you how to get an application running using AWS OpsWorks and AWS Elastic Beanstalk application management services. You will also learn how to use AWS CloudFormation templates to document, version control, and share your application configuration. This session will cover topics like application updates, customization, and working with resources such as load balancers and databases.TRANSCRIPT
![Page 1: Deploy, Manage, and Scale Your Apps with OpsWorks and Elastic Beanstalk](https://reader033.vdocuments.us/reader033/viewer/2022050918/540d762c8d7f728d7e8b4952/html5/thumbnails/1.jpg)
© 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
![Page 2: Deploy, Manage, and Scale Your Apps with OpsWorks and Elastic Beanstalk](https://reader033.vdocuments.us/reader033/viewer/2022050918/540d762c8d7f728d7e8b4952/html5/thumbnails/2.jpg)
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
![Page 3: Deploy, Manage, and Scale Your Apps with OpsWorks and Elastic Beanstalk](https://reader033.vdocuments.us/reader033/viewer/2022050918/540d762c8d7f728d7e8b4952/html5/thumbnails/3.jpg)
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)
![Page 4: Deploy, Manage, and Scale Your Apps with OpsWorks and Elastic Beanstalk](https://reader033.vdocuments.us/reader033/viewer/2022050918/540d762c8d7f728d7e8b4952/html5/thumbnails/4.jpg)
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?
![Page 5: Deploy, Manage, and Scale Your Apps with OpsWorks and Elastic Beanstalk](https://reader033.vdocuments.us/reader033/viewer/2022050918/540d762c8d7f728d7e8b4952/html5/thumbnails/5.jpg)
You need to
deliver resilient
applications with
less work
Source: http://xkcd.com/844/
![Page 6: Deploy, Manage, and Scale Your Apps with OpsWorks and Elastic Beanstalk](https://reader033.vdocuments.us/reader033/viewer/2022050918/540d762c8d7f728d7e8b4952/html5/thumbnails/6.jpg)
Elastic Beanstalk OpsWorks CloudFormation
Application Container Application Automation Templated Provisioning
![Page 7: Deploy, Manage, and Scale Your Apps with OpsWorks and Elastic Beanstalk](https://reader033.vdocuments.us/reader033/viewer/2022050918/540d762c8d7f728d7e8b4952/html5/thumbnails/7.jpg)
Jane Doe, Elastic Beanstalk developer
![Page 8: Deploy, Manage, and Scale Your Apps with OpsWorks and Elastic Beanstalk](https://reader033.vdocuments.us/reader033/viewer/2022050918/540d762c8d7f728d7e8b4952/html5/thumbnails/8.jpg)
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
![Page 9: Deploy, Manage, and Scale Your Apps with OpsWorks and Elastic Beanstalk](https://reader033.vdocuments.us/reader033/viewer/2022050918/540d762c8d7f728d7e8b4952/html5/thumbnails/9.jpg)
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
![Page 10: Deploy, Manage, and Scale Your Apps with OpsWorks and Elastic Beanstalk](https://reader033.vdocuments.us/reader033/viewer/2022050918/540d762c8d7f728d7e8b4952/html5/thumbnails/10.jpg)
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
![Page 11: Deploy, Manage, and Scale Your Apps with OpsWorks and Elastic Beanstalk](https://reader033.vdocuments.us/reader033/viewer/2022050918/540d762c8d7f728d7e8b4952/html5/thumbnails/11.jpg)
Elastic Beanstalk Supports…
Java PHP Python Ruby .NET Node.js
![Page 12: Deploy, Manage, and Scale Your Apps with OpsWorks and Elastic Beanstalk](https://reader033.vdocuments.us/reader033/viewer/2022050918/540d762c8d7f728d7e8b4952/html5/thumbnails/12.jpg)
Deploy Your App for Test
Alert
Log
Mon
Ap
p
AZ
http://your-app.elasticbeanstalk.com
![Page 13: Deploy, Manage, and Scale Your Apps with OpsWorks and Elastic Beanstalk](https://reader033.vdocuments.us/reader033/viewer/2022050918/540d762c8d7f728d7e8b4952/html5/thumbnails/13.jpg)
Deploy Your App for Scale
Alert
Log
Mon
Ap
p
AZ
EL
B
http://your-app.elasticbeanstalk.com
![Page 14: Deploy, Manage, and Scale Your Apps with OpsWorks and Elastic Beanstalk](https://reader033.vdocuments.us/reader033/viewer/2022050918/540d762c8d7f728d7e8b4952/html5/thumbnails/14.jpg)
Deploy Your Background Processing App
Alert
Log
Mon
Ap
p
AZ
SQS QueueProducers
![Page 15: Deploy, Manage, and Scale Your Apps with OpsWorks and Elastic Beanstalk](https://reader033.vdocuments.us/reader033/viewer/2022050918/540d762c8d7f728d7e8b4952/html5/thumbnails/15.jpg)
Deploy With Tools You Know
![Page 16: Deploy, Manage, and Scale Your Apps with OpsWorks and Elastic Beanstalk](https://reader033.vdocuments.us/reader033/viewer/2022050918/540d762c8d7f728d7e8b4952/html5/thumbnails/16.jpg)
Deploy With Tools You Know
![Page 17: Deploy, Manage, and Scale Your Apps with OpsWorks and Elastic Beanstalk](https://reader033.vdocuments.us/reader033/viewer/2022050918/540d762c8d7f728d7e8b4952/html5/thumbnails/17.jpg)
Deploy With Tools You Know
Alert
Log
Mon
Ap
p
AZ
EL
B
http://your-app.elasticbeanstalk.com
![Page 18: Deploy, Manage, and Scale Your Apps with OpsWorks and Elastic Beanstalk](https://reader033.vdocuments.us/reader033/viewer/2022050918/540d762c8d7f728d7e8b4952/html5/thumbnails/18.jpg)
Customize Your Servers, Simply
![Page 19: Deploy, Manage, and Scale Your Apps with OpsWorks and Elastic Beanstalk](https://reader033.vdocuments.us/reader033/viewer/2022050918/540d762c8d7f728d7e8b4952/html5/thumbnails/19.jpg)
Customize Your Servers, Simply
![Page 20: Deploy, Manage, and Scale Your Apps with OpsWorks and Elastic Beanstalk](https://reader033.vdocuments.us/reader033/viewer/2022050918/540d762c8d7f728d7e8b4952/html5/thumbnails/20.jpg)
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#
![Page 21: Deploy, Manage, and Scale Your Apps with OpsWorks and Elastic Beanstalk](https://reader033.vdocuments.us/reader033/viewer/2022050918/540d762c8d7f728d7e8b4952/html5/thumbnails/21.jpg)
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#
![Page 22: Deploy, Manage, and Scale Your Apps with OpsWorks and Elastic Beanstalk](https://reader033.vdocuments.us/reader033/viewer/2022050918/540d762c8d7f728d7e8b4952/html5/thumbnails/22.jpg)
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#
![Page 23: Deploy, Manage, and Scale Your Apps with OpsWorks and Elastic Beanstalk](https://reader033.vdocuments.us/reader033/viewer/2022050918/540d762c8d7f728d7e8b4952/html5/thumbnails/23.jpg)
John Doe, OpsWorks Developer
![Page 24: Deploy, Manage, and Scale Your Apps with OpsWorks and Elastic Beanstalk](https://reader033.vdocuments.us/reader033/viewer/2022050918/540d762c8d7f728d7e8b4952/html5/thumbnails/24.jpg)
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
![Page 25: Deploy, Manage, and Scale Your Apps with OpsWorks and Elastic Beanstalk](https://reader033.vdocuments.us/reader033/viewer/2022050918/540d762c8d7f728d7e8b4952/html5/thumbnails/25.jpg)
Benefits
• Any architecture
• Configuration as code
• Automation to run at scale
• Control any component
![Page 26: Deploy, Manage, and Scale Your Apps with OpsWorks and Elastic Beanstalk](https://reader033.vdocuments.us/reader033/viewer/2022050918/540d762c8d7f728d7e8b4952/html5/thumbnails/26.jpg)
Dynamic Configuration
![Page 27: Deploy, Manage, and Scale Your Apps with OpsWorks and Elastic Beanstalk](https://reader033.vdocuments.us/reader033/viewer/2022050918/540d762c8d7f728d7e8b4952/html5/thumbnails/27.jpg)
Dynamic Configuration
![Page 28: Deploy, Manage, and Scale Your Apps with OpsWorks and Elastic Beanstalk](https://reader033.vdocuments.us/reader033/viewer/2022050918/540d762c8d7f728d7e8b4952/html5/thumbnails/28.jpg)
Dynamic Configuration
![Page 29: Deploy, Manage, and Scale Your Apps with OpsWorks and Elastic Beanstalk](https://reader033.vdocuments.us/reader033/viewer/2022050918/540d762c8d7f728d7e8b4952/html5/thumbnails/29.jpg)
Dynamic Configuration
![Page 30: Deploy, Manage, and Scale Your Apps with OpsWorks and Elastic Beanstalk](https://reader033.vdocuments.us/reader033/viewer/2022050918/540d762c8d7f728d7e8b4952/html5/thumbnails/30.jpg)
Dynamic Configuration
![Page 31: Deploy, Manage, and Scale Your Apps with OpsWorks and Elastic Beanstalk](https://reader033.vdocuments.us/reader033/viewer/2022050918/540d762c8d7f728d7e8b4952/html5/thumbnails/31.jpg)
Dynamic Configuration
![Page 32: Deploy, Manage, and Scale Your Apps with OpsWorks and Elastic Beanstalk](https://reader033.vdocuments.us/reader033/viewer/2022050918/540d762c8d7f728d7e8b4952/html5/thumbnails/32.jpg)
Dynamic Configuration
![Page 33: Deploy, Manage, and Scale Your Apps with OpsWorks and Elastic Beanstalk](https://reader033.vdocuments.us/reader033/viewer/2022050918/540d762c8d7f728d7e8b4952/html5/thumbnails/33.jpg)
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 …
![Page 34: Deploy, Manage, and Scale Your Apps with OpsWorks and Elastic Beanstalk](https://reader033.vdocuments.us/reader033/viewer/2022050918/540d762c8d7f728d7e8b4952/html5/thumbnails/34.jpg)
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
![Page 35: Deploy, Manage, and Scale Your Apps with OpsWorks and Elastic Beanstalk](https://reader033.vdocuments.us/reader033/viewer/2022050918/540d762c8d7f728d7e8b4952/html5/thumbnails/35.jpg)
Demo time
• Model application using layers and apps
• Customize configuration using recipes
• Deployment options
• Review logs
• Manage user permissions
![Page 36: Deploy, Manage, and Scale Your Apps with OpsWorks and Elastic Beanstalk](https://reader033.vdocuments.us/reader033/viewer/2022050918/540d762c8d7f728d7e8b4952/html5/thumbnails/36.jpg)
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
![Page 37: Deploy, Manage, and Scale Your Apps with OpsWorks and Elastic Beanstalk](https://reader033.vdocuments.us/reader033/viewer/2022050918/540d762c8d7f728d7e8b4952/html5/thumbnails/37.jpg)
Elastic Beanstalk or OpsWorks Resource
Ap
pE
LB
AZ
your-app.elasticbeanstalk.com
Alert
Log
Mon
![Page 38: Deploy, Manage, and Scale Your Apps with OpsWorks and Elastic Beanstalk](https://reader033.vdocuments.us/reader033/viewer/2022050918/540d762c8d7f728d7e8b4952/html5/thumbnails/38.jpg)
Database Resources
Users Table
(DynamoDB)
MySQL Primary
(RDS)
Ap
pE
LB
AZ
your-app.elasticbeanstalk.com
Alert
Log
Mon
![Page 39: Deploy, Manage, and Scale Your Apps with OpsWorks and Elastic Beanstalk](https://reader033.vdocuments.us/reader033/viewer/2022050918/540d762c8d7f728d7e8b4952/html5/thumbnails/39.jpg)
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
![Page 40: Deploy, Manage, and Scale Your Apps with OpsWorks and Elastic Beanstalk](https://reader033.vdocuments.us/reader033/viewer/2022050918/540d762c8d7f728d7e8b4952/html5/thumbnails/40.jpg)
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
![Page 41: Deploy, Manage, and Scale Your Apps with OpsWorks and Elastic Beanstalk](https://reader033.vdocuments.us/reader033/viewer/2022050918/540d762c8d7f728d7e8b4952/html5/thumbnails/41.jpg)
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
![Page 42: Deploy, Manage, and Scale Your Apps with OpsWorks and Elastic Beanstalk](https://reader033.vdocuments.us/reader033/viewer/2022050918/540d762c8d7f728d7e8b4952/html5/thumbnails/42.jpg)
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
![Page 43: Deploy, Manage, and Scale Your Apps with OpsWorks and Elastic Beanstalk](https://reader033.vdocuments.us/reader033/viewer/2022050918/540d762c8d7f728d7e8b4952/html5/thumbnails/43.jpg)
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
![Page 44: Deploy, Manage, and Scale Your Apps with OpsWorks and Elastic Beanstalk](https://reader033.vdocuments.us/reader033/viewer/2022050918/540d762c8d7f728d7e8b4952/html5/thumbnails/44.jpg)
Thank You!