t2 – continuous integration on aws

81
AWS Summit 2014 Continuous Integration & Deployment on AWS Sébastien Stormacq Senior Technical Trainer, EMEA @sebsto

Upload: amazon-web-services

Post on 15-Jan-2015

1.299 views

Category:

Technology


1 download

DESCRIPTION

With AWS, companies now have the ability to develop and run their applications with speed and flexibility like never before. Working with an infrastructure that can be 100% API driven enables businesses to use lean methodologies and realize these benefits. This in turn leads to greater success for those who make use of these practices. In this session we'll talk about some of the key concepts and design patterns for Continuous Deployment and Continuous Integration - two elements of lean development of applications and infrastructures.

TRANSCRIPT

Page 1: T2 – Continuous integration on aws

AWS Summit 2014

Continuous Integration & Deployment on AWS

Sébastien Stormacq Senior Technical Trainer, EMEA @sebsto

Page 2: T2 – Continuous integration on aws

CONTINUOUS INTEGRATION

Page 3: T2 – Continuous integration on aws

DEVELOPER

Page 4: T2 – Continuous integration on aws

SOURCE CODE REPOSITORY

Page 5: T2 – Continuous integration on aws

SOURCE CODE REPOSITORY

PROJECT MANAGEMENT SERVER

Page 6: T2 – Continuous integration on aws

SOURCE CODE REPOSITORY

PROJECT MANAGEMENT SERVER

CONTINUOUS INTEGRATION SERVER

Page 7: T2 – Continuous integration on aws

SOURCE CODE REPOSITORY

PROJECT MANAGEMENT SERVER

CONTINUOUS INTEGRATION SERVER

PICK TASKS

Page 8: T2 – Continuous integration on aws

SOURCE CODE REPOSITORY

PROJECT MANAGEMENT SERVER

CONTINUOUS INTEGRATION SERVER

SUBMIT CODE

Page 9: T2 – Continuous integration on aws

SOURCE CODE REPOSITORY

PROJECT MANAGEMENT SERVER

CONTINUOUS INTEGRATION SERVER

CODE FETCH

Page 10: T2 – Continuous integration on aws

SOURCE CODE REPOSITORY

PROJECT MANAGEMENT SERVER

CONTINUOUS INTEGRATION SERVER

BUILD OUTPUT

Page 11: T2 – Continuous integration on aws

SOURCE CODE REPOSITORY

PROJECT MANAGEMENT SERVER

CONTINUOUS INTEGRATION SERVER

DOCS

BINARIES & PACKAGES

Page 12: T2 – Continuous integration on aws

SOURCE CODE REPOSITORY

DNS

CONTINUOUS INTEGRATION SERVER

PROJECT MANAGEMENT SERVER

BUILDS

Page 13: T2 – Continuous integration on aws

PAIN POINTS •  UNIT TESTS INCOMPLETE •  MOCK MAINTENANCE •  EXPENSIVE TEST ENVIRONMENT •  TEST ENVIRONMENT ≠ PRODUCTION

Page 14: T2 – Continuous integration on aws

ON-DEMAND

PAY AS YOU GO

ELASTIC

Page 15: T2 – Continuous integration on aws
Page 16: T2 – Continuous integration on aws
Page 17: T2 – Continuous integration on aws

= PROGRAMMABLE PLATFORM

Page 18: T2 – Continuous integration on aws

https://ec2.amazonaws.com/! ?Action=RunInstances! &ImageId=ami-4b814f22! &MaxCount=1 ! &MinCount=1! &SecurityGroup.1=httpssh! &KeyName=mykey! &<AUTHPARAMS>!

AWS REST API

Page 19: T2 – Continuous integration on aws

…!ec2.runInstances(new RunInstancesRequest()! .withImageId("ami-4b814f22")! .withInstanceType("m1.small")! .withMinCount(1)! .withMaxCount(1)! .withKeyName("mykey")! .withSecurityGroups("httpssh"));!…!!

JAVA SDK

Page 20: T2 – Continuous integration on aws

…!var runInstanceRequest = new! RunInstancesRequest()! {! ImageId = "ami-4b814f22",! InstanceType = "m1.small",! MinCount = 1,! MaxCount = 1,! KeyName = "mykey"! };!runInstanceRequest.SecurityGroup.Add("httpssh");!ec2.RunInstances(runInstanceRequest);!…!!

.NET SDK

Page 21: T2 – Continuous integration on aws

…!ec2.run_instances(! 'ami-4b814f22',! key_name='mykey',! instance_type='m1.small',! min_count=1,! max_count=1,! security_groups=['httpssh'])!…!!

PYTHON SDK

Page 22: T2 – Continuous integration on aws

…!ec2.instances.create(! :image_id => 'ami-4b814f22',! :instance_type => 'm1.small',! :count => 1, ! :security_groups => 'httpssh', ! :key_pair => ec2.key_pairs['mykey'])!…!!

RUBY SDK

Page 23: T2 – Continuous integration on aws

…!$ec2 -> run_instances(!!'ami-4b814f22', 1, 1, !!array(!! 'InstanceType' => 'm1.small',!! 'KeyName' => 'mykey', !! 'SecurityGroup' => 'httpssh')!

);!…!!

PHP SDK

Page 24: T2 – Continuous integration on aws

…!var params = {! ImageId: 'ami-4b814f22',! InstanceType: 'm1.small',! MinCount: 1,! MaxCount: 1,! SecurityGroups: ['httpssh']!};!!ec2.runInstances(params, function(err, res) {! …!});!…!

JAVASCRIPT SDK

Page 25: T2 – Continuous integration on aws

aws ec2 run-instances !! !--image-id ami-4b814f22!!--min-count 1!

!--max-count 1 !!--key-name mykey!!--security-groups httpssh!

UNIFIED CLI

Page 26: T2 – Continuous integration on aws

New-EC2Instance! -ImageId ami-4b814f22! -MinCount 1! -MaxCount 1! -KeyName mykey! -SecurityGroupId sg-9cf9e5d9! -InstanceType m1.small!

POWERSHELL CLI

Page 27: T2 – Continuous integration on aws
Page 28: T2 – Continuous integration on aws

IF YOU CAN PROGRAM IT YOU CAN AUTOMATE IT

Page 29: T2 – Continuous integration on aws
Page 30: T2 – Continuous integration on aws
Page 31: T2 – Continuous integration on aws
Page 32: T2 – Continuous integration on aws
Page 33: T2 – Continuous integration on aws

AWS CLOUDFORMATION

STACK-BASED DEPLOYMENT SERVICE

Page 34: T2 – Continuous integration on aws

AWS CLOUDFORMATION TEMPLATE

Page 35: T2 – Continuous integration on aws

{! "Description" : "Create a small instance",! "Resources" : {! "MyInstance" : {! "Type" : "AWS::EC2::Instance", ! "Properties" : {! "ImageId" : "ami-4b814f22",! "KeyName" : "mykey",! "InstanceType" : "m1.small",! "SecurityGroups" : ["httpssh"]! }! }! }!}!!!!

Page 36: T2 – Continuous integration on aws

CLOUDFORMATION TEMPLATE

DECLARATIVE DEFINITION

Create it programmatically

KNOWN CONFIGURATION Store stack configuration in source control

PARAMETER DRIVEN

Dynamic and user-driven templates

COLLABORATION Share templates with ease as just files

Page 37: T2 – Continuous integration on aws
Page 38: T2 – Continuous integration on aws

APPLICATION VERSIONS

+ INFRASTRUCTURE

VERSIONS

Page 39: T2 – Continuous integration on aws

AWS CLOUDFORMATION

TEMPLATE

Page 40: T2 – Continuous integration on aws

CONTINUOUS DEPLOYMENT

SMALL, FREQUENT CHANGES CONSTANTLY INTEGRATING INTO

PRODUCTION

Page 41: T2 – Continuous integration on aws

KEY = ITERATION

Page 42: T2 – Continuous integration on aws

ITERATION =

MODIFY THE SYSTEM TO BETTER MEET THE EXPECTATIONS OF

YOUR USERS

Page 43: T2 – Continuous integration on aws

11.6s

Mean time between deployments (weekday)

1,079

Max number of deployments in a

single hour

10,000

Mean number of hosts

simultaneously receiving a deployment

30,000

Max number of hosts

simultaneously receiving a deployment

DEPLOYMENTS AT AMAZON.COM

Page 44: T2 – Continuous integration on aws

SOFTWARE DEPLOY ≠

PRODUCT LAUNCH

Page 45: T2 – Continuous integration on aws
Page 46: T2 – Continuous integration on aws

1.8 BILLION PAGE VIEWS $109 MILLION IN SALES 5.5 MILLION ITEMS SOLD

Page 47: T2 – Continuous integration on aws

30 DEPLOYS PER DAY 1 DEPLOY EVERY 20 MINUTES

Page 48: T2 – Continuous integration on aws

"Production is truly the only place you can validate your code."

Page 49: T2 – Continuous integration on aws

RUN-TIME CONFIGURATION OF ACTIVE FEATURES

Page 50: T2 – Continuous integration on aws

AWS OPSWORKS INTEGRATED APPLICATION

MANAGEMENT

Page 51: T2 – Continuous integration on aws
Page 52: T2 – Continuous integration on aws

14 BILLION REQUESTS/MONTH 50 000 DATABASE UPDATES/SEC

Page 53: T2 – Continuous integration on aws
Page 54: T2 – Continuous integration on aws
Page 55: T2 – Continuous integration on aws
Page 56: T2 – Continuous integration on aws
Page 57: T2 – Continuous integration on aws
Page 58: T2 – Continuous integration on aws
Page 59: T2 – Continuous integration on aws
Page 60: T2 – Continuous integration on aws
Page 61: T2 – Continuous integration on aws
Page 62: T2 – Continuous integration on aws
Page 63: T2 – Continuous integration on aws

ENVIRONMENTS

SERVICES

STEPS

The Open Delivery platform

Page 64: T2 – Continuous integration on aws
Page 65: T2 – Continuous integration on aws
Page 66: T2 – Continuous integration on aws
Page 67: T2 – Continuous integration on aws
Page 68: T2 – Continuous integration on aws
Page 69: T2 – Continuous integration on aws

http://wercker.com/awssummit

Thanks for listening! (also, we’re hiring; [email protected])

wercker

sign up at

Page 70: T2 – Continuous integration on aws

A / B TESTING

Page 71: T2 – Continuous integration on aws
Page 72: T2 – Continuous integration on aws
Page 73: T2 – Continuous integration on aws

DATA-DRIVEN ARCHITECTURES

Page 74: T2 – Continuous integration on aws

METRICS @ETSY

Page 75: T2 – Continuous integration on aws

CONTINUOUS INTEGRATION

CONTINUOUS DEPLOYMENT

Page 76: T2 – Continuous integration on aws

CONTINUOUS DEPLOYMENT

= CONTINUOUS

EXPERIMENTATION

Page 77: T2 – Continuous integration on aws

CONTINUOUS DEPLOYMENT

= CONTINUOUS

IMPROVEMENT

Page 78: T2 – Continuous integration on aws

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

Joi Ito

Page 79: T2 – Continuous integration on aws

SPEED AND AGILITY

Experiment Often

Fail quickly at

a low cost

More Innovation

Experiment Infrequently

Failure is expensive

Less

Innovation

“ON-PREMISES”

Page 80: T2 – Continuous integration on aws

Thank You!

AWS EXPERT? GET CERTIFIED! aws.amazon.com/certification

Sébastien Stormacq Senior Technical Trainer, EMEA @sebsto

Page 81: T2 – Continuous integration on aws

COFFEE BREAK

AWS EXPERT? GET CERTIFIED! aws.amazon.com/certification

#awssummit