Book Image

Learning DevOps

By : Mikael Krief
Book Image

Learning DevOps

By: Mikael Krief

Overview of this book

The implementation of DevOps processes requires the efficient use of various tools, and the choice of these tools is crucial for the sustainability of projects and collaboration between development (Dev) and operations (Ops). This book presents the different patterns and tools that you can use to provision and configure an infrastructure in the cloud. You'll begin by understanding DevOps culture, the application of DevOps in cloud infrastructure, provisioning with Terraform, configuration with Ansible, and image building with Packer. You'll then be taken through source code versioning with Git and the construction of a DevOps CI/CD pipeline using Jenkins, GitLab CI, and Azure Pipelines. This DevOps handbook will also guide you in containerizing and deploying your applications with Docker and Kubernetes. You'll learn how to reduce deployment downtime with blue-green deployment and the feature flags technique, and study DevOps practices for open source projects. Finally, you'll grasp some best practices for reducing the overall application lead time to ensure faster time to market. By the end of this book, you'll have built a solid foundation in DevOps, and developed the skills necessary to enhance a traditional software delivery process using modern software delivery tools and techniques
Table of Contents (23 chapters)
Free Chapter
1
Section 1: DevOps and Infrastructure as Code
6
Section 2: DevOps CI/CD Pipeline
9
Section 3: Containerized Applications with Docker and Kubernetes
12
Section 4: Testing Your Application
16
Section 5: Taking DevOps Further

What this book covers

Chapter 1, DevOps Culture and Practices, explains the objectives of the DevOps culture and details the different DevOps practices – IaC and CI/CD pipelines – that will be seen throughout this book.

Chapter 2, Provisioning Cloud Infrastructure with Terraform, details provisioning cloud infrastructure with IaC using Terraform, including its installation, its command line, its life cycle, a practical usage for provisioning a sample of Azure infrastructure, and the protection of tfstate with remote backends.

Chapter 3, Using Ansible for Configuring IaaS Infrastructure, concerns the configuration of VMs with Ansible, including Ansible's installation, command lines, setting up roles for an inventory and a playbook, its use in configuring VMs in Azure, data protection with Ansible Vault, and the use of a dynamic inventory.

Chapter 4, Optimizing Infrastructure Deployment with Packer, covers the use of Packer to create VM images, including its installation and how it is used for creating images in Azure.

Chapter 5, Managing Your Source Code with Git, explores the use of Git, including its installation, its principal command lines, its workflow, an overview of the branch system, and an example of a workflow with GitFlow.

Chapter 6, Continuous Integration and Continuous Delivery, shows the creation of an end-to-end CI/CD pipeline using three different tools: Jenkins, GitLab CI, and Azure Pipelines. For each of these tools, we will explain their characteristics in detail.

Chapter 7, Containerizing Your Application with Docker, covers the use of Docker, including its local installation, an overview of the Docker Hub registry, writing a Dockerfile, and a demonstration of how it can be used. An example of an application will be containerized, executed locally, and then deployed in an Azure container instance via a CI/CD pipeline.

Chapter 8, Managing Containers Effectively with Kubernetes, explains the basic use of Kubernetes, including its local installation and application deployment, and then an example of Kubernetes managed with Azure Kubernetes Services.

Chapter 9, Testing APIs with Postman, details the use of Postman to test an example of an API, including its local use and automation in a CI/CD pipeline with Newman and Azure Pipelines.

Chapter 10, Static Code Analysis with SonarQube, explains the use of SonarQube to analyze static code in an application, including its installation, real-time analysis with the SonarLint tool, and the integration of SonarQube into a CI pipeline in Azure Pipelines.

Chapter 11, Security and Performance Tests, discusses the security and performance of web applications, including demonstrations of how to use the ZAP tool to test OWASP rules, Postman to test API performance, and Azure Plan Tests to perform load tests.

Chapter 12, Security in the DevOps Process with DevSecOps, explains how to use security integration in the DevOps process through testing the compliance of infrastructure with Inspec, the usage of Vault for protecting sensitive data, and an overview of Azure's Secure DevOps Kit for testing Azure resource compliance.

Chapter 13, Reducing Deployment Downtime, presents the reduction of downtime deployment with Terraform, the concepts and patterns of blue-green deployment, and how to apply them in Azure. A great focus is also given on the use of feature flags within an application.

Chapter 14, DevOps for Open Source Projects, is dedicated to open source. It details the tools, processes, and practices for open source projects with collaboration in GitHub, pull requests, changelog files, binary sharing in GitHub releases, and an end-to-end examples of a CI pipeline in Travis CI and in GitHub Actions. Open source code analysis and security are also discussed with SonarCloud and WhiteSource Bolt.

Chapter 15, DevOps Best Practices, reviews a DevOps list of good practices regarding automation, IaC, CI/CD pipelines, testing, security, monitoring, and project management.