Azure Resource Manager is the future of Azure and his templating features are a big improvement and simplification of how you provision resources on Azure. See how you can create ARM template in Visual Studio to create complex, multiple resources templates and how they can be combined and reused. Learn the different template functions available and how they can help you build more advanced template.
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
Improve Azure Deployments with ARM Templates
1. Online Conference
June 17th and 18th 2015
WWW.COLLAB365.EVENTS
Azure Resource Manager templates:
Improve deployment time and reusability
2. WWW.COLLAB365.EVENTS
Stephane Lapointe
Orckestra
Email :
stephane@stephanelapointe.net
Twitter : @s_lapointe
Facebook :
stephane.lapointe.azure
LinkedIn
ca.linkedin.com/in/stephanelapointe
Stephane Lapointe have 20 years of experience with Microsoft
technologies. He has been working at Orckestra since 2008 where
he is a Cloud Solutions Architect. He is very passionate about
everything that touches Microsoft Azure, the DevOps practice
and automation of all sort of things using PowerShell. He is very
dedicated to the Montreal msdevmtl community where he is a
co-organizer for the Azure group. He is also an Azure Advisor.
You can read Stephane on his blog at
http://www.codeisahighway.com/
and on twitter under the handle @s_lapointe.
5. WWW.COLLAB365.EVENTS
ARM overview
• Limits and quotas in ARM are at regional level
• 1 Resource Group can span multiple regions
• A deployment can only span 1 Resource Group
• 1 Resource Group can hold up to 800 deployments
• Resource group’s location is for his Metadata
• Support both imperative and declarative deployment models
6. WWW.COLLAB365.EVENTS
Template format{
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "",
"parameters": { },
"variables": { },
"resources": [ ],
"outputs": { }
}
ELEMENT NAME REQUIRED DESCRIPTION
$schema Yes Location of the JSON schema file that describes the version of the template language.
contentVersion Yes Version of the template (such as 1.0.0.0). When deploying resources using the template, this value can be used to
make sure that the right template is being used.
parameters No Values that are provided when deployment is executed to customize resource deployment.
variables No Values that are used as JSON fragments in the template to simplify template language expressions.
resources Yes Types of services that are deployed or updated in a resource group.
outputs No Values that are returned after deployment.
7. WWW.COLLAB365.EVENTS
Tools to edit your templates
• Visual Studio using Azure SDK 2.7 or later
using ResourceGroup projects
• Visual Studio Code
• Notepad++
• Any text editor that can handle JSON files and
schemas
8. WWW.COLLAB365.EVENTS
Expressions
• Extend JSON that is normaly available in template
• Enable values that are not strict literal values
• Can be placed anywhere there is a JSON string
• Expressions are enclosed with brakets [ ]
• Evaluated at deployment time
• Typically used with functions to configure deployment
• Reference properties using dot (.) and [index] operator
19. WWW.COLLAB365.EVENTS
CustomScriptExtension
Your files can be downloaded from:
• Publicly over HTTP (Storage Account, GitHub, etc.)
• Default storage account
• Non-default single storage account using storage key
• Single or multiple storage accounts using SAS Url
21. WWW.COLLAB365.EVENTS
Security tips when using CSE
• Use SAS for your assets whenever possible
• Never use hardcoded strings for storage keys, use the listKeys
template function in a protectedSettings section instead
"protectedSettings": {
"storageAccountName": "[parameters('customScriptStorageAccountName')]",
"storageAccountKey": "[listKeys(variables('accountid'),'2015-05-01-preview').key1]"
}
22. WWW.COLLAB365.EVENTS
Debugging tips
• Troubleshoot your deployment using
– Deployment details in new Portal
– Get-AzureResourceGroupLog cmdlet
– Get-AzureResourceGroupDeploymentOperation cmdlet
• Troubleshoot CustomScriptExtension using
– Get-AzureVMCustomScriptExtension cmdlet w/ –Status switch
– C:WindowsAzureLogsPluginsMicrosoft.Compute.CustomScriptExtension1.4
– C:PackagesPluginsMicrosoft.Compute.CustomScriptExtension1.4Downloads
– C:PackagesPluginsMicrosoft.Compute.CustomScriptExtension1.4Status
– Advanced using sysinternals psexec tool: psexec.exe /i /s powershell.exe
23. WWW.COLLAB365.EVENTS
Resources
• Azure Resource Manager Template Functions
https://azure.microsoft.com/en-us/documentation/articles/resource-group-template-functions/
• Azure Subscription and Service Limits, Quotas, and Constraints
https://azure.microsoft.com/en-us/documentation/articles/azure-subscription-service-limits/
• ARM Template deployment schemas
https://github.com/Azure/azure-resource-manager-schemas
• Azure Resource Manager QuickStart Templates
https://github.com/Azure/azure-quickstart-templates
• Ryan Jones’s ARM examples
https://github.com/rjmax/ArmExamples
• ARM Explorer
• https://resources.azure.com/subscriptions