Upgrade to Pro — share decks privately, control downloads, hide ads and more …

DevOps

Avatar for Mike Medley Mike Medley
November 02, 2015

 DevOps

A brief introduction to devops and best practices.

Avatar for Mike Medley

Mike Medley

November 02, 2015

Other Decks in Technology

Transcript

  1. Overview • Goal: Discuss the DevOps culture and practice •

    Provide a high-level overview of DevOps • Identify the components involved in a DevOps practice • Discuss organizational cultures that aid in embracing the DevOps approach • Discuss strategies for incorporating DevOps practices
  2. What is DevOps Development + Operations = DevOps • A

    methodology that requires collaboration between the teams involved in a product lifecycle. • Application owners, developers, and IT operations • Helps businesses in rapid development and delivery of products and services. • Goal: A continuous delivery model that is repeatable, reliable, stable, resilient, and secure, and that improves operational efficiency.
  3. The Dev and Ops Silos Development Team Code Build Package

    Test Release Operations Team Deploy Operations Test • Development teams are interested in agile methodologies. • Operations teams focus on lean IT approaches and automation.
  4. Components of DevOps Practice • Continuous Development • Continuous Integration/Testing

    • Configuration Management • Continuous Delivery and Deployment Automation at every phase
  5. Continuous Development • Follows iterative and incremental development. • Key

    characteristics: • Flexibility in development cycle. • Adapts quickly to frequent requirement changes. • Frequent delivery of builds. • Constant feedback loops. • Examples: Agile tools like Scrum and Lean Software Development techniques like Kanban.
  6. Continuous Development: Scrum Model Product Owner Scrum Master Dev and

    Ops Teams • Gathers requirements from business owners and customers. • Creates user stories, user cases, items. • Builds product backlog. • Communicates development status to stakeholders. • Ensures Dev team’s alignment with Scrum principles. • Helps Dev team by removing any impediments. • Helps Product Owner maintain the backlog. • Creates and maintains sprint cycles. • Conducts daily scrum meetings. • Participates in sprint planning meetings. • Develops software. • Plans operational capacity and systems configuration. • Participates in daily scrum meetings. • Participates in sprint review meetings.
  7. Continuous Development: Sprints Product Backlog 1.___________ 2.___________ 3.___________ 4.___________ 5.___________

    Sprint Backlog 1.___________ 2.___________ 3.___________ Sprint 1 Sprint Cycle • Typical duration: 2-4 weeks • Daily scrum meetings • Sprint output: Product increment that can be released Sprint Backlog 1.___________ 2.___________ 3.___________ Sprint 2 Sprint Cycle
  8. Continuous Integration • Continuous development principles include frequent delivery of

    builds. • How do you ensure code integrity when multiple development teams are working simultaneously on the source code? • Answer: Continuous Integration
  9. Continuous Integration • Practice of doing the build phase several

    times a day. • Use code repositories to maintain the code. • Commit your code very frequently – several times per day. • Automate code commit to trigger the build phase. • Build, package, register to package repository. • What is the best approach? • Automation
  10. Code Repositories • Mainline (trunk) should always be intact. •

    Check out from mainline and work on the local copy (branch). • Ensure that your local copy is in a working condition before committing it. • Test at every step to ensure code integrity. • Run unit tests before every check-in. • Goal: No broken builds on the mainline.
  11. Configuration Management • Process of automating and standardizing resource configurations.

    • Help provision, configure, and manage infrastructure. • Ensures consistency across all phases of software development and delivery lifecycle.
  12. Continuous Delivery and Deployment • Continuous delivery: The practice of

    testing and releasing builds in an automated fashion. • Involves deploying and configuring the infrastructure and installing, configuring, and testing the software. • Goal: Deliver more frequently in an automated fashion to enable continuous deployment (“push-button” deployment). • Tools: Infrastructure as Code; Configuration Management
  13. Infrastructure as Code • Infrastructure is built through automation. •

    Servers, OS, networking, storage • Transforms typical IT operations into code, especially with PaaS. • Use code repository to store and maintain the code. • Use Configuration Management to automate resource configuration.
  14. The DevOps Goal • A continuous delivery model that is

    repeatable, reliable, stable, resilient, and secure while improving operational efficiency. • Q: How is it possible if teams are working in silos? • A: Requires a change in the organization’s culture: • Collaboration: Teams work together. • Integration: Creating end-to-end processes across teams using automation. • DevOps motto: People over Process over Tools.
  15. Building on Continuous Integration • Successful continuous integration enables successful

    continuous delivery and deployment Build Integrate Package Test Deploy Continuous Integration Continuous Delivery Continuous Deployment Helps developers verify Verify suitability of release
  16. Patterns and Anti-Patterns of Delivery and Deployment Anti-Pattern Pattern Manual

    intervention Automated Process Hardcoding config values inside the source code or using different tools in each dev environment All config values and tools externalized into build/deployment-time properties and resources Running all analysis/tests at the commit stage, taking extended time to discover simple problems Having the commit build run as quickly as possible to uncover common build problems first Making last-minute changes to force a build to work Failing fast using CD reduces the need for last-minute fixed Writing an app where each component is tightly coupled with every other Decoupling components of your app to allow updates of individual components
  17. I WANT CONTINUOUS DELIVERY! • CD does require time and

    human resource investment, but only up front: • Converting to automated testing • Decoupling software architectures so they can be updated by component • These costs are ultimately negligible compared to the benefits.
  18. Managing Continuous Deployment Rollout • Use these technologies to manage

    rollout of a new version: • Roll out new Auto Scaling instances with a new launch configuration that hosts the latest version of your application. • Use multiple load balancers as entry points to different versions of your running system. • Use Amazon Route 53 to gradually shift traffic to the new version of your application or do a cutover.
  19. Continuous Deployment Strategies • In-Place updates – Update your application

    on existing infrastructure rather than replacing it • Blue-Green – Gradually replace exiting environments (blue) with the new version (green) • Red-Black – Cut over from the current system to the new system after the new system is created and verified. • A-B Testing – Release different versions simultaneously to test different versions of features. • Dark – Deploy new functionality in the background to verify stress and generate back-end reports.
  20. Application Deployment Pipelines Application deployment pipelines automate the end-to-end process

    of release, from checking in code to deploying an application. Commit Testing Staging Deploy Unit Tests Package for deployment Acceptance tests
  21. The Deployment Pipeline Version Control System Artifact Repository Source Code

    Configuration Management Configuration Management Commit Acceptance User Acceptance Testing Capacity Testing Production
  22. The Deployment Pipeline Version Control System Artifact Repository Source Code

    Configuration Management Configuration Management Commit Acceptance User Acceptance Testing Capacity Testing Production Reports Binaries Metadata
  23. The Deployment Pipeline Version Control System Artifact Repository Source Code

    Configuration Management Configuration Management Commit Acceptance User Acceptance Testing Capacity Testing Production Reports Binaries Metadata Binaries Reports Metadata
  24. The Deployment Pipeline Version Control System Artifact Repository Source Code

    Configuration Management Configuration Management Commit Acceptance User Acceptance Testing Capacity Testing Production Reports Binaries Metadata Binaries Reports Metadata Binaries Reports Metadata
  25. The Deployment Pipeline Version Control System Artifact Repository Source Code

    Configuration Management Configuration Management Commit Acceptance User Acceptance Testing Capacity Testing Production Reports Binaries Metadata Binaries Reports Metadata Binaries Reports Metadata Binaries Reports Metadata
  26. Benefits of the Deployment Pipeline • Enables “push-button” deployment. •

    Any issues discovered during deployment can be fixed and incorporated into the release process in an automated fashion. • Builds become stable and predictable. • Releases become more frequent. • Enables leveraging of process and tools from one project to future projects.
  27. Application Pipeline Design Considerations • Which tasks can be parallelized?

    • Which tasks are automated, and which are manual? • How will infrastructure be created? • Initializing machines: Scripts, or a configuration management system? • How will our application be deployed? • Using which deployment technology? • How will failures be reported? • Who is responsible for integrating them into the pipeline.
  28. Where do we go from here? • What can we

    do better? • Continuous Deployment - Automated deployments • Database source control – deployments and rollbacks • Configuration Management – puppet/chef/ansible • Application Pipelines • Standards and Procedures • https://en.wikipedia.org/wiki/Cyber_security_standards • Top 10 Secure Coding Practices • https://www.securecoding.cert.org/confluence/display/seccode/Top+10+Secure+C oding+Practices