Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions 201-vmss-win-existing-vnet/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Deploy a VM Scale Set into an existing vnet and subnet

<a href="https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2Fazure-quickstart-templates%2Fmaster%2F201-vmss-win-existing-vnet%2Fazuredeploy.json" target="_blank">
<img src="http://azuredeploy.net/deploybutton.png"/>
</a>
<a href="http://armviz.io/#/?load=https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2Fazure-quickstart-templates%2Fmaster%2F201-vmss-win-existing-vnet%2Fazuredeploy.json" target="_blank">
<img src="http://armviz.io/visualizebutton.png"/>
</a>

This template deploys a Windows 2016-Datacenter based VM Scale Set into an existing resource group, vnet and subnet.

This is a bare-bones scale set deployment into an existing subnet that does not create any additional resources. To connect to the VMs in this scale set, look at the private IP addresses of the scale set VMs, and connect from existing resources in the VNet. If you need to connect to these VMs externally, your existing VNet will need a load balancer/gateway or jumpbox resource to connect into.

PARAMETER RESTRICTIONS
======================

vmssName must be 3-61 characters in length. It should also be unique across the VNet.

instanceCount must be 100 or less.

Do not deploy this scale set into a new resource group - it will only work in an existing resource group which contains a VNet and subnet.
111 changes: 111 additions & 0 deletions 201-vmss-win-existing-vnet/azuredeploy.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
{
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json",
"contentVersion": "1.0.0.0",
"parameters": {
"vmSku": {
"type": "string",
"defaultValue": "Standard_D1_v2",
"metadata": {
"description": "Size of VMs in the VM Scale Set."
}
},
"vmssName": {
"type": "string",
"metadata": {
"description": "Unique name for the scale set. Must be 3-61 characters in length and unique across the VNet."
},
"maxLength": 61
},
"instanceCount": {
"type": "int",
"metadata": {
"description": "Number of VM instances (100 or less)."
},
"defaultValue": 2,
"maxValue": 100
},
"adminUsername": {
"type": "string",
"metadata": {
"description": "Admin username on all VMs."
}
},
"adminPassword": {
"type": "securestring",
"metadata": {
"description": "Admin password on all VMs."
}
},
"existingVnetName": {
"type": "string",
"metadata": {
"description": "vName of the existing virtual network to deploy the scale set into."
}
},
"existingSubnetName": {
"type": "string",
"metadata": {
"description": "Name of the existing subnet to deploy the scale set into."
}
}
},
"variables": {
},
"resources": [
{
"type": "Microsoft.Compute/virtualMachineScaleSets",
"name": "[parameters('vmssName')]",
"location": "[resourceGroup().location]",
"apiVersion": "2017-03-30",
"sku": {
"name": "[parameters('vmSku')]",
"capacity": "[parameters('instanceCount')]"
},
"properties": {
"overprovision": "false",
"upgradePolicy": {
"mode": "Manual"
},
"virtualMachineProfile": {
"storageProfile": {
"osDisk": {
"createOption": "FromImage",
"caching": "ReadWrite"
},
"imageReference": {
"publisher": "MicrosoftWindowsServer",
"offer": "WindowsServer",
"sku": "2016-Datacenter",
"version": "latest"
}
},
"osProfile": {
"computerNamePrefix": "[parameters('vmssName')]",
"adminUsername": "[parameters('adminUsername')]",
"adminPassword": "[parameters('adminPassword')]"
},
"networkProfile": {
"networkInterfaceConfigurations": [
{
"name": "nic",
"properties": {
"primary": true,
"ipConfigurations": [
{
"name": "ipconfig",
"properties": {
"subnet": {
"id": "[resourceId(resourceGroup().name, 'Microsoft.Network/virtualNetworks/subnets', parameters('existingVnetName'), parameters('existingSubNetName'))]"
}
}
}
]
}
}
]
}
}
}
}
]
}
27 changes: 27 additions & 0 deletions 201-vmss-win-existing-vnet/azuredeploy.parameters.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"vmSku": {
"value": "Standard_D1_v2"
},
"vmssName": {
"value": "GEN-UNIQUE"
},
"instanceCount": {
"value": 2
},
"adminUsername": {
"value": "azureuser"
},
"adminPassword": {
"value": "GEN-PASSWORD"
},
"existingVnetName": {
"value": "vnet"
},
"existingSubnetName": {
"value": "subnet"
}
}
}
7 changes: 7 additions & 0 deletions 201-vmss-win-existing-vnet/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"itemDisplayName": "Deploy a Scale Set into an existing vnet",
"description": "This template deploys a Windows 2016 Datacenter VM Scale Set into an exsisting resource group, vnet and subnet.",
"summary": "This template deploys a VM Scale Set into an exsisting vnet.",
"githubUsername": "gbowerman",
"dateUpdated": "2017-07-26"
}