Azure Resource Manager Templates Quick Start Guide
Create, deploy, and manage Azure resources with ARM templates using best practices
Ritesh Modi
- 234 pagine
- English
- ePUB (disponibile sull'app)
- Disponibile su iOS e Android
Azure Resource Manager Templates Quick Start Guide
Create, deploy, and manage Azure resources with ARM templates using best practices
Ritesh Modi
Informazioni sul libro
Compose and decompose ARM templates and use advanced concepts like looping, conditions, dependencies, PowerShell and Desired State Configuration.
Key Features
- Design, implement, and unit test ARM templates
- Develop and deploy ARM templates following security best practices
Book Description
Azure Resource Manager (ARM) templates are declarations of Azure resources in the JSON format to provision and maintain them using infrastructure as code. This book gives practical solutions and examples for provisioning and managing various Azure services using ARM templates.
The book starts with an understanding of infrastructure as code, a refresher on JSON, and then moves on to explain the fundamental concepts of ARM templates. Important concepts like iteration, conditional evaluation, security, usage of expressions, and functions will be covered in detail.
You will use linked and nested templates to create modular ARM templates. You will see how to create multiple instances of the same resources, how to nest and link templates, and how to establish dependencies between them.
You will also learn about implementing design patterns, secure template design, the unit testing of ARM templates, and adopting best practices.
By the end of this book, you will understand the entire life cycle of ARM templates and their testing, and be able to author them for complex deployments.
What you will learn
- Understand the foundations of ARM templates including nested and linked templates
- Design, create, and unit test ARM templates using best practices
- Learn about conditional deployments, looping, Custom Script Extensions using PowerShell, Bash, and DSC
- Implement design patterns related to ARM templates
- Run post-deployment PowerShell and Desired State Configuration scripts
- Create solutions and deploy them on Azure using ARM templates
Who this book is for
This books is for developers, DevOps engineers, and architects who have experience in Azure.
Domande frequenti
Informazioni
Section 1: ARM Template Foundational Skills
- Chapter 1, Infrastructure as Code and Configuration Management
- Chapter 2, Azure Resource Manager Templates
- Chapter 3, Understanding Core Elements of ARM Templates
- Chapter 4, Advance Template Features
Infrastructure as Code and Configuration Management
- Configuration management
- Infrastructure as code
- Understanding ARM templates
- Designing ARM template
- A primer on JSON
- Introducing Azure Resource Manager
What is configuration management?
- Environment or infrastructure resources
- Application deployment
Infrastructure as Code
- Lack of repeatability, consistency, and predictability during provisioning and updating environments. The configuration values for scripts are either entered manually by copying from documents and Excel sheets.
- Lack of diagnostic information and it's difficult to figure out the exact error location.
- Human error while providing configuration values.
- Lack of confidence in deployments.
- Lack of efficiency and speed.
- They should be versioned and stored in a version-controlled repository. Developers should be able to author infrastructure-related code and push them into the repository.
- The repository helps with collaborating among developers about code related to infrastructure.
- There should be a process established to verify and validate the changes done to infrastructure code to ensure that only well-tested code is deployed to higher-level environments.
- After verification, the code should be stored in a place that can be used by all the environments for creation and updates.
- Configuration information for each environment should be stored alongside the actual infrastructure code. These configurations can then be applied to each environment as applicable.
- After the infrastructure code is deployed to pre-production and production environments, appropriate operational validation should be conducted to ensure that the environment is behaving as intended and meeting expectations.
- There should be active monitoring of the environment and any deviation from the known desired configuration should be reported back.
What are ARM templates?
- Specifying resources and their configurations in a declarative manner. There is no scripting involved in provisioning resources.
- Providing intent and what should be provisioned by defining the resources rather than how to deploy the resources.
- Offers idempotent deployments by ensuring that the end state of the deployment is always consistent and predictable. This means that even during incremental deployments, the end state will remain consistent. It also means that templates deployed over and over will not change the end result, and environments will be equivalent when used to create multiple environments.
- Orchestrates the provisioning and configuration process by declaring dependencies between resources.
- Parameterizes the deployment process by enabling reusability, modular, and generic development.
- Cross-subscription, cross-region, and multiple resource group deployment and configuration of resources.
- Enables DevOps in the continuous integration and the continuous deployment of resources and the environment.
Designing ARM templates
- Identification of resources: This is the first step when designing ARM templates for a solution; it involves the identification of resources and their count. There are...