Quick start ARM templates that deploy on Microsoft Azure Stack
PowerShell
Pull request Compare This branch is 565 commits behind Azure:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
101-create-nsg
101-create-storage-account
101-create-vnet-full
101-create-vnet-nsg-only
101-create-vnet-only
101-linux-customscript-ext
101-linux-docker-extension
101-linux-vmaccess-ext
101-simple-windows-vm-diag
101-simple-windows-vm
101-two-vm-extensions
101-vm-ext-win-cs-cmd
101-vm-ext-win-cs-pscmd
101-vm-ext-win-cs-scriptfile
101-vm-extension-bginfo
101-vm-from-user-image
201-Comprehensive
ad-non-ha
bootstorm-vm-boot-time
iostorm-vm-iops-latency-azure
iostorm-vm-iops-latency
sharepoint-2013-non-ha
sql-2014-non-ha
README.md

README.md

AzureStack-QuickStart-Templates

Quick start ARM templates that deploy on Microsoft Azure Stack

CONNECT TO AZURE STACK ENVIRONMENT

Add specific Azure Stack Environment

$AadTenantId = "3dc25382-d7d1-4e5a-ad19-2fb47f1571c2" #GUID Specific to the AAD Tenant
Add-AzureRmEnvironment -Name 'Azure Stack' `
    -ActiveDirectoryEndpoint ("https://login.windows.net/$AadTenantId/") `
    -ActiveDirectoryServiceEndpointResourceId "https://azurestack.local-api/" `
    -ResourceManagerEndpoint ("https://api.azurestack.local/") `
    -GalleryEndpoint ("https://gallery.azurestack.local:30016/") `
    -GraphEndpoint "https://graph.windows.net/"

Get Azure Stack Environment Information

$env = Get-AzureRmEnvironment 'Azure Stack'

Authenticate to AAD with Azure Stack Environment

Add-AzureRmAccount -Environment $env -Verbose

Get Azure Stack Environment Subscription

$SubName = "Best Sub"
Get-AzureRmSubscription -SubscriptionName $SubName | Select-AzureRmSubscription

DEPLOY TEMPLATE TO AZURE STACK

Set Deployment Variables

$myNum = "001" #Modify this per deployment
$RGName = "myRG$myNum"
$myLocation = "local"
$myBlobStorageEndpoint = "blob.azurestack.local"

Create Resource Group for Template Deployment

New-AzureRmResourceGroup -Name $RGName -Location $myLocation

Deploy Simple IaaS Template

New-AzureRmResourceGroupDeployment `
    -Name "myDeployment$myNum" `
    -ResourceGroupName $RGName `
    -TemplateFile "c:\templates\azuredeploy-101-simple-windows-vm-withDNS.json" `
    -deploymentLocation $myLocation `
    -blobStorageEndpoint $myBlobStorageEndpoint `
    -newStorageAccountName "mystorage$myNum" `
    -dnsNameForPublicIP "mydns$myNum" `
    -adminUsername "admin" `
    -adminPassword ("User@123" | ConvertTo-SecureString -AsPlainText -Force) `
    -vmName "myVM$myNum" `
    -windowsOSVersion "2012-R2-Datacenter"

DEPLOY TEMPLATE USING DSC EXTENSION

Set Deployment Variables

$vmName = 'myVM001'
$RGName = 'myRG001'
$depName = 'myDSCDeployment001'

Deploy DSC Extension Template

New-AzureRmResourceGroupDeployment `
    -Name $depName `
    -ResourceGroupName $RGName `
    -TemplateFile "c:\templates\azuredeploy-dsc.json" `
    -TemplateParameterFile "C:\templates\azuredeploy-dsc.parameters.json" `
    -vmName $vmName `
    -timestamp (Get-Date)

DEPLOY TEMPLATE USING CUSTOM SCRIPT

Set Deployment Variables

$vmName = 'myVM001'
$RGName = 'myRG001'
$depName = 'myCSDeployment001'

Deploy Custom Script Template

New-AzureRmResourceGroupDeployment `
    -Name $depName `
    -ResourceGroupName $RGName `
    -TemplateFile "c:\templates\azuredeploy-customscript-command.json" `
    -vmName $vmName

DEPLOY TEMPLATE USING BGINFO

Set Deployment Variables

$vmName = 'myVM001'
$RGName = 'myRG001'
$depName = 'myBGIDeployment001'

Deploy BGInfo Template

New-AzureRmResourceGroupDeployment `
    -Name $depName `
    -ResourceGroupName $RGName `
    -TemplateFile "c:\templates\azuredeploy-bginfo.json" `
    -vmName $vmName

DEPLOY STORAGE ACCOUNT TEMPLATE

Set Deployment Variables

$storageacct = 'mystorage001'
$RGName = 'myRG001'
$depName = 'mySADeployment001'

Deploy Storage Account Template

New-AzureRmResourceGroupDeployment `
    -Name $depName `
    -ResourceGroupName $RGName `
    -TemplateFile "c:\templates\azuredeploy-storageacct.json" `
    -newStorageAccountName $storageacct

DEPLOY vNET TEMPLATE

Set Deployment Variables

$RGName = 'myRG001'
$depName = 'myVNDeployment001'

Deploy vNet Template

New-AzureRmResourceGroupDeployment `
    -Name $depName `
    -ResourceGroupName $RGName `
    -TemplateFile "c:\templates\azuredeploy-vNet.json"