Cloud-Powered Continuous Integration and Deployment Jinesh Varia - - PowerPoint PPT Presentation

cloud powered
SMART_READER_LITE
LIVE PREVIEW

Cloud-Powered Continuous Integration and Deployment Jinesh Varia - - PowerPoint PPT Presentation

Cloud-Powered Continuous Integration and Deployment Jinesh Varia jvaria@amazon.com @jinman About Me Jinesh Varia @jinman jvaria@amazon.com linkedin/in/jinman http://jinesh.varia.in Cloud Architectures Cloud Best Practices


slide-1
SLIDE 1

Cloud-Powered

Continuous Integration and Deployment

Jinesh Varia jvaria@amazon.com @jinman

slide-2
SLIDE 2

About Me Jinesh Varia

@jinman jvaria@amazon.com linkedin/in/jinman http://jinesh.varia.in

slide-3
SLIDE 3

“Cloud Architectures” “Cloud Best Practices aws” “Cloud Migration aws”

slide-4
SLIDE 4

Customer is the center of our universe

slide-5
SLIDE 5

Requirements gathering Development and Check In Test and QA Release

slide-6
SLIDE 6

Learning from customers

  • Requirements

gathering Development and Check In Test and QA Release

slide-7
SLIDE 7

Learning from customers

  • Requirements

gathering Development and Check In Test and QA Release

slide-8
SLIDE 8

Learning from customers

Requirements gathering Development and Check In Test and QA Release

Cycle Time

slide-9
SLIDE 9

Learning from customers

Requirements gathering Release

slide-10
SLIDE 10

Reduce the cycle time

Requirements gathering Release

slide-11
SLIDE 11

Learn faster

Requirements gathering Automation + Cloud Release

… while keeping your costs low

slide-12
SLIDE 12

Continuous Integration Continuous Deployment Continuous Optimization

Cloud-powered Continuous Delivery

slide-13
SLIDE 13

Continuous Integration

Cloud-powered Continuous Integration

Goal: to have a working state of the code at any given time Benefit: Fix bugs earlier when they are cheaper to fix Metric: New guy can check out and compile at first day at job

slide-14
SLIDE 14

Poka yo-ke (ポカヨケ)

slide-15
SLIDE 15

Martin Fowler Paul Duvall Jez Humble David Farley Matt Graham Michael Nygard ….. …..

slide-16
SLIDE 16
  • 1. Keep absolutely everything in version control
  • 2. Commit early and commit often
  • 3. Always check in to trunk and avoid branching
  • 4. Take responsibility if your check in breaks the build
  • 5. Automate the build, test, deploy process
  • 6. Be prepared to stop the mainline when/if build breaks
  • 7. Create a comprehensive automated test suite
  • 8. Only one way deploy and everybody uses that same way
  • 9. Be prepared to revert to the previous revision

10.Continuously improve collaboration and increase speed of feedback

slide-17
SLIDE 17

Testing and Deployment

Automate Everything

slide-18
SLIDE 18
slide-19
SLIDE 19

Application Containers - JBoss, Tomcat, IIS, Mongrel. NOTE: there are so many app containers, I'm not going to try to list all of them. Build Tools - Ant, AntContrib, NAnt, MSBuild, Buildr, Gant, Gradle, make, Maven, Rake Code Review - Crucible Code Insight - Fisheye Continuous Integration - Bamboo, Jenkins, AntHill Pro, Go, TeamCity, TFS 2010 Database - Hibernate, MySQL, Liquibase, Oracle, PostgreSQL, SQL Server, SimpleDB, SQL Azure, Ant, MongoDB Database Change Management - dbdeploy, Liquibase Data Center Configuration Automation - Capistrano, Cobbler, BMC Bladelogic, CFEngine, IBM Tivoli Provisioning Manager, Puppet, Chef, Bcfg2, AWS Cloud Formation, Windows Azure AppFabric NOTE: There are many names and overlap for this tool "category". Dependency Management - Ivy, Archiva, Nexus, Artifactory, Bundler Deployment Automation - Java Secure Channel, ControlTier, Altiris, Capistrano, Fabric, Func Information Sharing - Confluence, Google Apps Installer - InstallShield, IzPack Integrated Development Environment (IDE) - Eclipse, IDEA, Visual Studio Issue Tracking - Greenhopper, JIRA Multi-Type - rPath Passwords - PassPack, PasswordSafe Protected Configuration - ESCAPE, ConfigGen Project Management - JIRA, Pivotal Tracker, SmartSheet Provisioning - JEOS, BoxGrinder, CLIP, Eucalyptus, AppLogic Reporting/Documentation - Doxygen, Grand, GraphViz, JavaDoc, NDoc, SchemaSpy, UmlGraph Static Analysis - CheckStyle, Clover, Cobertura, FindBugs, FxCop, JavaNCSS, JDepend, PMD, Sonar, Simian Systems Monitoring - CloudKick, Nagios, Zabbix, Zenoss Testing AntUnit, Cucumber, DbUnit, webrat, easyb, Fitnesse, JMeter, JUnit, NBehave, SoapUI, Selenium, RSp ec,SauceLabs Version-Control System - SVN/Subversion, git, Perforce

Paul Duvall’s Blog

http://blog.stelligent.com/integrate-button/2011/03/list-of-software-tools-for-continuous-delivery-in-the-cloud.html

slide-20
SLIDE 20
slide-21
SLIDE 21

Discipline

slide-22
SLIDE 22

Version Control Developer <code> CI Server Build Slave Build Slave Build Slave

Distributed Builds

slide-23
SLIDE 23

EBS Root Volume EC2 Instance AMI EBS Snapshot EBS Volume EC2 Instance createImage() RunInstances() StopInstances() StartInstances() TerminateInstances()

Stop v/s Terminate

slide-24
SLIDE 24
slide-25
SLIDE 25
slide-26
SLIDE 26
  • !!!"#$$"
  • $%

%

& '

($

  • $$)

)

  • *

"#$$"

(Static data)

% + ,

slide-27
SLIDE 27
  • !!!"#$$"
  • $%

%

& '

($

  • $$)

)

  • *

"#$$"

(Static data)

% + ,

  • *
  • .)$
slide-28
SLIDE 28
  • *
  • .)$

/ 0$

slide-29
SLIDE 29

Version Control Version Control CI Server CI Server Package Builder Package Builder Deploy Server Deploy Server

Commit to Git/master

Dev Pull Code AMIs Send Build Report to Dev Stop everything if build failed Distributed Builds Run Tests in parallel Staging Env Test Env Code Config Tests Prod Env Push Config Install Create Repo CloudFormation Templates for Env Generate

Cloud Continuous Integration

slide-30
SLIDE 30
  • Know exactly which version (and configuration) is currently in

Test, Staging and Prod.

  • Fast deployments with pre-configured AMIs and CF templates
  • Easy to reproduce bugs by cloning the deployment into Test

Environment

  • Easy to spin up environments for ad-hoc requests from sales

and marketing

  • Poka-yoke design: Only one way to deploy

Cloud Continuous Integration

slide-31
SLIDE 31

Build Job does the following: build the artifact, publish it to Artifactory, build the package, publish the package to the repo. Then there is a follow on job that mounts a base OS image, installs the packages and then creates the final AMI.

Source: http://techblog.netflix.com/2011/08/building-with-legos.html

slide-32
SLIDE 32

“TestOps”

slide-33
SLIDE 33
  • Load Tests
  • Web Performance Tests
  • Usability Tests
  • Unit Tests
  • Regression Tests
  • Acceptance Tests
  • Functional Tests
  • Integration Tests
  • Capacity Tests
  • System Tests

Automated Testing in Parallel

slide-34
SLIDE 34

PROD

Very Large Server Storage

Bob Test

Very Small Server

Storage

Ted Test

Very Small Server

Storage

Mary Test

Very Small Server

Storage

7 AM 6 PM RDS Snapshots – Test something quickly

slide-35
SLIDE 35

Continuous Integration Continuous Deployment

Cloud-powered Continuous Deployment

slide-36
SLIDE 36

Cloud-powered Continuous Deployment

Goal: 1-click deploy and 1-click rollback Benefit: Release early, release often and iterate quickly Metric: fast feedback of your feature Continuous Deployment

slide-37
SLIDE 37
slide-38
SLIDE 38

Software Inventory is lost revenue

slide-39
SLIDE 39
slide-40
SLIDE 40

Mean Time between deployments (weekday) Max # of deployments in a single hour Mean # of hosts simultaneously receiving a deployment Max # of hosts simultaneously receiving a deployment

Amazon May Continuous Deployment Stats

(production hosts and environments only)

11.6

Seconds

1079 10000 30000

slide-41
SLIDE 41

The need for speed

slide-42
SLIDE 42

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

Joli Ito

slide-43
SLIDE 43

Break your problem into small batches Small deployments Incremental changes Easy rollbacks

slide-44
SLIDE 44

Virtual Images = Real Productivity Gain

Centos

Ruby Runtime

Your Code logger RubyGems memcached Rails Mongrel Apache Linux JEE Your Code Log4J Spring Hibernate Struts Tomcat Apache Windows .NET Your Code Log4Net Spring.NET nHibernate

ASP.NET MVC ASP.NET

IIS Centos

Ruby Runtime

Your Code logger RubyGems memcached Rails Mongrel Apache OS Framework Your Code Libraries Packages DB Caching MVC App Server Web Server Java Stack .NET Stack RoR stack

slide-45
SLIDE 45

Push to an AMI or Pull from an Instance

Inventory of AMIs Inventory of AMIs Golden AMI and Fetch binaries on boot Golden AMI and Fetch binaries on boot JeOS AMI and library of recipes (install scripts) JeOS AMI and library of recipes (install scripts) Linux JEE Your Code Log4J Spring Hibernate Struts Tomcat Apache

Linux JEE Your Code Log4J Spring Hibernate Struts Tomcat Apache

Amazon EC2

n u x L i n u x E J E E u r C
  • d
e Y
  • u
r C
  • d
e g 4 J L
  • g
4 J r i n g S p r i n g b e r n a t e H i b e r n a t e r u t s S t r u t s m c a t T
  • m
c a t a c h e A p a c h e n u x L i n u x E J E E u r C
  • d
e Y
  • u
r C
  • d
e g 4 J L
  • g
4 J r i n g S p r i n g b e r n a t e H i b e r n a t e r u t s S t r u t s m c a t T
  • m
c a t a c h e A p a c h e n u x L i n u x E J E E u r C
  • d
e Y
  • u
r C
  • d
e g 4 J L
  • g
4 J r i n g S p r i n g b e r n a t e H i b e r n a t e r u t s S t r u t s m c a t T
  • m
c a t a c h e A p a c h e n u x L i n u x E J E E u r C
  • d
e Y
  • u
r C
  • d
e g 4 J L
  • g
4 J r i n g S p r i n g b e r n a t e H i b e r n a t e r u t s S t r u t s m c a t T
  • m
c a t a c h e A p a c h e

Amazon EC2 Amazon EC2

Your Code

Amazon S3

Log4J Spring Struts Linux JEE Hibernate Tomcat Apache Linux JEE Your Code

Amazon S3

Hibernate Tomcat Log4J Spring Struts Apache u x L i n u x J E E e r n a t e H i b e r n a t e c a t T
  • m
c a t c h e A p a c h e u x L i n u x J E E e r n a t e H i b e r n a t e c a t T
  • m
c a t c h e A p a c h e u x L i n u x J E E e r n a t e H i b e r n a t e c a t T
  • m
c a t c h e A p a c h e Linux JEE Linux JEE

Puppet CHEF Puppet

Chef/puppet

scripts

Java AMI Java App Stack Java AMI JeOS AMI Fetch on boot Fetch on boot Fetch on boot Frozen Pizza Model Take N Bake Pizza Model Made to order Pizza Model

slide-46
SLIDE 46

Version Control Version Control CI Server CI Server Deploy Server Deploy Server

Commit to Git/master

Dev Pull Code Send Build Report to Dev Stop everything if build failed Build Run Tests Code Config Tests CloudFormation Templates

Package Builder Package Builder

Push Config Repo

Base AMIs

Instances Scripts Cloud-init

Cloud Continuous Deployment (Simple)

slide-47
SLIDE 47

"UserData": { "Fn::Base64": { "Fn::Join": [ "", [ "#!/bin/bash -ex\n", "yum -y install git-core\n", "yum -y install php-pear\n", "pear install Crypt_HMAC2-1.0.0\n", "pear install HTTP_Request-1.4.4\n", "pear channel-discover pear.amazonwebservices.com\n", "pear install aws/sdk\n",

slide-48
SLIDE 48

"AppDatabase": {"Type": "AWS::CloudFormation::Stack", "Metadata": { … }, "Properties": { "TemplateURL": { "Fn::Join": [ "/", [ { … }, "RDS_MySQL_55.template" ] ] },

slide-49
SLIDE 49

Version Control Version Control CI Server CI Server Deploy Server Deploy Server

Commit to Git/master

Dev Pull Code Send Build Report to Dev Stop everything if build failed Build Run Tests Code Config Tests CloudFormation Templates Chef Server

(config, package dependencies)

Puppet Master

(Manifest, config and mappings)

Chef S Puppet M Chef S Puppet M

Push Config New Code Reports

Base AMIs

Managed Instances Scripts recipes

Cloud Continuous Deployment

slide-50
SLIDE 50

AWS Region

Availability Zone 2 Availability Zone 3 Availability Zone 1

Deploy Server Deploy Server

Automate deployment to multiple Availability Zones (Fault Tolerant Zones)

slide-51
SLIDE 51

Blue Green Deployments

slide-52
SLIDE 52

Web Server Fleet

(Amazon EC2)

Database Fleet

(RDS or DB on EC2)

Load Balancing

(ELB)

v1.1 v1.1 v1.1 v1.1 v1.2 v1.2 v1.2 v1.2 Monitoring

(CloudWatch)

High Error Rate

slide-53
SLIDE 53

Auto Scaling Group (Min, Max # of instances, Availability Zones .. ) Health Check (Maintain Min # active…) Launch Configuration (AMIID, Instance type, UserData, Security Groups..) Scaling Trigger (Metric, Upper Threshold, Lower Threshold, Time interval …) Types of Scaling (Scale by Schedule, Scale by Policy) Alarm (Notification Email, SMS, SQS, HTTP) Availability Zones and Regions

Auto Scaling

slide-54
SLIDE 54

“Auto scaling” Web Server Fleet

(Amazon EC2)

Database Fleet

(RDS or DB on EC2)

Load Balancing

(ELB)

v1.1 v1.1 v1.1 v1.1 v1.2 v1.2 v1.2 v1.2 Auto scaling

Max instances Min instances Scaling Trigger Custom Metrics Upper Threshold Lower Threshold Increment by

slide-55
SLIDE 55

Dark Launches with feature flags

Deploy != Product Launch

slide-56
SLIDE 56

v1.1 v1.1 v1.1 v1.1 Web Server Fleet

(Amazon EC2)

Database Fleet

(RDS or DB on EC2)

Load Balancing

(ELB)

v1.1 v1.1 v1.1 v1.1 v1.2 v1.2 Happy Path v1.1 New feature Code Path v1.2 Feature = ON request

slide-57
SLIDE 57

Dialing up

A B

Control Treatment

slide-58
SLIDE 58

Web Server Fleet

(Amazon EC2)

Database Fleet

(RDS or DB on EC2)

Load Balancing

(ELB)

v1.1

v1.2

99% 1%

v1.1 v1.1 v1.1 v1.1 v1.1 v1.1 v1.1 v1.1 v1.1 v1.1 v1.1 v1.1 v1.1 v1.1 v1.1 v1.1 v1.1 v1.1 v1.1

v1.2

…..

v1.2 v1.2

A/B Testing Service

slide-59
SLIDE 59

Web Server Fleet

(Amazon EC2)

Database Fleet

(RDS or DB on EC2)

Load Balancing

(ELB)

v1.1

v1.2

v1.1 v1.1 v1.1 v1.1 v1.1 v1.1 v1.1 v1.1 v1.1 v1.1 v1.1 v1.1 v1.1 v1.1 v1.1 v1.1 v1.1 v1.1 v1.1

v1.2

…..

v1.2 v1.2

A/B Testing Service

90% 10%

v1.2 v1.2

slide-60
SLIDE 60

Web Server Fleet

(Amazon EC2)

Database Fleet

(RDS or DB on EC2)

Load Balancing

(ELB)

v1.1

v1.2

v1.1 v1.1 v1.1 v1.1 v1.1 v1.1 v1.1 v1.1 v1.1 v1.1 v1.1 v1.1 v1.1 v1.1 v1.1 v1.1 v1.1 v1.1

v1.2

…..

v1.2 v1.2

A/B Testing Service

v1.2 v1.2

70% 30%

v1.2 v1.2 v1.2 v1.2 v1.2 v1.2

slide-61
SLIDE 61

Web Server Fleet

(Amazon EC2)

Database Fleet

(RDS or DB on EC2)

Load Balancing

(ELB)

v1.1

v1.2

v1.1 v1.1 v1.1 v1.1 v1.1 v1.1 v1.1 v1.1 v1.1 v1.1 v1.1 v1.1 v1.1 v1.1

v1.2

…..

v1.2 v1.2

A/B Testing Service

v1.2 v1.2

70% 30%

v1.2 v1.2 v1.2 v1.2 v1.2 v1.2

Monitoring

(CloudWatch)

High Error Rate

Rollback

slide-62
SLIDE 62

Web Server Fleet

(Amazon EC2)

Database Fleet

(RDS or DB on EC2)

Load Balancing

(ELB)

v1.1 v1.1 v1.1 v1.1 v1.1 v1.1 v1.1 v1.1 v1.1 v1.1 v1.1 v1.1 v1.1 v1.1 v1.1 v1.1 v1.1 v1.1 v1.1

….. A/B Testing Service

90% 10%

v1.2 v1.2 v1.2 v1.2 v1.2 v1.2 v1.2 v1.2 v1.2 v1.2 v1.2 v1.2

Rollback

Dev, Test

slide-63
SLIDE 63

Web Server Fleet

(Amazon EC2)

Database Fleet

(RDS or DB on EC2)

Load Balancing

(ELB)

v1.1

v1.2

v1.1 v1.1 v1.1 v1.1 v1.1 v1.1 v1.1 v1.1 v1.1 v1.1 v1.1 v1.1 v1.1 v1.1 v1.1 v1.1 v1.1 v1.1

v1.2

…..

v1.2 v1.2

A/B Testing Service

v1.2 v1.2

70% 30%

v1.2 v1.2 v1.2 v1.2 v1.2 v1.2

slide-64
SLIDE 64

Web Server Fleet

(Amazon EC2)

Database Fleet

(RDS or DB on EC2)

Load Balancing

(ELB)

v1.1

v1.2

v1.1 v1.1 v1.1 v1.1 v1.1 v1.1 v1.1 v1.1 v1.1 v1.1 v1.1 v1.1 v1.1 v1.1

v1.2

…..

v1.2 v1.2

A/B Testing Service

v1.2 v1.2

50% 50%

v1.2 v1.2 v1.2 v1.2 v1.2 v1.2 v1.2 v1.2 v1.2 v1.2 v1.2 v1.2 v1.2 v1.2

slide-65
SLIDE 65

Web Server Fleet

(Amazon EC2)

Database Fleet

(RDS or DB on EC2)

Load Balancing

(ELB)

v1.1

v1.2

v1.1 v1.1 v1.1 v1.1 v1.1 v1.1 v1.1 v1.1 v1.1

v1.2

…..

v1.2 v1.2

A/B Testing Service

v1.2 v1.2

30% 70%

v1.2 v1.2 v1.2 v1.2 v1.2 v1.2 v1.2 v1.2 v1.2 v1.2 v1.2 v1.2 v1.2 v1.2

slide-66
SLIDE 66

Web Server Fleet

(Amazon EC2)

Database Fleet

(RDS or DB on EC2)

Load Balancing

(ELB)

v1.1

v1.2

v1.1 v1.1 v1.1 v1.1 v1.1 v1.1

v1.2

…..

v1.2 v1.2

A/B Testing Service

v1.2 v1.2

5% 95%

v1.2 v1.2 v1.2 v1.2 v1.2 v1.2 v1.2 v1.2 v1.2 v1.2 v1.2 v1.2 v1.2 v1.2 v1.2 v1.2 v1.2 v1.2

slide-67
SLIDE 67

Split Users by multiple experiments

A B

Control

Treatment 1

C D

Treatment 2 Treatment 3

slide-68
SLIDE 68

v1.1 v1.1 v1.1 v1.1 Web Server Fleet

(Amazon EC2)

Database Fleet

(RDS or DB on EC2)

Load Balancing

(ELB)

v1.1 v1.1 v1.1 v1.1 v1.2 v1.2

90% 5%

v1.2.1 v1.2.1

3%

v1.2.2 v1.2.2

2%

slide-69
SLIDE 69

Blue Green Deployments : RDBMS?

Mastering the Tradeoffs:

  • 1. Hot deployment techniques
  • 2. Simple Backup and Restore (RDS User-initiated Snapshots)
  • 3. Break huge jobs into series of multiple backward-compatible

tasks and decouple Application deployment and DB migration

slide-70
SLIDE 70

Timeline

V2.1

Example

ID NAME ADDRESS ORDERID (Char) 23234 Joe Doe xxx 333424 45322 Rob Smith xxxx 234 2342342 Jane Smith xxxx 23424 2342265 Anne Lee xxxx 2342425

slide-71
SLIDE 71

Timeline

DB V1.1

V2.1

6 Steps 1. Add a new column

ID NAME ADDRESS ORDERID ORDERID_INT 23234 Joe Doe xxx 333424 45322 Rob Smith xxxx 234 2342342 Jane Smith xxxx 23424 2342265 Anne Lee xxxx 2342425

Example

slide-72
SLIDE 72

Deployment Timeline

DB V1.1

V2.1

6 Steps 1. Add a new column 2. Change all software to write to both columns (old and new)

ID NAME ADDRESS ORDERID ORDERID_INT 23234 Joe Doe xxx 333424 45322 Rob Smith xxxx 234 2342342 Jane Smith xxxx 23424 2342265 Anne Lee xxxx 2342425 3632342 Mark Fox cxxxx 567890 567890

Example

slide-73
SLIDE 73

Deployment Timeline

DB V1.1

V2.1

6 Steps 1. Add a new column 2. Change all software to write to both columns (old and new) 3. Migrate the old column data to new column (for

  • lder rows)

ID NAME ADDRESS ORDERID ORDERID_INT 23234 Joe Doe xxx 333424 333424 45322 Rob Smith xxxx 234 234 2342342 Jane Smith xxxx 23424 23424 2342265 Anne Lee xxxx 2342425 2342425 3632342 Mark Fox cxxxx 567890 567890

DB V1.2

Example

slide-74
SLIDE 74

Deployment Timeline

DB V1.1

V2.1

6 Steps 1. Add a new column 2. Change all software to write to both columns (old and new) 3. Migrate the old column data to new column (for

  • lder rows)

4. Change all software to read from the new column

ID NAME ADDRESS ORDERID ORDERID_INT 23234 Joe Doe xxx 333424 333424 45322 Rob Smith xxxx 234 234 2342342 Jane Smith xxxx 23424 23424 2342265 Anne Lee xxxx 2342425 2342425 3632342 Mark Fox cxxxx 567890 567890

DB V1.2

V2.2

Example

slide-75
SLIDE 75

Deployment Timeline

DB V1.1

V2.1

6 Steps 1. Add a new column 2. Change all software to write to both columns (old and new) 3. Migrate the old column data to new column (for

  • lder rows)

4. Change all software to read from the new column 5. Change all the software to

  • nly write to the new

column

ID NAME ADDRESS ORDERID ORDERID_INT 23234 Joe Doe xxx 333424 333424 45322 Rob Smith xxxx 234 234 2342342 Jane Smith xxxx 23424 23424 2342265 Anne Lee xxxx 2342425 2342425 3632342 Mark Fox cxxxx 567890 567890 433453 Mark Lee cxxxxx 4352342422

DB V1.2

V2.2 V2.3

Example

slide-76
SLIDE 76

Deployment Timeline

DB V1.1

V2.1

6 Steps 1. Add a new column 2. Change all software to write to both columns (old and new) 3. Migrate the old column data to new column (for

  • lder rows)

4. Change all software to read from the new column 5. Change all the software to

  • nly write to the new

column 6. Drop the old column

ID NAME ADDRESS ORDERID_INT 23234 Joe Doe xxx 333424 45322 Rob Smith xxxx 234 2342342 Jane Smith xxxx 23424 2342265 Anne Lee xxxx 2342425 3632342 Mark Fox cxxxx 567890 433453 Mark Lee cxxxxx 4352342422

DB V1.2

V2.2 V2.3

DB V1.2

Example

slide-77
SLIDE 77

Increasing the speed of Iteration

slide-78
SLIDE 78

Break your problem into small batches Stream of small deployments Incremental changes Easy rollbacks

slide-79
SLIDE 79

Deploy new software quickly

Revert a bad change quickly

Cost of Mistakes

slide-80
SLIDE 80

Dynamism of the cloud makes its easy

slide-81
SLIDE 81

Small

Application Layer

Large CPU

Week 1

Large CPU

Week 1 Week 2 Small Week 1 Week 2 Week 3 Small Week 1 Week 2 Week 3 Week 4 Small Week 1 Week 2 Week 3 Week 4 Week 5 Week 1 Week 2 Week 3 Week 4 Week 5 Week 6

Give me Week1 data

Writes Reads

slide-82
SLIDE 82

Continuous Integration Continuous Deployment Continuous Optimization

Cloud-powered Continuous Delivery

slide-83
SLIDE 83

Continuous Optimization

Cloud-powered Continuous Optimization

Goal: Optimize on multiple dimensions : Cost, Performance, HA, Security, Response Time Benefit on optimize for cost - Immediate recurring cost savings Metric: understanding utilization

slide-84
SLIDE 84

When you turn off your cloud resources, you actually stop paying for them

slide-85
SLIDE 85

2 4 6 8 10 12 14 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 Load Hour

Daily CPU Load

25% Savings

By the time of day

slide-86
SLIDE 86

Availability Zone #2 Availability Zone #1

Auto Scaling group : App Tier Auto Scaling group : Web Tier

Elastic Load Balancer www.MyWebSite.com (dynamic data) media.MyWebSite.com (static data) Amazon Route 53 (DNS) Amazon EC2 Amazon RDS Amazon RDS Amazon S3 Amazon CloudFront

slide-87
SLIDE 87

1 5 9 13 17 21 25 29 33 37 41 45 49 Web Servers Week

during a year

50% Savings

slide-88
SLIDE 88

1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 RDS DB Servers Days of the Month

75% Savings

during a month

slide-89
SLIDE 89

Continuous optimization in your architecture and cloud infrastructure results in recurring savings in your next month’s bill

slide-90
SLIDE 90
  • Free Memory

Free CPU Free HDD At 1-min intervals

  • “You could save a bunch of money by switching

to a small instance, Click on CloudFormation Script to Save”

Cost-aware instances

slide-91
SLIDE 91

Choosing the right pricing model On-demand Instances Reserved Instances Spot Instances

slide-92
SLIDE 92

Usage Fee One-time Fee Total Savings Option 1

On-Demand only

$1493

  • $1493
  • Option 2

On-Demand + Reserved

$1008 $227 $1234

~20%

Option 3

All reserved

$528 $455 $983

~35%

Usage Fee One-time Fee Total

Savings Option 1

On-Demand only

$4479

  • $4479
  • Option 2

On-Demand + Reserved

$3024 $350 $3374

~30%

Option 3

All reserved

$1584 $700 $2284

~50%

Total Cost for 1 Year-term of 2 application servers Total Cost for 3 Year-term of the same 2 application servers

Steady State Usage

slide-93
SLIDE 93

50,000 100,000 150,000 200,000 250,000 300,000 350,000 400,000 450,000

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24

On Demand 1-year RI 3-year RI 2 3 1

1-year RI versus On Demand: cost savings realized after first 6 months of usage 3-year RI versus On Demand: cost savings realized after first 9 months of usage. 3-year RI versus 1-year RI: Net savings of 3-year RI versus 1-year RI begin by month 13 and continue throughout the RI term (additional 23 months of savings)

1 2 3

slide-94
SLIDE 94

Common Pattern: Reserved + On-Demand

slide-95
SLIDE 95

Elasticity is one of the

fundamental properties of the cloud that drives many of its economic benefits

slide-96
SLIDE 96

Continuous Integration Continuous Deployment Continuous Optimization

Cloud-powered Continuous Delivery

slide-97
SLIDE 97

Summary

Invest in areas where you get to learn from your customers quickly Automate everything else Cloud Continuous Integration Release early, Release often, Iterate Quickly Get fast feedback Distributed Builds, Automated Tests in Parallel Cloud Continuous Deployment Reduce the cost of mistakes Increase the speed of iteration Leverage cloud for Blue Green Deployments Cloud Continuous Optimization Keep Optimizing and further reduce costs of infrastructure

slide-98
SLIDE 98

Jinesh Varia

jvaria@amazon.com

Twitter: @jinman

Credits to Jon Jenkins, Paul Duvall and several engineers at Amazon

Thank you!

slide-99
SLIDE 99

http://aws.amazon.com

slide-100
SLIDE 100

You just lost customers

Optimize by Implementing Elasticity

Infrastructure Cost $ time

Large Capital Expenditure Opportunity Cost Wastage Opportunity Cost Wastage Predicted Demand Traditional Hardware Actual Demand Cloud Automated Elasticity

slide-101
SLIDE 101
  • !!!"#$$"
  • $%

%

& '

($

  • $$)

)

  • *

"#$$"

(Static data)

% + ,

slide-102
SLIDE 102
  • !

12# 12#+ "#$$ %&'

  • &'
  • &'

( ) * + )" ,

  • The New Cloud-Ready

Enterprise IT

./&