zero to sixty: aws elastic beanstalk (dmg204) | aws re:invent 2013
DESCRIPTION
AWS Elastic Beanstalk provides an easy way for you to quickly deploy and manage applications in the AWS cloud. In this Zero to Sixty session, accelerate your use of Elastic Beanstalk by learning how Nike and VTEX use several of its most powerful features. Through interactive demos and code samples for both Windows and Linux, this session teaches you how to achieve deployments with zero downtime, how to easily enable or disable application functionality via feature flags, and how to customize your Elastic Beanstalk environments with extensions. Demos and code samples are available to all session attendees. Are you new to Elastic Beanstalk? Get up to speed for this session by first completing the 60-minute Fundamentals of Elastic Beanstalk lab in the Self Paced Lab Lounge.TRANSCRIPT
![Page 1: Zero to Sixty: AWS Elastic Beanstalk (DMG204) | AWS re:Invent 2013](https://reader034.vdocuments.us/reader034/viewer/2022042521/54b6d5a24a7959ec3a8b4654/html5/thumbnails/1.jpg)
© 2013 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.
Zero to Sixty: AWS Elastic Beanstalk
Evan Brown, Amazon Web Services
November 14, 2013
![Page 2: Zero to Sixty: AWS Elastic Beanstalk (DMG204) | AWS re:Invent 2013](https://reader034.vdocuments.us/reader034/viewer/2022042521/54b6d5a24a7959ec3a8b4654/html5/thumbnails/2.jpg)
The Zero to Sixty Series
• Some Elastic Beanstalk experience assumed
• Practical tips and tricks
• Real stories, real advice, from real customers
• Q&A!
![Page 3: Zero to Sixty: AWS Elastic Beanstalk (DMG204) | AWS re:Invent 2013](https://reader034.vdocuments.us/reader034/viewer/2022042521/54b6d5a24a7959ec3a8b4654/html5/thumbnails/3.jpg)
Featuring
Ann Wallace and Amber
Milavec, Nike
Geraldo Thomaz, VTEX
Gabriel Arrais, VTEX
![Page 4: Zero to Sixty: AWS Elastic Beanstalk (DMG204) | AWS re:Invent 2013](https://reader034.vdocuments.us/reader034/viewer/2022042521/54b6d5a24a7959ec3a8b4654/html5/thumbnails/4.jpg)
Flow
AWS (10m)
NIKE (20m)
VTEX (20m)
Q&A (10m)
![Page 5: Zero to Sixty: AWS Elastic Beanstalk (DMG204) | AWS re:Invent 2013](https://reader034.vdocuments.us/reader034/viewer/2022042521/54b6d5a24a7959ec3a8b4654/html5/thumbnails/5.jpg)
Practical Tips and Tricks
What you can do with AWS Elastic Beanstalk
![Page 6: Zero to Sixty: AWS Elastic Beanstalk (DMG204) | AWS re:Invent 2013](https://reader034.vdocuments.us/reader034/viewer/2022042521/54b6d5a24a7959ec3a8b4654/html5/thumbnails/6.jpg)
Build apps for 6 popular container types
With AWS Elastic Beanstalk, you can…
Java PHP Python Ruby .NET Node.js
![Page 7: Zero to Sixty: AWS Elastic Beanstalk (DMG204) | AWS re:Invent 2013](https://reader034.vdocuments.us/reader034/viewer/2022042521/54b6d5a24a7959ec3a8b4654/html5/thumbnails/7.jpg)
Deploy your app to a load balanced, auto
scaled Environment
With AWS Elastic Beanstalk, you can…
![Page 8: Zero to Sixty: AWS Elastic Beanstalk (DMG204) | AWS re:Invent 2013](https://reader034.vdocuments.us/reader034/viewer/2022042521/54b6d5a24a7959ec3a8b4654/html5/thumbnails/8.jpg)
Alert
Log
Mon A
pp
E
LB
AZ
http://your-app.elasticbeanstalk.com
![Page 9: Zero to Sixty: AWS Elastic Beanstalk (DMG204) | AWS re:Invent 2013](https://reader034.vdocuments.us/reader034/viewer/2022042521/54b6d5a24a7959ec3a8b4654/html5/thumbnails/9.jpg)
Alert
Log
Mon A
pp
AZ
EL
B
http://your-app.elasticbeanstalk.com
![Page 10: Zero to Sixty: AWS Elastic Beanstalk (DMG204) | AWS re:Invent 2013](https://reader034.vdocuments.us/reader034/viewer/2022042521/54b6d5a24a7959ec3a8b4654/html5/thumbnails/10.jpg)
Alert
DB
Log
Mon A
pp
AZ
AZ
EL
B
http://your-app.elasticbeanstalk.com
![Page 11: Zero to Sixty: AWS Elastic Beanstalk (DMG204) | AWS re:Invent 2013](https://reader034.vdocuments.us/reader034/viewer/2022042521/54b6d5a24a7959ec3a8b4654/html5/thumbnails/11.jpg)
Deploy your app to a Single Instance
Environment
With AWS Elastic Beanstalk, you can…
![Page 12: Zero to Sixty: AWS Elastic Beanstalk (DMG204) | AWS re:Invent 2013](https://reader034.vdocuments.us/reader034/viewer/2022042521/54b6d5a24a7959ec3a8b4654/html5/thumbnails/12.jpg)
Alert
DB
Log
Mon A
pp
AZ
AZ
http://your-app-dev.elasticbeanstalk.com
![Page 13: Zero to Sixty: AWS Elastic Beanstalk (DMG204) | AWS re:Invent 2013](https://reader034.vdocuments.us/reader034/viewer/2022042521/54b6d5a24a7959ec3a8b4654/html5/thumbnails/13.jpg)
Environments exist within an Elastic
Beanstalk Application
With AWS Elastic Beanstalk, you can…
![Page 14: Zero to Sixty: AWS Elastic Beanstalk (DMG204) | AWS re:Invent 2013](https://reader034.vdocuments.us/reader034/viewer/2022042521/54b6d5a24a7959ec3a8b4654/html5/thumbnails/14.jpg)
Application: YourWebApp
Application Versions
![Page 15: Zero to Sixty: AWS Elastic Beanstalk (DMG204) | AWS re:Invent 2013](https://reader034.vdocuments.us/reader034/viewer/2022042521/54b6d5a24a7959ec3a8b4654/html5/thumbnails/15.jpg)
Deploy your app using tools you know
With AWS Elastic Beanstalk, you can…
![Page 16: Zero to Sixty: AWS Elastic Beanstalk (DMG204) | AWS re:Invent 2013](https://reader034.vdocuments.us/reader034/viewer/2022042521/54b6d5a24a7959ec3a8b4654/html5/thumbnails/16.jpg)
Application Versions
![Page 17: Zero to Sixty: AWS Elastic Beanstalk (DMG204) | AWS re:Invent 2013](https://reader034.vdocuments.us/reader034/viewer/2022042521/54b6d5a24a7959ec3a8b4654/html5/thumbnails/17.jpg)
Customizing Elastic Beanstalk
![Page 18: Zero to Sixty: AWS Elastic Beanstalk (DMG204) | AWS re:Invent 2013](https://reader034.vdocuments.us/reader034/viewer/2022042521/54b6d5a24a7959ec3a8b4654/html5/thumbnails/18.jpg)
Customizing Elastic Beanstalk
• The software running
on your instances
– Install other software
– Create or download
files
• The resources
supporting your app
– Adjust scaling policies
– Add a key pair for SSH
access
– Create an S3 bucket
![Page 19: Zero to Sixty: AWS Elastic Beanstalk (DMG204) | AWS re:Invent 2013](https://reader034.vdocuments.us/reader034/viewer/2022042521/54b6d5a24a7959ec3a8b4654/html5/thumbnails/19.jpg)
Customizing Elastic Beanstalk
• In 3 steps: 1. Add a .ebextensions folder to your app/project
2. Define customizations in YAML config files
3. Package and deploy app to Elastic Beanstalk
![Page 20: Zero to Sixty: AWS Elastic Beanstalk (DMG204) | AWS re:Invent 2013](https://reader034.vdocuments.us/reader034/viewer/2022042521/54b6d5a24a7959ec3a8b4654/html5/thumbnails/20.jpg)
Customizing Elastic Beanstalk
• In 3 steps: 1. Add a .ebextensions folder to your app/project
2. Define customizations in YAML-formatted config files
3. Package and deploy app to Elastic Beanstalk
![Page 21: Zero to Sixty: AWS Elastic Beanstalk (DMG204) | AWS re:Invent 2013](https://reader034.vdocuments.us/reader034/viewer/2022042521/54b6d5a24a7959ec3a8b4654/html5/thumbnails/21.jpg)
Customization Scenario
• .NET Application on Windows Server
• Automatically Install New Relic Server Monitor
on each instance
Courtesy of Travis Cannon
Complete code available at https://gist.github.com/TravisCannon/6023875
![Page 22: Zero to Sixty: AWS Elastic Beanstalk (DMG204) | AWS re:Invent 2013](https://reader034.vdocuments.us/reader034/viewer/2022042521/54b6d5a24a7959ec3a8b4654/html5/thumbnails/22.jpg)
Download Agent Files to Instance files:
"C:\\Users\\Public\\Downloads\\EnableEc2SetComputerName.ps1”:
source: http://<s3>/EnableEc2SetComputerName.ps1
"C:\\Users\\Public\\Downloads\\NewRelicAgent.msi”:
source: http://<s3>/NewRelicAgent_<platform>_<version>.msi
"C:\\Users\\Public\\Downloads\\NewRelicServerMonitor.msi”:
source: http://<s3>/NewRelicServerMonitor_<platform>_<version>.msi
Win
do
ws
![Page 23: Zero to Sixty: AWS Elastic Beanstalk (DMG204) | AWS re:Invent 2013](https://reader034.vdocuments.us/reader034/viewer/2022042521/54b6d5a24a7959ec3a8b4654/html5/thumbnails/23.jpg)
Download Agent Files to Instance files:
"C:\\Users\\Public\\Downloads\\EnableEc2SetComputerName.ps1”:
source: http://<s3>/EnableEc2SetComputerName.ps1
"C:\\Users\\Public\\Downloads\\NewRelicAgent.msi”:
source: http://<s3>/NewRelicAgent_<platform>_<version>.msi
"C:\\Users\\Public\\Downloads\\NewRelicServerMonitor.msi”:
source: http://<s3>/NewRelicServerMonitor_<platform>_<version>.msi
Win
do
ws
![Page 24: Zero to Sixty: AWS Elastic Beanstalk (DMG204) | AWS re:Invent 2013](https://reader034.vdocuments.us/reader034/viewer/2022042521/54b6d5a24a7959ec3a8b4654/html5/thumbnails/24.jpg)
Download Agent Files to Instance commands:
ec2setcomputername-enable:
command: powershell.exe -ExecutionPolicy Bypass -File "C:\\Users\
\Public\\Downloads\\EnableEc2SetComputerName.ps1"
install_newrelic_agent:
command: msiexec.exe /i "C:\\Users\\Public\\Downloads\
\NewRelicAgent.msi" /qb
NR_LICENSE_KEY=<new_relic_license_key> INSTALLLEVEL=50
install_newrelic_servermonitor:
command: msiexec.exe /i "C:\\Users\\Public\\Downloads\
\NewRelicServerMonitor.msi" /L*v install.log /qn
NR_LICENSE_KEY=<new_relic_license_key>
Win
do
ws
![Page 25: Zero to Sixty: AWS Elastic Beanstalk (DMG204) | AWS re:Invent 2013](https://reader034.vdocuments.us/reader034/viewer/2022042521/54b6d5a24a7959ec3a8b4654/html5/thumbnails/25.jpg)
Download Agent Files to Instance commands:
ec2setcomputername-enable:
command: powershell.exe -ExecutionPolicy Bypass -File "C:\\Users\
\Public\\Downloads\\EnableEc2SetComputerName.ps1"
install_newrelic_agent:
command: msiexec.exe /i "C:\\Users\\Public\\Downloads\
\NewRelicAgent.msi" /qb
NR_LICENSE_KEY=<new_relic_license_key> INSTALLLEVEL=50
install_newrelic_servermonitor:
command: msiexec.exe /i "C:\\Users\\Public\\Downloads\
\NewRelicServerMonitor.msi" /L*v install.log /qn
NR_LICENSE_KEY=<new_relic_license_key>
Win
do
ws
![Page 26: Zero to Sixty: AWS Elastic Beanstalk (DMG204) | AWS re:Invent 2013](https://reader034.vdocuments.us/reader034/viewer/2022042521/54b6d5a24a7959ec3a8b4654/html5/thumbnails/26.jpg)
Download Agent Files to Instance commands:
ec2setcomputername-enable:
command: powershell.exe -ExecutionPolicy Bypass -File "C:\\Users\
\Public\\Downloads\\EnableEc2SetComputerName.ps1"
install_newrelic_agent:
command: msiexec.exe /i "C:\\Users\\Public\\Downloads\
\NewRelicAgent.msi" /qb
NR_LICENSE_KEY=<new_relic_license_key> INSTALLLEVEL=50
install_newrelic_servermonitor:
command: msiexec.exe /i "C:\\Users\\Public\\Downloads\
\NewRelicServerMonitor.msi" /L*v install.log /qn
NR_LICENSE_KEY=<new_relic_license_key>
Win
do
ws
![Page 27: Zero to Sixty: AWS Elastic Beanstalk (DMG204) | AWS re:Invent 2013](https://reader034.vdocuments.us/reader034/viewer/2022042521/54b6d5a24a7959ec3a8b4654/html5/thumbnails/27.jpg)
Customization Scenario
• Application Configuration
Store config in the environment
![Page 28: Zero to Sixty: AWS Elastic Beanstalk (DMG204) | AWS re:Invent 2013](https://reader034.vdocuments.us/reader034/viewer/2022042521/54b6d5a24a7959ec3a8b4654/html5/thumbnails/28.jpg)
Store App Config in the Environment option_settings:
- option_name: SOME_ENV_VAR_NAME
value: ”env_var_value”
Win
do
ws
L
inu
x
![Page 29: Zero to Sixty: AWS Elastic Beanstalk (DMG204) | AWS re:Invent 2013](https://reader034.vdocuments.us/reader034/viewer/2022042521/54b6d5a24a7959ec3a8b4654/html5/thumbnails/29.jpg)
Store App Config in the Environment option_settings:
- option_name: ENV_VAR
value: ”env_var_value”
Win
do
ws
L
inu
x
import os
some_var=os.environ.get(‘ENV_VAR’)
String some_var = System.getProperty(‘ENV_VAR’)
NameValueCollection appConfig = ConfigurationManager.AppSettings;
string param1 = appConfig[”ENV_VAR"];
Python
Java
C#
![Page 30: Zero to Sixty: AWS Elastic Beanstalk (DMG204) | AWS re:Invent 2013](https://reader034.vdocuments.us/reader034/viewer/2022042521/54b6d5a24a7959ec3a8b4654/html5/thumbnails/30.jpg)
Store App Config in the Environment option_settings:
- option_name: ENV_VAR
value: ”env_var_value”
Win
do
ws
L
inu
x
import os
some_var=os.environ.get(‘ENV_VAR’)
String some_var = System.getProperty(‘ENV_VAR’)
NameValueCollection appConfig = ConfigurationManager.AppSettings;
string param1 = appConfig[”ENV_VAR"];
Python
Java
C#
![Page 31: Zero to Sixty: AWS Elastic Beanstalk (DMG204) | AWS re:Invent 2013](https://reader034.vdocuments.us/reader034/viewer/2022042521/54b6d5a24a7959ec3a8b4654/html5/thumbnails/31.jpg)
Store App Config in the Environment option_settings:
- option_name: ENV_VAR
value: ”env_var_value”
Win
do
ws
L
inu
x
import os
some_var=os.environ.get(‘ENV_VAR’)
String some_var = System.getProperty(‘ENV_VAR’)
NameValueCollection appConfig = ConfigurationManager.AppSettings;
string param1 = appConfig[”ENV_VAR"];
Python
Java
C#
![Page 32: Zero to Sixty: AWS Elastic Beanstalk (DMG204) | AWS re:Invent 2013](https://reader034.vdocuments.us/reader034/viewer/2022042521/54b6d5a24a7959ec3a8b4654/html5/thumbnails/32.jpg)
Store App Config in the Environment option_settings:
- option_name: CDN_DNS
value: ”http://dmorf1fvvsmuy.cloudfront.net”
option_settings:
- option_name: DB_CONN_STRING
value: ”jdbc:mysql://3yta.us-west-2.
rds.amazonaws.com:3306/amediamanager”
option_settings:
- option_name: ENABLE_MEMCACHED
value: ”false”
option_settings:
- option_name: AWS_REGION
value: { "Ref" : "AWS::Region"}
Win
do
ws
L
inu
x
![Page 33: Zero to Sixty: AWS Elastic Beanstalk (DMG204) | AWS re:Invent 2013](https://reader034.vdocuments.us/reader034/viewer/2022042521/54b6d5a24a7959ec3a8b4654/html5/thumbnails/33.jpg)
© 2013 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.
AWS Elastic Beanstalk at Nike
Ann Wallace :: @randombug :: Nike, Inc.
Amber Milavec :: @noneonnone :: Nike, Inc.
![Page 34: Zero to Sixty: AWS Elastic Beanstalk (DMG204) | AWS re:Invent 2013](https://reader034.vdocuments.us/reader034/viewer/2022042521/54b6d5a24a7959ec3a8b4654/html5/thumbnails/34.jpg)
Where does Nike use Elastic Beanstalk?
• Brand and marketing campaigns
• Stand-alone apps that only integrate with Nike
web services
![Page 35: Zero to Sixty: AWS Elastic Beanstalk (DMG204) | AWS re:Invent 2013](https://reader034.vdocuments.us/reader034/viewer/2022042521/54b6d5a24a7959ec3a8b4654/html5/thumbnails/35.jpg)
Why does Nike use Elastic Beanstalk?
• Ease of use
• Agility
• Familiarity
• Distributed deployment model
![Page 36: Zero to Sixty: AWS Elastic Beanstalk (DMG204) | AWS re:Invent 2013](https://reader034.vdocuments.us/reader034/viewer/2022042521/54b6d5a24a7959ec3a8b4654/html5/thumbnails/36.jpg)
How does Nike use Elastic Beanstalk?
! "#$%&'( ) #*$+#", '- . . "/&#%0*
- 12'3 #+) 4 #5
"06/*'$) 78/&)
9: ) "'; #+#'$) 78/&)
) < #/"'$) 78/&)
6#< ) '$) 78/&)
![Page 37: Zero to Sixty: AWS Elastic Beanstalk (DMG204) | AWS re:Invent 2013](https://reader034.vdocuments.us/reader034/viewer/2022042521/54b6d5a24a7959ec3a8b4654/html5/thumbnails/37.jpg)
Standard Elastic Beanstalk Application setup
![Page 38: Zero to Sixty: AWS Elastic Beanstalk (DMG204) | AWS re:Invent 2013](https://reader034.vdocuments.us/reader034/viewer/2022042521/54b6d5a24a7959ec3a8b4654/html5/thumbnails/38.jpg)
Deployment UI
![Page 39: Zero to Sixty: AWS Elastic Beanstalk (DMG204) | AWS re:Invent 2013](https://reader034.vdocuments.us/reader034/viewer/2022042521/54b6d5a24a7959ec3a8b4654/html5/thumbnails/39.jpg)
Elastic Beanstalk Deployment Process
!"#$%&' ( ' ) *$%&' (
+, -./$-!$) -0)&/$( 1/&' .( 23+.&$' 30) 3*&-!$' , !4&/$5( $54&$
' ) *$%&' ( $
, !&%$04&0) !$-#$0( /&
![Page 40: Zero to Sixty: AWS Elastic Beanstalk (DMG204) | AWS re:Invent 2013](https://reader034.vdocuments.us/reader034/viewer/2022042521/54b6d5a24a7959ec3a8b4654/html5/thumbnails/40.jpg)
Elastic Beanstalk Deployment Process
!"#$%&' ( ' ) *$%&' (
+, -./$-!$) -0)&/$( 1/&' .( 23+.&$' 30) 3*&-!$' , !4&/$5( $54&$
' ) *$%&' ( $
/&' .( 2$, - +&3#!53.)' %( 62$4( !5
, !&%$!&.&05!$&#"$3#/$' ) *$5( $/&' .( 2
/&' .( 2$0( /&$-!$-#-735&/$
89$' 30) 3*&$-!$' , ..&/$"-3$4: ' $
, !&%$04&0) !$-#$0( /&
![Page 41: Zero to Sixty: AWS Elastic Beanstalk (DMG204) | AWS re:Invent 2013](https://reader034.vdocuments.us/reader034/viewer/2022042521/54b6d5a24a7959ec3a8b4654/html5/thumbnails/41.jpg)
Elastic Beanstalk Deployment Process
!"#$%&' ( ' ) *$%&' (
+, -./$-!$) -0)&/$( 1/&' .( 23+.&$' 30) 3*&-!$' , !4&/$5( $54&$
' ) *$%&' ( $
/&' .( 2$, - +&3#!53.)' %( 62$4( !5
, !&%$!&.&05!$&#"$3#/$' ) *$5( $/&' .( 2
/&' .( 2$0( /&$-!$-#-735&/$
)&2$"3., &$/+
89$&#"$!' &0-: 0$/353$-!$' , ..&/$
; 9$' 30) 3*&$-!$' , ..&/$"-3$4< ' $
, !&%$04&0) !$-#$0( /&
![Page 42: Zero to Sixty: AWS Elastic Beanstalk (DMG204) | AWS re:Invent 2013](https://reader034.vdocuments.us/reader034/viewer/2022042521/54b6d5a24a7959ec3a8b4654/html5/thumbnails/42.jpg)
Elastic Beanstalk Deployment Process
!"#$%&' ( ' ) *$%&' (
+, -./$-!$) -0)&/$( 1/&' .( 23+.&$' 30) 3*&-!$' , !4&/$5( $54&$
' ) *$%&' ( $
/&' .( 2$, - +&3#!53.)' %( 62$4( !5
, !&%$!&.&05!$&#"$3#/$' ) *$5( $/&' .( 2
/&' .( 2$0( /&$-!$-#-735&/$
)&2$"3., &$/+
89$&#"$!' &0-: 0$/353$-!$' , ..&/$
; 9$' 30) 3*&$-!$' , ..&/$"-3$4< ' $
=9$+&3#!53.) $0( #: *$: .&$-!$0%&35&/$!
, !&%$04&0) !$-#$0( /&
![Page 43: Zero to Sixty: AWS Elastic Beanstalk (DMG204) | AWS re:Invent 2013](https://reader034.vdocuments.us/reader034/viewer/2022042521/54b6d5a24a7959ec3a8b4654/html5/thumbnails/43.jpg)
Elastic Beanstalk Deployment Process
!"#$%&' ( ' ) *$%&' (
+, -./$-!$) -0)&/$( 1/&' .( 23+.&$' 30) 3*&-!$' , !4&/$5( $54&$
' ) *$%&' ( $
/&' .( 2$, - +&3#!53.)' %( 62$4( !5
! "
, !&%$!&.&05!$&#"$3#/$' ) *$5( $/&' .( 2
/&' .( 2$0( /&$-!$-#-735&/$
)&2$"3., &$/+
89$&#"$!' &0-: 0$/353$-!$' , ..&/$
; 9$' 30) 3*&$-!$' , ..&/$"-3$4< ' $
=9$+&3#!53.) $0( #: *$: .&$-!$0%&35&/$#
>9$? 3%$: .&$-!$0( ' -&/$5( $!=$
, !&%$04&0) !$-#$0( /&
![Page 44: Zero to Sixty: AWS Elastic Beanstalk (DMG204) | AWS re:Invent 2013](https://reader034.vdocuments.us/reader034/viewer/2022042521/54b6d5a24a7959ec3a8b4654/html5/thumbnails/44.jpg)
Elastic Beanstalk Deployment Process
!"#$%&' ( ' ) *$%&' (
+, -./$-!$) -0)&/$( 1/&' .( 23+.&$' 30) 3*&-!$' , !4&/$5( $54&$
' ) *$%&' ( $
/&' .( 2$, - +&3#!53.)' %( 62$4( !5
! "
, !&%$!&.&05!$&#"$3#/$' ) *$5( $/&' .( 2
/&' .( 2$0( /&$-!$-#-735&/$
)&2$"3., &$/+
89$&#"$!' &0-: 0$/353$-!$' , ..&/$
; 9$' 30) 3*&$-!$' , ..&/$"-3$4< ' $
=9$+&3#!53.) $0( #: *$: .&$-!$0%&35&/$#
>9$? 3%$: .&$-!$0( ' -&/$5( $!=$
@9$+&3#!53.) $&#"-%( #A $-!$0%&35&/
, !&%$04&0) !$-#$0( /&
![Page 45: Zero to Sixty: AWS Elastic Beanstalk (DMG204) | AWS re:Invent 2013](https://reader034.vdocuments.us/reader034/viewer/2022042521/54b6d5a24a7959ec3a8b4654/html5/thumbnails/45.jpg)
Elastic Beanstalk Deployment Process
!"#$%&' ( ' ) *$%&' (
+, -./$-!$) -0)&/$( 1/&' .( 23+.&$' 30) 3*&-!$' , !4&/$5( $54&$
' ) *$%&' ( $
/&' .( 2$, - +&3#!53.)' %( 62$4( !5
! "
, !&%$!&.&05!$&#"$3#/$' ) *$5( $/&' .( 2
/&' .( 2$0( /&$-!$-#-735&/$
)&2$"3., &$/+
89$&#"$!' &0-: 0$/353$-!$' , ..&/$
; 9$' 30) 3*&$-!$' , ..&/$"-3$4< ' $
=9$+&3#!53.) $0( #: *$: .&$-!$0%&35&/$#
>9$? 3%$: .&$-!$0( ' -&/$5( $!=$
@9$+&3#!53.) $&#"-%( #A $-!$0%&35&/
B9$+&3#!53.) $' , ..!$54&$? 3%$: .&C%( A $!=$C( %$/&' .( 2A 
, !&%$04&0) !$-#$0( /&
![Page 46: Zero to Sixty: AWS Elastic Beanstalk (DMG204) | AWS re:Invent 2013](https://reader034.vdocuments.us/reader034/viewer/2022042521/54b6d5a24a7959ec3a8b4654/html5/thumbnails/46.jpg)
Under the covers
• Configuration templates
• .ebextensions
• Zero downtime deployments
• Wild card certs
![Page 47: Zero to Sixty: AWS Elastic Beanstalk (DMG204) | AWS re:Invent 2013](https://reader034.vdocuments.us/reader034/viewer/2022042521/54b6d5a24a7959ec3a8b4654/html5/thumbnails/47.jpg)
Zero downtime deployments
create a new
environment
deploy new app
version and
configuration
is status
ready &&
health
green?
swap cname of
old env with
new env
terminate old
env
FAIL
no cname swap
new env has to
be manually
deleted
> 10 mins
Yes
![Page 48: Zero to Sixty: AWS Elastic Beanstalk (DMG204) | AWS re:Invent 2013](https://reader034.vdocuments.us/reader034/viewer/2022042521/54b6d5a24a7959ec3a8b4654/html5/thumbnails/48.jpg)
template.json example {
"Value" : "%%healthcheck.page%%",
"Namespace" : "aws:elasticbeanstalk:application",
"OptionName" : "Application Healthcheck URL"
},
{
"Value" : "%%autoscale.measure%%",
"Namespace" : "aws:autoscaling:trigger",
"OptionName" : "MeasureName"
},
{
"Value" : "%%autoscale.stat%%",
"Namespace" : "aws:autoscaling:trigger",
"OptionName" : "Statistic"
},
![Page 49: Zero to Sixty: AWS Elastic Beanstalk (DMG204) | AWS re:Invent 2013](https://reader034.vdocuments.us/reader034/viewer/2022042521/54b6d5a24a7959ec3a8b4654/html5/thumbnails/49.jpg)
New Relic .ebextensions example container_commands:
00-new-relic:
command: wget https://X.s3.amazonaws.com/newrelic_agent.zip
cwd: /tmp
01-unzip:
command: unzip -j newrelic_agent.zip -d /usr/share/java/tomcat6
cwd: /tmp
option_settings:
- namespace: aws:elasticbeanstalk:container:tomcat:jvmoptions
option_name: "JVM Options"
value: "-javaagent:/usr/share/java/tomcat6/newrelic.jar"
![Page 50: Zero to Sixty: AWS Elastic Beanstalk (DMG204) | AWS re:Invent 2013](https://reader034.vdocuments.us/reader034/viewer/2022042521/54b6d5a24a7959ec3a8b4654/html5/thumbnails/50.jpg)
It’s not all rainbows and unicorns
• Unable to deploy multiple wars to one environment
• Unable to update a cert without redeploying
• Log access
• Developers still say “it works on my box”
• Boot time / deployment cycles take awhile
![Page 51: Zero to Sixty: AWS Elastic Beanstalk (DMG204) | AWS re:Invent 2013](https://reader034.vdocuments.us/reader034/viewer/2022042521/54b6d5a24a7959ec3a8b4654/html5/thumbnails/51.jpg)
Geraldo Thomaz, co-CEO
![Page 52: Zero to Sixty: AWS Elastic Beanstalk (DMG204) | AWS re:Invent 2013](https://reader034.vdocuments.us/reader034/viewer/2022042521/54b6d5a24a7959ec3a8b4654/html5/thumbnails/52.jpg)
VTEX who? • Started in 2000, after MANY pivots, we
focused in SAAS E-Commerce Platform,
and we are growing, since 2009, an
average of 70%/year
• Today we are the preferred platform for
more than 400 customers, in 8 LATAM countries
• Our customers generates more than U$
1bi in gross merchandise value
• More than 200 million page-views/month
delivered through AWS infrastructure
![Page 53: Zero to Sixty: AWS Elastic Beanstalk (DMG204) | AWS re:Invent 2013](https://reader034.vdocuments.us/reader034/viewer/2022042521/54b6d5a24a7959ec3a8b4654/html5/thumbnails/53.jpg)
Why and How does VTEX use AWS?
![Page 54: Zero to Sixty: AWS Elastic Beanstalk (DMG204) | AWS re:Invent 2013](https://reader034.vdocuments.us/reader034/viewer/2022042521/54b6d5a24a7959ec3a8b4654/html5/thumbnails/54.jpg)
Why and How does VTEX use Elastic Beanstalk?
Our goal:
Satisfy more than 1000 customers
Maximum Availability - with minimal downtime
Minimum Cost - building a multi-tenant application
![Page 55: Zero to Sixty: AWS Elastic Beanstalk (DMG204) | AWS re:Invent 2013](https://reader034.vdocuments.us/reader034/viewer/2022042521/54b6d5a24a7959ec3a8b4654/html5/thumbnails/55.jpg)
Why and How does VTEX use Elastic Beanstalk?
Increase the number of thinking minds, not
developers only
(in one year, our tech team grew from 15 to 170)
Make every one of the 170 count, giving ownership to
most of them
SOA, split our product into more than 30
independent services
Create a code-delivery infrastructure that minimizes downtime, deployment errors, Q&A and gives incentives for
small batches
Continuous integration, automation, fast rollback, monitoring
AWS Elastic Beanstalk
TeamCity, Splunk, Varnish/Nginx (VTEX Janus)
![Page 56: Zero to Sixty: AWS Elastic Beanstalk (DMG204) | AWS re:Invent 2013](https://reader034.vdocuments.us/reader034/viewer/2022042521/54b6d5a24a7959ec3a8b4654/html5/thumbnails/56.jpg)
DEMO
![Page 57: Zero to Sixty: AWS Elastic Beanstalk (DMG204) | AWS re:Invent 2013](https://reader034.vdocuments.us/reader034/viewer/2022042521/54b6d5a24a7959ec3a8b4654/html5/thumbnails/57.jpg)
Our Beanstalk Console
![Page 58: Zero to Sixty: AWS Elastic Beanstalk (DMG204) | AWS re:Invent 2013](https://reader034.vdocuments.us/reader034/viewer/2022042521/54b6d5a24a7959ec3a8b4654/html5/thumbnails/58.jpg)
TeamCity – The Build Server
![Page 59: Zero to Sixty: AWS Elastic Beanstalk (DMG204) | AWS re:Invent 2013](https://reader034.vdocuments.us/reader034/viewer/2022042521/54b6d5a24a7959ec3a8b4654/html5/thumbnails/59.jpg)
Awsdeploy command line tool
![Page 60: Zero to Sixty: AWS Elastic Beanstalk (DMG204) | AWS re:Invent 2013](https://reader034.vdocuments.us/reader034/viewer/2022042521/54b6d5a24a7959ec3a8b4654/html5/thumbnails/60.jpg)
Ebextension to install Splunk sources:
c:\temp: https://loggerdeploy.s3.amazonaws.com/LoggerSplunkForwarderSetup.zip
commands:
install-vtexLogger:
command: LoggerSplunkForwarderSetup.exe
cwd: c:\temp
waitForCompletion: 0
services:
windows:
SplunkForwarder:
enabled: true
ensureRunning: true
![Page 61: Zero to Sixty: AWS Elastic Beanstalk (DMG204) | AWS re:Invent 2013](https://reader034.vdocuments.us/reader034/viewer/2022042521/54b6d5a24a7959ec3a8b4654/html5/thumbnails/61.jpg)
We use Splunk and Elastic Beanstalk interface
for Monitoring
![Page 62: Zero to Sixty: AWS Elastic Beanstalk (DMG204) | AWS re:Invent 2013](https://reader034.vdocuments.us/reader034/viewer/2022042521/54b6d5a24a7959ec3a8b4654/html5/thumbnails/62.jpg)
Roadmap
• Make Janus distribute load between two
versions and ask Splunk if the new version is
better than the previous one – Lower Error/Warn Rate?
– Lower Latency?
– Lower Resource Consumption?
![Page 63: Zero to Sixty: AWS Elastic Beanstalk (DMG204) | AWS re:Invent 2013](https://reader034.vdocuments.us/reader034/viewer/2022042521/54b6d5a24a7959ec3a8b4654/html5/thumbnails/63.jpg)
Remarks
• Ownership to the service teams
• Bad version has limited impact
• Q&A protects the job of our developers – Rollback protects the credibility of VTEX
![Page 64: Zero to Sixty: AWS Elastic Beanstalk (DMG204) | AWS re:Invent 2013](https://reader034.vdocuments.us/reader034/viewer/2022042521/54b6d5a24a7959ec3a8b4654/html5/thumbnails/64.jpg)
And now it’s time for…
![Page 65: Zero to Sixty: AWS Elastic Beanstalk (DMG204) | AWS re:Invent 2013](https://reader034.vdocuments.us/reader034/viewer/2022042521/54b6d5a24a7959ec3a8b4654/html5/thumbnails/65.jpg)
And now it’s time for…
• Q & A!
![Page 66: Zero to Sixty: AWS Elastic Beanstalk (DMG204) | AWS re:Invent 2013](https://reader034.vdocuments.us/reader034/viewer/2022042521/54b6d5a24a7959ec3a8b4654/html5/thumbnails/66.jpg)
© 2013 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.
Coming up right after this…
DMG301 - AWS Elastic Beanstalk Under the Hood
![Page 67: Zero to Sixty: AWS Elastic Beanstalk (DMG204) | AWS re:Invent 2013](https://reader034.vdocuments.us/reader034/viewer/2022042521/54b6d5a24a7959ec3a8b4654/html5/thumbnails/67.jpg)
Please give us your feedback on this
presentation
As a thank you, we will select prize
winners daily for completed surveys!
DMG204