Learning DevOps: A comprehensive guide to accelerating DevOps culture adoption with Terraform, Azure DevOps, Kubernetes, and Jenkins, 2nd Edition
- Length: 560 pages
- Edition: 2
- Language: English
- Publisher: Packt Publishing
- Publication Date: 2022-03-31
- ISBN-10: 1801818967
- ISBN-13: 9781801818964
- Sales Rank: #1490477 (See Top 100 Books)
Implement modern DevOps techniques to increase business productivity, agility, reliability, security, and scalability
Key Features
- Learn how to use business resources effectively for improved productivity and collaboration
- Use infrastructure as code practices to build large-scale cloud infrastructure
- Leverage the ultimate open source DevOps tools to achieve continuous integration and continuous delivery (CI/CD)
Book Description
In the implementation of DevOps processes, the choice of tools is crucial to the sustainability of projects and collaboration between developers and ops. This book presents the different patterns and tools for provisioning and configuring an infrastructure in the cloud, covering mostly open source tools with a large community contribution, such as Terraform, Ansible, and Packer, which are assets for automation.
This DevOps book will show you how to containerize your applications with Docker and Kubernetes and walk you through the construction of DevOps pipelines in Jenkins as well as Azure pipelines before covering the tools and importance of testing. You’ll find a complete chapter on DevOps practices and tooling for open source projects before getting to grips with security integration in DevOps using Inspec, Hashicorp Vault, and Azure Secure DevOps kit. You’ll also learn about the reduction of downtime with blue-green deployment and feature flags techniques before finally covering common DevOps best practices for all your projects.
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.
What you will learn
- Understand the basics of infrastructure as code patterns and practices
- Get an overview of Git command and Git flow
- Install and write Packer, Terraform, and Ansible code for provisioning and configuring cloud infrastructure based on Azure examples
- Use Vagrant to create a local development environment
- Containerize applications with Docker and Kubernetes
- Apply DevSecOps for testing compliance and securing DevOps infrastructure
- Build DevOps CI/CD pipelines with Jenkins, Azure Pipelines, and GitLab CI
- Explore blue-green deployment and DevOps practices for open sources projects
Who this book is for
If you are an application developer or a system administrator interested in understanding continuous integration, continuous delivery, and containerization with DevOps tools and techniques, this book is for you. Knowledge of DevOps fundamentals and Git principles is required.
Learning DevOps Second Edition Contributors About the author About the reviewers Preface Who this book is for What this book covers To get the most out of this book Download the example code files Code in Action Download the color images Conventions used Get in touch Share Your Thoughts Section 1: DevOps and Infrastructure as Code Chapter 1: The DevOps Culture and Infrastructure as Code Practices Getting started with DevOps Implementing CI/CD and continuous deployment Continuous integration (CI) Continuous delivery (CD) Continuous deployment Understanding IaC practices The benefits of IaC IaC languages and tools The IaC topology The evolution of the DevOps culture Summary Questions Further reading Chapter 2: Provisioning Cloud Infrastructure with Terraform Technical requirements Installing Terraform Manual installation Installation by script Integrating Terraform with Azure Cloud Shell Configuring Terraform for Azure Creating the Azure SP Configuring the Terraform provider The Terraform configuration for local development and testing Writing a Terraform script to deploy an Azure infrastructure Following some Terraform good practices Running Terraform for deployment Initialization Previewing the changes Applying the changes Understanding the Terraform life cycle with different command-line options Using destroy to better rebuild Formatting and validating the configuration The Terraform life cycle within a CI/CD process Protecting the state file with a remote backend Summary Questions Further reading Chapter 3: Using Ansible for Configuring IaaS Infrastructure Technical requirements Installing Ansible Installing Ansible with a script Integrating Ansible into Azure Cloud Shell Ansible artifacts Configuring Ansible Creating an Ansible inventory The inventory file Configuring hosts in the inventory Testing the inventory Executing the first playbook Writing a basic playbook Understanding Ansible modules Improving your playbooks with roles Executing Ansible Using the preview or dry run option Increasing the log level output Protecting data with Ansible Vault Using variables in Ansible for better configuration Protecting sensitive data with Ansible Vault Using a dynamic inventory for an Azure infrastructure Summary Questions Further reading Chapter 4: Optimizing Infrastructure Deployment with Packer Technical requirements An overview of Packer Installing Packer Creating Packer templates for Azure VMs with scripts The structure of the Packer template Building an Azure image with the Packer template Using Ansible in a Packer template Writing the Ansible playbook Integrating an Ansible playbook in a Packer template Executing Packer Configuring Packer to authenticate to Azure Checking the validity of the Packer template Running Packer to generate our VM image Writing Packer templates with HCL format Using a Packer image with Terraform Summary Questions Further reading Chapter 5: Authoring the Development Environment with Vagrant Technical requirements Installing Vagrant Installing manually on Windows Installing Vagrant by script on Windows Installing Vagrant by script on Linux Writing a Vagrant configuration file Using Vagrant Cloud for Vagrant Boxes Writing the Vagrant configuration file Creating a local VM using the Vagrant CLI Creating the VM Connecting to the VM Summary Questions Further reading Section 2: DevOps CI/CD Pipeline Chapter 6: Managing Your Source Code with Git Technical requirements Overviewing Git and its principal command lines Git installation Git configuration Useful Git vocabulary Git command lines Understanding the Git process and Gitflow pattern Starting with the Git process Isolating your code with branches Branching strategy with Gitflow Summary Questions Further reading Chapter 7: Continuous Integration and Continuous Delivery Technical requirements CI/CD principles CI CD Using a package manager in the CI/CD process Private NuGet and npm repository Nexus Repository OSS Azure Artifacts Using Jenkins for CI/CD implementation Installing and configuring Jenkins Configuring a GitHub webhook Configuring a Jenkins CI job Executing a Jenkins job Using Azure Pipelines for CI/CD Versioning of the code with Git in Azure Repos Creating a CI pipeline Creating a CD pipeline – the release Creating a full pipeline definition in a YAML file Using GitLab CI Authentication at GitLab Creating a new project and managing your source code Creating a CI pipeline Accessing the CI pipeline execution details Summary Questions Further reading Chapter 8: Deploying Infrastructure as Code with CI/CD Pipelines Technical requirements Running Packer in Azure Pipelines Running Terraform and Ansible in Azure Pipelines Summary Questions Further reading Section 3: Containerized Microservices with Docker and Kubernetes Chapter 9: Containerizing Your Application with Docker Technical requirements Installing Docker Registering on Docker Hub Docker installation An overview of Docker's elements Creating a Dockerfile Writing a Dockerfile Dockerfile instructions overview Building and running a container on a local machine Building a Docker image Instantiating a new container of an image Testing a container locally Pushing an image to Docker Hub Pushing a Docker image to a private registry (ACR) Deploying a container to ACI with a CI/CD pipeline Writing the Terraform code for ACI Creating a CI/CD pipeline for the container Using Docker for running command-line tools Getting started with Docker Compose Installing Docker Compose Writing the Docker Compose configuration file Executing Docker Compose Deploying Docker Compose containers in ACI Summary Questions Further reading Chapter 10: Managing Containers Effectively with Kubernetes Technical requirements Installing Kubernetes Kubernetes architecture overview Installing Kubernetes on a local machine Installing the Kubernetes dashboard A first example of Kubernetes application deployment Using Helm as a package manager Installing the Helm client Using a public Helm chart from Artifact Hub Creating a custom Helm chart Publishing a Helm chart in a private registry (ACR) Using AKS Creating an AKS service Configuring the kubeconfig file for AKS Advantages of AKS Creating a CI/CD pipeline for Kubernetes with Azure Pipelines Monitoring applications and metrics in Kubernetes Using the kubectl command line Using the web dashboard Using tier tools Summary Questions Further reading Section 4: Testing Your Application Chapter 11: Testing APIs with Postman Technical requirements Creating a Postman collection with requests Installation of Postman Creating a collection Creating our first request Using environments and variables to dynamize requests Writing Postman tests Executing Postman request tests locally Understanding the Newman concept Preparing Postman collections for Newman Exporting the collection Exporting the environments Running the Newman command line Integration of Newman in the CI/CD pipeline process Build and release configuration The pipeline execution Summary Questions Further reading Chapter 12: Static Code Analysis with SonarQube Technical requirements Exploring SonarQube Installing SonarQube Overview of the SonarQube architecture SonarQube installation Real-time analysis with SonarLint Executing SonarQube in a CI process Configuring SonarQube Creating a CI pipeline for SonarQube in Azure Pipelines Summary Questions Further reading Chapter 13: Security and Performance Tests Technical requirements Applying web security and penetration testing with ZAP Using ZAP for security testing Ways to automate the execution of ZAP Running performance tests with Postman Summary Questions Further reading Section 5: Taking DevOps Further/More on DevOps Chapter 14: Security in the DevOps Process with DevSecOps Technical requirements Testing Azure infrastructure compliance with Chef InSpec Overview of InSpec Installing InSpec Configuring Azure for InSpec Writing InSpec tests Executing InSpec Keeping sensitive data safe with HashiCorp Vault Installing Vault locally Starting the Vault server Writing secrets to Vault Reading secrets in Vault Using the Vault UI web interface Getting Vault secrets in Terraform Summary Questions Further reading Chapter 15: Reducing Deployment Downtime Technical requirements Reducing deployment downtime with Terraform Understanding blue-green deployment concepts and patterns Using blue-green deployment to improve the production environment Understanding the canary release pattern Exploring the dark launch pattern Applying blue-green deployments on Azure Using App Service with slots Using Azure Traffic Manager Introducing feature flags Using an open source framework for feature flags Using the LaunchDarkly solution Summary Questions Further reading Chapter 16: DevOps for Open Source Projects Technical requirements Storing source code in GitHub Creating a new repository on GitHub Contributing to a GitHub project Contributing to open source projects using pull requests Managing the changelog file and release notes Sharing binaries in GitHub releases Getting started with GitHub Actions Analyzing code with SonarCloud Detecting security vulnerabilities with WhiteSource Bolt Summary Questions Further reading Chapter 17: DevOps Best Practices Automating everything Choosing the right tool Writing all your configuration in code Designing the system architecture Building a good CI/CD pipeline Integrating tests Shifting security left with DevSecOps Monitoring your system Evolving project management Summary Questions Further reading Assessments Chapter 1: The DevOps Culture and Infrastructure as Code Practices Chapter 2: Provisioning Cloud Infrastructure with Terraform Chapter 3: Using Ansible for Configuring IaaS Infrastructure Chapter 4: Optimizing Infrastructure Deployment with Packer Chapter 5: Authoring the Development Environment with Vagrant Chapter 6: Managing Your Source Code with Git Chapter 7: Continuous Integration and Continuous Delivery Chapter 8: Deploying Infrastructure as Code with CI/CD Pipelines Chapter 9: Containerizing Your Application with Docker Chapter 10: Managing Containers Effectively with Kubernetes Chapter 11: Testing APIs with Postman Chapter 12: Static Code Analysis with SonarQube Chapter 13: Security and Performance Tests Chapter 14: Security in the DevOps Process with DevSecOps Chapter 15: Reducing Deployment Downtime Chapter 16: DevOps for Open Source Projects Chapter 17: DevOps Best Practices Why subscribe? Other Books You May Enjoy Packt is searching for authors like you Share Your Thoughts
Donate to keep this site alive
How to download source code?
1. Go to: https://github.com/PacktPublishing
2. In the Find a repository… box, search the book title: Learning DevOps: A comprehensive guide to accelerating DevOps culture adoption with Terraform, Azure DevOps, Kubernetes, and Jenkins, 2nd Edition
, sometime you may not get the results, please search the main title.
3. Click the book title in the search results.
3. Click Code to download.
1. Disable the AdBlock plugin. Otherwise, you may not get any links.
2. Solve the CAPTCHA.
3. Click download link.
4. Lead to download server to download.