Book Image

Modern DevOps Practices - Second Edition

By : Gaurav Agarwal
Book Image

Modern DevOps Practices - Second Edition

By: Gaurav Agarwal

Overview of this book

DevOps and the cloud have changed how we look at software development and operations like never before, leading to the rapid growth of various DevOps tools, techniques, and practices. This updated edition helps you pick up the right tools by providing you with everything you need to get started with your DevOps journey. The book begins by introducing you to modern cloud-native architecture, and then teaches you about the architectural concepts needed to implement the modern way of application development. The next set of chapters helps you get familiarized with Git, Docker, Kubernetes, Ansible, Terraform, Packer, and other similar tools to enable you to build a base. As you advance, you’ll explore the core elements of cloud integration—AWS ECS, GKE, and other CaaS services. The chapters also discuss GitOps, continuous integration, and continuous delivery—GitHub actions, Jenkins, and Argo CD—to help you understand the essence of modern app delivery. Later, you’ll operate your container app in production using a service mesh and apply AI in DevOps. Throughout the book, you’ll discover best practices for automating and managing your development lifecycle, infrastructure, containers, and more. By the end of this DevOps book, you'll be well-equipped to develop and operate applications using modern tools and techniques.
Table of Contents (24 chapters)
1
Part 1:Modern DevOps Fundamentals
6
Part 2:Container Orchestration and Serverless
10
Part 3:Managing Config and Infrastructure
14
Part 4:Delivering Applications with GitOps
18
Part 5:Operating Applications in Production

What this book covers

Chapter 1, The Modern Way of DevOps, delves into the realm of modern DevOps, emphasizing its distinctions from traditional DevOps. We’ll explore the core technologies propelling modern DevOps, with a special emphasis on the central role played by containers. Given that containers are a relatively recent development, we’ll delve into the essential best practices and techniques to develop, deploy, and secure container-based applications.

Chapter 2, Source Code Management with Git and GitOps, introduces us to Git, the leading source code management tool, and its application in managing software development and delivery through GitOps.

Chapter 3, Containerization with Docker, initiates our journey into Docker, encompassing installation, Docker storage configuration, launching initial containers, and monitoring Docker via Journald and Splunk.

Chapter 4, Creating and Managing Container Images, dissects Docker images, a critical component in Docker usage. We’ll understand Docker images, the layered model, Dockerfile directives, image flattening, image construction, and image-building best practices. Additionally, we’ll explore distroless images and their relevance from a DevSecOps standpoint.

Chapter 5, Container Orchestration with Kubernetes, introduces Kubernetes. We’ll install Kubernetes using minikube and kinD, delve into Kubernetes’ architectural underpinnings, and explore fundamental Kubernetes building blocks such as Pods, containers, ConfigMaps, secrets, probes, and multi-container Pods.

Chapter 6, Managing Advanced Kubernetes Resources, advances into intricate Kubernetes concepts, encompassing networking, DNS, Services, Deployments, the HorizontalPodAutoscaler, and StatefulSets.

Chapter 7, Containers as a Service (CaaS) and Serverless Computing for Containers, explores the hybrid nature of Kubernetes, bridging IaaS and PaaS paradigms. Additionally, we will examine serverless container services such as AWS ECS, alongside alternatives such as Google Cloud Run and Azure Container Instances. We will conclude with a discussion on Knative, an open source, cloud-native, and serverless technology.

Chapter 8, Infrastructure as Code (IaC) with Terraform, introduces IaC using Terraform, elucidating its core principles. We will proceed with hands-on examples, creating a resource group and virtual machine from scratch on Azure using Terraform, while grasping essential Terraform concepts.

Chapter 9, Configuration Management with Ansible, acquaints us with configuration management through Ansible and its foundational principles. We will explore key Ansible concepts by configuring a MySQL and Apache application on Azure Virtual Machines.

Chapter 10, Immutable Infrastructure with Packer, delves into immutable infrastructure using Packer. We will integrate this with insights from Chapter 8, Infrastructure as Code (IaC) with Terraform, and Chapter 9, Configuration Management with Ansible, to launch an IaaS-based Linux, Apache, MySQL, and PHP (LAMP) stack on Azure.

Chapter 11, Continuous Integration with GitHub Actions and Jenkins, explains continuous integration from a container-centric perspective, evaluating various tools and methodologies to continuously build container-based applications. We will examine tools such as GitHub Actions and Jenkins, discerning when and how to employ each one while deploying an example microservices-based distributed application, the Blog app.

Chapter 12, Continuous Deployment/Delivery with Argo CD, delves into continuous deployment/delivery, employing Argo CD. As a contemporary GitOps-based continuous delivery tool, Argo CD streamlines the deployment and management of container applications. We will harness its power to deploy our example Blog App.

Chapter 13, Securing and Testing the Deployment Pipeline, explores multiple strategies to secure a container deployment pipeline, encompassing container image analysis, vulnerability scanning, secrets management, storage, integration testing, and binary authorization. We will integrate these techniques to enhance the security of our existing CI/CD pipelines.

Chapter 14, Understanding Key Performance Indicators (KPIs) for Your Production Service, introduces site reliability engineering and investigates a range of key performance indicators, vital for effectively managing distributed applications in production.

Chapter 15, Operating Containers in Production with Istio, acquaints you with the widely adopted service mesh technology Istio. We will explore various techniques for day-to-day operations in production, including traffic management, security measures, and observability enhancements for our example Blog app.