chapter seven

7 Complex deployments using Azure DevOps

 

This chapter covers

  • Basic understanding of Azure DevOps pipelines
  • Create and understand the purpose of Service Connections
  • Write and maintain Azure DevOps pipelines
  • Deploy infrastructure to the cloud using Azure DevOps pipelines

In the chapters up until now you have learned (hopefully!) a lot about the Azure Resource Manager, ARM Templates and Bicep. You have used different tools like PowerShell and the Azure CLI to interact with ARM. You have also used those tools to deploy templates to Azure in a manual way. By doing that manually, there are no enforcements, checks, or policies in place to take control of the quality of the bicep templates. A mistake is easily made and this would allow developers to potentially break the production environment.

Also, working manually with the CLI means that a person needs to log in to Azure to deploy a template. The result of that is that at least one person has enough permissions on the production environment to potentially break it where it would be best if that was not the case.

So far you probably stored all the templates you created while reading this book on your local system and deployed them from there. If developers in a real company working on the same infrastructure would do that, they are bound to risky file copying back and forth with the risk of overwriting newer versions of a certain file with an older version. You would rather use a version control system.

7.1     Meet Toma Toe Pizzas

7.2     Crafting the bicep files

7.2.1   Describing the App Service Plan

7.2.2   Describing the App Service

7.2.3   Finalizing the template

7.3     Storing templates in Source Control

7.4     Automated build and release pipelines

7.4.1   Triggers

7.4.2   Tasks

7.4.3   Grouping tasks in a job

7.4.4   Service Connections

7.4.5   Configure Azure DevOps to run your pipeline

7.5     Adding logical phases to your pipeline

7.5.1   Identifying the logical phases

7.5.2   Accessing artifacts from different jobs

7.5.3   Transpiling Bicep in a pipeline stage

7.5.4   Deploying a template from a pipeline artifact

7.6     Adding the traffic manager

7.6.1   Deployment of the traffic manager

7.7     Creating a real-world example pipeline

7.7.1   Completing the pipeline

7.8     Summary