Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Azure Strategy and Implementation Guide, Fourth Edition

You're reading from   Azure Strategy and Implementation Guide, Fourth Edition The essential handbook to cloud transformation with Azure

Arrow left icon
Product type Paperback
Published in May 2021
Publisher Packt
ISBN-13 9781801077972
Length 228 pages
Edition 4th Edition
Tools
Arrow right icon
Authors (5):
Arrow left icon
Aaditya Pokkunuri Aaditya Pokkunuri
Author Profile Icon Aaditya Pokkunuri
Aaditya Pokkunuri
Greg Leonardo Greg Leonardo
Author Profile Icon Greg Leonardo
Greg Leonardo
David Rendón David Rendón
Author Profile Icon David Rendón
David Rendón
Jason Milgram Jason Milgram
Author Profile Icon Jason Milgram
Jason Milgram
Jack Lee Jack Lee
Author Profile Icon Jack Lee
Jack Lee
+1 more Show less
Arrow right icon
View More author details
Toc

Table of Contents (10) Chapters Close

Preface 1. Introduction 2. Automation and governance in Azure FREE CHAPTER 3. Modernizing with hybrid cloud and multicloud 4. Cloud migration: Planning, implementation, and best practices 5. Enabling secure, remote work with Microsoft Azure AD and WVD 6. Security fundamentals to help protect against cybercrime 7. Offers, support, resources, and tips to optimize cost in Azure 8. Conclusion Index

Azure DevOps

While this chapter isn't about Azure DevOps, it's a good idea to begin with a fundamental understanding of what it brings to the table. Azure DevOps is both a developer tool and a business tool, as it can be the source of truth for your code base and a backlog of items that code needs to accomplish. Let's look at some of the options that it brings to the table, from which you can pick and choose:

  • Azure Repos allows you to either create a Git repository or Team Foundation Version Control to store your development source control.
  • Azure Pipelines, one of the critical processes we will use in this chapter for the artifacts we create, provides build and release services for continuous integration and delivery (CI/CD) of your apps.
  • Azure Boards helps deliver a product backlog to plan and track work, code defects, and other issues that may arise during your software development.
  • Azure Test Plans allows you to test the code within your repository and enables you to perform manual and exploratory testing, along with continuous testing.
  • Azure Artifacts provides the elements needed for your code to be packaged and deployed, such as NuGet resources usually shared with your CI/CD pipelines.

As you can see, Azure DevOps is Microsoft's tool for deploying and managing applications within Azure as part of the release management process. To learn more about Azure DevOps, you can head over to the documentation at https://docs.microsoft.com/azure/devops/user-guide/what-is-azure-devops?view=azure-devops.

Note

Azure DevOps is available for free with a five-user license, so feel free to have a look and explore how deployment in Azure works. Head to https://azure.microsoft.com/services/devops/ to create your free account.

Now that we've discussed some of the toolings at a very high level, let's take a look at ARM templates.

ARM templates

ARM templates are how your infrastructure is represented as code. ARM templates help teams take a more agile approach to deploying infrastructure in the cloud; it is no longer necessary to click deploy within the Azure portal to create your infrastructure. An ARM template is a mixture of a JSON file representing the configuration of your infrastructure and a PowerShell script to execute that template and create the infrastructure.

The real benefit of using the ARM template system is that it allows you to have declarative syntax. That means you can deploy a virtual machine and create the networking infrastructure that goes around it. Templates end up providing a process that can be run repeatedly in a very consistent manner. They manage the desired state of the infrastructure, meaning a template becomes the source of truth for those infrastructure resources. If you make changes to your infrastructure, you should do that through the templates.

The template deployment process can't be accomplished without orchestrating how the template process needs to run and what order it needs to run in. It is also useful to break these files into smaller chunks and allow them to be linked together or reused in different fashions with other templates. This can help with understanding and controlling your infrastructure while making it repeatable and stable. ARM templates are used in CI/CD pipelines and code deployment to build a suite of applications within the organization.

The following JSON file shows you how ARM templates are structured:

{
  "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
  "contentVersion": "1.0.0.0",
  "parameters": {},
  "variables": {},
  "resources": [],
  "outputs": {}
}

As you can see, there are several important parts: parameters, variables, resources, and outputs. Let's discuss each of them briefly:

  • ARM template files should be parameterized, and there is a separate file for the parameters that maps to the parameters list in the JSON template file.
  • The variables portion is for variables used within this file. Variables are generally used for creating naming functions to help generate a naming convention that is already structured, and for building that structure to use input parameters to make the name.
  • The resources section is where all of the resources that you're trying to deploy with this ARM template are represented; these can range from virtual machines to websites.
  • Finally, the outputs section is anything you want to pass out of your ARM template to be used elsewhere, such as an SQL Server name, before running your SQL scripts.

Three files are created when you create an ARM template file within Visual Studio:

  • The first is the JSON file, which is the template that is represented in the preceding code.
  • The second is the JSON parameter input file, a file that can be changed with every deployment to match the environment you want to deploy.
  • The third is the PowerShell script used to execute the template. The PowerShell script accepts the resource group's inputs, the ARM template file, and the parameters file.

That was a quick overview of Azure DevOps and the files that are created when you create an ARM template. Let's see how Azure resources are deployed using these ARM templates.

You have been reading a chapter from
Azure Strategy and Implementation Guide, Fourth Edition - Fourth Edition
Published in: May 2021
Publisher: Packt
ISBN-13: 9781801077972
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime