+ All Categories
Home > Technology > Continuous Deployment with Amazon Web Services by Carlos Conde

Continuous Deployment with Amazon Web Services by Carlos Conde

Date post: 08-May-2015
Category:
Upload: codemotion
View: 4,032 times
Download: 1 times
Share this document with a friend
101
CONTINOUS DEPLOYMENT WITH AMAZON WEB SERVICES Carlos Conde | Solutions Architecture
Transcript
Page 1: Continuous Deployment with Amazon Web Services by Carlos Conde

CONTINOUS DEPLOYMENTWITH AMAZON WEB SERVICES

Carlos Conde | Solutions Architecture

Page 2: Continuous Deployment with Amazon Web Services by Carlos Conde

CONTINUOUS INTEGRATION

Page 3: Continuous Deployment with Amazon Web Services by Carlos Conde

DEVELOPER

Page 4: Continuous Deployment with Amazon Web Services by Carlos Conde

SOURCE CODEREPOSITORY

Page 5: Continuous Deployment with Amazon Web Services by Carlos Conde

SOURCE CODEREPOSITORY

PROJECT MANAGEMENT SERVER

Page 6: Continuous Deployment with Amazon Web Services by Carlos Conde

SOURCE CODEREPOSITORY

PROJECT MANAGEMENT SERVER

CONTINUOUS INTEGRATION SERVER

Page 7: Continuous Deployment with Amazon Web Services by Carlos Conde

SOURCE CODEREPOSITORY

PROJECT MANAGEMENT SERVER

CONTINUOUS INTEGRATION SERVER

PICK TASKS

Page 8: Continuous Deployment with Amazon Web Services by Carlos Conde

SOURCE CODEREPOSITORY

PROJECT MANAGEMENT SERVER

CONTINUOUS INTEGRATION SERVER

SUBMITCODE

Page 9: Continuous Deployment with Amazon Web Services by Carlos Conde

SOURCE CODEREPOSITORY

PROJECT MANAGEMENT SERVER

CONTINUOUS INTEGRATION SERVER

SCHEDULE BUILD

Page 10: Continuous Deployment with Amazon Web Services by Carlos Conde

SOURCE CODEREPOSITORY

PROJECT MANAGEMENT SERVER

CONTINUOUS INTEGRATION SERVER

RECURENTBUILDS

Page 11: Continuous Deployment with Amazon Web Services by Carlos Conde

SOURCE CODEREPOSITORY

PROJECT MANAGEMENT SERVER

CONTINUOUS INTEGRATION SERVER

CODEFETCH

Page 12: Continuous Deployment with Amazon Web Services by Carlos Conde

SOURCE CODEREPOSITORY

PROJECT MANAGEMENT SERVER

CONTINUOUS INTEGRATION SERVER

CODE QUALITY TESTS

TEST RESULTS

Page 13: Continuous Deployment with Amazon Web Services by Carlos Conde

SOURCE CODEREPOSITORY

PROJECT MANAGEMENT SERVER

CONTINUOUS INTEGRATION SERVER

BUILD OUTPUT

Page 14: Continuous Deployment with Amazon Web Services by Carlos Conde

SOURCE CODEREPOSITORY

PROJECT MANAGEMENT SERVER

CONTINUOUS INTEGRATION SERVER

DOCS

BINARIES / PACKAGES

Page 15: Continuous Deployment with Amazon Web Services by Carlos Conde
Page 16: Continuous Deployment with Amazon Web Services by Carlos Conde

SOURCE CODE REPOSITORY

DNS

CONTINUOUS INTEGRATION SERVER

PROJECT MANAGEMENT SERVER

BUILDS

Page 17: Continuous Deployment with Amazon Web Services by Carlos Conde

PAIN POINTS:• UNIT TESTS INCOMPLETE• MOCKS MAINTENANCE• TEST ENV EXPENSIVE• TEST ENV ≠ PROD

Page 18: Continuous Deployment with Amazon Web Services by Carlos Conde
Page 19: Continuous Deployment with Amazon Web Services by Carlos Conde

KEY = ITERATION

Page 20: Continuous Deployment with Amazon Web Services by Carlos Conde

ITERATION

=MODIFY THE SYSTEM TO BETTER

MEET THE EXPECTATIONS OF YOUR USERS

Page 21: Continuous Deployment with Amazon Web Services by Carlos Conde

ON-DEMAND

PAY AS YOU GO

ELASTIC

Page 22: Continuous Deployment with Amazon Web Services by Carlos Conde

=PROGRAMMABLE

PLATFORM

Page 23: Continuous Deployment with Amazon Web Services by Carlos Conde
Page 24: Continuous Deployment with Amazon Web Services by Carlos Conde
Page 25: Continuous Deployment with Amazon Web Services by Carlos Conde
Page 26: Continuous Deployment with Amazon Web Services by Carlos Conde

AWS CLOUDFORMATION

STACK-BASED DEPLOYMENT SERVICE

Page 27: Continuous Deployment with Amazon Web Services by Carlos Conde

CLOUDFORMATIONTEMPLATE

Page 28: Continuous Deployment with Amazon Web Services by Carlos Conde
Page 29: Continuous Deployment with Amazon Web Services by Carlos Conde

{ "Description" : "Create RDS with username and password", "Resources" : {

"MyDB" : { "Type" : "AWS::RDS::DBInstance", "Properties" : { "AllocatedStorage" : "500", "DBInstanceClass" : "db.m1.small", "Engine" : "MySQL", "EngineVersion" : "5.5", "MasterUsername" : "MyName", "MasterUserPassword" : "MyPassword" } } }}

Page 30: Continuous Deployment with Amazon Web Services by Carlos Conde

"AWS::CloudFormation::Init" : { "config" : {

"packages" : { "yum" : { "mysql" : [], "mysql-server" : [], "httpd" : [], "php" : [], "php-mysql" : [] } },

"sources" : { "/var/www/html" : "https://s3.amazonaws.com/my-builds/build-v4.zip" } }}

Page 31: Continuous Deployment with Amazon Web Services by Carlos Conde

{ "Parameters" : { "KeyName" : { "Description" : "Name of an existing EC2 KeyPair to enable SSH access to the instance", "Type" : "String" } },}

Page 32: Continuous Deployment with Amazon Web Services by Carlos Conde

CLOUDFORMATIONTEMPLATE

PROCEDURALDEFINITION

Create it programmatically

KNOWN CONFIGURATIONStore stack configuration in source control

PARAMETER DRIVEN

Dynamic and user-driven templates

COLLABORATIONShare templates with ease as just files

Page 33: Continuous Deployment with Amazon Web Services by Carlos Conde
Page 34: Continuous Deployment with Amazon Web Services by Carlos Conde
Page 35: Continuous Deployment with Amazon Web Services by Carlos Conde

Template ELBs to front secondary cache

~100 Nginx secondary cache servers

2-3 Nginx mid-tier cache servers

Stack

CLOUDFORMATION TEMPLATEVIDEO CACHING

INFRASTRUCTURECASE S

TUDY

Page 36: Continuous Deployment with Amazon Web Services by Carlos Conde

APPLICATIONVERSIONS

&INFRASTRUCTURE

VERSIONS

Page 37: Continuous Deployment with Amazon Web Services by Carlos Conde

CLOUDFORMATION TEMPLATE

Page 38: Continuous Deployment with Amazon Web Services by Carlos Conde

TEST ENVIRONMENTS

Page 39: Continuous Deployment with Amazon Web Services by Carlos Conde
Page 40: Continuous Deployment with Amazon Web Services by Carlos Conde

30,000 REQUESTS / SECOND

1 TB TRAFFIC / DAY

CASE STUDY

Page 41: Continuous Deployment with Amazon Web Services by Carlos Conde

“…AWS seemed to be the best solution available to allow a small, independent company to rapidly develop and test a completely new infrastructure,

and host it.

We also loved the flexibility that AWS allowed us, when spinning up smaller test environments, for

beta trials, QA, localization, and during development. The low initial cost was also

crucial.”

Alex Evans, CTO

Page 42: Continuous Deployment with Amazon Web Services by Carlos Conde

CONTINUOUS DEPLOYMENT

SMALL, FREQUENT CHANGES CONSTANTLY INTEGRATING INTO

PRODUCTION.

Page 43: Continuous Deployment with Amazon Web Services by Carlos Conde

11.6sMean time between

deployments (weekday)

1,079Max number of

deployments in a single hour

10,000Mean number of

hosts simultaneously

receiving a deployment

30,000Max number of

hosts simultaneously

receiving a deployment

DEPLOYMENTS AT AMAZON.COM

Page 44: Continuous Deployment with Amazon Web Services by Carlos Conde

SOFTWARE DEPLOY

≠PRODUCT LAUNCH

Page 45: Continuous Deployment with Amazon Web Services by Carlos Conde
Page 46: Continuous Deployment with Amazon Web Services by Carlos Conde

1.5 BILLION PAGE VIEWS

OCTOBER 2012

$83 MILLION IN TRANSACTIONS

4.2 MILLION ITEMS SOLD

CASE STUDY

Page 47: Continuous Deployment with Amazon Web Services by Carlos Conde

30 DEPLOYS PER DAY1 DEPLOY EVERY 20 MINUTES

Page 48: Continuous Deployment with Amazon Web Services by Carlos Conde

"Production is truly the only place you

can validate your code."

Page 49: Continuous Deployment with Amazon Web Services by Carlos Conde
Page 50: Continuous Deployment with Amazon Web Services by Carlos Conde
Page 51: Continuous Deployment with Amazon Web Services by Carlos Conde
Page 52: Continuous Deployment with Amazon Web Services by Carlos Conde
Page 53: Continuous Deployment with Amazon Web Services by Carlos Conde

HTTPS://GITHUB.COM/ETSY/DEPLOYINATOR

HTTP://CODEASCRAFT.ETSY.COM/

Page 54: Continuous Deployment with Amazon Web Services by Carlos Conde

CASE STUDY

Page 55: Continuous Deployment with Amazon Web Services by Carlos Conde
Page 56: Continuous Deployment with Amazon Web Services by Carlos Conde
Page 57: Continuous Deployment with Amazon Web Services by Carlos Conde
Page 58: Continuous Deployment with Amazon Web Services by Carlos Conde

HTTP://SORCERY.SMUGMUG.COM/

Page 59: Continuous Deployment with Amazon Web Services by Carlos Conde

AWS OPSWORKSINTEGRATED APPLICATION

MANAGEMENT

Page 60: Continuous Deployment with Amazon Web Services by Carlos Conde

MODEL, CONTROL AND AUTOMATEAT ANY SCALE AND COMPLEXITY

Page 61: Continuous Deployment with Amazon Web Services by Carlos Conde

A stack represents your application. One stack might be used for staging and another for production.

A layer defines how to setup and configure a set of instances and related resources such as volumes and software.

Tell OpsWorks where it can find your code and define any additional deployment tasks. OpsWorks will take care of deploying your app.

Scale your stack based on time or load. Clone your production stack to a different region. Automate workflows for common tasks.

Page 62: Continuous Deployment with Amazon Web Services by Carlos Conde

A stack represents your application. One stack might be used for staging and another for production.

A layer defines how to setup and configure a set of instances and related resources such as volumes and software.

Tell OpsWorks where it can find your code and define any additional deployment tasks. OpsWorks will take care of deploying your app.

Scale your stack based on time or load. Clone your production stack to a different region. Automate workflows for common tasks.

Page 63: Continuous Deployment with Amazon Web Services by Carlos Conde

A stack represents your application. One stack might be used for staging and another for production.

A layer defines how to setup and configure a set of instances and related resources such as volumes and software.

Tell OpsWorks where it can find your code and define any additional deployment tasks. OpsWorks will take care of deploying your app.

Scale your stack based on time or load. Clone your production stack to a different region. Automate workflows for common tasks.

Page 64: Continuous Deployment with Amazon Web Services by Carlos Conde

A stack represents your application. One stack might be used for staging and another for production.

A layer defines how to setup and configure a set of instances and related resources such as volumes and software.

Tell OpsWorks where it can find your code and define any additional deployment tasks. OpsWorks will take care of deploying your app.

Scale your stack based on time or load. Clone your production stack to a different region. Automate workflows for common tasks.

Page 65: Continuous Deployment with Amazon Web Services by Carlos Conde

AWS ElasticBeanstalk

AWSOpsWorks

AWSCloudFormation

Amazon EC2

Page 66: Continuous Deployment with Amazon Web Services by Carlos Conde

AWS ElasticBeanstalk

AWSOpsWorks

AWSCloudFormation

Amazon EC2

CONVENIENCE CONTROL

Page 67: Continuous Deployment with Amazon Web Services by Carlos Conde

AWS ElasticBeanstalk

AWSOpsWorks

AWSCloudFormation

Amazon EC2

CONVENIENCE CONTROL

HIGH-LEVEL DO IT YOURSELF

Page 68: Continuous Deployment with Amazon Web Services by Carlos Conde

FREE OF CHARGE

Page 69: Continuous Deployment with Amazon Web Services by Carlos Conde
Page 70: Continuous Deployment with Amazon Web Services by Carlos Conde

14 BILLION REQUESTS/MONTH

50 000 DATABASE UPDATES / SEC

NO CACHE

CASE STUDY

Page 71: Continuous Deployment with Amazon Web Services by Carlos Conde

“AWS OpsWorks gives us the tools we need to automate operations.

We can scale Monster World, one of the largest Facebook games, to millions of users without ever needing more than two backend developers”

Jesper Richter-ReichhelmHead of engineering – Wooga

Page 72: Continuous Deployment with Amazon Web Services by Carlos Conde

A / B TESTING

Page 73: Continuous Deployment with Amazon Web Services by Carlos Conde
Page 74: Continuous Deployment with Amazon Web Services by Carlos Conde
Page 75: Continuous Deployment with Amazon Web Services by Carlos Conde
Page 76: Continuous Deployment with Amazon Web Services by Carlos Conde
Page 77: Continuous Deployment with Amazon Web Services by Carlos Conde

LOAD TESTING

Page 78: Continuous Deployment with Amazon Web Services by Carlos Conde
Page 79: Continuous Deployment with Amazon Web Services by Carlos Conde
Page 80: Continuous Deployment with Amazon Web Services by Carlos Conde
Page 81: Continuous Deployment with Amazon Web Services by Carlos Conde
Page 82: Continuous Deployment with Amazon Web Services by Carlos Conde
Page 83: Continuous Deployment with Amazon Web Services by Carlos Conde

USING AMAZON EC2 TO SIMULATE

2.4 MILLION PLAYERS

Page 84: Continuous Deployment with Amazon Web Services by Carlos Conde

DATA-DRIVENARCHITECTURES

Page 85: Continuous Deployment with Amazon Web Services by Carlos Conde

METRICS @ETSY

Page 86: Continuous Deployment with Amazon Web Services by Carlos Conde

COST-ORIENTED ARCHITECTURES

Page 87: Continuous Deployment with Amazon Web Services by Carlos Conde

PHP+APACHE+VARNISH

NGINX+NODEJS

Page 88: Continuous Deployment with Amazon Web Services by Carlos Conde
Page 89: Continuous Deployment with Amazon Web Services by Carlos Conde

CONTINUOUS INTEGRATION

CONTINUOUS DEPLOYMENT

Page 90: Continuous Deployment with Amazon Web Services by Carlos Conde

CONTINUOUS DEPLOYMENT

=

CONTINUOUS EXPERIMENTATION

Page 91: Continuous Deployment with Amazon Web Services by Carlos Conde

CONTINUOUS DEPLOYMENT

=

CONTINUOUS IMPROVEMENT

Page 92: Continuous Deployment with Amazon Web Services by Carlos Conde

INNOVATE

Page 93: Continuous Deployment with Amazon Web Services by Carlos Conde

« Want to increase innovation? Lower the cost of failure »

Joi Ito

Page 94: Continuous Deployment with Amazon Web Services by Carlos Conde

SPEED AND AGILITY

Experiment Often

Fail quickly at a low cost

More Innovation

Experiment Infrequently

Failure is expensive

Less Innovation

“ON-PREMISE”

Page 95: Continuous Deployment with Amazon Web Services by Carlos Conde
Page 96: Continuous Deployment with Amazon Web Services by Carlos Conde
Page 97: Continuous Deployment with Amazon Web Services by Carlos Conde

ARCHITECTURE CENTERhttp://aws.amazon.com/architecture

TECHNICAL ARTICLEShttp://aws.amazon.com/articles

PODCASThttp://aws.amazon.com/podcast

BLOGhttp://aws.typepad.com

Page 98: Continuous Deployment with Amazon Web Services by Carlos Conde

CASE STUDY

Page 99: Continuous Deployment with Amazon Web Services by Carlos Conde

CASE STUDY

Page 100: Continuous Deployment with Amazon Web Services by Carlos Conde

CASE STUDY

Page 101: Continuous Deployment with Amazon Web Services by Carlos Conde

CASE STUDY


Recommended