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.
© 2015, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Dean Samuels, Head of Solutions Architect, AWS –...
What to expect in this session :
Evolution of DevOps
What is DevOps?
AWS Tools for Accelerated software delivery
using CI/...
Software moves faster today
Software creation and distribution is
easier and faster than ever:
• Startups can now take on ...
Monolithic Application and Teams
Agile
- Iterative development
- Sprints, Stories, Feedback
- Velocity
Agile Software Development
Business
Agility
Business...
?
Developers Operations
End-Users
Code
DevOps
- IT Automation
- Continuous Integration
- Continuous Deployment
Co-evolution of Agile and DevOps software developm...
DevOps
Cultures
Tools
Practices
Practices
Continuous IntegrationContinuous Delivery
Microservices
Infrastructure as Code Monitoring and Logging Communicat...
• code building,
• code coverage,
• unit testing,
• packaging, and
• deployment
DevOps Practices vary with task
• provisio...
DevOps tools stack on AWS
Source Build Test Deploy Provision Monitor
CodeCommit CodeBuild
CodeDeploy
CodePipeline
Cloud
Fo...
Availability Zone BAvailability Zone A
RDS instance
standby
(Multi-AZ)
Public subnet
EC2 instances
security group
Web Serv...
Region
DEV STAGING PRODUCTION
v1
v1 v1 v1 v1
v2
v2 v2 v2 v2
Application Development
• code building,
• unit testing,
• packaging, and
• deployment
• Integration
tests with
other systems
• Load testing
• UI tests
• Penetration
testing
Release processes have four major p...
CONTINUOUS DELIVERY
CONTINUOUS INTEGRATION
Release processes levels
Source Build Test Production
CONTINUOUS DEPLOYMENT
V2
...
AWS Code* services
Source Build Test Production
Software Release Phases :
AWS
CodePipeline
AWS
CodeBuild
AWS
CodeDeploy
AW...
AWS CodeCommit
Secure, scalable, and managed Git source control
Use standard Git tools
No repository size limit
Scalabilit...
AWS CodeBuild
Fully managed build service that compiles source code,
runs test, and produces software packages
Scales cont...
Build Specification File
“buildspec.yml”
• Collection of build commands and settings,
• In YAML format,
• Phases :
• insta...
version: 0.1
environment_variables:
plaintext:
JAVA_HOME: "/usr/lib/jvm/java-8-openjdk-amd64”
phases:
build:
commands:
- e...
Testing your code
Testing is both a science and an art form!
Goals for testing your code:
• Confirm desired functionality
...
Service and release phase corresponding to test
UI
Service
Unit
BuildTest
AWS
CodeBuild
Third-party
tooling
AWS CodeDeploy
Automates code deployments to any instance
• In-place
• Green-Blue
Handles the complexity of updating your ...
Application Specification Files
“appspec.yml”
• Defines lifecycle event hooks that allow you
to run scripts on an instance...
Sample appspec.yml
version: 0.0
os: linux
files:
- source: /
destination: /var/www/html
permissions:
- object: /var/www/ht...
We have a strong partner list, and it’s growing
AWS Code* services
Source Build Test Production
Software Release Phases :
AWS
CodeBuild
AWS
CodeDeploy
AWS
CodeCommit
Thir...
AWS Code* services
Source Build Test Production
Software Release Phases : AWS
CodePipeline
AWS
CodeBuild
AWS
CodeDeploy
AW...
AWS CodePipeline
Continuous delivery service for fast and reliable
application updates
Model and visualize your software r...
Stage
Transition
Transition
Action
Action
Action
Build
BuildCode
CodeCommit
NotifyDevelopers
Lambda
Parallel actions
Build...
AWS CodePipeline Integrations
Source Build Test Deploy
AWS CodeBuild AWS CodeDeployAWS CodeCommit
Amazon S3
AWS Elastic
Be...
CodePipeline integrations (contd.)
Approval Invoke Logic Management
Amazon Simple
Notification Services
(SNS)
Amazon
Lambd...
Demo
AWS Code* services
Source Build Test Production
Software Release Phases :
AWS
CodePipeline
AWS
CodeBuild
AWS
CodeDeploy
AW...
Infrastructure Management
• provisioning,
• configuration,
• orchestration, and
• deployment
Create templates of your infrastructure
Write templates in JSON or YAML
CloudFormation provisions AWS resources
based on d...
• JSON/YAML format template
• Presents template to CloudFormation Service
• CloudFormation translates that to API request
...
Infrastructure as Code
• Network, Servers, Storage etc.
are just part of your service.
• Single source of truth to deploy
...
Region
DEV STAGING PRODUCTION
v1
v1 v1 v1 v1
v2
v2 v2 v2 v2
CI/CD
AWS
CloudFormation
App
Developers
AWS
CodePipeline
Dev
Staging
Prod
Infrastructure as Code
Template
AWS
CodeCommit
A...
CI/CD
AWS
CloudFormation
App
Developers
AWS
CodePipeline
Dev
Staging
Prod
Infrastructure as Code
Template
AWS
CodeCommit
A...
Code* tips and tricks
• All Code* products can (and should) be provisioned and managed
with AWS CloudFormation!
• (It’s li...
General best practices used by Amazon developers
• CI/CD is a MUST!
• Commit frequently
• Builds on every commit
• Build o...
Next Steps
• AWS Free Tier - start today!
• AWS for DevOps Walkthrough documentation -
https://docs.aws.amazon.com/devops/...
aws.amazon.com/devops
AWS DevOps Blog
Thank you!
Happy deploying!
DevOps on AWS - Accelerating Software Delivery
DevOps on AWS - Accelerating Software Delivery
DevOps on AWS - Accelerating Software Delivery
DevOps on AWS - Accelerating Software Delivery
DevOps on AWS - Accelerating Software Delivery
Upcoming SlideShare
Loading in …5
×

DevOps on AWS - Accelerating Software Delivery

974 views

Published on

Today’s cutting edge companies have software release cycles measured in days instead of months. This agility is enabled by the DevOps practice of continuous delivery, which automates building, testing, and deploying all code changes. This automation helps you catch bugs sooner and accelerates developer productivity. In this session, we’ll share the processes followed by Amazon engineers and discuss how you can bring them to your company by using AWS CodePipeline and AWS CodeDeploy, services inspired by Amazon's internal developer tools and DevOps culture.

Published in: Technology
  • Hello! Get Your Professional Job-Winning Resume Here - Check our website! https://vk.cc/818RFv
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

DevOps on AWS - Accelerating Software Delivery

  1. 1. © 2015, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Dean Samuels, Head of Solutions Architect, AWS – Hong Kong & Taiwan 21st June 2017 DevOps on Amazon Web Services Managed Services for CI/CD on Cloud
  2. 2. What to expect in this session : Evolution of DevOps What is DevOps? AWS Tools for Accelerated software delivery using CI/CD and Infrastructure as Code DEV OPS
  3. 3. Software moves faster today Software creation and distribution is easier and faster than ever: • Startups can now take on giants with little to no funding ahead of time • Getting your software into the hands of millions is a download away • Your ability to move fast is paramount to your ability to fight off disruption
  4. 4. Monolithic Application and Teams
  5. 5. Agile - Iterative development - Sprints, Stories, Feedback - Velocity Agile Software Development Business Agility Business Case Requirements Use Case Features Plan Go to Market Design Code Refactor Unit Test Bug Fix Deploy Provision Configure Orchestrate Deploy Report Monitor Business Developers (application) IT operations (infrastructure)
  6. 6. ? Developers Operations End-Users Code
  7. 7. DevOps - IT Automation - Continuous Integration - Continuous Deployment Co-evolution of Agile and DevOps software development IT Agility Business Agility Agile - Iterative development - Sprints, Stories, Feedback - Velocity Business Case Requirements Use Case Features Plan Go to Market Design Code Refactor Unit Test Bug Fix Deploy Provision Configure Orchestrate Deploy Report Monitor Business Developers (application) IT operations (infrastructure)
  8. 8. DevOps Cultures Tools Practices
  9. 9. Practices Continuous IntegrationContinuous Delivery Microservices Infrastructure as Code Monitoring and Logging Communication and Collaboration
  10. 10. • code building, • code coverage, • unit testing, • packaging, and • deployment DevOps Practices vary with task • provisioning, • configuration, • orchestration, and • deployment Application Development Infrastructure Management Version Management Deployment Roll Forward TestingRoll Back underlying principles remain the same :
  11. 11. DevOps tools stack on AWS Source Build Test Deploy Provision Monitor CodeCommit CodeBuild CodeDeploy CodePipeline Cloud Formation Cloud Watch Elastic Beanstalk OpsWorks EC2 Container Service (ECS) X-ray
  12. 12. Availability Zone BAvailability Zone A RDS instance standby (Multi-AZ) Public subnet EC2 instances security group Web Server With Multi-AZ Autoscaling Public subnet RDS DB instance Private subnetPrivate subnet Synchronous replication EC2 instances Elastic Load Balancing Auto Scaling Region v1 v1
  13. 13. Region DEV STAGING PRODUCTION v1 v1 v1 v1 v1 v2 v2 v2 v2 v2
  14. 14. Application Development • code building, • unit testing, • packaging, and • deployment
  15. 15. • Integration tests with other systems • Load testing • UI tests • Penetration testing Release processes have four major phases Source Build Test Production • Check-in source code • Peer review new code • Version control • Compile code • Unit tests • Style checkers • Code metrics • Create container images • Deployment to production environments
  16. 16. CONTINUOUS DELIVERY CONTINUOUS INTEGRATION Release processes levels Source Build Test Production CONTINUOUS DEPLOYMENT V2 Approve Deploy Automatic Deploy
  17. 17. AWS Code* services Source Build Test Production Software Release Phases : AWS CodePipeline AWS CodeBuild AWS CodeDeploy AWS CodeCommit Third-party tooling
  18. 18. AWS CodeCommit Secure, scalable, and managed Git source control Use standard Git tools No repository size limit Scalability, availability, and durability of Amazon S3 Post commit hooks to call out to AWS Lambda/ Amazon Simple Notification Service(SNS) Encryption at rest with customer-specific keys
  19. 19. AWS CodeBuild Fully managed build service that compiles source code, runs test, 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
  20. 20. Build Specification File “buildspec.yml” • Collection of build commands and settings, • In YAML format, • Phases : • install • pre_build • build • post_build
  21. 21. version: 0.1 environment_variables: plaintext: JAVA_HOME: "/usr/lib/jvm/java-8-openjdk-amd64” phases: build: commands: - echo Build started - mvn test post_build: commands: - echo Build completed - mvn package artifacts: files: - target/my-web-app.war Set a custom environment variable with the key of JAVA_HOME You cannot change these build phase names. echo commands do not run, are to display of phases and their order of execution Represents the files to upload to the build output location. Sample buildspec.yml
  22. 22. Testing your code Testing is both a science and an art form! Goals for testing your code: • Confirm desired functionality • Catch programming syntax errors • Standardize code patterns and format • Reduce bugs due to non-desired application usage and logic failures • Make applications more secure
  23. 23. Service and release phase corresponding to test UI Service Unit BuildTest AWS CodeBuild Third-party tooling
  24. 24. AWS CodeDeploy Automates code deployments to any instance • In-place • Green-Blue 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 Integrates with third-party tools and AWS
  25. 25. Application Specification Files “appspec.yml” • Defines lifecycle event hooks that allow you to run scripts on an instance, • In YAML format, • CodeDeploy Agent running on EC2 instances execute the scripts specified in this file
  26. 26. Sample appspec.yml version: 0.0 os: linux files: - source: / destination: /var/www/html permissions: - object: /var/www/html pattern: “*.html” owner: root group: root mode: 755 hooks: ApplicationStop: - location: scripts/deregister_from_elb.sh BeforeInstall: - location: scripts/install_dependencies.sh ApplicationStart: - location: scripts/start_httpd.sh ValidateService: - location: scripts/test_site.sh - location: scripts/register_with_elb.sh • Remove/add instance to ELB • Install dependency packages • Start Apache • Confirm successful deploy • More! Send application files to one directory and configuration files to another Set specific permissions on specific directories and files
  27. 27. We have a strong partner list, and it’s growing
  28. 28. AWS Code* services Source Build Test Production Software Release Phases : AWS CodeBuild AWS CodeDeploy AWS CodeCommit Third-party tooling Amazon EC2 On-Premises
  29. 29. AWS Code* services Source Build Test Production Software Release Phases : AWS CodePipeline AWS CodeBuild AWS CodeDeploy AWS CodeCommit Third-party tooling
  30. 30. AWS CodePipeline 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 Supports manual approvals Integrates with other AWS services and third-party tools
  31. 31. Stage Transition Transition Action Action Action Build BuildCode CodeCommit NotifyDevelopers Lambda Parallel actions Build BuildCode AWS CodeBuild NotifyDevelopers Lambda TestAPI Runscope Sequential actions
  32. 32. AWS CodePipeline Integrations Source Build Test Deploy AWS CodeBuild AWS CodeDeployAWS CodeCommit Amazon S3 AWS Elastic Beanstalk AWS CloudFormation AWS OpsWorks
  33. 33. CodePipeline integrations (contd.) Approval Invoke Logic Management Amazon Simple Notification Services (SNS) Amazon Lambda AWS CloudTrail AWS Key Management Service (KMS)
  34. 34. Demo
  35. 35. AWS Code* services Source Build Test Production Software Release Phases : AWS CodePipeline AWS CodeBuild AWS CodeDeploy AWS CodeCommit Third-party tooling
  36. 36. Infrastructure Management • provisioning, • configuration, • orchestration, and • deployment
  37. 37. Create templates of your infrastructure Write templates in JSON or YAML CloudFormation provisions AWS resources based on dependency needs Version control/replicate/update templates like code Integrates with development, CI/CD, management tools AWS CloudFormation
  38. 38. • JSON/YAML format template • Presents template to CloudFormation Service • CloudFormation translates that to API request • Forms a stack of resources • FREE – only pay for resources • All regions • API are called in parallel • Manages dependencies/relationships API calls made on your behalf Template A running environment Stack Components & Technology Framework
  39. 39. Infrastructure as Code • Network, Servers, Storage etc. are just part of your service. • Single source of truth to deploy the whole stack. • Infrastructure that you can replicate, re-deploy, re-purpose • Version control your infrastructure and your application together. • Build your infrastructure and run it through your CI/CD pipeline. Template Development Stack Staging Stack Production Stack code version control code review integrate “It’s all software”
  40. 40. Region DEV STAGING PRODUCTION v1 v1 v1 v1 v1 v2 v2 v2 v2 v2
  41. 41. CI/CD AWS CloudFormation App Developers AWS CodePipeline Dev Staging Prod Infrastructure as Code Template AWS CodeCommit AWS CodeDeploy AWS CodeBuild App Source Code App Operations
  42. 42. CI/CD AWS CloudFormation App Developers AWS CodePipeline Dev Staging Prod Infrastructure as Code Template AWS CodeCommit AWS CodeDeploy AWS CodeBuild App Source Code App Operations AWS Elastic Beanstalk AWS OpsWorks
  43. 43. Code* tips and tricks • All Code* products can (and should) be provisioned and managed with AWS CloudFormation! • (It’s like Code* inception!) • Deep integration with AWS IAM. You can assign permissions on who can commit code, approve manual approvals, deploy to certain deployment groups, and more! • Integrate with AWS Lambda to do almost anything: • CodeCommit has Repository Triggers • CodeDeploy has Event Notifications • CodePipeline has native Lambda invoke
  44. 44. General best practices used by Amazon developers • CI/CD is a MUST! • Commit frequently • Builds on every commit • Build once in a given execution flow • Deploy to a running environment for further testing • Everything that is code (application, infrastructure, documentation) goes into a repository • Start with continuous delivery (“gated” promotion) and build up to continuous deployment once evidence of a high-level of excellence in testing is clear
  45. 45. Next Steps • AWS Free Tier - start today! • AWS for DevOps Walkthrough documentation - https://docs.aws.amazon.com/devops/latest/gsg/welcome.html • Watch Re:invent DEV403 DevOps on AWS-Advanced Continuous Delivery
  46. 46. aws.amazon.com/devops
  47. 47. AWS DevOps Blog
  48. 48. Thank you! Happy deploying!

×