SlideShare a Scribd company logo
WHAT IS ARM
Azure Service Manager (ASM aka ‘Classic’)
• Legacy way to deploy and manage applications in Azure
• Classic portal
• PowerShell / CLI (default mode)
• No templating, no grouping
Azure Resource Manager (ARM)
• Modern way to deploy and manage applications in Azure
• Production Portal
• PowerShell / Cross platform CLI
• REST API
• Idempotent and incremental deployments
• Use Azure Resource Groups as unit of management
• Templates and declarative orchestration
• Infrastructure As Code approach
HISTORY
RESOURCE
GROUP
2 resources exist in one* resource group
1 container for multiple resources
3 resource groups can span regions
4 resource groups can span services
*and only one
RESOURCE GROUP
ORGANIZE
webapp storage db
MANAGE
webapp storage db
manage groups not individual resources
• Assign metadata
to resources
• Multiple tags per
group or resource
• Used with billing,
reporting and
automation
MANAGE
• Control access to
resources
• Fine grained roles
and operations
• Backed by Azure
AD
• Govern how
resources are
used with rules
• Apply restrictions
on type, region,
size, name, etc
• Global or group
level
• Protect live
resources
• Prevent accidental
changes with
RBAC
• Lock against
deletion or
modification
SQL - A Website Virtual
Machines
SQL-A
Website
[SQL CONFIG] VM
(2x)
DEPENDS ON SQLDEPENDS ON SQL
SQLCONFIG
TEMPLATING
3 Repeated & consistent deployments
2 Declarative - desired state
1 Specify resources & dependencies
4 Incremental deployments - idempotent
5 JSON based description
ARM Template
{
"parameters": {},
"variables": {},
"resources": [
{
type: "Microsoft.Compute/virtualMachines"
}
],
"outputs": {}
}
INFRASTRUCTURE AS CODE
AUTHORING
3 Azure Portal
2 Visual Studio Code (cross platform)
1 Visual Studio 2015
4 Exporting existing resources
5 Any code/text editor with JSON support
Visual Studio Code
Create automation
script (export)
Portal template
management
Don’t reinvent the wheel
github.com/Azure/azure-quickstart-templates
Full reference- aka.ms/armref
DEPLOYING
3 Azure CLI (cross platform)
2 PowerShell
1 Azure Portal
4 Visual Studio / Visual Studio Code
5 Visual Studio Team Services (CI / CD)
6 REST API
7 SDKs (.NET, Java, Node.js, Python, etc)
8 Octopus, Ansible, Chef, Puppet
9 ‘Deploy to Azure’ HTML button
• Github Quickstart
• ARM Template Full Reference
• Azure.com template library
• Azure Marketplace
https://github.com/Azure/azure-quickstart-templates
ARM RESOURCES
https://docs.microsoft.com/en-gb/azure/templates/
https://azure.microsoft.com/en-gb/resources/templates/
https://azuremarketplace.microsoft.com/
ARM TOOLING AND SDKS
Visual Studio Code
https://github.com/projectkudu/
ARMClient
https://docs.microsoft.com/en-gb/azure/#pivot=sdkstools
Visual Studio
Azure Resource Explorer
https://resources.azure.com/
 Variable elements
 Azure Subscription GUID
 Resource group name (e.g. myGroup)
 Resource name (e.g. myStore)
Azure Resource Ids
/subscriptions/c000110d-b000-4000-b000-
b000bf000b00/resourceGroups/myGroup/providers/
Microsoft.Storage/storageAccounts/myStore
• Resource section
• Resource provider
• Resource type (plus optional sub-type)
Warning!
Nerdy Stuff
 Template file, JSON - e.g. azuredeploy.json
 Main file, declares resources, input parameters, etc
 Parameter file, JSON - e.g. azuredeploy.parameters.json
 Optional file, provides values for the all parameters at deploy time
 Deploy into a resource group (groups are not defined in the template)
Templates Basics
$ az group deployment create -g "MyGroup" --template-file "azuredeploy.json"
--parameters "@azuredeploy.parameters.json"
$ New-AzureRmResourceGroupDeployment -ResourceGroupName "MyGroup"
-TemplateFile "azuredeploy.json" -TemplateParameterFile "azuredeploy.parameters.json"
 Schema (required)
 Content Version (required)
 Parameters
 Variables
 Resources (array)
 Outputs
General Template Structure
{
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": { },
"variables": { },
"resources": [ ],
"outputs": { }
}
Full documentation
Best practises for template
development
Parameters are exposed to the
user of the template as inputs
they can provide.
Values are passed to the
template via a parameter file
or from the command line
Variables are used internally
by the template for values you
wish to use in several places
or to prevent hard-coding
"vmUserName": {
"type": "string",
"defaultValue": “adminuser",
}
"appPlanName": "app-service-plan",
"subnet": "10.0.100.0/24",
Visual Studio Code
Azure Resource Manager Tools ARM snippets
https://portal.azure.com/#create/Microsoft.Template
Template Functions
 Array and object functions
 Comparison functions
 Deployment value functions
 Resource functions
 Numeric functions
 String functions
https://docs.microsoft.com/en-us/azure/azure-resource-
manager/resource-group-template-functions
Note.
Functions are enclosed in braces
[ ] to distinguish them from literal
string values in JSON.
Template Functions - Commonly Used
parameters()
variables()
resourceGroup()
resourceId()
reference()
concat()
listKeys()
"location":
"[resourceGroup().location]",
"name": "[variables('vnetName')]",
"size": "[parameters('vmSize')]",
"dependsOn":
["[resourceId('Microsoft.Sql/servers',
parameters('sqlServerName'))]"]
listKeys(variables('storageAcctName'),'
2015-05-01-preview').key1)]"
"nicName":
"[concat(parameters('vmName'),
'_nic')]",
Resource Providers & Types
• Microsoft.Compute
• Microsoft.Network
• Microsoft.Web
• Microsoft.Compute/disks
• Microsoft.Compute/virtualMachines
• Microsoft.Network/publicIPAddresses
• Microsoft.Network/virtualNetworks/subnet
s
Note.
There are over 100 resource providers
and over 700 resource types
$ az provider list -o table
$ az provider show -n Microsoft.compute
Resource Dependencies
"dependsOn": [
"[resourceId('Microsoft.Network/virtualNetworks/',
variables('vnetName'))]"],
"dependsOn": [
"[resourceId('Microsoft.Network/networkInterfaces/',
variables('nicName'))]"],
"type": "Microsoft.Network/virtualNetworks",
Template Outputs
"tomcat_url": {
"type": "string",
"value": "[concat('http://', reference(variables('tomcatIpName')).dnsSettings.fqdn, '/')]"
}
"storageAccountKey": {
"type": "string",
"value": "[listKeys(variables('storageAcctName'), '2015-05-01-preview').key1]"
}
“storeAcctObject": {
"type": "object",
"value": "[reference(variables('storageAcctName'))]"
}
 Quickstart templates - https://github.com/Azure/azure-quickstart-templates
 ARM full reference http://aka.ms/armref
 Azure published templates - https://azure.microsoft.com/en-gb/resources/templates/
 Resource explorer - https://resources.azure.com/
 Resource Manager main docs - https://docs.microsoft.com/en-us/azure/azure-resource-manager/
 ARM template best practices - https://aka.ms/armbest
 ARM template main docs - https://docs.microsoft.com/en-us/azure/templates/
 Template functions reference - https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-
group-template-functions
 Visual Studio Code - https://code.visualstudio.com/
 Azure Portal template editor - https://portal.azure.com/#create/Microsoft.Template
 ARM Client tool - https://github.com/projectkudu/ARMClient
Azure Resource Manager - Technical Primer

More Related Content

What's hot

TechnoramaNL Azure Key Vault, Azure Dev Ops and Azure Data Factor
TechnoramaNL Azure Key Vault, Azure Dev Ops and Azure Data FactorTechnoramaNL Azure Key Vault, Azure Dev Ops and Azure Data Factor
TechnoramaNL Azure Key Vault, Azure Dev Ops and Azure Data Factor
Erwin de Kreuk
 
Test & Dev on the AWS Cloud
Test & Dev on the AWS CloudTest & Dev on the AWS Cloud
Test & Dev on the AWS Cloud
Amazon Web Services
 
Application Lifecycle Management in a Serverless World
Application Lifecycle Management in a Serverless WorldApplication Lifecycle Management in a Serverless World
Application Lifecycle Management in a Serverless World
Amazon Web Services
 
Automating Software Deployments with AWS CodeDeploy by Matthew Trescot, Manag...
Automating Software Deployments with AWS CodeDeploy by Matthew Trescot, Manag...Automating Software Deployments with AWS CodeDeploy by Matthew Trescot, Manag...
Automating Software Deployments with AWS CodeDeploy by Matthew Trescot, Manag...
Amazon Web Services
 
Dev & Test on AWS - Journey Through the Cloud
Dev & Test on AWS - Journey Through the CloudDev & Test on AWS - Journey Through the Cloud
Dev & Test on AWS - Journey Through the Cloud
Amazon Web Services
 
Create Secure Test and Dev Environments in the Cloud
Create Secure Test and Dev Environments in the CloudCreate Secure Test and Dev Environments in the Cloud
Create Secure Test and Dev Environments in the Cloud
RightScale
 
AWS Code Services
AWS Code ServicesAWS Code Services
AWS Code Services
Amazon Web Services
 
Managing Your Infrastructure as Code by Travis Williams, Solutions Architect,...
Managing Your Infrastructure as Code by Travis Williams, Solutions Architect,...Managing Your Infrastructure as Code by Travis Williams, Solutions Architect,...
Managing Your Infrastructure as Code by Travis Williams, Solutions Architect,...
Amazon Web Services
 
AWS Services - Part 1
AWS Services - Part 1AWS Services - Part 1
AWS Services - Part 1
Sivakumar Ramar
 
AWS re:Invent 2016: Chalk Talk: Succeeding at Infrastructure-as-Code (GPSCT312)
AWS re:Invent 2016: Chalk Talk: Succeeding at Infrastructure-as-Code (GPSCT312)AWS re:Invent 2016: Chalk Talk: Succeeding at Infrastructure-as-Code (GPSCT312)
AWS re:Invent 2016: Chalk Talk: Succeeding at Infrastructure-as-Code (GPSCT312)
Amazon Web Services
 
Improving Infrastructure Governance on AWS by Henrik Johansson, Solutions Ar...
 Improving Infrastructure Governance on AWS by Henrik Johansson, Solutions Ar... Improving Infrastructure Governance on AWS by Henrik Johansson, Solutions Ar...
Improving Infrastructure Governance on AWS by Henrik Johansson, Solutions Ar...
Amazon Web Services
 
Intro to Azure Static Web Apps
Intro to Azure Static Web AppsIntro to Azure Static Web Apps
Intro to Azure Static Web Apps
Moaid Hathot
 
Test & Development on the AWS Cloud
Test & Development on the AWS CloudTest & Development on the AWS Cloud
Test & Development on the AWS Cloud
Amazon Web Services
 
CloudFormation Best Practices
CloudFormation Best PracticesCloudFormation Best Practices
CloudFormation Best Practices
Amazon Web Services
 
(DVO313) Building Next-Generation Applications with Amazon ECS
(DVO313) Building Next-Generation Applications with Amazon ECS(DVO313) Building Next-Generation Applications with Amazon ECS
(DVO313) Building Next-Generation Applications with Amazon ECS
Amazon Web Services
 
Configuration Management with AWS OpsWorks  by Amir Golan, Senior Product Man...
Configuration Management with AWS OpsWorks  by Amir Golan, Senior Product Man...Configuration Management with AWS OpsWorks  by Amir Golan, Senior Product Man...
Configuration Management with AWS OpsWorks  by Amir Golan, Senior Product Man...
Amazon Web Services
 
AWS December 2015 Webinar Series - EC2 Dedicated Hosts
AWS December 2015 Webinar Series - EC2 Dedicated HostsAWS December 2015 Webinar Series - EC2 Dedicated Hosts
AWS December 2015 Webinar Series - EC2 Dedicated Hosts
Amazon Web Services
 
Configuration Management with AWS OpsWorks - November 2016 Webinar Series
Configuration Management with AWS OpsWorks - November 2016 Webinar SeriesConfiguration Management with AWS OpsWorks - November 2016 Webinar Series
Configuration Management with AWS OpsWorks - November 2016 Webinar Series
Amazon Web Services
 
Building Solution Templates and Managed Applications for the Azure Marketplace
Building Solution Templates and Managed Applications for the Azure MarketplaceBuilding Solution Templates and Managed Applications for the Azure Marketplace
Building Solution Templates and Managed Applications for the Azure Marketplace
Microsoft Tech Community
 
AWS Systems manager 2019
AWS Systems manager 2019AWS Systems manager 2019
AWS Systems manager 2019
John Varghese
 

What's hot (20)

TechnoramaNL Azure Key Vault, Azure Dev Ops and Azure Data Factor
TechnoramaNL Azure Key Vault, Azure Dev Ops and Azure Data FactorTechnoramaNL Azure Key Vault, Azure Dev Ops and Azure Data Factor
TechnoramaNL Azure Key Vault, Azure Dev Ops and Azure Data Factor
 
Test & Dev on the AWS Cloud
Test & Dev on the AWS CloudTest & Dev on the AWS Cloud
Test & Dev on the AWS Cloud
 
Application Lifecycle Management in a Serverless World
Application Lifecycle Management in a Serverless WorldApplication Lifecycle Management in a Serverless World
Application Lifecycle Management in a Serverless World
 
Automating Software Deployments with AWS CodeDeploy by Matthew Trescot, Manag...
Automating Software Deployments with AWS CodeDeploy by Matthew Trescot, Manag...Automating Software Deployments with AWS CodeDeploy by Matthew Trescot, Manag...
Automating Software Deployments with AWS CodeDeploy by Matthew Trescot, Manag...
 
Dev & Test on AWS - Journey Through the Cloud
Dev & Test on AWS - Journey Through the CloudDev & Test on AWS - Journey Through the Cloud
Dev & Test on AWS - Journey Through the Cloud
 
Create Secure Test and Dev Environments in the Cloud
Create Secure Test and Dev Environments in the CloudCreate Secure Test and Dev Environments in the Cloud
Create Secure Test and Dev Environments in the Cloud
 
AWS Code Services
AWS Code ServicesAWS Code Services
AWS Code Services
 
Managing Your Infrastructure as Code by Travis Williams, Solutions Architect,...
Managing Your Infrastructure as Code by Travis Williams, Solutions Architect,...Managing Your Infrastructure as Code by Travis Williams, Solutions Architect,...
Managing Your Infrastructure as Code by Travis Williams, Solutions Architect,...
 
AWS Services - Part 1
AWS Services - Part 1AWS Services - Part 1
AWS Services - Part 1
 
AWS re:Invent 2016: Chalk Talk: Succeeding at Infrastructure-as-Code (GPSCT312)
AWS re:Invent 2016: Chalk Talk: Succeeding at Infrastructure-as-Code (GPSCT312)AWS re:Invent 2016: Chalk Talk: Succeeding at Infrastructure-as-Code (GPSCT312)
AWS re:Invent 2016: Chalk Talk: Succeeding at Infrastructure-as-Code (GPSCT312)
 
Improving Infrastructure Governance on AWS by Henrik Johansson, Solutions Ar...
 Improving Infrastructure Governance on AWS by Henrik Johansson, Solutions Ar... Improving Infrastructure Governance on AWS by Henrik Johansson, Solutions Ar...
Improving Infrastructure Governance on AWS by Henrik Johansson, Solutions Ar...
 
Intro to Azure Static Web Apps
Intro to Azure Static Web AppsIntro to Azure Static Web Apps
Intro to Azure Static Web Apps
 
Test & Development on the AWS Cloud
Test & Development on the AWS CloudTest & Development on the AWS Cloud
Test & Development on the AWS Cloud
 
CloudFormation Best Practices
CloudFormation Best PracticesCloudFormation Best Practices
CloudFormation Best Practices
 
(DVO313) Building Next-Generation Applications with Amazon ECS
(DVO313) Building Next-Generation Applications with Amazon ECS(DVO313) Building Next-Generation Applications with Amazon ECS
(DVO313) Building Next-Generation Applications with Amazon ECS
 
Configuration Management with AWS OpsWorks  by Amir Golan, Senior Product Man...
Configuration Management with AWS OpsWorks  by Amir Golan, Senior Product Man...Configuration Management with AWS OpsWorks  by Amir Golan, Senior Product Man...
Configuration Management with AWS OpsWorks  by Amir Golan, Senior Product Man...
 
AWS December 2015 Webinar Series - EC2 Dedicated Hosts
AWS December 2015 Webinar Series - EC2 Dedicated HostsAWS December 2015 Webinar Series - EC2 Dedicated Hosts
AWS December 2015 Webinar Series - EC2 Dedicated Hosts
 
Configuration Management with AWS OpsWorks - November 2016 Webinar Series
Configuration Management with AWS OpsWorks - November 2016 Webinar SeriesConfiguration Management with AWS OpsWorks - November 2016 Webinar Series
Configuration Management with AWS OpsWorks - November 2016 Webinar Series
 
Building Solution Templates and Managed Applications for the Azure Marketplace
Building Solution Templates and Managed Applications for the Azure MarketplaceBuilding Solution Templates and Managed Applications for the Azure Marketplace
Building Solution Templates and Managed Applications for the Azure Marketplace
 
AWS Systems manager 2019
AWS Systems manager 2019AWS Systems manager 2019
AWS Systems manager 2019
 

Similar to Azure Resource Manager - Technical Primer

Azure arm templates
Azure arm templatesAzure arm templates
Azure arm templates
sachinkalia15
 
Microsoft Azure essentials
Microsoft Azure essentialsMicrosoft Azure essentials
Microsoft Azure essentials
Vaibhav Gujral
 
CCI2018 - Automatizzare la creazione di risorse con ARM template e PowerShell
CCI2018 - Automatizzare la creazione di risorse con ARM template e PowerShellCCI2018 - Automatizzare la creazione di risorse con ARM template e PowerShell
CCI2018 - Automatizzare la creazione di risorse con ARM template e PowerShell
walk2talk srl
 
Azure for SharePoint Developers - Workshop - Part 3: Web Services
Azure for SharePoint Developers - Workshop - Part 3: Web ServicesAzure for SharePoint Developers - Workshop - Part 3: Web Services
Azure for SharePoint Developers - Workshop - Part 3: Web Services
Bob German
 
Azure provisioning at your control
Azure provisioning at your controlAzure provisioning at your control
Azure provisioning at your control
Govind Kanshi
 
Azure ARM Template
Azure ARM TemplateAzure ARM Template
Azure ARM Template
DevOps Indonesia
 
Azure Day Reloaded 2019 - ARM Template workshop
Azure Day Reloaded 2019 - ARM Template workshopAzure Day Reloaded 2019 - ARM Template workshop
Azure Day Reloaded 2019 - ARM Template workshop
Marco Obinu
 
Serverless in Azure with Functions
Serverless in Azure with FunctionsServerless in Azure with Functions
Serverless in Azure with Functions
Christos Matskas
 
Local Testing and Deployment Best Practices for Serverless Applications - AWS...
Local Testing and Deployment Best Practices for Serverless Applications - AWS...Local Testing and Deployment Best Practices for Serverless Applications - AWS...
Local Testing and Deployment Best Practices for Serverless Applications - AWS...
Amazon Web Services
 
Local Testing and Deployment Best Practices for Serverless Applications - AWS...
Local Testing and Deployment Best Practices for Serverless Applications - AWS...Local Testing and Deployment Best Practices for Serverless Applications - AWS...
Local Testing and Deployment Best Practices for Serverless Applications - AWS...
Amazon Web Services
 
Introduction to DevOps on AWS
Introduction to DevOps on AWSIntroduction to DevOps on AWS
Introduction to DevOps on AWS
Shiva Narayanaswamy
 
TenT-Day09.pptx
TenT-Day09.pptxTenT-Day09.pptx
TenT-Day09.pptx
Johan Myburgh
 
TenT-Day09.pptx
TenT-Day09.pptxTenT-Day09.pptx
TenT-Day09.pptx
JohanMyburgh15
 
Cnam azure ze cloud resource manager
Cnam azure ze cloud  resource managerCnam azure ze cloud  resource manager
Cnam azure ze cloud resource manager
Aymeric Weinbach
 
Managing Your Cloud Assets
Managing Your Cloud AssetsManaging Your Cloud Assets
Managing Your Cloud Assets
Amazon Web Services
 
Become an Automation Ninja in 60 Minutes
Become an Automation Ninja in 60 MinutesBecome an Automation Ninja in 60 Minutes
Become an Automation Ninja in 60 Minutes
Michael Rüefli
 
Azure from scratch part 3 By Girish Kalamati
Azure from scratch part 3 By Girish KalamatiAzure from scratch part 3 By Girish Kalamati
Azure from scratch part 3 By Girish Kalamati
Girish Kalamati
 
WinOps Conf 2016 - Ed Wilson - Configuration Management with Azure DSC
WinOps Conf 2016 - Ed Wilson - Configuration Management with Azure DSCWinOps Conf 2016 - Ed Wilson - Configuration Management with Azure DSC
WinOps Conf 2016 - Ed Wilson - Configuration Management with Azure DSC
WinOps Conf
 
Azure ARM’d and Ready
Azure ARM’d and ReadyAzure ARM’d and Ready
Azure ARM’d and Ready
mscug
 
Iac :: Lessons Learned from Dev to Ops
Iac :: Lessons Learned from Dev to OpsIac :: Lessons Learned from Dev to Ops
Iac :: Lessons Learned from Dev to Ops
Emma Button
 

Similar to Azure Resource Manager - Technical Primer (20)

Azure arm templates
Azure arm templatesAzure arm templates
Azure arm templates
 
Microsoft Azure essentials
Microsoft Azure essentialsMicrosoft Azure essentials
Microsoft Azure essentials
 
CCI2018 - Automatizzare la creazione di risorse con ARM template e PowerShell
CCI2018 - Automatizzare la creazione di risorse con ARM template e PowerShellCCI2018 - Automatizzare la creazione di risorse con ARM template e PowerShell
CCI2018 - Automatizzare la creazione di risorse con ARM template e PowerShell
 
Azure for SharePoint Developers - Workshop - Part 3: Web Services
Azure for SharePoint Developers - Workshop - Part 3: Web ServicesAzure for SharePoint Developers - Workshop - Part 3: Web Services
Azure for SharePoint Developers - Workshop - Part 3: Web Services
 
Azure provisioning at your control
Azure provisioning at your controlAzure provisioning at your control
Azure provisioning at your control
 
Azure ARM Template
Azure ARM TemplateAzure ARM Template
Azure ARM Template
 
Azure Day Reloaded 2019 - ARM Template workshop
Azure Day Reloaded 2019 - ARM Template workshopAzure Day Reloaded 2019 - ARM Template workshop
Azure Day Reloaded 2019 - ARM Template workshop
 
Serverless in Azure with Functions
Serverless in Azure with FunctionsServerless in Azure with Functions
Serverless in Azure with Functions
 
Local Testing and Deployment Best Practices for Serverless Applications - AWS...
Local Testing and Deployment Best Practices for Serverless Applications - AWS...Local Testing and Deployment Best Practices for Serverless Applications - AWS...
Local Testing and Deployment Best Practices for Serverless Applications - AWS...
 
Local Testing and Deployment Best Practices for Serverless Applications - AWS...
Local Testing and Deployment Best Practices for Serverless Applications - AWS...Local Testing and Deployment Best Practices for Serverless Applications - AWS...
Local Testing and Deployment Best Practices for Serverless Applications - AWS...
 
Introduction to DevOps on AWS
Introduction to DevOps on AWSIntroduction to DevOps on AWS
Introduction to DevOps on AWS
 
TenT-Day09.pptx
TenT-Day09.pptxTenT-Day09.pptx
TenT-Day09.pptx
 
TenT-Day09.pptx
TenT-Day09.pptxTenT-Day09.pptx
TenT-Day09.pptx
 
Cnam azure ze cloud resource manager
Cnam azure ze cloud  resource managerCnam azure ze cloud  resource manager
Cnam azure ze cloud resource manager
 
Managing Your Cloud Assets
Managing Your Cloud AssetsManaging Your Cloud Assets
Managing Your Cloud Assets
 
Become an Automation Ninja in 60 Minutes
Become an Automation Ninja in 60 MinutesBecome an Automation Ninja in 60 Minutes
Become an Automation Ninja in 60 Minutes
 
Azure from scratch part 3 By Girish Kalamati
Azure from scratch part 3 By Girish KalamatiAzure from scratch part 3 By Girish Kalamati
Azure from scratch part 3 By Girish Kalamati
 
WinOps Conf 2016 - Ed Wilson - Configuration Management with Azure DSC
WinOps Conf 2016 - Ed Wilson - Configuration Management with Azure DSCWinOps Conf 2016 - Ed Wilson - Configuration Management with Azure DSC
WinOps Conf 2016 - Ed Wilson - Configuration Management with Azure DSC
 
Azure ARM’d and Ready
Azure ARM’d and ReadyAzure ARM’d and Ready
Azure ARM’d and Ready
 
Iac :: Lessons Learned from Dev to Ops
Iac :: Lessons Learned from Dev to OpsIac :: Lessons Learned from Dev to Ops
Iac :: Lessons Learned from Dev to Ops
 

Recently uploaded

Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
Rohit Gautam
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
Pierluigi Pugliese
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
RinaMondal9
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
James Anderson
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
Kumud Singh
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
SOFTTECHHUB
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 

Recently uploaded (20)

Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 

Azure Resource Manager - Technical Primer

  • 1.
  • 2.
  • 3.
  • 5. Azure Service Manager (ASM aka ‘Classic’) • Legacy way to deploy and manage applications in Azure • Classic portal • PowerShell / CLI (default mode) • No templating, no grouping Azure Resource Manager (ARM) • Modern way to deploy and manage applications in Azure • Production Portal • PowerShell / Cross platform CLI • REST API • Idempotent and incremental deployments • Use Azure Resource Groups as unit of management • Templates and declarative orchestration • Infrastructure As Code approach HISTORY
  • 6. RESOURCE GROUP 2 resources exist in one* resource group 1 container for multiple resources 3 resource groups can span regions 4 resource groups can span services *and only one RESOURCE GROUP
  • 8. MANAGE webapp storage db manage groups not individual resources
  • 9. • Assign metadata to resources • Multiple tags per group or resource • Used with billing, reporting and automation MANAGE • Control access to resources • Fine grained roles and operations • Backed by Azure AD • Govern how resources are used with rules • Apply restrictions on type, region, size, name, etc • Global or group level • Protect live resources • Prevent accidental changes with RBAC • Lock against deletion or modification
  • 10.
  • 11. SQL - A Website Virtual Machines SQL-A Website [SQL CONFIG] VM (2x) DEPENDS ON SQLDEPENDS ON SQL SQLCONFIG TEMPLATING 3 Repeated & consistent deployments 2 Declarative - desired state 1 Specify resources & dependencies 4 Incremental deployments - idempotent 5 JSON based description ARM Template { "parameters": {}, "variables": {}, "resources": [ { type: "Microsoft.Compute/virtualMachines" } ], "outputs": {} } INFRASTRUCTURE AS CODE
  • 12.
  • 13. AUTHORING 3 Azure Portal 2 Visual Studio Code (cross platform) 1 Visual Studio 2015 4 Exporting existing resources 5 Any code/text editor with JSON support Visual Studio Code Create automation script (export) Portal template management Don’t reinvent the wheel github.com/Azure/azure-quickstart-templates Full reference- aka.ms/armref
  • 14. DEPLOYING 3 Azure CLI (cross platform) 2 PowerShell 1 Azure Portal 4 Visual Studio / Visual Studio Code 5 Visual Studio Team Services (CI / CD) 6 REST API 7 SDKs (.NET, Java, Node.js, Python, etc) 8 Octopus, Ansible, Chef, Puppet 9 ‘Deploy to Azure’ HTML button
  • 15. • Github Quickstart • ARM Template Full Reference • Azure.com template library • Azure Marketplace https://github.com/Azure/azure-quickstart-templates ARM RESOURCES https://docs.microsoft.com/en-gb/azure/templates/ https://azure.microsoft.com/en-gb/resources/templates/ https://azuremarketplace.microsoft.com/
  • 16. ARM TOOLING AND SDKS Visual Studio Code https://github.com/projectkudu/ ARMClient https://docs.microsoft.com/en-gb/azure/#pivot=sdkstools Visual Studio
  • 17.
  • 19.  Variable elements  Azure Subscription GUID  Resource group name (e.g. myGroup)  Resource name (e.g. myStore) Azure Resource Ids /subscriptions/c000110d-b000-4000-b000- b000bf000b00/resourceGroups/myGroup/providers/ Microsoft.Storage/storageAccounts/myStore • Resource section • Resource provider • Resource type (plus optional sub-type) Warning! Nerdy Stuff
  • 20.  Template file, JSON - e.g. azuredeploy.json  Main file, declares resources, input parameters, etc  Parameter file, JSON - e.g. azuredeploy.parameters.json  Optional file, provides values for the all parameters at deploy time  Deploy into a resource group (groups are not defined in the template) Templates Basics $ az group deployment create -g "MyGroup" --template-file "azuredeploy.json" --parameters "@azuredeploy.parameters.json" $ New-AzureRmResourceGroupDeployment -ResourceGroupName "MyGroup" -TemplateFile "azuredeploy.json" -TemplateParameterFile "azuredeploy.parameters.json"
  • 21.  Schema (required)  Content Version (required)  Parameters  Variables  Resources (array)  Outputs General Template Structure { "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0", "parameters": { }, "variables": { }, "resources": [ ], "outputs": { } } Full documentation Best practises for template development
  • 22. Parameters are exposed to the user of the template as inputs they can provide. Values are passed to the template via a parameter file or from the command line Variables are used internally by the template for values you wish to use in several places or to prevent hard-coding "vmUserName": { "type": "string", "defaultValue": “adminuser", } "appPlanName": "app-service-plan", "subnet": "10.0.100.0/24",
  • 23. Visual Studio Code Azure Resource Manager Tools ARM snippets https://portal.azure.com/#create/Microsoft.Template
  • 24. Template Functions  Array and object functions  Comparison functions  Deployment value functions  Resource functions  Numeric functions  String functions https://docs.microsoft.com/en-us/azure/azure-resource- manager/resource-group-template-functions Note. Functions are enclosed in braces [ ] to distinguish them from literal string values in JSON.
  • 25. Template Functions - Commonly Used parameters() variables() resourceGroup() resourceId() reference() concat() listKeys() "location": "[resourceGroup().location]", "name": "[variables('vnetName')]", "size": "[parameters('vmSize')]", "dependsOn": ["[resourceId('Microsoft.Sql/servers', parameters('sqlServerName'))]"] listKeys(variables('storageAcctName'),' 2015-05-01-preview').key1)]" "nicName": "[concat(parameters('vmName'), '_nic')]",
  • 26. Resource Providers & Types • Microsoft.Compute • Microsoft.Network • Microsoft.Web • Microsoft.Compute/disks • Microsoft.Compute/virtualMachines • Microsoft.Network/publicIPAddresses • Microsoft.Network/virtualNetworks/subnet s Note. There are over 100 resource providers and over 700 resource types $ az provider list -o table $ az provider show -n Microsoft.compute
  • 27. Resource Dependencies "dependsOn": [ "[resourceId('Microsoft.Network/virtualNetworks/', variables('vnetName'))]"], "dependsOn": [ "[resourceId('Microsoft.Network/networkInterfaces/', variables('nicName'))]"], "type": "Microsoft.Network/virtualNetworks",
  • 28. Template Outputs "tomcat_url": { "type": "string", "value": "[concat('http://', reference(variables('tomcatIpName')).dnsSettings.fqdn, '/')]" } "storageAccountKey": { "type": "string", "value": "[listKeys(variables('storageAcctName'), '2015-05-01-preview').key1]" } “storeAcctObject": { "type": "object", "value": "[reference(variables('storageAcctName'))]" }
  • 29.  Quickstart templates - https://github.com/Azure/azure-quickstart-templates  ARM full reference http://aka.ms/armref  Azure published templates - https://azure.microsoft.com/en-gb/resources/templates/  Resource explorer - https://resources.azure.com/  Resource Manager main docs - https://docs.microsoft.com/en-us/azure/azure-resource-manager/  ARM template best practices - https://aka.ms/armbest  ARM template main docs - https://docs.microsoft.com/en-us/azure/templates/  Template functions reference - https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource- group-template-functions  Visual Studio Code - https://code.visualstudio.com/  Azure Portal template editor - https://portal.azure.com/#create/Microsoft.Template  ARM Client tool - https://github.com/projectkudu/ARMClient

Editor's Notes

  1. NOTE - If presenting this deck, the following section goes deeper into ARM, do not present these slides unless you are running a hands on workshop or training lab on the topic
  2. A summary of what Azure Resource Manager does and why it exists
  3. ARM was introduced in 2014 and replaces the legacy API (called ASM - Azure Service Manager) The legacy API goes hand in hand with the classic portal - and is slowly being phased out All work in Azure now should be done via ARM for all the reasons shown here
  4. All resources in ARM must reside in a resource group. Groups are a logical construct to hold resources, they are not a resource themselves.
  5. How you organize resources across groups is up to you, use whatever grouping makes sense based on the application, the lifecycle of those resources or other management / organizational constraints For example this web application has a three resource, we can group those together - so the resource group represents “the app” OR We could also split by resource type e.g. all dbs and all storage go into groups - this way certain teams or individuals can have permissions to those resource types without giving everyone access OR A logical approach is to group by environment so all prod resources for that app go together, all dev and all test are grouped as environments
  6. The key thing about groups as they provide the core unit of management in Azure, at the group level you can apply: Tags: key value pairs to help with billing and other identification of resources, letting you attach your own metadata to a resource group RBAC: control who can see, and interact with resources with a fine grained RBAC roles and operations model, linked to Azure AD Policies: Assign resource polices to enforce rules such as permitted types of resources, resource names, regions, VM sizes and other attributes you want to govern Locks: Prevent modification and deletion of resources
  7. The key thing about groups as they provide the core unit of management in Azure, at the group level you can apply: Tags: key value pairs to help with billing and other identification of resources, letting you attach your own metadata to a resource group RBAC: control who can see, and interact with resources with a fine grained RBAC roles and operations model, linked to Azure AD Policies: Assign resource polices to enforce rules such as permitted types of resources, resource names, regions, VM sizes and other attributes you want to govern Locks: Prevent modification and deletion of resources
  8. NOTE - If presenting this deck, you can stop here if all you needed is a basic intro. The following section goes into a little more depth on the topic of templates and infrastructure as code
  9. Templates are a key capability of ARM allowing you to use the now common infrastructure as code approach ARM templates allow you to specify the resources you want deployed and automate that deployment Templates are declarative and represent *desired state* Templates are idempotent so you can redeploy safely over existing resources, any changed parameters in your template will be applied to existing resources as necessary, e.g. want to scale up - change the instance count in your template and re-deploy
  10. Editing a template in the portal
  11. Lots of ways to author templates, they are standard JSON documents The Azure portal lets you “export” to existing resources and capture a template Github has many templates and is the defacto collection of templates - and good to learn from
  12. There are LOTS of ways to deploy resources via ARM and templates, this is some of the tools and mechanisms available
  13. These are some key online resources for ARM templates
  14. As we touched on during the deploying slide - there are a many libraries, tools and SDKs to allow you to use ARM, both opensource and Microsoft The cross platform CLI is written in Python works on Windows, Linux and OSX it is also open source
  15. NOTE - If presenting this deck, the following section goes deeper into ARM, do not present these slides unless you are running a hands on workshop or training lab on the topic
  16. Resource explorer is a great way to understand more about ARM, you can inspect resources and their properties - which can give you ideas of the properties settable in your templates You can also edit resources and make advanced changes to them, bypassing the portal, but proceed with caution!
  17. Every resource in Azure has an ID, but this is not some integer value or a GUID. It’s a form of URN - a string made up of several parts separated by forward slashes. This complete string contains enough information to uniquely identify any resource in the whole of Azure
  18. ARM Templates are Azure’s primary approach to infrastructure as code. A template can define any number or type of resources, declare how they are to be built, their properties, the order they should be deployed in. The following slides dig deeper into ARM templates
  19. This is the basic form of am ARM template Outputs, Parameters and Variables are optional, a template much have at least one resource
  20. The difference between a parameter and a variable may not be apparent when first using templates, this describes the differences
  21. Some advice on how to edit & create templates
  22. Functions are used extensively in templates even when accessing parameters and variables. There’s now a LOT of different functions available for range of scenarios - this slide is just introducing the concept
  23. Details on ARM functions, and examples of commonly used functions
  24. Details on resource providers and types, resource providers are a key aspect of ARM, and can be plugged into the Azure platform either by Microsoft or 3rd parties. Every resource has both a provider and a type
  25. Dependencies between resources are common - where the output or existence of one resource is needed for another ARM templates let you define dependencies using the dependsOn statement
  26. Output are optional to add to your template, but sometimes helpful. You can see the output of a deployment on the command like when using PowerShell or the CLI, and also in the portal