SlideShare a Scribd company logo
1 of 24
Online Conference
June 17th and 18th 2015
WWW.COLLAB365.EVENTS
Azure Resource Manager templates:
Improve deployment time and reusability
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.
WWW.COLLAB365.EVENTS
Agenda
• ARM overview
• Tools to edit your templates
• Expressions & Functions
• Advanced template scenarios: CSE & Copy
• Debugging & Security tips
WWW.COLLAB365.EVENTS
Consistent
Management
Layer
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
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.
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
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
WWW.COLLAB365.EVENTS
Template functions
Several functions types that targets:
• Objects
• Strings
• Numbers
• Resources
• Templates
WWW.COLLAB365.EVENTS
Object functions
• int(valueToConvert)
• length(array)
• string(valueToConvert)
WWW.COLLAB365.EVENTS
Strings functions
• base64(inputString)
• concat(arg1, arg2, arg3, ...)
• padLeft(stringToPad, totalLength, paddingCharacter)
• replace(originalString, oldCharacter, newCharacter)
• split(inputString, delimiter)
• toLower(stringToChange)
• toUpper(stringToChange)
WWW.COLLAB365.EVENTS
Numbers functions
• add(operand1, operand2)
• div(operand1, operand2)
• mod(operand1, operand2)
• mul(operand1, operand2)
• sub(operand1, operand2)
WWW.COLLAB365.EVENTS
Resources functions
• listKeys(resourceName or resourceIdentifier, apiVersion)
• providers(providerNamespace, [resourceType])
• reference(resourceName or resourceIdentifier, [apiVersion])
• resourceGroup()
• resourceId([resourceGroupName], resourceType,
resourceName1, [resourceName2]...)
• subscription()
WWW.COLLAB365.EVENTS
Template functions
• copyIndex()
• deployment()
• parameters(parameterName)
• variables(variableName)
WWW.COLLAB365.EVENTS
Demo
Create a Virtual machine ResourceGroup project in Visual Studio 2015
WWW.COLLAB365.EVENTS
Advanced template scenarios
• Resources Extensions
• Copy
• Nested Templates
WWW.COLLAB365.EVENTS
Resource Extensions
• VM
– CustomScript, DSC, Chef, Puppet, VmAccess
• DB
– Import database
• Web app
– MSDeploy
WWW.COLLAB365.EVENTS
CustomScriptExtension
• Customize Virtual Machines the way you want
• Support .exe, batch & PowerShell scripts
• Allow you to download one or many files on
the machine
• Available for both Windows and Linux
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
WWW.COLLAB365.EVENTS
Demo
Advanced scenarios for your virtual machine template:
CustomScriptExtension & Copy
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]"
}
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
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
WWW.COLLAB365.EVENTS
Stay tuned for more great sessions …

More Related Content

What's hot

Infrastructure Continuous Delivery Using AWS CloudFormation
Infrastructure Continuous Delivery Using AWS CloudFormationInfrastructure Continuous Delivery Using AWS CloudFormation
Infrastructure Continuous Delivery Using AWS CloudFormationAmazon Web Services
 
Henry been azure resource manager - inside out
Henry been   azure resource manager - inside outHenry been   azure resource manager - inside out
Henry been azure resource manager - inside outHenry Been
 
Infrastructure as Code on Azure - NET Conf CO v2018
Infrastructure as Code on Azure - NET Conf CO v2018 Infrastructure as Code on Azure - NET Conf CO v2018
Infrastructure as Code on Azure - NET Conf CO v2018 Victor Silva
 
Development and Test on AWS - Pizette
Development and Test on AWS - PizetteDevelopment and Test on AWS - Pizette
Development and Test on AWS - PizetteAmazon Web Services
 
Azure Automation and Update Management
Azure Automation and Update ManagementAzure Automation and Update Management
Azure Automation and Update ManagementUdaiappa Ramachandran
 
Intro to docker and kubernetes
Intro to docker and kubernetesIntro to docker and kubernetes
Intro to docker and kubernetesMohit Chhabra
 
Security Day IAM Recommended Practices
Security Day IAM Recommended PracticesSecurity Day IAM Recommended Practices
Security Day IAM Recommended PracticesAmazon Web Services
 
Deep Dive on Microservices and Amazon ECS
Deep Dive on Microservices and Amazon ECSDeep Dive on Microservices and Amazon ECS
Deep Dive on Microservices and Amazon ECSAmazon Web Services
 
Azure DevOps Multistage YAML Pipelines – Top 10 Features
Azure DevOps Multistage YAML Pipelines – Top 10 FeaturesAzure DevOps Multistage YAML Pipelines – Top 10 Features
Azure DevOps Multistage YAML Pipelines – Top 10 FeaturesMarc Müller
 
AWS Tips for LAUNCHing Your Infrastructure in the Cloud
AWS Tips for LAUNCHing Your Infrastructure in the CloudAWS Tips for LAUNCHing Your Infrastructure in the Cloud
AWS Tips for LAUNCHing Your Infrastructure in the CloudAmazon 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 WorldAmazon Web Services
 
AWS - Migrating Internal IT Applications
AWS - Migrating Internal IT Applications AWS - Migrating Internal IT Applications
AWS - Migrating Internal IT Applications Amazon Web Services
 
Azure for AWS & GCP Pros: Which Azure services to use?
Azure for AWS & GCP Pros: Which Azure services to use?Azure for AWS & GCP Pros: Which Azure services to use?
Azure for AWS & GCP Pros: Which Azure services to use?Daniel Zivkovic
 
Building Scalable Windows and .NET Apps on AWS (TLS302) | AWS re:Invent 2013
Building Scalable Windows and .NET Apps on AWS (TLS302) | AWS re:Invent 2013Building Scalable Windows and .NET Apps on AWS (TLS302) | AWS re:Invent 2013
Building Scalable Windows and .NET Apps on AWS (TLS302) | AWS re:Invent 2013Amazon Web Services
 
Securing SQL Server with TLS 1.2
Securing SQL Server with TLS 1.2Securing SQL Server with TLS 1.2
Securing SQL Server with TLS 1.2Amit Banerjee
 
Improving Infrastructure Governance on AWS
Improving Infrastructure Governance on AWSImproving Infrastructure Governance on AWS
Improving Infrastructure Governance on AWSAmazon Web Services
 
Infrastructure Automation on AWS using a Real-World Customer Example - Sessio...
Infrastructure Automation on AWS using a Real-World Customer Example - Sessio...Infrastructure Automation on AWS using a Real-World Customer Example - Sessio...
Infrastructure Automation on AWS using a Real-World Customer Example - Sessio...Amazon Web Services
 
Azure Templates for Consistent Deployment
Azure Templates for Consistent DeploymentAzure Templates for Consistent Deployment
Azure Templates for Consistent DeploymentJosé Maia
 

What's hot (20)

Infrastructure Continuous Delivery Using AWS CloudFormation
Infrastructure Continuous Delivery Using AWS CloudFormationInfrastructure Continuous Delivery Using AWS CloudFormation
Infrastructure Continuous Delivery Using AWS CloudFormation
 
AWS OpsWorks for Chef Automate
AWS OpsWorks for Chef AutomateAWS OpsWorks for Chef Automate
AWS OpsWorks for Chef Automate
 
Henry been azure resource manager - inside out
Henry been   azure resource manager - inside outHenry been   azure resource manager - inside out
Henry been azure resource manager - inside out
 
Infrastructure as Code on Azure - NET Conf CO v2018
Infrastructure as Code on Azure - NET Conf CO v2018 Infrastructure as Code on Azure - NET Conf CO v2018
Infrastructure as Code on Azure - NET Conf CO v2018
 
Development and Test on AWS - Pizette
Development and Test on AWS - PizetteDevelopment and Test on AWS - Pizette
Development and Test on AWS - Pizette
 
Azure Automation and Update Management
Azure Automation and Update ManagementAzure Automation and Update Management
Azure Automation and Update Management
 
Intro to docker and kubernetes
Intro to docker and kubernetesIntro to docker and kubernetes
Intro to docker and kubernetes
 
Security Day IAM Recommended Practices
Security Day IAM Recommended PracticesSecurity Day IAM Recommended Practices
Security Day IAM Recommended Practices
 
Deep Dive on Microservices and Amazon ECS
Deep Dive on Microservices and Amazon ECSDeep Dive on Microservices and Amazon ECS
Deep Dive on Microservices and Amazon ECS
 
Azure DevOps Multistage YAML Pipelines – Top 10 Features
Azure DevOps Multistage YAML Pipelines – Top 10 FeaturesAzure DevOps Multistage YAML Pipelines – Top 10 Features
Azure DevOps Multistage YAML Pipelines – Top 10 Features
 
AWS Tips for LAUNCHing Your Infrastructure in the Cloud
AWS Tips for LAUNCHing Your Infrastructure in the CloudAWS Tips for LAUNCHing Your Infrastructure in the Cloud
AWS Tips for LAUNCHing Your Infrastructure in the 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
 
AWS - Migrating Internal IT Applications
AWS - Migrating Internal IT Applications AWS - Migrating Internal IT Applications
AWS - Migrating Internal IT Applications
 
Azure for AWS & GCP Pros: Which Azure services to use?
Azure for AWS & GCP Pros: Which Azure services to use?Azure for AWS & GCP Pros: Which Azure services to use?
Azure for AWS & GCP Pros: Which Azure services to use?
 
Building Scalable Windows and .NET Apps on AWS (TLS302) | AWS re:Invent 2013
Building Scalable Windows and .NET Apps on AWS (TLS302) | AWS re:Invent 2013Building Scalable Windows and .NET Apps on AWS (TLS302) | AWS re:Invent 2013
Building Scalable Windows and .NET Apps on AWS (TLS302) | AWS re:Invent 2013
 
Windows and .NET on AWS
Windows and .NET on AWSWindows and .NET on AWS
Windows and .NET on AWS
 
Securing SQL Server with TLS 1.2
Securing SQL Server with TLS 1.2Securing SQL Server with TLS 1.2
Securing SQL Server with TLS 1.2
 
Improving Infrastructure Governance on AWS
Improving Infrastructure Governance on AWSImproving Infrastructure Governance on AWS
Improving Infrastructure Governance on AWS
 
Infrastructure Automation on AWS using a Real-World Customer Example - Sessio...
Infrastructure Automation on AWS using a Real-World Customer Example - Sessio...Infrastructure Automation on AWS using a Real-World Customer Example - Sessio...
Infrastructure Automation on AWS using a Real-World Customer Example - Sessio...
 
Azure Templates for Consistent Deployment
Azure Templates for Consistent DeploymentAzure Templates for Consistent Deployment
Azure Templates for Consistent Deployment
 

Similar to Improve Azure Deployments with ARM Templates

Logic Apps – Deployments
Logic Apps – DeploymentsLogic Apps – Deployments
Logic Apps – DeploymentsBizTalk360
 
Zure Azure PaaS Zero to Hero - DevOps training day
Zure Azure PaaS Zero to Hero - DevOps training dayZure Azure PaaS Zero to Hero - DevOps training day
Zure Azure PaaS Zero to Hero - DevOps training dayOkko Oulasvirta
 
Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...
Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...
Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...Anupam Ranku
 
Azure DevOps Best Practices Webinar
Azure DevOps Best Practices WebinarAzure DevOps Best Practices Webinar
Azure DevOps Best Practices WebinarCambay Digital
 
All Day DevOps - Azure DevOps from Start to Star
All Day DevOps - Azure DevOps from Start to StarAll Day DevOps - Azure DevOps from Start to Star
All Day DevOps - Azure DevOps from Start to StarÁngel Rayo
 
Mastering azure devOps - Dot Net Tricks
Mastering azure devOps - Dot Net TricksMastering azure devOps - Dot Net Tricks
Mastering azure devOps - Dot Net TricksGaurav Singh
 
Cnam azure ze cloud resource manager
Cnam azure ze cloud  resource managerCnam azure ze cloud  resource manager
Cnam azure ze cloud resource managerAymeric Weinbach
 
Microsoft Tech Series 2019 - Azure DevOps
Microsoft Tech Series 2019 - Azure DevOpsMicrosoft Tech Series 2019 - Azure DevOps
Microsoft Tech Series 2019 - Azure DevOpsTomasz Wisniewski
 
201908 Overview of Automated ML
201908 Overview of Automated ML201908 Overview of Automated ML
201908 Overview of Automated MLMark Tabladillo
 
AWS ECS Copilot DevOps Presentation
AWS ECS Copilot DevOps PresentationAWS ECS Copilot DevOps Presentation
AWS ECS Copilot DevOps PresentationVarun Manik
 
Aws amity university_presentation_oct-31-2020
Aws amity university_presentation_oct-31-2020Aws amity university_presentation_oct-31-2020
Aws amity university_presentation_oct-31-2020Varun Manik
 
DevOps for Machine Learning overview en-us
DevOps for Machine Learning overview en-usDevOps for Machine Learning overview en-us
DevOps for Machine Learning overview en-useltonrodriguez11
 
AWS re:Invent 2016: Deploying and Managing .NET Pipelines and Microsoft Workl...
AWS re:Invent 2016: Deploying and Managing .NET Pipelines and Microsoft Workl...AWS re:Invent 2016: Deploying and Managing .NET Pipelines and Microsoft Workl...
AWS re:Invent 2016: Deploying and Managing .NET Pipelines and Microsoft Workl...Amazon Web Services
 
Event Hub & Azure Stream Analytics
Event Hub & Azure Stream AnalyticsEvent Hub & Azure Stream Analytics
Event Hub & Azure Stream AnalyticsDavide Mauri
 
AWS Kochi User Group Presentation
AWS  Kochi User Group PresentationAWS  Kochi User Group Presentation
AWS Kochi User Group PresentationVarun Manik
 
Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...
Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...
Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...Emerson Eduardo Rodrigues Von Staffen
 
DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...
DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...
DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...Amazon Web Services
 

Similar to Improve Azure Deployments with ARM Templates (20)

Logic Apps – Deployments
Logic Apps – DeploymentsLogic Apps – Deployments
Logic Apps – Deployments
 
Azure ARM Template
Azure ARM TemplateAzure ARM Template
Azure ARM Template
 
Zure Azure PaaS Zero to Hero - DevOps training day
Zure Azure PaaS Zero to Hero - DevOps training dayZure Azure PaaS Zero to Hero - DevOps training day
Zure Azure PaaS Zero to Hero - DevOps training day
 
Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...
Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...
Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...
 
Azure DevOps Best Practices Webinar
Azure DevOps Best Practices WebinarAzure DevOps Best Practices Webinar
Azure DevOps Best Practices Webinar
 
MLOps in action
MLOps in actionMLOps in action
MLOps in action
 
All Day DevOps - Azure DevOps from Start to Star
All Day DevOps - Azure DevOps from Start to StarAll Day DevOps - Azure DevOps from Start to Star
All Day DevOps - Azure DevOps from Start to Star
 
Welcome to Azure Devops
Welcome to Azure DevopsWelcome to Azure Devops
Welcome to Azure Devops
 
Mastering azure devOps - Dot Net Tricks
Mastering azure devOps - Dot Net TricksMastering azure devOps - Dot Net Tricks
Mastering azure devOps - Dot Net Tricks
 
Cnam azure ze cloud resource manager
Cnam azure ze cloud  resource managerCnam azure ze cloud  resource manager
Cnam azure ze cloud resource manager
 
Microsoft Tech Series 2019 - Azure DevOps
Microsoft Tech Series 2019 - Azure DevOpsMicrosoft Tech Series 2019 - Azure DevOps
Microsoft Tech Series 2019 - Azure DevOps
 
201908 Overview of Automated ML
201908 Overview of Automated ML201908 Overview of Automated ML
201908 Overview of Automated ML
 
AWS ECS Copilot DevOps Presentation
AWS ECS Copilot DevOps PresentationAWS ECS Copilot DevOps Presentation
AWS ECS Copilot DevOps Presentation
 
Aws amity university_presentation_oct-31-2020
Aws amity university_presentation_oct-31-2020Aws amity university_presentation_oct-31-2020
Aws amity university_presentation_oct-31-2020
 
DevOps for Machine Learning overview en-us
DevOps for Machine Learning overview en-usDevOps for Machine Learning overview en-us
DevOps for Machine Learning overview en-us
 
AWS re:Invent 2016: Deploying and Managing .NET Pipelines and Microsoft Workl...
AWS re:Invent 2016: Deploying and Managing .NET Pipelines and Microsoft Workl...AWS re:Invent 2016: Deploying and Managing .NET Pipelines and Microsoft Workl...
AWS re:Invent 2016: Deploying and Managing .NET Pipelines and Microsoft Workl...
 
Event Hub & Azure Stream Analytics
Event Hub & Azure Stream AnalyticsEvent Hub & Azure Stream Analytics
Event Hub & Azure Stream Analytics
 
AWS Kochi User Group Presentation
AWS  Kochi User Group PresentationAWS  Kochi User Group Presentation
AWS Kochi User Group Presentation
 
Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...
Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...
Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...
 
DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...
DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...
DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...
 

Recently uploaded

Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 

Recently uploaded (20)

Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
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.
  • 3. WWW.COLLAB365.EVENTS Agenda • ARM overview • Tools to edit your templates • Expressions & Functions • Advanced template scenarios: CSE & Copy • Debugging & Security tips
  • 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
  • 9. WWW.COLLAB365.EVENTS Template functions Several functions types that targets: • Objects • Strings • Numbers • Resources • Templates
  • 10. WWW.COLLAB365.EVENTS Object functions • int(valueToConvert) • length(array) • string(valueToConvert)
  • 11. WWW.COLLAB365.EVENTS Strings functions • base64(inputString) • concat(arg1, arg2, arg3, ...) • padLeft(stringToPad, totalLength, paddingCharacter) • replace(originalString, oldCharacter, newCharacter) • split(inputString, delimiter) • toLower(stringToChange) • toUpper(stringToChange)
  • 12. WWW.COLLAB365.EVENTS Numbers functions • add(operand1, operand2) • div(operand1, operand2) • mod(operand1, operand2) • mul(operand1, operand2) • sub(operand1, operand2)
  • 13. WWW.COLLAB365.EVENTS Resources functions • listKeys(resourceName or resourceIdentifier, apiVersion) • providers(providerNamespace, [resourceType]) • reference(resourceName or resourceIdentifier, [apiVersion]) • resourceGroup() • resourceId([resourceGroupName], resourceType, resourceName1, [resourceName2]...) • subscription()
  • 14. WWW.COLLAB365.EVENTS Template functions • copyIndex() • deployment() • parameters(parameterName) • variables(variableName)
  • 15. WWW.COLLAB365.EVENTS Demo Create a Virtual machine ResourceGroup project in Visual Studio 2015
  • 16. WWW.COLLAB365.EVENTS Advanced template scenarios • Resources Extensions • Copy • Nested Templates
  • 17. WWW.COLLAB365.EVENTS Resource Extensions • VM – CustomScript, DSC, Chef, Puppet, VmAccess • DB – Import database • Web app – MSDeploy
  • 18. WWW.COLLAB365.EVENTS CustomScriptExtension • Customize Virtual Machines the way you want • Support .exe, batch & PowerShell scripts • Allow you to download one or many files on the machine • Available for both Windows and Linux
  • 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
  • 20. WWW.COLLAB365.EVENTS Demo Advanced scenarios for your virtual machine template: CustomScriptExtension & Copy
  • 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
  • 24. WWW.COLLAB365.EVENTS Stay tuned for more great sessions …