Learning Azure DevOps
By Myra Kelnor
()
About this ebook
To help cloud professionals make the most of the Azure DevOps platform, "Learning Azure DevOps" is a practical book that walks them through the process step-by-step. This book goes over all the bases of DevOps, including how to automate crucial tasks, deploy infrastructure as code (IaC), and set up and manage CI/CD pipelines. At the outset, the chapters will teach readers how to create Azure DevOps projects and link their repositories to VCSes like GitHub. Any application's build, test, and deployment processes, including Spring Boot's, can be automated with Azure Pipelines by configuring Pipeline as Code using YAML. To make sure that professionals can manage scalable, cloud-native apps, we also cover advanced topics like containerizing apps with Docker and deploying them to Azure Kubernetes Service (AKS).
Using frameworks such as JUnit, Mockito, and Postman, the book goes even further into automated testing to guarantee quality assurance and continuous testing. It teaches to automate backup and disaster recovery procedures for resilient operations and to use Flyway to perform schema migrations. Additionally, teams are guided to work efficiently together through Azure Boards, shared pipelines, and centralized infrastructure management, highlighting collaboration. Also covered is Azure DevOps Analytics, which readers can use to keep tabs on their projects and teams' performance using real-time dashboards.
Key Learnings
Integrate with Git for version control and set up Azure DevOps projects.
Develop YAML-based Pipeline as Code to streamline automating builds, tests, and deployments.
Dockerize your apps and then launch them on AKS.
Utilize Azure Boards and Project Boards to manage and monitor work items, tasks, and user stories.
Add Postman, JUnit, and Mockito to automate your application testing.
Integrate Flyway to automate database schema migrations and achieve continuous delivery.
Deploy backups and failover procedures automatically in Azure DevOps.
Use Terraform in conjunction with Azure Pipelines to deploy cloud-based IaC.
Related to Learning Azure DevOps
Related ebooks
Learning Azure DevOps: Outperform DevOps using Azure Pipelines, Artifacts, Boards, Azure CLI, Test Plans and Repos Rating: 0 out of 5 stars0 ratingsModern DevOps Practices: Implement, secure, and manage applications on the public cloud by leveraging cutting-edge tools Rating: 0 out of 5 stars0 ratingsMicrosoft Azure DevOps Rating: 0 out of 5 stars0 ratingsAzure Bicep QuickStart Pro Rating: 0 out of 5 stars0 ratingsMastering Shell for DevOps: Automate, streamline, and secure DevOps workflows with modern shell scripting Rating: 0 out of 5 stars0 ratingsMastering Shell for DevOps Rating: 0 out of 5 stars0 ratingsKubernetes on AWS: Deploy and manage production-ready Kubernetes clusters on AWS Rating: 0 out of 5 stars0 ratingsAWS DevOps for GenAI: Automating and Scaling AI Solutions Rating: 0 out of 5 stars0 ratingsAzure DevOps Engineer: Designing and Implementing Microsoft DevOps Solutions Rating: 0 out of 5 stars0 ratingsRapid Application Development with AWS Amplify: Full stack web development on Amazon Web Servics Rating: 0 out of 5 stars0 ratingsAccelerating DevSecOps on AWS: Create secure CI/CD pipelines using Chaos and AIOps Rating: 0 out of 5 stars0 ratingsProgramming Backend with Go Rating: 0 out of 5 stars0 ratingsTroubleshooting Docker: Develop, test, automate, and deploy production-ready Docker containers Rating: 0 out of 5 stars0 ratingsA Developer's Essential Guide to Docker Compose: Simplify the development and orchestration of multi-container applications Rating: 0 out of 5 stars0 ratingsHands-On Kubernetes on Azure: Automate management, scaling, and deployment of containerized applications, 2nd Edition Rating: 0 out of 5 stars0 ratingsMastering Kubernetes: Dive into Kubernetes and learn how to create and operate world-class cloud-native systems Rating: 0 out of 5 stars0 ratingsBig Data on Kubernetes: A practical guide to building efficient and scalable data solutions Rating: 0 out of 5 stars0 ratingsPractical DevOps: Implement DevOps in your organization by effectively building, deploying, testing, and monitoring code Rating: 0 out of 5 stars0 ratingsA Developer's Guide to .NET in Azure: Build quick, scalable cloud-native applications and microservices with .NET 6.0 and Azure Rating: 0 out of 5 stars0 ratingsAzure Stack Hub Demystified: Building hybrid cloud, IaaS, and PaaS solutions Rating: 0 out of 5 stars0 ratingsThe Kubernetes Bible: The definitive guide to deploying and managing Kubernetes across major cloud platforms Rating: 4 out of 5 stars4/5
System Administration For You
Design and Build Modern Datacentres, A to Z practical guide Rating: 3 out of 5 stars3/5Mastering Bash Rating: 5 out of 5 stars5/5Learn PowerShell Scripting in a Month of Lunches Rating: 0 out of 5 stars0 ratingsPractical Data Analysis Rating: 4 out of 5 stars4/5Git Essentials Rating: 4 out of 5 stars4/5Cybersecurity: The Beginner's Guide: A comprehensive guide to getting started in cybersecurity Rating: 5 out of 5 stars5/5Learning Linux Shell Scripting Rating: 4 out of 5 stars4/5Mastering Proxmox - Second Edition Rating: 0 out of 5 stars0 ratingsWindows Server 2016 Cookbook Rating: 0 out of 5 stars0 ratingsEnterprise PowerShell Scripting Bootcamp Rating: 0 out of 5 stars0 ratingsLearning Docker - Second Edition Rating: 0 out of 5 stars0 ratingsEthical Hacking Rating: 4 out of 5 stars4/5Wordpress 2023 A Beginners Guide : Design Your Own Website With WordPress 2023 Rating: 0 out of 5 stars0 ratingsGetting Started with Kubernetes - Second Edition Rating: 0 out of 5 stars0 ratingsLinux Shell Scripting Cookbook - Third Edition Rating: 4 out of 5 stars4/5Implementing DevOps on AWS Rating: 0 out of 5 stars0 ratingsCybersecurity Architect's Handbook: An end-to-end guide to implementing and maintaining robust security architecture Rating: 0 out of 5 stars0 ratingsLinux Bible Rating: 0 out of 5 stars0 ratingsSpring Batch in Action Rating: 0 out of 5 stars0 ratingsLearning Nagios 4 Rating: 5 out of 5 stars5/5Bash Command Line Pro Tips Rating: 5 out of 5 stars5/5Learning Ansible 2 - Second Edition Rating: 5 out of 5 stars5/5DevOps: Introduction to DevOps and its impact on Business Ecosystem: Introduction to DevOps and its impact on Business Ecosystem Rating: 0 out of 5 stars0 ratingsMastering Kubernetes Rating: 5 out of 5 stars5/5Linux: Learn in 24 Hours Rating: 5 out of 5 stars5/5Security Monitoring with Wazuh: A hands-on guide to effective enterprise security using real-life use cases in Wazuh Rating: 0 out of 5 stars0 ratingsLinux: A Comprehensive Guide to Linux Operating System and Command Line Rating: 0 out of 5 stars0 ratings
Reviews for Learning Azure DevOps
0 ratings0 reviews
Book preview
Learning Azure DevOps - Myra Kelnor
Learning Azure DevOps
Outperform DevOps using Azure Pipelines, Artifacts, Boards, Azure CLI, Test Plans and Repos
Myra Kelnor
Preface
To help cloud professionals make the most of the Azure DevOps platform, Learning Azure DevOps
is a practical book that walks them through the process step-by-step. This book goes over all the bases of DevOps, including how to automate crucial tasks, deploy infrastructure as code (IaC), and set up and manage CI/CD pipelines.
At the outset, the chapters will teach readers how to create Azure DevOps projects and link their repositories to VCSes like GitHub. Any application's build, test, and deployment processes, including Spring Boot's, can be automated with Azure Pipelines by configuring Pipeline as Code using YAML. To make sure that professionals can manage scalable, cloud-native apps, we also cover advanced topics like containerizing apps with Docker and deploying them to Azure Kubernetes Service (AKS).
Using frameworks such as JUnit, Mockito, and Postman, the book goes even further into automated testing to guarantee quality assurance and continuous testing. It teaches to automate backup and disaster recovery procedures for resilient operations and to use Flyway to perform schema migrations. Additionally, teams are guided to work efficiently together through Azure Boards, shared pipelines, and centralized infrastructure management, highlighting collaboration. Also covered is Azure DevOps Analytics, which readers can use to keep tabs on their projects and teams' performance using real-time dashboards.
In this book you will learn how to:
Integrate with Git for version control and set up Azure DevOps projects.
Develop YAML-based Pipeline as Code to streamline the process of automating builds, tests, and deployments.
Dockerize your apps and then launch them on AKS.
Utilize Azure Boards and Project Boards to manage and monitor work items, tasks, and user stories.
Add Postman, JUnit, and Mockito to your continuous integration pipelines to automate your application testing.
Integrate Flyway into your Azure Pipelines to automate database schema migrations and achieve continuous delivery.
Facilitate cross-team and cross-project cooperation by establishing shared pipelines and resources.
Use Azure DevOps Analytics and performance insights for project management and monitoring.
Deploy backups and failover procedures automatically in Azure DevOps.
Use Terraform in conjunction with Azure Pipelines to deploy cloud-based IaC.
Prologue
Upon beginning my journey with Azure DevOps, I was astounded by its immense power and versatility. The more I looked into it, the more I realized that it was a full-featured platform with the potential to automate, streamline, and revolutionize our DevOps strategy, rather than merely another toolset. Managing numerous teams, projects, and infrastructure simultaneously is a major challenge in today's cloud workflows, and I learned this firsthand as I worked with Azure DevOps on actual projects. Learning Azure DevOps,
is a reflection of my experiences, and I hope it serves as a useful resource for professionals looking to adopt DevOps at scale.
My intention all along was to provide an opportunity for practical training. As the reader, what I want from you is action, not merely reading. Each chapter is organized around practical tasks that you can complete as you progress. Whether you're building CI/CD pipelines or managing containerized applications, I'll walk you through each step. For example, you'll quickly learn how to create and configure Azure DevOps projects, integrate GitHub repositories, and implement automated workflows. One of the most significant aspects of this book is its emphasis on real-world scenarios. We start with fundamental concepts like integrating your source code repository and using YAML to define pipelines before progressing to more advanced topics like Infrastructure as Code (IaC) with Terraform. Each task builds on the previous one to ensure that you have a consistent learning experience. This isn't just about setting things up and moving on. It's about understanding why we make certain decisions, how they affect the overall DevOps lifecycle, and how to apply these principles in your own work environments.
I wanted to make sure that this book portrayed the importance of collaboration in modern DevOps. From creating shared pipelines to collaborating with multiple teams, I emphasize how to align DevOps practices with teamwork. We'll look at the features of Azure Boards, including how to track work items, bugs, and sprints in a way that is understandable to both developers and project managers. You'll learn how to strike a balance between productivity and transparency, so that everyone on the team is aware of the project's current state at all times.
This book will teach you automate everything from builds and tests to database migrations and infrastructure provisioning. By the end, you'll be able to create an automated pipeline that not only builds and tests your application, but also deploys it to a scalable cloud environment such as Azure Kubernetes Service (AKS), including disaster recovery and backup procedures. These are skills that will change the way you and your team deliver software.
I think this book's pragmatic approach will speak to you as a professional who wants to become an expert in Azure DevOps. This is not about theoretical knowledge; it is about providing you with the tools and confidence to use Azure DevOps effectively in your daily work.
Copyright © 2024 by GitforGits
All rights reserved. This book is protected under copyright laws and no part of it may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or by any information storage and retrieval system, without the prior written permission of the publisher. Any unauthorized reproduction, distribution, or transmission of this work may result in civil and criminal penalties and will be dealt with in the respective jurisdiction at anywhere in India, in accordance with the applicable copyright laws.
Published by: GitforGits
Publisher: Sonal Dhandre
www.gitforgits.com
support@gitforgits.com
First Printing: August 2024
Cover Design by: Kitten Publishing
For permission to use material from this book, please contact GitforGits at support@gitforgits.com.
Content
Preface
GitforGits
Acknowledgement
Chapter 1: Getting Started with Azure DevOps
Overview
What is Azure DevOps?
Services Offered by Azure DevOps
Azure Repos
Azure Pipelines
Azure Boards
Azure Test Plans
Azure Artifacts
How Azure DevOps Forms a Unified Platform?
Setting up Azure DevOps Organization and Projects
Create an Azure DevOps Account
Setting up Organization
Setting up a New Project
Configuring Repositories
Configuring Pipelines
Setting up Testing Environments
Managing Multiple Projects within an Organization
Installing and configuring Azure CLI
Installing Azure CLI on Windows
Logging into Azure CLI
Configuring Azure CLI
Set Default Output Format
Set Default Resource Group
Viewing Current Configurations
Popular Azure CLI Commands In-use
Creating and Managing Resource Groups
Working with Azure Virtual Machines
Managing Azure DevOps Pipelines
Managing Kubernetes Clusters
Working with Storage Accounts
Deploying Azure Resources using ARM Templates
Introduction to Visual Studio Code for DevOps tasks
Installing VS Code on Windows
VS Code Features and Components for DevOps
Integrated Terminal
Git Integration
Extensions for Azure and DevOps
Editing and Managing YAML Pipelines
Task Automation with Task Runner
Remote Development
Cloning and Setting up REST API Application
Cloning the Spring Boot REST API Repository
Opening Project in VS Code
Building the Application
Running the Application Locally
Preparing Project for Azure DevOps
Summary
Chapter 2: Pipeline as Code with YAML
Overview
Introduction to Pipeline as Code
Introduction to YAML in Pipeline as Code
Benefits of YAML in Pipeline as Code
Exploring YAML for Azure Pipelines
Creating Pipeline Definition File
Defining Triggers
Specifying Pipeline Environment
Defining the Build Stage
Running Unit Tests
Defining Build Artifacts
Running the Pipeline in Azure DevOps
Modifying the Pipeline
Creating Build Pipeline for Spring Boot
Create a New Pipeline in Azure DevOps
Writing the Build Pipeline for Spring Boot
Configuring Unit Testing
Saving and Running the Pipeline
Modifying the Pipeline
Structuring Multi-Stage YAML Pipelines
Define Structure of Multi-Stage Pipelines
Defining Build Stage
Defining Staging
Defining Production Stage
Running and Monitoring the Multi-stage Pipeline
Using VS Code extensions for YAML
Installing the YAML Extension in VS Code
Installing Azure Pipelines Extension
Leveraging IntelliSense for YAML files
Enabling YAML Linting and Formatting
Using Snippets for faster YAML Editing
Snippet Overview
Creating Custom Snippets
Validating and Testing YAML files
Real-time Validation
Schema-based Validation
Summary
Chapter 3: Continuous Integration with Azure Pipelines
Overview
Getting Started with Continuous Integration
Configuring Build Triggers
Understanding Build Triggers
Configuring a Trigger in the YAML Build Pipeline
Configuring Pull Request Triggers
Testing the Build Trigger
Configuring Path Filters for Triggers
Automating Tests in CI pipelines with JUnit and Mockito
JUnit and Mockito Overview
Installing and Configuring JUnit and Mockito
Writing Unit Tests with JUnit
Mocking Dependencies with Mockito
Automating Tests in the CI Pipeline
Handling Code Quality with Static Analysis
Setting up SonarQube in Azure Pipelines
Use SonarCloud
Install the SonarQube Extension in Azure Pipelines
Configuring YAML file for SonarQube Analysis
Update the YAML Pipeline
Running Static Analysis in CI Pipeline
Viewing the SonarQube Report
Using Azure Pipelines to Test Project
Ensuring the CI Pipeline is Setup
Running the CI Pipeline in Azure Pipelines
Commit and Push Changes to the Repository
Monitor the Pipeline
Viewing Build Logs
Testing the Spring Boot Project in the Pipeline
Summary
Chapter 4: Continuous Delivery with Azure Pipelines
Overview
Understanding Continuous Delivery (CD) and Deployment Strategies
Deployment Strategies in Azure DevOps
Blue-Green Deployment
Canary Release
Deploying Spring Boot Apps to Azure App Service
Deploying Application to Azure App Service
Preparing Spring Boot Application
Creating Azure App Service Instance
Deploying Application
Automating Deployment Process using Azure Pipelines
Configure Deployment Stage in YAML Pipeline
Running Automated Deployment Pipeline
Managing Multiple Environments in Azure DevOps
Understanding Environment Management
Setting up Multiple Environments in YAML file
Linking Environments in Azure DevOps
Setting Deployment Conditions
Conditional Deployment
Approvals and Gates
Triggering Pipeline and Managing Environment Flow
Implementing Approval Gates and Checks
Setting up Environments for Approvals
Adding Approval Gates in the YAML Pipeline
Testing Approval Gates in Action
Implementing Additional Checks
Using ARM Templates to Automate Infrastructure Provisioning
Understanding ARM Templates
Creating ARM Template for Spring Boot Infrastructure
Create a JSON File
Deploying the ARM Template Using Azure CLI
Automating ARM Template Deployment
Summary
Chapter 5: Managing Dependencies with Azure Artifacts
Overview
Getting Started with Azure Artifacts
Creating an Azure Artifacts Feed
Navigate to Azure Artifacts
Create a New Feed
Configure Permissions
Maven for Azure Artifacts
Connect to Feed
Update Maven Settings
Configure Project's POM File
Uploading and Consuming Packages
Integrating Azure Artifacts with CI/CD Pipeline
Setting up NuGet Feeds
Creating a NuGet Feed in Azure Artifacts
Setting up NuGet on Your Local Machine
Pushing NuGet Package to Azure Artifacts
Consuming NuGet Packages in Other Projects
Integrating NuGet Packages into CI/CD Pipeline
Integrating Dependencies into CI/CD Pipeline
Integrating Maven Dependencies into CI/CD Pipeline
Integrating NuGet Dependencies into CI/CD Pipeline
Managing Version Control for Dependencies
Managing Version Control for Packages
Managing Package Versions in Maven
Setting Package Versions
Upgrading to a New Version
Rolling Back to a Previous Version
Managing NuGet Package Versions
Setting Package Versions in NuGet
Upgrading to a New Version
Rolling Back to a Previous Version
Using Version Ranges in NuGet
Version Control and Package Publishing in CI/CD Pipeline
Publishing Artifacts from Build Pipelines
Leveraging the Existing Build Pipeline
Modifying the Pipeline to Publish NuGet Artifacts
Accessing and Using Published NuGet Packages
Managing Versions of Published Artifacts
Summary
Chapter 6: Testing and Quality Assurance with Azure Test Plans
Overview
Up and Running with Azure Test Plans
Activating Azure Test Plans
Configuring Azure Test Plans
Create a Test Plan
Define Test Suites
Adding Team Members
Integrating with Work Items
Configuring Azure Test Runner for Manual Tests
Setting up Test Plans for Manual Testing
Creating Structured Test Cases
Executing Manual Tests