Azure and DevOps: ARM & ARM
Boston Azure User Group – Nov. 14, 2017
Jim O’Neil
Senior Architect, BlueMetal
Azure MVP
DEFINITIONS
Azure
1. the blue color of the clear sky1
2. the unclouded sky1
3. Microsoft’s public cloud
1 Merriam-Webster.com
DEFINITIONS
DevOps
1. a portmanteau
2. a type of agile relationship between
development and IT Operations 2
3. a practice that everyone thinks everyone else
is doing
2 https://www.webopedia.com/TERM/D/devops_development_operations.html
DEFINITIONS
ARM
1. Azure Resource Management
2. Attract, Retain, and Motivate3
3. Anxiety Reaction, Mild3
3 http://www.abbreviations.com
IF JOHN DONNE WERE ALIVE TODAY
“No service is an island,
entire of itself”
WHY ARE DEVOPS IMPORTANT FOR THE CLOUD?
Modern applications are:
• Agile
• Composed vs. Monolithic
• Dynamically scalable
• Available 24x7
LIKE THIS…
Deployment (“Infrastructure as Code”)
Templates
Parameter File
Organization
Resource Provider
Resource Group
Governance
RBAC
Policies
Tags
Key ARM Components
{
"$schema":
"https://schema.management.azure.com/schemas/2015-01-
01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters" : {},
"variables" : {},
"resources" : [],
"outputs" : {}
}
ARM Template Structure
{
"apiVersion": “2015-08-01",
"name": "[variables('webSiteName')]",
"type": "Microsoft.Web/sites",
"location": "[resourceGroup().location]",
“comments": “This is the primary website”,
"tags": { },
"dependsOn": [
"[resourceId('Microsoft.Web/serverfarms/', parameters('hostingPlanName'))]"
],
"properties": {
"name": "[variables('webSiteName')]",
"serverFarmId": "[resourceId('Microsoft.Web/serverfarms', parameters('hostingPlanName'))]"
}
}
ARM Resource Sample
LET’S TINKER
Nested resources
Linked templates
Incremental vs. Complete
Condition element
Copy element
SecureString/SecureObject
Service Principal Account
STUFF WE MIGHT NOT HAVE TALKED ABOUT
• Not everything is template-able or consistent
• Use JSONLint
• Use objects as parameters for services (vs. scalars)
• Use outputs to pass on value for additional processing
• Pay attention to API Version in samples
• Be cognizant of dependencies (“dependsOn”)
• For debugging
• Test-AzureRMResourceGroupDeployment cmdlet
• Set $VerbosePreference = “continue”
• Add resources created to output section
Tips and Tricks
• REST API: https://docs.microsoft.com/en-us/rest/api/resources/
• Resource Manager Schemas: https://github.com/Azure/azure-
resource-manager-schemas
• Quickstart Templates: https://azure.microsoft.com/en-
us/resources/templates/
• Quickstart Templates (GitHub): https://github.com/Azure/azure-
quickstart-templates
• Template Functions: https://docs.microsoft.com/en-us/azure/azure-
resource-manager/resource-group-template-functions
• Resource Explorer: https://resources.azure.com
• Template Building Blocks (P&P): https://github.com/mspnp/template-
building-blocks/wiki
Key Resources

Azure and DevOps: ARM & ARM

  • 1.
    Azure and DevOps:ARM & ARM Boston Azure User Group – Nov. 14, 2017 Jim O’Neil Senior Architect, BlueMetal Azure MVP
  • 2.
    DEFINITIONS Azure 1. the bluecolor of the clear sky1 2. the unclouded sky1 3. Microsoft’s public cloud 1 Merriam-Webster.com
  • 3.
    DEFINITIONS DevOps 1. a portmanteau 2.a type of agile relationship between development and IT Operations 2 3. a practice that everyone thinks everyone else is doing 2 https://www.webopedia.com/TERM/D/devops_development_operations.html
  • 4.
    DEFINITIONS ARM 1. Azure ResourceManagement 2. Attract, Retain, and Motivate3 3. Anxiety Reaction, Mild3 3 http://www.abbreviations.com
  • 5.
    IF JOHN DONNEWERE ALIVE TODAY “No service is an island, entire of itself”
  • 6.
    WHY ARE DEVOPSIMPORTANT FOR THE CLOUD? Modern applications are: • Agile • Composed vs. Monolithic • Dynamically scalable • Available 24x7
  • 7.
  • 8.
    Deployment (“Infrastructure asCode”) Templates Parameter File Organization Resource Provider Resource Group Governance RBAC Policies Tags Key ARM Components
  • 9.
  • 10.
    { "apiVersion": “2015-08-01", "name": "[variables('webSiteName')]", "type":"Microsoft.Web/sites", "location": "[resourceGroup().location]", “comments": “This is the primary website”, "tags": { }, "dependsOn": [ "[resourceId('Microsoft.Web/serverfarms/', parameters('hostingPlanName'))]" ], "properties": { "name": "[variables('webSiteName')]", "serverFarmId": "[resourceId('Microsoft.Web/serverfarms', parameters('hostingPlanName'))]" } } ARM Resource Sample
  • 11.
  • 12.
    Nested resources Linked templates Incrementalvs. Complete Condition element Copy element SecureString/SecureObject Service Principal Account STUFF WE MIGHT NOT HAVE TALKED ABOUT
  • 13.
    • Not everythingis template-able or consistent • Use JSONLint • Use objects as parameters for services (vs. scalars) • Use outputs to pass on value for additional processing • Pay attention to API Version in samples • Be cognizant of dependencies (“dependsOn”) • For debugging • Test-AzureRMResourceGroupDeployment cmdlet • Set $VerbosePreference = “continue” • Add resources created to output section Tips and Tricks
  • 14.
    • REST API:https://docs.microsoft.com/en-us/rest/api/resources/ • Resource Manager Schemas: https://github.com/Azure/azure- resource-manager-schemas • Quickstart Templates: https://azure.microsoft.com/en- us/resources/templates/ • Quickstart Templates (GitHub): https://github.com/Azure/azure- quickstart-templates • Template Functions: https://docs.microsoft.com/en-us/azure/azure- resource-manager/resource-group-template-functions • Resource Explorer: https://resources.azure.com • Template Building Blocks (P&P): https://github.com/mspnp/template- building-blocks/wiki Key Resources