Learning DevOps a comprehensive guide to accelerating DevOps culture adoption with terraform, azure DevOps, kubernetes, and Jenkins
Implement modern DevOps techniques to increase business productivity, agility, reliability, security, and scalability. 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 diff...
Otros Autores: | |
---|---|
Formato: | Libro electrónico |
Idioma: | Inglés |
Publicado: |
Birmingham :
Packt Publishing, Limited
[2022]
|
Edición: | 2nd ed |
Materias: | |
Ver en Biblioteca Universitat Ramon Llull: | https://discovery.url.edu/permalink/34CSUC_URL/1im36ta/alma991009657537506719 |
Tabla de Contenidos:
- Cover
- Title Page
- Copyright and Credits
- Dedication
- Contributors
- Table of Contents
- Preface
- 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.