T2 – Continuous integration on aws

1,939 views
1,596 views

Published on

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.

Published in: Technology, Business

T2 – Continuous integration on aws

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

×