Upload
amazon-web-services
View
1.299
Download
1
Tags:
Embed Size (px)
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.
Citation preview
AWS Summit 2014
Continuous Integration & Deployment on AWS
Sébastien Stormacq Senior Technical Trainer, EMEA @sebsto
CONTINUOUS INTEGRATION
DEVELOPER
SOURCE CODE REPOSITORY
SOURCE CODE REPOSITORY
PROJECT MANAGEMENT SERVER
SOURCE CODE REPOSITORY
PROJECT MANAGEMENT SERVER
CONTINUOUS INTEGRATION SERVER
SOURCE CODE REPOSITORY
PROJECT MANAGEMENT SERVER
CONTINUOUS INTEGRATION SERVER
PICK TASKS
SOURCE CODE REPOSITORY
PROJECT MANAGEMENT SERVER
CONTINUOUS INTEGRATION SERVER
SUBMIT CODE
SOURCE CODE REPOSITORY
PROJECT MANAGEMENT SERVER
CONTINUOUS INTEGRATION SERVER
CODE FETCH
SOURCE CODE REPOSITORY
PROJECT MANAGEMENT SERVER
CONTINUOUS INTEGRATION SERVER
BUILD OUTPUT
SOURCE CODE REPOSITORY
PROJECT MANAGEMENT SERVER
CONTINUOUS INTEGRATION SERVER
DOCS
BINARIES & PACKAGES
SOURCE CODE REPOSITORY
DNS
CONTINUOUS INTEGRATION SERVER
PROJECT MANAGEMENT SERVER
BUILDS
PAIN POINTS • UNIT TESTS INCOMPLETE • MOCK MAINTENANCE • EXPENSIVE TEST ENVIRONMENT • TEST ENVIRONMENT ≠ PRODUCTION
ON-DEMAND
PAY AS YOU GO
ELASTIC
= PROGRAMMABLE PLATFORM
https://ec2.amazonaws.com/! ?Action=RunInstances! &ImageId=ami-4b814f22! &MaxCount=1 ! &MinCount=1! &SecurityGroup.1=httpssh! &KeyName=mykey! &<AUTHPARAMS>!
AWS REST API
…!ec2.runInstances(new RunInstancesRequest()! .withImageId("ami-4b814f22")! .withInstanceType("m1.small")! .withMinCount(1)! .withMaxCount(1)! .withKeyName("mykey")! .withSecurityGroups("httpssh"));!…!!
JAVA SDK
…!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
…!ec2.run_instances(! 'ami-4b814f22',! key_name='mykey',! instance_type='m1.small',! min_count=1,! max_count=1,! security_groups=['httpssh'])!…!!
PYTHON SDK
…!ec2.instances.create(! :image_id => 'ami-4b814f22',! :instance_type => 'm1.small',! :count => 1, ! :security_groups => 'httpssh', ! :key_pair => ec2.key_pairs['mykey'])!…!!
RUBY SDK
…!$ec2 -> run_instances(!!'ami-4b814f22', 1, 1, !!array(!! 'InstanceType' => 'm1.small',!! 'KeyName' => 'mykey', !! 'SecurityGroup' => 'httpssh')!
);!…!!
PHP SDK
…!var params = {! ImageId: 'ami-4b814f22',! InstanceType: 'm1.small',! MinCount: 1,! MaxCount: 1,! SecurityGroups: ['httpssh']!};!!ec2.runInstances(params, function(err, res) {! …!});!…!
JAVASCRIPT SDK
aws ec2 run-instances !! !--image-id ami-4b814f22!!--min-count 1!
!--max-count 1 !!--key-name mykey!!--security-groups httpssh!
UNIFIED CLI
New-EC2Instance! -ImageId ami-4b814f22! -MinCount 1! -MaxCount 1! -KeyName mykey! -SecurityGroupId sg-9cf9e5d9! -InstanceType m1.small!
POWERSHELL CLI
IF YOU CAN PROGRAM IT YOU CAN AUTOMATE IT
AWS CLOUDFORMATION
STACK-BASED DEPLOYMENT SERVICE
AWS CLOUDFORMATION TEMPLATE
{! "Description" : "Create a small instance",! "Resources" : {! "MyInstance" : {! "Type" : "AWS::EC2::Instance", ! "Properties" : {! "ImageId" : "ami-4b814f22",! "KeyName" : "mykey",! "InstanceType" : "m1.small",! "SecurityGroups" : ["httpssh"]! }! }! }!}!!!!
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
APPLICATION VERSIONS
+ INFRASTRUCTURE
VERSIONS
AWS CLOUDFORMATION
TEMPLATE
CONTINUOUS DEPLOYMENT
SMALL, FREQUENT CHANGES CONSTANTLY INTEGRATING INTO
PRODUCTION
KEY = ITERATION
ITERATION =
MODIFY THE SYSTEM TO BETTER MEET THE EXPECTATIONS OF
YOUR USERS
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
SOFTWARE DEPLOY ≠
PRODUCT LAUNCH
1.8 BILLION PAGE VIEWS $109 MILLION IN SALES 5.5 MILLION ITEMS SOLD
30 DEPLOYS PER DAY 1 DEPLOY EVERY 20 MINUTES
"Production is truly the only place you can validate your code."
RUN-TIME CONFIGURATION OF ACTIVE FEATURES
AWS OPSWORKS INTEGRATED APPLICATION
MANAGEMENT
14 BILLION REQUESTS/MONTH 50 000 DATABASE UPDATES/SEC
ENVIRONMENTS
SERVICES
STEPS
The Open Delivery platform
http://wercker.com/awssummit
Thanks for listening! (also, we’re hiring; [email protected])
wercker
sign up at
A / B TESTING
DATA-DRIVEN ARCHITECTURES
METRICS @ETSY
CONTINUOUS INTEGRATION
CONTINUOUS DEPLOYMENT
CONTINUOUS DEPLOYMENT
= CONTINUOUS
EXPERIMENTATION
CONTINUOUS DEPLOYMENT
= CONTINUOUS
IMPROVEMENT
« Want to increase innovation? Lower the cost of failure »
Joi Ito
SPEED AND AGILITY
Experiment Often
Fail quickly at
a low cost
More Innovation
Experiment Infrequently
Failure is expensive
Less
Innovation
“ON-PREMISES”
Thank You!
AWS EXPERT? GET CERTIFIED! aws.amazon.com/certification
Sébastien Stormacq Senior Technical Trainer, EMEA @sebsto
COFFEE BREAK
AWS EXPERT? GET CERTIFIED! aws.amazon.com/certification
#awssummit