Se ha denunciado esta presentación.
Utilizamos tu perfil de LinkedIn y tus datos de actividad para personalizar los anuncios y mostrarte publicidad más relevante. Puedes cambiar tus preferencias de publicidad en cualquier momento.

DevOps on AWS

1.190 visualizaciones

Publicado el

Software release cycles are now measured in days instead of months. Cutting edge companies are continuously delivering high-quality software at a fast pace. In this session, we will cover how you can begin your DevOps journey by sharing best practices and tools used by the engineering teams at Amazon. We will showcase how you can accelerate developer productivity by implementing continuous Integration and delivery workflows. We will also cover an introduction to AWS CodeStar, AWS CodeCommit, AWS CodeBuild, AWS CodePipeline, AWS CodeDeploy, AWS Cloud9, and AWS X-Ray the services inspired by Amazon's internal developer tools and DevOps practice.
Level: 200

Speaker: Nick Brandaleone - Solutions Architect, AWS

  • Inicia sesión para ver los comentarios

DevOps on AWS

  1. 1. © 2015, Amazon Web Services, Inc. or its Affiliates. All rights reserved. September 2018 DevOps on AWS Building Systems to Deliver Faster Nick Brandaleone
  2. 2. https://secure.flickr.com/photos/mgifford/4525333972 Why are we here today?
  3. 3. What we'll cover What is DevOps? The Amazon DevOps story AWS Code Services AWS DevOps Portfolio
  4. 4. Software moves faster today
  5. 5. Old vs New
  6. 6. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. Why does DevOps matter? 5xLower change failure rate 440xFaster from commit to deploy 46xMore frequent deployments 44%More time spent on new features and code Source: Puppet 2017 State of DevOps Report
  7. 7. What is DevOps?
  8. 8. What is DevOps? • Cultural philosophies • Practices • Tools
  9. 9. DevOps Culture • Dev & Ops coming together • No more “silos” • Shared responsibility • Ownership • Visibility and communication
  10. 10. What is continuous integration? 1. Developers regularly check in code to a shared, central repository 2. Automated builds run using the shared code base 3. Tests are run against the code base giving feedback to the developers Develop BuildTest
  11. 11. What is continuous integration? 1. Developers regularly check in code to a shared, central repository 2. Automated builds run using the shared code base 3. Tests are run against the code base giving feedback to the developers Develop BuildTest
  12. 12. What is continuous integration? 1. Developers regularly check in code to a shared, central repository 2. Automated builds run using the shared code base 3. Tests are run against the code base giving feedback to the developers Develop BuildTest
  13. 13. What is continuous delivery (CD)?
  14. 14. What is continuous delivery? Develop BuildTest Develop Build Test Deploy Test Release
  15. 15. What is continuous delivery? 1. Successful builds are automatically deployed to Staging and Pre-Prod 2. Automated and Manual exploratory tests are completed on each tier 3. Approval needed for release to Production Develop Build Test Deploy Test Release
  16. 16. What is continuous delivery? 1. Successful builds are automatically deployed to Staging and Pre-Prod 2. Automated and Manual exploratory tests are completed on each tier 3. Approval needed for release to Production Develop Build Test Deploy Test Release
  17. 17. What is continuous delivery? 1. Successful builds are automatically deployed to Staging and Pre-Prod 2. Automated and Manual exploratory tests are completed on each tier 3. Approval needed for release to Production Develop Build Test Deploy Test Release
  18. 18. DevOps Practices • Continuous Integration • Continuous Delivery & Deployment
  19. 19. DevOps Practices • Microservices • Moving away from “monolithic” application architecture to many individual services
  20. 20. DevOps Practices • Infrastructure as Code • Model your AWS resources using code
  21. 21. DevOps Practices • Monitoring and Logging • Track and analyze metrics and logs • Understand real-time performance of infrastructure and application
  22. 22. Reliability Benefits of DevOps Speed Scale Rapid DeliveryImproved Collaboration Security
  23. 23. A look back at development at Amazon.. https://secure.flickr.com/photos/pixelthing/15806918992/
  24. 24. https://www.flickr.com/photos/treehouse1977/3687758531
  25. 25. 2001 Development transformation at Amazon: 2001-2009 2009 monolithic application + teams microservices + 2 pizza teams
  26. 26. Amazon.com June, 2009
  27. 27. Amazon.com July, 2018
  28. 28. = 60 million deployments a year = 1.9 deployments / second Thousands of teams + Microservices architectures + Multiple environments + Continuous delivery?
  29. 29. But how do you maintain quality, consistency, security and reliability in a world moving so fast?
  30. 30. In Amazon, we prefer to distribute capabilities into teams rather than having a centralized team with that capability
  31. 31. First, we have practices that focus on enabling each team to have that capability, and we provide access to experts who ensure that teams raise the bar on the standards they need to meet.
  32. 32. Second, we put in place mechanisms that carry out automated checks to ensure standards are being met.
  33. 33. “Good intentions never work, you need good mechanisms to make anything happen” - Jeff Bezos. This means replacing humans best efforts with mechanisms (often automated) that check for compliance with rules or process.
  34. 34. To help new teams gain these capabilities or existing teams to raise their bar, we enable access to a virtual community of principal engineers who can review their designs and help them understand what AWS best practices are. The principal engineering community works to make best practices visible and accessible.
  35. 35. This works as teams have end-to-end ownership, but also as teams are encouraged to embrace failures, and share the learnings.
  36. 36. Weekly Ops Meeting For more than 10 years, AWS has run a regular operations review meeting. It includes over 100 service owners and engineers and runs for 2 hours every Wednesday. • Share successes and failings • Review service metrics • Identify new best practices • Minimize time on team-specific items
  37. 37. “Invention requires two things: the ability to try a lot of experiments, and not having to live with the collateral damage of failed experiments” Andy Jassy, CEO, Amazon Web Services
  38. 38. … experiment patiently, accept failures, plant seeds, protect saplings, and double down when you see customer delight. A customer-obsessed culture best creates the conditions where all of that can happen.
  39. 39. Things went much better under this model and teams were releasing faster than ever, but we felt that we could still improve.
  40. 40. In 2009, we ran a study to find out where inefficiencies might still exist
  41. 41. We were just waiting. WaitWrite Code WaitBuild Code WaitDeploy to Test Deploy to Prod
  42. 42. We were just waiting. WaitWrite Code WaitBuild Code WaitDeploy to Test Deploy to Prod Mins Days Mins Days Mins Days Mins
  43. 43. We were just waiting. WaitWrite Code WaitBuild Code WaitDeploy to Test Deploy to Prod Weeks Mins Days Mins Days Mins Days Mins
  44. 44. We were just waiting. WaitWrite Code WaitBuild Code WaitDeploy to Test Deploy to Prod Weeks Mins Days Mins Days Mins Days Mins
  45. 45. We built tools to automate our software release process https://secure.flickr.com/photos/lindseygee/5894617854/
  46. 46. Automated actions and transitions; from check- in to production Development benefits: • Faster • Safer • Simplification & standardization • Visualization of the process Pipelines
  47. 47. This has continued to work out really well: Every year at Amazon, we perform a survey of all our software developers. The 2014 results found only one development tool/service could be correlated statistically with happier developers: Our pipelines service! continuous delivery == happier developers!
  48. 48. Where do you ?
  49. 49. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. • Integration tests with other systems • Load testing • UI tests • Penetration testing Five major phases of release and monitor Source Build Test Deploy Monitor • Check-in source code such as .java files. • Peer review new code • Compile code • Unit tests • Style checkers • Code metrics • Create container images • Deployment to production environments • Monitor code in production to quickly detect unusual activity or errors
  50. 50. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. AWS Code Services AWS CodeBuild + Third Party Software Release Steps: AWS CodeCommit AWS CodeBuild AWS CodeDeploy AWS CodePipeline AWS CodeStar Source Build Test Deploy Monitor AWS X-Ray Amazon CloudWatch
  51. 51. Amazon CloudWatch AWS CloudTrail Monitoring & Logging AWS DevOps Portfolio AWS CodeCommit AWS CodeDeploy AWS CodePipeline Software Development and Continuous Delivery Toolchain AWS CloudFormation AWS OpsWorks AWS Config Infrastructure as Code AWS CodeBuild AWS CodeStar AWS OpsWorks for Chef Automate AWS X-Ray
  52. 52. Secure, scalable, and managed Git source control Use standard Git tools Scalability, availability, and durability of Amazon S3 Encryption at rest with customer-specific keys No repo size limit Post commit hooks to call out to SNS/Lambda AWS CodeCommit
  53. 53. Source control in the cloud Secure Fully managed High availability Store anything
  54. 54. AWS CodeCommit git pull/push CodeCommit Git objects in Amazon S3 Git index in Amazon DynamoDB Encryption key in AWS KMS SSH or HTTPS
  55. 55. $ git clone https://git-codecommit.us-east-1.amazonaws.com/v1/repos/aws-cli Cloning into 'aws-cli'... Receiving objects: 100% (16032/16032), 5.55 MiB | 1.25 MiB/s, done. Resolving deltas: 100% (9900/9900), done. Checking connectivity... done. $ nano README.rst $ git commit -am 'updated README' [master 4fa0318] updated README 1 file changed, 1 insertion(+) $ git push Counting objects: 3, done. Delta compression using up to 4 threads. Compressing objects: 100% (3/3), done. Writing objects: 100% (3/3), 297 bytes | 0 bytes/s, done. Total 3 (delta 2), reused 0 (delta 0) remote: To https://git-codecommit.us-east-1.amazonaws.com/v1/repos/aws-cli 4dacd6d..4fa0318 master -> master Same Git experience
  56. 56. Build & test your application https://secure.flickr.com/photos/spenceyc/7481166880
  57. 57. Fully managed build service that compiles source code, runs tests, and produces software packages Scales continuously and processes multiple builds concurrently You can provide custom build environments suited to your needs via Docker images Only pay by the minute for the compute resources you use Launched with CodePipeline and Jenkins integration AWS CodeBuild
  58. 58. How does it work? 1. Downloads source code 2. Executes commands configured in the buildspec in temporary compute containers (created fresh on every build) 3. Streams the build output to the service console and CloudWatch logs 4. Uploads the generated artifact to an S3 bucket
  59. 59. buildspec.yml Example version: 0.1 environment_variables: plaintext: JAVA_HOME: "/usr/lib/jvm/java-8-openjdk-amd64" phases: install: commands: - apt-get update -y - apt-get install -y maven pre_build: commands: - echo Nothing to do in the pre_build phase... build: commands: - echo Build started on `date` - mvn install post_build: commands: - echo Build completed on `date` artifacts: type: zip files: - target/messageUtil-1.0.jar discard-paths: yes • Variables to be used by phases of build • Examples for what you can do in the phases of a build: • You can install packages or run commands to prepare your environment in ”install”. • Run syntax checking, commands in “pre_build”. • Execute your build tool/command in “build” • Test your app further or ship a container image to a repository in post_build • Create and store an artifact in S3
  60. 60. Deploying your applications https://secure.flickr.com/photos/simononly/15386966677
  61. 61. Automates code deployments to any instance Handles the complexity of updating your applications Avoid downtime during application deployment Rollback automatically if failure detected Deploy to Amazon EC2 or on-premises servers, in any language and on any operating system. Or Lambda functions! Rolling Deployment, Blue-Green or Canary AWS CodeDeploy
  62. 62. v2 v2 v2 v2 v2 v2 one at a time half at a time all at once v2 v2 v2 v1 v1 v1 v2 v1 v1 v1 v1 v1 Agent Agent Dev Deployment group OR Prod Deployment group Agent AgentAgent Agent Agent Agent Choose Deployment Speed and Group
  63. 63. Orchestrating build and deploy with a pipeline https://www.flickr.com/photos/seattlemunicipalarchives/12504672623/
  64. 64. Continuous delivery service for fast and reliable application updates Model and visualize your software release process Builds, tests, and deploys your code every time there is a code change Integrates with third-party tools and AWS AWS CodePipeline
  65. 65. Source Source GitHub Build CodeBuild AWS CodeBuild Deploy JavaApp Elastic Beanstalk Pipeline Stage Action Transition CodePipeline MyApplication
  66. 66. Build CodeBuild AWS CodeBuild NotifyDevelopers Lambda Parallel actions Source Source GitHub CodePipeline MyApplication Deploy JavaApp Elastic Beanstalk
  67. 67. Build CodeBuild AWS CodeBuild NotifyDevelopers Lambda TestAPI Runscope Sequential actions Deploy JavaApp Elastic Beanstalk Source Source GitHub CodePipeline MyApplication
  68. 68. Build CodeBuild AWS CodeBuild Staging-Deploy JavaApp Elastic Beanstalk Prod-Deploy JavaApp Elastic Beanstalk QATeamReview Manual Approval Manual Approvals Review CodePipeline MyApplication
  69. 69. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. AWS Cloud9 Cloud-based integrated development environment (IDE) Let’s you write, run, and debug your code with just a browser Share your environment with your team to pair-program in real-time Direct terminal access to AWS Provides great serverless experience: enables local testing and preconfigures the development environment with all SDKs, libraries, and plug-ins
  70. 70. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. Fully Featured Editor
  71. 71. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. AWS CodeStar • Quickly develop, build and deploy applications on AWS • Start developing on AWS in minutes • Work across your team, securely • Manage software delivery easily • Choose from a variety of project templates
  72. 72. AWS X-Ray
  73. 73. How X-Ray Service Works
  74. 74. X-Ray elements
  75. 75. ? https://secure.flickr.com/photos/dullhunk/202872717/
  76. 76. THANK YOU
  77. 77. SF Loft CI/CD Workshop https://github.com/awslabs/aws-devops-essential/

×