Practical DevOps - Second Edition

Book description

Understand the benefits of DevOps and continuous delivery and see how they support the agile software development process

About This Book
  • Learn how DevOps can accelerate your entire software development life cycle
  • Improve your organization's performance to ensure the smooth production of software and services
  • Get hands-on experience in using efficient DevOps tools to better effect
Who This Book Is For

If you're a developer or system administrator looking to take on larger responsibilities and understand how the infrastructure that builds today's enterprises works, this is the book for you. This book will also help you greatly if you're an operations worker who would like to better support developers. You do not need any previous knowledge of DevOps to understand the concepts in this book.

What You Will Learn
  • Understand how all deployment systems fit together to form a larger system
  • Set up and familiarize yourself with all the tools you need to be efficient with DevOps
  • Design an application suitable for continuous deployment systems with DevOps in mind
  • Store and manage your code effectively using Git, Gerrit, Gitlab, and more
  • Configure a job to build a sample CRUD application
  • Test your code using automated regression testing with Jenkins Selenium
  • Deploy your code using tools such as Puppet, Ansible, Palletops, Chef, and Vagrant
In Detail

DevOps is a practical field that focuses on delivering business value as efficiently as possible. DevOps encompasses all code workflows from testing environments to production environments. It stresses cooperation between different roles, and how they can work together more closely, as the roots of the word imply—Development and Operations.

Practical DevOps begins with a quick refresher on DevOps and continuous delivery and quickly moves on to show you how DevOps affects software architectures. You'll create a sample enterprise Java application that you''ll continue to work with through the remaining chapters. Following this, you will explore various code storage and build server options. You will then learn how to test your code with a few tools and deploy your test successfully. In addition to this, you will also see how to monitor code for any anomalies and make sure that it runs as expected. Finally, you will discover how to handle logs and keep track of the issues that affect different processes.

By the end of the book, you will be familiar with all the tools needed to deploy, integrate, and deliver efficiently with DevOps.

Style and approach

This book is primarily a technical guide to DevOps with practical examples suitable for people who like to learn by implementing concrete working code.

Table of contents

  1. Title Page
  2. Copyright and Credits
    1. Practical DevOps Second Edition
  3. Packt Upsell
    1. Why subscribe?
    2. PacktPub.com
  4. Contributors
    1. About the author
    2. About the reviewer
    3. Packt is searching for authors like you
  5. Preface
    1. Who this book is for
    2. What this book covers
    3. To get the most out of this book
      1. Download the example code files
      2. Download the color images
      3. Conventions used
    4. Get in touch
      1. Reviews
  6. Introducing DevOps and Continuous Delivery
    1. Introducing DevOps
    2. How fast is fast?
    3. The Agile wheel of wheels
    4. Beware the cargo cult Agile fallacy
    5. DevOps and ITIL
    6. Summary
  7. A View from Orbit
    1. The DevOps process and CD – an overview
      1. The developers
      2. The Revision Control System
      3. The build server
      4. The artifact repository
      5. Package managers
      6. Test environments
      7. Staging/production
    2. Release management
    3. Scrum, Kanban, and the delivery pipeline
    4. Wrapping up – a complete example
    5. Identifying bottlenecks
    6. Summary
  8. How DevOps Affects Architecture
    1. Introducing software architecture
    2. The monolithic scenario
    3. The Twelve Factors
      1. Factor 1 – code base
      2. Factor 2 – dependencies
      3. Factor 3 – config
      4. Factor 4 – backing services
      5. Factor 5 – build, release, run
      6. Factor 6 – processes
      7. Factor 7 – port binding
      8. Factor 8 – concurrency
      9. Factor 9 – disposability
      10. Factor 10 – dev/prod parity
      11. Factor 11 – logs
      12. Factor 12 – admin processes
    4. Architecture rules of thumb
      1. The separation of concerns
      2. The principle of cohesion
      3. Coupling
    5. Back to the monolithic scenario
    6. A practical example
      1. Three-tier systems
        1. The presentation tier
        2. The logic tier
        3. The data tier
    7. Handling database migrations
      1. Rolling upgrades
      2. Hello world in Liquibase
      3. The changelog file
      4. The pom.xml file
    8. Manual installation
    9. Microservices
    10. Interlude – Conway's law
    11. How to keep service interfaces forward compatible
    12. Microservices and the data tier
    13. DevOps, architecture, and resilience
    14. Summary
  9. Everything is Code
    1. The need for source code control
    2. The history of source code management
    3. Roles and code
    4. Which source code management system?
    5. A word about source code management system migrations
      1. Choosing a branching strategy
      2. Branching problem areas
      3. Artifact version naming
      4. Choosing a client
      5. Setting up a basic Git server
    6. Shared authentication
    7. Hosted Git servers
    8. Large binary files
    9. Trying out different Git server implementations
    10. Docker intermission
    11. Gerrit
      1. Installing the git-review package
      2. The value of history revisionism
    12. The pull request model
    13. GitLab
    14. Summary
  10. Building the Code
    1. Why do we build code?
    2. The many faces of build systems
    3. The Jenkins build server
    4. Managing build dependencies
    5. The final artifact
    6. Cheating with FPM
    7. Continuous Integration
    8. Continuous Delivery
    9. Jenkins plugins
    10. The host server
    11. Build slaves
    12. Software on the host
    13. Triggers
    14. Job chaining and build pipelines
    15. A look at the Jenkins filesystem layout
    16. Build servers and Infrastructure as Code
      1. Building by dependency order
    17. Build phases
    18. Alternative build servers
    19. Collating quality measures
    20. About build status visualization
    21. Taking build errors seriously
    22. Robustness
    23. Summary
  11. Testing the Code
    1. Manual testing
    2. Pros and cons with test automation
    3. Unit testing
    4. xUnit in general and JUnit in particular
      1. A JUnit example
    5. Mocking
    6. Test coverage
    7. Automated integration testing
      1. Docker in automated testing
      2. Arquillian
    8. Performance testing
    9. Automated acceptance testing
    10. Automated GUI testing
    11. Integrating Selenium tests in Jenkins
    12. JavaScript testing
    13. Testing backend integration points
    14. Test-driven development
    15. REPL-driven development
    16. A complete test automation scenario
      1. Manually testing our web application
      2. Running the automated test
      3. Finding a bug
      4. Test walkthrough
      5. Handling tricky dependencies with Docker
    17. Summary
  12. Deploying the Code
    1. Why are there so many deployment systems?
      1. Configuring the base OS
      2. Describing clusters
      3. Delivering packages to a system
    2. Virtualization stacks
    3. Executing code on the client
      1. A note about the exercises
    4. The Puppet master and Puppet agents
    5. Ansible
    6. Deploying with Chef
    7. Deploying with SaltStack
    8. Salt versus Ansible versus Puppet execution models
    9. Vagrant
    10. Deploying with Docker
    11. Comparison tables
    12. Cloud solutions
    13. AWS
    14. Azure
    15. Summary
  13. Monitoring the Code
    1. Nagios
    2. Munin
    3. Ganglia
    4. Graphite
    5. Log handling
      1. Client-side logging libraries
      2. The ELK stack
    6. Summary
  14. Issue Tracking
    1. What are issue trackers used for?
    2. Some examples of workflows and issues
    3. What do we need from an issue tracker?
    4. Problems with issue tracker proliferation
    5. All the trackers
      1. Bugzilla
      2. Trac
      3. Redmine
      4. The GitLab issue tracker
      5. Jira
    6. Summary
  15. The Internet of Things and DevOps
    1. Introducing the IoT and DevOps
    2. The future of the IoT according to the market
    3. Machine-to-machine communication
    4. IoT deployment affects software architecture
    5. IoT deployment security
    6. Okay, but what about DevOps and the IoT again?
    7. A hands-on lab with an IoT device for DevOps
    8. Summary
  16. Other Books You May Enjoy
    1. Leave a review - let other readers know what you think

Product information

  • Title: Practical DevOps - Second Edition
  • Author(s): Joakim Verona
  • Release date: May 2018
  • Publisher(s): Packt Publishing
  • ISBN: 9781788392570