Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Automating Software Deployments with AWS CodeDeploy


Published on

Learn how you can use AWS CodeDeploy to easily and quickly push your application updates.

Published in: Technology
  • Get access to 16,000 woodworking plans, Download 50 FREE Plans... 
    Are you sure you want to  Yes  No
    Your message goes here

Automating Software Deployments with AWS CodeDeploy

  1. 1. © 2015, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Nicolas Vautier September 20th, 2016 Automating Software Deployments with AWS CodeDeploy
  2. 2. What we’ll cover The value of Automation GitHub line of products AWS CodeDeploy GitHub integration
  3. 3. The value of Automation(It’s not just about laziness)
  4. 4. We’ve already defined DevOps … developers customers releasetestbuild plan monitor delivery pipeline feedback loop Software development lifecycle
  5. 5. The problem, and its solution The problem: Humans make mistakes! • Releasing Code and/or Infrastructure manually is wrought with human error – That brings inconsistency The solution: Automation! • It bring consistency of outcome (sometimes it even saves us time)
  6. 6. Setting up a delivery pipeline Testing Staging Production deploy deploy deploy Source Build release
  8. 8. AWS CodeDeploy – What is it? Managed Service to deploy code to a fleet of machines • Efficient • Highly Scalable • Reliable Agent-based: Can deploy to EC2 instances as well as on-premises instances Flexible: • Deploy any type of application • Re-use existing scripts & tools Integration with other parts of the developer toolchain
  9. 9. AWS CodeDeploy - How does it work?
  10. 10. AWS Code Deploy – Components Application: What you are deploying – A container for revisions Revision: A given version of your application Instance: Target instance for deployment Deployment Groups: Group of instances – A construct for environment segregation (Dev/QA/Prod, Blue/Green, A/B, etc.) AppSpec File: Describes actions that needs to be taken pre- or post-deployment Deployment: The action of deploying a new revision onto instances
  11. 11. AWS Code Deploy – Application • The Application is the highest level container • Revisions will be attached to the Application
  12. 12. AWS Code Deploy – Revisions Revisions are versions of your application They can be uploaded to: • Amazon S3 • GitHub Revisions are deployed onto Deployment Groups, which are groups of instance
  13. 13. • Verify your instance has an IAM instance profile and verify the permissions allows it to participate in AWS CodeDeploy deployments • Tag the instance - or make sure it’s in an Auto Scaling Group • Install the agent (can be automated) • Verify the agent is running AWS Code Deploy – Instance setup
  14. 14. AWS Code Deploy – Set up Deployment Groups Group instances by: • Auto Scaling Groups • EC2 Tags • On-Premise tags Deploy to Deployment Groups independently from each other Could be used for “DevOps” constructs: • Dev/QA/Prod/etc. • Blue/Green • A/B Testing • Etc.
  15. 15. AWS Code Deploy – Lifecycle Events AfterInstall ApplicationStart ValidateService ApplicationStop BeforeInstall Agent The agent goes through a series of steps before and after deployment These steps allow you to tightly control how your application is deployed For example, you may want to stop your application cleanly
  16. 16. AWS Code Deploy – AppSpec File version: 0.0 os: linux files: - source: / destination: /var/www/html/WordPress hooks: ApplicationStop: - location: helper_scripts/ BeforeInstall: - location: deploy_hooks/ - location: deploy_hooks/ AfterInstall: - location: deploy_hooks / timeout: 30 runas: root • AppSpec.yml sits in your application’s source directory structure • Allows you to defines the hooks you want to use.
  17. 17. AWS Code Deploy – Deployment Configuration One-at-a-time Half-at-a-time All-at-once Custom
  18. 18. AWS Code Deploy – Service Integrations – Now and Future Auto Scaling – Deploy revisions to an ASG Elastic Load Balancing (ELB) – Coordinate a Deployment to Instances behind an ELB. Amazon S3 – Pull any package for deployment from S3 AWS CodeCommit – Deploy Revisions from AWS CodeCommit repositories AWS CodePipeline – Fully automate your deployment with integration of AWS CodeDeploy and AWS CodePipeline AWS Lambda – Trigger CodeDeploy to release from AWS Lambda
  19. 19. AWS Code Deploy – Product Integrations
  20. 20. Demo Time!
  22. 22. Thank You!