Download - Azure resource manager deployment templates
You will:Understand Azure Quickstart templatesLearn how to configure Visual Studio for template managementLearn how to customize a template and its related parameters JSON file using Visual Studio to meet your specific and additional requirements
Objectives
RESOURCE PROVIDER CONRACT
ADFSAAD
RESOURCE MANAGER
SERVICE MANAGEMENT API
Consistent management layer
Curated extensions
Tools
Provider rest points
Visual StudioMicrosoft Azure
Command line
Cloud On-premises
Contoso
Azure Resource Manager (ARM)
DB
ReferenceReferenc
e
ReferenceReference
Storage account
Virtual network
Cloud service
Subnet-1Disk (blob)
Virtual networkStorage account
VM with IP address
Network Security Group ACLS
(deployed to VM, NIC, or Subnet)
Depends on
LB IP address
Load balancedendpoint with IP address
Load Balance
rVNetSubnet
VM IP addressNICVMStorage
accountDisk
(blob)
Resource groupBack-end pool (NICs)
Resource Manager exampleClassic model (v1) Resource Manager
(v2)
Reference
ARM templates can:• Simplify deployment• Simplify roll-back• Provide cross-resource
configuration and update support • Be used as a learning tool to build
to suitAzure templates are: • Source file, checked-in• Specifies resources and
dependencies (VMs, websites, DBs) and connections (configuration, LB sets)
• Configurable parameters for input/output
Azure Resource Manager templates
Repeatable configurationConfiguration Resource Group
DEPENDS ON SQLDepends on SQL
SQL-A website[SQL CONFIG] VM (2x)
ARM template
SQL-A
DB
Website Virtual machines
Depends on SQL
SQL configuration
Enterprises and system integrators• Internal software development teams• Delivering an application
• Corporate IT• Delivering a capability or cloud capacity
Cloud Service Vendors (CSVs)• Support different multi-tenancy approaches• Distinct deployments per customer• Within the CSV’s subscription• “Bring your own subscription” model that uses customer subscriptions
• Scale units within a central multi-tenant system• Support ability to make available via the marketplaceAll deploy known configurations/SKUs/VM sizes
Common use cases for ARM templates
Wide range of Quickstart templates• Indexed on Azure.com• GitHub repo• Community and Microsoft contributedIntegration of IaaS with Azure Services
Getting started with Azure templates
Many examples available @ https://github.com/Azure/azure-quickstart-templates
JSON files—simpler than they lookSchema, content version, parameters, variables, resources, and outputs
Deploying custom JSON files
New-AzureResourceGroupDeployment -DeploymentName "Simple-VM" -ResourceGroupNameRG-TESTGROUP -TemplateFile "C:\GitHub\Templates\101-simple-windows-vm\azuredeploy.json
Multiple types of state• Parameters• Static variables• Dynamic variablesTemplates accept parametersTemplates return variables as output valuesSimple or complex object types are supported
Passing state in and out of templates
• Easier to pass a number of related values with a single variable
• Object.Property approach provides additional context when reading the template
Passing state—complex objects
"networkSettings": { "vnetName": "[parameters('virtualNetworkName')]", "addressPrefix": "10.0.0.0/16", "subnets": { "dmz": { "name": "dmz", "prefix": "10.0.0.0/24", "vnet": "[parameters('virtualNetworkName')]" }, "data": { "name": "data", "prefix": "10.0.1.0/24", "vnet": "[parameters('virtualNetworkName')]" } } }
"osSettings": { "imageReference": { "publisher": "Canonical", "offer": "UbuntuServer", "sku": "14.04.2-LTS", "version": "latest" }
"tshirtSizeSmall": { "vmSize": "Standard_A1", "diskSize": 1023, "vmTemplate": "[concat(variables('templateBaseUrl'), 'database-2disk-resources.json')]", "vmCount": 2, "storage": { "name": "[parameters('storageAccountNamePrefix')]", "count": 1, "pool": "db", "map": [0,0], "jumpbox": 0 } },
"availabilitySetSettings": { "name": "pgsqlAvailabilitySet", "fdCount": 3, "udCount": 5 }
Examples
No control flow logic built into ARM template languageAn approach with parameters, variables, and linked templates• Use provides parameter value that provides context, e.g., tshirtSize
parameter is passed in as a value of ‘small’• Using concat and a pre-defined variable, a new variable value is created
which points to the specific , e.g., ‘tshirtSize-small.json’• Template linking is incorporated into the template and uses this new
value to identify which template to deploy.• Common examples are “tshirt sizes” and optional features for a
deployment, e.g., “enableJumpbox”
Control flow
GIT• A widely used version control system for
software development• A distributed revision control system with
an emphasis on speed, data integrity, and support for distributed, non-linear workflows
• A full-fledged repository with complete history and full version-tracking capabilities, independent of network access or a central server
Visual Studio Code integration with GIT1. Open your team repository in Visual
Studio2. Clone your repository3. Create a new app4. Confirm your settings and add the app5. Snapshot (commit) your code6. Pull changes from your team7. Push your local commits to the server
Thank youLinkedin: Email: [email protected]
ResourcesWatch the Channel 9 Show, “Your Premises or Mine”Get the latest On-Premises and In-Cloud technologies.
aka.ms/YourPremises
Try Azure for free.Sign up for a free one-month trial.
aka.ms/TryAzureForMonth
Register for an IT Innovation Series eventTopics include Cloud Infrastructure, Window Server 2016, Windows 10 and more.
aka.ms/ITInnovation