clean ARM templates from Bicep samples
This commit is contained in:
Родитель
1136f0b776
Коммит
9bf38a8181
|
@ -1,387 +0,0 @@
|
||||||
{
|
|
||||||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
|
||||||
"contentVersion": "1.0.0.0",
|
|
||||||
"apiProfile": "2020-09-01-hybrid",
|
|
||||||
"parameters": {
|
|
||||||
"adminUsername": {
|
|
||||||
"type": "string",
|
|
||||||
"metadata": {
|
|
||||||
"description": "The name of the Administrator of the new VMs"
|
|
||||||
},
|
|
||||||
"defaultValue": "vmadmin"
|
|
||||||
},
|
|
||||||
"adminPassword": {
|
|
||||||
"type": "securestring",
|
|
||||||
"metadata": {
|
|
||||||
"description": "The password for the Administrator account of the new VMs. Default value is subscription id"
|
|
||||||
},
|
|
||||||
"defaultValue": "[concat('Subscription#',substring(resourcegroup().id,15,36))]"
|
|
||||||
},
|
|
||||||
"numberOfInstances": {
|
|
||||||
"type": "int",
|
|
||||||
"defaultValue": 3,
|
|
||||||
"allowedValues": [
|
|
||||||
2,
|
|
||||||
3,
|
|
||||||
4,
|
|
||||||
5
|
|
||||||
],
|
|
||||||
"metadata": {
|
|
||||||
"description": "Number of VMs to deploy, limit 5 since this sample is using a single storage account"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"dataDiskSize": {
|
|
||||||
"type": "int",
|
|
||||||
"defaultValue": 1000,
|
|
||||||
"allowedValues": [
|
|
||||||
100,
|
|
||||||
500,
|
|
||||||
750,
|
|
||||||
1000
|
|
||||||
],
|
|
||||||
"metadata": {
|
|
||||||
"description": "Size of the Data Disk"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"vmNamePrefix": {
|
|
||||||
"type": "string",
|
|
||||||
"defaultValue": "vmset-",
|
|
||||||
"metadata": {
|
|
||||||
"description": "VM name prefix"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"vmSize": {
|
|
||||||
"allowedValues": [
|
|
||||||
"Standard_A1",
|
|
||||||
"Standard_A2",
|
|
||||||
"Standard_A3",
|
|
||||||
"Standard_A4",
|
|
||||||
"Standard_D1",
|
|
||||||
"Standard_D2",
|
|
||||||
"Standard_D3",
|
|
||||||
"Standard_D4"
|
|
||||||
],
|
|
||||||
"defaultValue": "Standard_A1",
|
|
||||||
"metadata": {
|
|
||||||
"description": "This is the size of your VM"
|
|
||||||
},
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"dnsPrefix": {
|
|
||||||
"type": "string",
|
|
||||||
"defaultValue": "vmdns",
|
|
||||||
"metadata": {
|
|
||||||
"description": "dns name prefix"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"osImagePublisher": {
|
|
||||||
"type": "string",
|
|
||||||
"defaultValue": "Canonical",
|
|
||||||
"metadata": {
|
|
||||||
"description": "Maps to the publisher in the Azure Stack Platform Image Repository manifest file."
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"osImageOffer": {
|
|
||||||
"type": "string",
|
|
||||||
"defaultValue": "UbuntuServer",
|
|
||||||
"metadata": {
|
|
||||||
"description": "Maps to the Offer in the Azure Stack Platform Image Repository manifest file."
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"osImageSKU": {
|
|
||||||
"type": "string",
|
|
||||||
"defaultValue": "16.04-LTS",
|
|
||||||
"allowedValues": [
|
|
||||||
"Centos-7.4",
|
|
||||||
"16.04-LTS"
|
|
||||||
],
|
|
||||||
"metadata": {
|
|
||||||
"description": "The Linux version for the VM. This will pick a fully patched image of this given Centos"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"variables": {
|
|
||||||
"availabilitySetName": "[toLower(concat('aSet-', resourceGroup().name))]",
|
|
||||||
"storageAccountType": "Standard_LRS",
|
|
||||||
"vmSize": "[parameters('vmSize')]",
|
|
||||||
"dnsPrefix": "[parameters('dnsPrefix')]",
|
|
||||||
"osImageVersion": "latest",
|
|
||||||
"dataDiskSize": "[parameters('dataDiskSize')]",
|
|
||||||
"addressPrefix": "10.0.0.0/16",
|
|
||||||
"virtualNetworkName": "[tolower(concat('vNet-',resourceGroup().name))]",
|
|
||||||
"vnetID": "[resourceId('Microsoft.Network/virtualNetworks', variables('virtualNetworkName'))]",
|
|
||||||
|
|
||||||
"NICPrefix": "vnic-",
|
|
||||||
"subnetPrefix": "10.0.0.0/24",
|
|
||||||
"subnetName": "vmstaticsubnet",
|
|
||||||
"subnetRef": "[resourceId('Microsoft.Network/virtualNetworks/subnets/', variables('virtualNetworkName'), variables('subnetName'))]",
|
|
||||||
|
|
||||||
"storageName": "[concat('sa', uniquestring(resourceGroup().id))]",
|
|
||||||
|
|
||||||
"publicLBName": "[tolower(concat('external-lb-', resourceGroup().name))]",
|
|
||||||
"publicLBID": "[resourceId('Microsoft.Network/loadBalancers', variables('publicLBName'))]",
|
|
||||||
"lbFE": "[tolower(concat('external-lb-fe-',resourceGroup().name))]",
|
|
||||||
"publicLBFEConfigID": "[resourceId('Microsoft.Network/loadBalancers/frontendIPConfigurations', variables('publicLBName'), variables('lbFE'))]",
|
|
||||||
|
|
||||||
"publicIPAddressName": "[tolower(concat('public-ip',resourceGroup().name))]",
|
|
||||||
"nsgName": "[tolower(concat('vmnsg',resourceGroup().name))]",
|
|
||||||
"nsgID": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('nsgName'))]",
|
|
||||||
"vmContainerName": "vhds"
|
|
||||||
},
|
|
||||||
"resources": [
|
|
||||||
{
|
|
||||||
"type": "Microsoft.Storage/storageAccounts",
|
|
||||||
"apiVersion": "2019-06-01",
|
|
||||||
"name": "[variables('storageName')]",
|
|
||||||
"location": "[resourceGroup().location]",
|
|
||||||
"sku": {
|
|
||||||
"name": "[variables('storageAccountType')]"
|
|
||||||
},
|
|
||||||
"kind": "Storage",
|
|
||||||
"dependsOn": [
|
|
||||||
"[variables('publicLBName')]"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Microsoft.Network/networkSecurityGroups",
|
|
||||||
"apiVersion": "2018-11-01",
|
|
||||||
"name": "[variables('nsgName')]",
|
|
||||||
"location": "[resourceGroup().location]",
|
|
||||||
"properties": {
|
|
||||||
"securityRules": [
|
|
||||||
{
|
|
||||||
"name": "rule1",
|
|
||||||
"properties": {
|
|
||||||
"protocol": "*",
|
|
||||||
"sourcePortRange": "*",
|
|
||||||
"destinationPortRange": "*",
|
|
||||||
"sourceAddressPrefix": "*",
|
|
||||||
"destinationAddressPrefix": "*",
|
|
||||||
"access": "Allow",
|
|
||||||
"priority": 101,
|
|
||||||
"direction": "Inbound"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Microsoft.Compute/availabilitySets",
|
|
||||||
"apiVersion": "2020-06-01",
|
|
||||||
"name": "[variables('availabilitySetName')]",
|
|
||||||
"location": "[resourceGroup().location]",
|
|
||||||
"properties": {
|
|
||||||
"platformFaultDomainCount": 1,
|
|
||||||
"platformUpdateDomainCount": 1
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Microsoft.Network/publicIPAddresses",
|
|
||||||
"apiVersion": "2018-11-01",
|
|
||||||
"name": "[variables('publicIPAddressName')]",
|
|
||||||
"location": "[resourceGroup().location]",
|
|
||||||
"properties": {
|
|
||||||
"publicIPAllocationMethod": "Dynamic",
|
|
||||||
"dnsSettings": {
|
|
||||||
"domainNameLabel": "[variables('dnsPrefix')]"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"dependsOn": [
|
|
||||||
"[variables('vnetID')]"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Microsoft.Network/virtualNetworks",
|
|
||||||
"apiVersion": "2018-11-01",
|
|
||||||
"name": "[variables('virtualNetworkName')]",
|
|
||||||
"location": "[resourceGroup().location]",
|
|
||||||
"properties": {
|
|
||||||
"addressSpace": {
|
|
||||||
"addressPrefixes": [
|
|
||||||
"[variables('addressPrefix')]"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"subnets": [
|
|
||||||
{
|
|
||||||
"name": "[variables('subnetName')]",
|
|
||||||
"properties": {
|
|
||||||
"addressPrefix": "[variables('subnetPrefix')]",
|
|
||||||
"networkSecurityGroup": {
|
|
||||||
"id": "[variables('nsgID')]"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"dependsOn": [
|
|
||||||
"[variables('nsgID')]"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "[variables('publicLBName')]",
|
|
||||||
"type": "Microsoft.Network/loadBalancers",
|
|
||||||
"apiVersion": "2018-11-01",
|
|
||||||
"location": "[resourceGroup().location]",
|
|
||||||
"dependsOn": [
|
|
||||||
"[variables('vnetID')]",
|
|
||||||
"[variables('publicIPAddressName')]"
|
|
||||||
],
|
|
||||||
"properties": {
|
|
||||||
"frontendIPConfigurations": [
|
|
||||||
{
|
|
||||||
"name": "[variables('lbFE')]",
|
|
||||||
"properties": {
|
|
||||||
"publicIPAddress": {
|
|
||||||
"id": "[resourceId('Microsoft.Network/publicIPAddresses',variables('publicIPAddressName'))]"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"backendAddressPools": [
|
|
||||||
{
|
|
||||||
"name": "LoadBalancerBackend"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Microsoft.Network/loadBalancers/inboundNatRules",
|
|
||||||
"apiVersion": "2018-11-01",
|
|
||||||
"name": "[concat(variables('publicLBName'), '/ssh-VM', copyIndex())]",
|
|
||||||
"copy": {
|
|
||||||
"name": "lbNatLoop",
|
|
||||||
"count": "[parameters('numberOfInstances')]"
|
|
||||||
},
|
|
||||||
"dependsOn": [
|
|
||||||
"[resourceId('Microsoft.Network/loadBalancers', variables('publicLBName'))]"
|
|
||||||
],
|
|
||||||
"properties": {
|
|
||||||
"frontendIPConfiguration": {
|
|
||||||
"id": "[variables('publicLBFEConfigID')]"
|
|
||||||
},
|
|
||||||
"protocol": "tcp",
|
|
||||||
"frontendPort": "[copyIndex(2200)]",
|
|
||||||
"backendPort": 22,
|
|
||||||
"enableFloatingIP": false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Microsoft.Network/networkInterfaces",
|
|
||||||
"apiVersion": "2018-11-01",
|
|
||||||
"name": "[concat(variables('NICPrefix'), parameters('vmNamePrefix'), copyIndex())]",
|
|
||||||
"location": "[resourceGroup().location]",
|
|
||||||
"copy": {
|
|
||||||
"name": "nicLoop",
|
|
||||||
"count": "[parameters('numberOfInstances')]"
|
|
||||||
},
|
|
||||||
"dependsOn": [
|
|
||||||
"[resourceId('Microsoft.Network/virtualNetworks', variables('virtualNetworkName'))]",
|
|
||||||
"[resourceId('Microsoft.Network/loadBalancers', variables('publicLBName'))]",
|
|
||||||
"[concat('Microsoft.Network/loadBalancers/', variables('publicLBName'), '/inboundNatRules/', 'ssh-VM', copyIndex())]"
|
|
||||||
],
|
|
||||||
"properties": {
|
|
||||||
"ipConfigurations": [
|
|
||||||
{
|
|
||||||
"name": "ipconfig1",
|
|
||||||
"properties": {
|
|
||||||
"privateIPAllocationMethod": "Dynamic",
|
|
||||||
"subnet": {
|
|
||||||
"id": "[variables('subnetRef')]"
|
|
||||||
},
|
|
||||||
"loadBalancerBackendAddressPools": [
|
|
||||||
{
|
|
||||||
"id": "[concat(variables('publicLBID'), '/backendAddressPools/LoadBalancerBackend')]"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"loadBalancerInboundNatRules": [
|
|
||||||
{
|
|
||||||
"id": "[concat(variables('publicLBID'), '/inboundNatRules/ssh-VM', copyIndex())]"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Microsoft.Compute/virtualMachines",
|
|
||||||
"apiVersion": "2020-06-01",
|
|
||||||
"name": "[concat(parameters('vmNamePrefix'), copyIndex())]",
|
|
||||||
"location": "[resourceGroup().location]",
|
|
||||||
"copy": {
|
|
||||||
"name": "virtualMachineLoop",
|
|
||||||
"count": "[parameters('numberOfInstances')]"
|
|
||||||
},
|
|
||||||
"dependsOn": [
|
|
||||||
"[resourceId('Microsoft.Storage/storageAccounts',variables('storageName'))]",
|
|
||||||
"[resourceId('Microsoft.Network/networkInterfaces', concat(variables('NICPrefix'), parameters('vmNamePrefix'), copyIndex()))]",
|
|
||||||
"[resourceId('Microsoft.Compute/availabilitySets', variables('availabilitySetName'))]"
|
|
||||||
],
|
|
||||||
"properties": {
|
|
||||||
"availabilitySet": {
|
|
||||||
"id": "[resourceId('Microsoft.Compute/availabilitySets',variables('availabilitySetName'))]"
|
|
||||||
},
|
|
||||||
"hardwareProfile": {
|
|
||||||
"vmSize": "[variables('vmSize')]"
|
|
||||||
},
|
|
||||||
"osProfile": {
|
|
||||||
"computerName": "[concat(parameters('vmNamePrefix'), copyIndex())]",
|
|
||||||
"adminUsername": "[parameters('adminUsername')]",
|
|
||||||
"adminPassword": "[parameters('adminPassword')]"
|
|
||||||
},
|
|
||||||
"storageProfile": {
|
|
||||||
"imageReference": {
|
|
||||||
"publisher": "[parameters('osImagePublisher')]",
|
|
||||||
"offer": "[parameters('osImageOffer')]",
|
|
||||||
"sku": "[parameters('osImageSKU')]",
|
|
||||||
"version": "[variables('osImageVersion')]"
|
|
||||||
},
|
|
||||||
"osDisk": {
|
|
||||||
"name": "osdisk",
|
|
||||||
"vhd": {
|
|
||||||
"uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('storageName')),providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]).primaryEndpoints.blob, variables('vmContainerName'),'/', parameters('vmNamePrefix'), copyIndex(),'-osdisk.vhd')]"
|
|
||||||
},
|
|
||||||
"caching": "ReadWrite",
|
|
||||||
"createOption": "FromImage"
|
|
||||||
},
|
|
||||||
"dataDisks": [
|
|
||||||
{
|
|
||||||
"vhd": {
|
|
||||||
"uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('storageName')),providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]).primaryEndpoints.blob, variables('vmContainerName'),'/', parameters('vmNamePrefix'), copyIndex(),'-data-1.vhd')]"
|
|
||||||
},
|
|
||||||
"name": "[concat(parameters('vmNamePrefix'), copyIndex(),'-data-disk1')]",
|
|
||||||
"createOption": "Empty",
|
|
||||||
"caching": "None",
|
|
||||||
"diskSizeGB": "[variables('dataDiskSize')]",
|
|
||||||
"lun": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"vhd": {
|
|
||||||
"uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('storageName')),providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]).primaryEndpoints.blob, variables('vmContainerName'),'/', parameters('vmNamePrefix'), copyIndex(),'-data-2.vhd')]"
|
|
||||||
},
|
|
||||||
"name": "[concat(parameters('vmNamePrefix'), copyIndex(),'-data-disk2')]",
|
|
||||||
"createOption": "Empty",
|
|
||||||
"caching": "None",
|
|
||||||
"diskSizeGB": "[variables('dataDiskSize')]",
|
|
||||||
"lun": 1
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"networkProfile": {
|
|
||||||
"networkInterfaces": [
|
|
||||||
{
|
|
||||||
"id": "[resourceId('Microsoft.Network/networkInterfaces', concat(variables('NICPrefix'), parameters('vmNamePrefix'), copyIndex()))]"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"diagnosticsProfile": {
|
|
||||||
"bootDiagnostics": {
|
|
||||||
"enabled": true,
|
|
||||||
"storageUri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('storageName')),providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]).primaryEndpoints.blob)]"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"outputs": {}
|
|
||||||
}
|
|
|
@ -1,7 +0,0 @@
|
||||||
{
|
|
||||||
"itemDisplayName": "Deploy a set of VMs in the same availability set",
|
|
||||||
"description": "This template deploys a set of VMs (defaut 3) as part of the same availability group. This template template also deploys an availability group, a virtual Network (with DNS), a load balancer with a front end Public IP address, and a Network Security Group.",
|
|
||||||
"summary": "This template takes a minimum amount of parameters and deploys 3 Linux VMs, with the appropriate DNS setting for the Azure Stack POC environment.",
|
|
||||||
"githubUsername": "bottkars",
|
|
||||||
"dateUpdated": "2018-11-06"
|
|
||||||
}
|
|
|
@ -1,230 +0,0 @@
|
||||||
{
|
|
||||||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
|
||||||
"contentVersion": "1.0.0.0",
|
|
||||||
"apiProfile": "2018-03-01-hybrid",
|
|
||||||
"parameters": {
|
|
||||||
"vmName": {
|
|
||||||
"type": "string",
|
|
||||||
"metadata": {
|
|
||||||
"description": "Name of the VM"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"adminUsername": {
|
|
||||||
"type": "string",
|
|
||||||
"metadata": {
|
|
||||||
"description": "Username for the Virtual Machine. Default value is localadmin"
|
|
||||||
},
|
|
||||||
"defaultValue": "ubuntu"
|
|
||||||
},
|
|
||||||
"sshkeyData": {
|
|
||||||
"type": "securestring",
|
|
||||||
"metadata": {
|
|
||||||
"description": "ssh key for vm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"imageName": {
|
|
||||||
"type": "string",
|
|
||||||
"defaultValue": "myimage",
|
|
||||||
"metadata": {
|
|
||||||
"description": "Maps to the Image Name"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"imageUri": {
|
|
||||||
"type": "string",
|
|
||||||
"defaultValue": "",
|
|
||||||
"metadata": {
|
|
||||||
"description": "uri of the Image "
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"vmSize": {
|
|
||||||
"type": "string",
|
|
||||||
"defaultValue": "Standard_A1",
|
|
||||||
"metadata": {
|
|
||||||
"description": "The size of the Virtual Machine."
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"variables": {
|
|
||||||
"PublicIPName": "[concat('PublicIP_', parameters('vmName'))]",
|
|
||||||
"location": "[resourceGroup().location]",
|
|
||||||
"nicName": "[tolower(concat('nic',uniquestring(resourceGroup().id)))]",
|
|
||||||
"addressPrefix": "10.0.0.0/24",
|
|
||||||
"subnetName": "[tolower(concat('subnet',uniquestring(resourceGroup().id)))]",
|
|
||||||
"subnetPrefix": "10.0.0.0/24",
|
|
||||||
"diagnosticsStorageAccountName": "[toLower(concat('diag', uniquestring(resourceGroup().id)))]",
|
|
||||||
"virtualNetworkName": "[tolower(concat('vnet',uniquestring(resourceGroup().id)))]",
|
|
||||||
"vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]",
|
|
||||||
"subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]",
|
|
||||||
"networkSecurityGroupName": "[tolower(concat('nsg',uniquestring(resourceGroup().id)))]",
|
|
||||||
"sshKeyPath": "[concat('/home/',parameters('adminUsername'),'/.ssh/authorized_keys')]"
|
|
||||||
},
|
|
||||||
"resources": [
|
|
||||||
{
|
|
||||||
"type": "Microsoft.Compute/images",
|
|
||||||
"apiVersion": "2017-03-30",
|
|
||||||
"name": "[parameters('ImageName')]",
|
|
||||||
"location": "[variables('location')]",
|
|
||||||
"tags": {
|
|
||||||
"provisioner": "Image_Deploy"
|
|
||||||
},
|
|
||||||
"properties": {
|
|
||||||
"storageProfile": {
|
|
||||||
"osDisk": {
|
|
||||||
"osType": "Linux",
|
|
||||||
"osState": "Generalized",
|
|
||||||
"blobUri": "[parameters('ImageUri')]",
|
|
||||||
"storageAccountType": "Standard_LRS",
|
|
||||||
"caching": "ReadWrite",
|
|
||||||
"diskSizeGB": 127
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"apiVersion": "2017-10-01",
|
|
||||||
"type": "Microsoft.Storage/storageAccounts",
|
|
||||||
"name": "[variables('diagnosticsStorageAccountName')]",
|
|
||||||
"location": "[variables('location')]",
|
|
||||||
"properties": {},
|
|
||||||
"sku": {
|
|
||||||
"name": "Standard_LRS"
|
|
||||||
},
|
|
||||||
"kind": "Storage"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"apiVersion": "2017-10-01",
|
|
||||||
"type": "Microsoft.Network/networkSecurityGroups",
|
|
||||||
"name": "[variables('networkSecurityGroupName')]",
|
|
||||||
"location": "[resourceGroup().location]",
|
|
||||||
"properties": {
|
|
||||||
"securityRules": [
|
|
||||||
{
|
|
||||||
"name": "ssh",
|
|
||||||
"properties": {
|
|
||||||
"description": "Allow ssh",
|
|
||||||
"protocol": "Tcp",
|
|
||||||
"sourcePortRange": "*",
|
|
||||||
"destinationPortRange": "22",
|
|
||||||
"sourceAddressPrefix": "*",
|
|
||||||
"destinationAddressPrefix": "*",
|
|
||||||
"access": "Allow",
|
|
||||||
"priority": 200,
|
|
||||||
"direction": "Inbound"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"apiVersion": "2017-10-01",
|
|
||||||
"type": "Microsoft.Network/virtualNetworks",
|
|
||||||
"name": "[variables('virtualNetworkName')]",
|
|
||||||
"location": "[variables('location')]",
|
|
||||||
"properties": {
|
|
||||||
"addressSpace": {
|
|
||||||
"addressPrefixes": [
|
|
||||||
"[variables('addressPrefix')]"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"subnets": [
|
|
||||||
{
|
|
||||||
"name": "[variables('subnetName')]",
|
|
||||||
"properties": {
|
|
||||||
"addressPrefix": "[variables('subnetPrefix')]"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"apiVersion": "2017-10-01",
|
|
||||||
"type": "Microsoft.Network/publicIPAddresses",
|
|
||||||
"name": "[variables('PublicIPName')]",
|
|
||||||
"location": "[variables('location')]",
|
|
||||||
"tags": {
|
|
||||||
"provisioner": "image_deploy"
|
|
||||||
},
|
|
||||||
"properties": {
|
|
||||||
"publicIPAllocationMethod": "Static"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"apiVersion": "2017-10-01",
|
|
||||||
"type": "Microsoft.Network/networkInterfaces",
|
|
||||||
"name": "[variables('nicName')]",
|
|
||||||
"location": "[variables('location')]",
|
|
||||||
"dependsOn": [
|
|
||||||
"[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]",
|
|
||||||
"[variables('networkSecurityGroupName')]"
|
|
||||||
],
|
|
||||||
"properties": {
|
|
||||||
"networkSecurityGroup": {
|
|
||||||
"id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('networkSecurityGroupName'))]"
|
|
||||||
},
|
|
||||||
"ipConfigurations": [
|
|
||||||
{
|
|
||||||
"name": "ipconfig1",
|
|
||||||
"properties": {
|
|
||||||
"privateIPAllocationMethod": "Dynamic",
|
|
||||||
"subnet": {
|
|
||||||
"id": "[variables('subnetRef')]"
|
|
||||||
},
|
|
||||||
"publicIPAddress": {
|
|
||||||
"id": "[resourceID('Microsoft.Network/publicIPAddresses/',variables('PublicIPName'))]"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"apiVersion": "2017-03-30",
|
|
||||||
"type": "Microsoft.Compute/virtualMachines",
|
|
||||||
"name": "[parameters('vmName')]",
|
|
||||||
"location": "[variables('location')]",
|
|
||||||
"dependsOn": [
|
|
||||||
"[concat('Microsoft.Storage/storageAccounts/', variables('diagnosticsStorageAccountName'))]",
|
|
||||||
"[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]",
|
|
||||||
"[concat('Microsoft.Compute/images/', parameters('imageName'))]"
|
|
||||||
],
|
|
||||||
"properties": {
|
|
||||||
"hardwareProfile": {
|
|
||||||
"vmSize": "[parameters('vmSize')]"
|
|
||||||
},
|
|
||||||
"osProfile": {
|
|
||||||
"computerName": "[parameters('vmName')]",
|
|
||||||
"adminUsername": "[parameters('adminUsername')]",
|
|
||||||
"linuxConfiguration": {
|
|
||||||
"disablePasswordAuthentication": true,
|
|
||||||
"ssh": {
|
|
||||||
"publicKeys": [
|
|
||||||
{
|
|
||||||
"path": "[variables('sshKeyPath')]",
|
|
||||||
"keyData": "[parameters('sshKeyData')]"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"storageProfile": {
|
|
||||||
"imageReference": {
|
|
||||||
"id": "[resourceId('Microsoft.Compute/images', Parameters('imageName'))]"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"networkProfile": {
|
|
||||||
"networkInterfaces": [
|
|
||||||
{
|
|
||||||
"id": "[resourceId('Microsoft.Network/networkInterfaces',variables('nicName'))]"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"diagnosticsProfile": {
|
|
||||||
"bootDiagnostics": {
|
|
||||||
"enabled": true,
|
|
||||||
"storageUri": "[reference(resourceId('Microsoft.Storage/storageAccounts/', variables('diagnosticsStorageAccountName')), providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]).primaryEndpoints.blob]"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
|
@ -1,7 +0,0 @@
|
||||||
{
|
|
||||||
"itemDisplayName": "101-simple-linux-vm-custom-managed-disk",
|
|
||||||
"description": "create linux vm using managed disk ad custom image",
|
|
||||||
"summary": "this example creates a linux vm using custom image and managed disk",
|
|
||||||
"githubUsername": "bottkars",
|
|
||||||
"dateUpdated": "2019-02-18"
|
|
||||||
}
|
|
|
@ -1,258 +0,0 @@
|
||||||
{
|
|
||||||
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json",
|
|
||||||
"contentVersion": "1.0.0.0",
|
|
||||||
"parameters": {
|
|
||||||
"vmSku": {
|
|
||||||
"defaultValue": "Standard_A1",
|
|
||||||
"type": "String",
|
|
||||||
"metadata": {
|
|
||||||
"description": "Size of VMs in the VM Scale Set."
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"vmssName": {
|
|
||||||
"type": "String",
|
|
||||||
"defaultValue": "[substring(concat('vmss', uniquestring(replace(resourceGroup().Id,'-',''))), 0, 8)]",
|
|
||||||
"metadata": {
|
|
||||||
"description": "String used as a base for naming resources. Must be 3-10 characters in length and globally unique across Azure Stack. A hash is prepended to this string for some resources, and resource-specific information is appended."
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"instanceCount": {
|
|
||||||
"defaultValue": 2,
|
|
||||||
"maxValue": 20,
|
|
||||||
"type": "Int",
|
|
||||||
"metadata": {
|
|
||||||
"description": "Number of VM instances (20 or less)."
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"adminUsername": {
|
|
||||||
"type": "String",
|
|
||||||
"defaultValue": "azureuser",
|
|
||||||
"metadata": {
|
|
||||||
"description": "Admin username on all VMs."
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"adminPassword": {
|
|
||||||
"type": "SecureString",
|
|
||||||
"defaultValue": "[concat('Subscription#', subscription().subscriptionId)]",
|
|
||||||
"metadata": {
|
|
||||||
"description": "Admin password on all VMs."
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"osImagePublisher": {
|
|
||||||
"type": "string",
|
|
||||||
"defaultValue": "MicrosoftWindowsServer",
|
|
||||||
"metadata": {
|
|
||||||
"description": "Maps to the publisher in the Azure Stack Platform Image Repository manifest file."
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"osImageOffer": {
|
|
||||||
"type": "string",
|
|
||||||
"defaultValue": "WindowsServer",
|
|
||||||
"metadata": {
|
|
||||||
"description": "Maps to the Offer in the Azure Stack Platform Image Repository manifest file."
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"osImageSku": {
|
|
||||||
"type": "string",
|
|
||||||
"defaultValue": "2016-Datacenter",
|
|
||||||
"allowedValues": [
|
|
||||||
"2012-R2-Datacenter",
|
|
||||||
"2016-Datacenter-Server-Core",
|
|
||||||
"2016-Datacenter"
|
|
||||||
],
|
|
||||||
"metadata": {
|
|
||||||
"description": "The Windows version for the VM. This will pick a fully patched image of this given Windows version. Allowed values: 2008-R2-SP1, 2012-Datacenter, 2012-R2-Datacenter."
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"variables": {
|
|
||||||
"location": "[resourceGroup().location]",
|
|
||||||
"vnetName": "[toLower(concat('vnet', uniqueString(resourceGroup().id)))]",
|
|
||||||
"subnetName": "[toLower(concat('subnet', uniqueString(resourceGroup().id)))]",
|
|
||||||
"vnetID": "[resourceId('Microsoft.Network/virtualNetworks', variables('vnetName'))]",
|
|
||||||
"subnetRef": "[concat(variables('vnetID'),'/subnets/', variables('subnetName'))]",
|
|
||||||
"publicIPAddressName": "[toLower(concat('pip', uniqueString(resourceGroup().id)))]",
|
|
||||||
"vmssDomainName": "[toLower(concat('pubdns', uniqueString(resourceGroup().id)))]",
|
|
||||||
"loadBalancerName": "[concat('LB', uniqueString(resourceGroup().id))]",
|
|
||||||
"loadBalancerFrontEndName": "[concat('LBFrontEnd', uniqueString(resourceGroup().id))]",
|
|
||||||
"loadBalancerBackEndName": "[concat('LBBackEnd', uniqueString(resourceGroup().id))]",
|
|
||||||
"loadBalancerProbeName": "[concat('LBHttpProbe', uniqueString(resourceGroup().id))]",
|
|
||||||
"loadBalancerNatPoolName": "[concat('LBNatPool', uniqueString(resourceGroup().id))]"
|
|
||||||
},
|
|
||||||
"resources": [
|
|
||||||
{
|
|
||||||
"type": "Microsoft.Network/virtualNetworks",
|
|
||||||
"apiVersion": "2018-11-01",
|
|
||||||
"name": "[variables('vnetName')]",
|
|
||||||
"location": "[variables('location')]",
|
|
||||||
"properties": {
|
|
||||||
"addressSpace": {
|
|
||||||
"addressPrefixes": [
|
|
||||||
"10.0.0.0/16"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"subnets": [
|
|
||||||
{
|
|
||||||
"name": "[variables('subnetName')]",
|
|
||||||
"properties": {
|
|
||||||
"addressPrefix": "10.0.0.0/24"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Microsoft.Network/publicIPAddresses",
|
|
||||||
"apiVersion": "2018-11-01",
|
|
||||||
"name": "[variables('publicIPAddressName')]",
|
|
||||||
"location": "[variables('location')]",
|
|
||||||
"properties": {
|
|
||||||
"publicIPAllocationMethod": "Dynamic",
|
|
||||||
"dnsSettings": {
|
|
||||||
"domainNameLabel": "[variables('vmssDomainName')]"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Microsoft.Network/loadBalancers",
|
|
||||||
"apiVersion": "2018-11-01",
|
|
||||||
"name": "[variables('loadBalancerName')]",
|
|
||||||
"location": "[variables('location')]",
|
|
||||||
"properties": {
|
|
||||||
"frontendIPConfigurations": [
|
|
||||||
{
|
|
||||||
"name": "[variables('loadBalancerFrontEndName')]",
|
|
||||||
"properties": {
|
|
||||||
"publicIPAddress": {
|
|
||||||
"id": "[resourceId('Microsoft.Network/publicIPAddresses', variables('publicIPAddressName'))]"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"backendAddressPools": [
|
|
||||||
{
|
|
||||||
"name": "[variables('loadBalancerBackendName')]"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"loadBalancingRules": [
|
|
||||||
{
|
|
||||||
"name": "roundRobinLBRule",
|
|
||||||
"properties": {
|
|
||||||
"frontendIPConfiguration": {
|
|
||||||
"id": "[resourceId('Microsoft.Network/loadBalancers/frontendIPConfigurations', variables('loadBalancerName'), variables('loadBalancerFrontEndName'))]"
|
|
||||||
},
|
|
||||||
"backendAddressPool": {
|
|
||||||
"id": "[resourceId('Microsoft.Network/loadBalancers/backendAddressPools', variables('loadBalancerName'), variables('loadBalancerBackendName'))]"
|
|
||||||
},
|
|
||||||
"protocol": "tcp",
|
|
||||||
"frontendPort": 80,
|
|
||||||
"backendPort": 80,
|
|
||||||
"enableFloatingIP": false,
|
|
||||||
"idleTimeoutInMinutes": 5,
|
|
||||||
"probe": {
|
|
||||||
"id": "[resourceId('Microsoft.Network/loadBalancers/probes', variables('loadBalancerName'), variables('loadBalancerProbeName'))]"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"probes": [
|
|
||||||
{
|
|
||||||
"name": "[variables('loadBalancerProbeName')]",
|
|
||||||
"properties": {
|
|
||||||
"protocol": "tcp",
|
|
||||||
"port": 80,
|
|
||||||
"intervalInSeconds": 5,
|
|
||||||
"numberOfProbes": 2
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"inboundNatPools": [
|
|
||||||
{
|
|
||||||
"name": "[variables('loadBalancerNatPoolName')]",
|
|
||||||
"properties": {
|
|
||||||
"frontendIPConfiguration": {
|
|
||||||
"id": "[resourceId('Microsoft.Network/loadBalancers/frontendIPConfigurations', variables('loadBalancerName'), variables('loadBalancerFrontEndName'))]"
|
|
||||||
},
|
|
||||||
"protocol": "tcp",
|
|
||||||
"frontendPortRangeStart": 50000,
|
|
||||||
"frontendPortRangeEnd": 50019,
|
|
||||||
"backendPort": 3389
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"dependsOn": [
|
|
||||||
"[resourceId('Microsoft.Network/publicIPAddresses', variables('publicIPAddressName'))]"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Microsoft.Compute/virtualMachineScaleSets",
|
|
||||||
"apiVersion": "2020-06-01",
|
|
||||||
"sku": {
|
|
||||||
"name": "[parameters('vmSku')]",
|
|
||||||
"tier": "Standard",
|
|
||||||
"capacity": "[parameters('instanceCount')]"
|
|
||||||
},
|
|
||||||
"name": "[parameters('vmssName')]",
|
|
||||||
"location": "[variables('location')]",
|
|
||||||
"properties": {
|
|
||||||
"upgradePolicy": {
|
|
||||||
"mode": "Manual"
|
|
||||||
},
|
|
||||||
"virtualMachineProfile": {
|
|
||||||
"storageProfile": {
|
|
||||||
"osDisk": {
|
|
||||||
"caching": "ReadOnly",
|
|
||||||
"createOption": "FromImage"
|
|
||||||
},
|
|
||||||
"imageReference": {
|
|
||||||
"publisher": "[parameters('osImagePublisher')]",
|
|
||||||
"offer": "[parameters('osImageOffer')]",
|
|
||||||
"sku": "[parameters('osImageSku')]",
|
|
||||||
"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": "[variables('subnetRef')]"
|
|
||||||
},
|
|
||||||
"loadBalancerBackendAddressPools": [
|
|
||||||
{
|
|
||||||
"id": "[resourceId('Microsoft.Network/loadBalancers/backendAddressPools', variables('loadBalancerName'), variables('loadBalancerBackendName'))]"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"loadBalancerInboundNatPools": [
|
|
||||||
{
|
|
||||||
"id": "[resourceId('Microsoft.Network/loadBalancers/inboundNatPools', variables('loadBalancerName'), variables('loadBalancerNatPoolName'))]"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"dependsOn": [
|
|
||||||
"[resourceId('Microsoft.Network/virtualNetworks', variables('vnetName'))]",
|
|
||||||
"[resourceId('Microsoft.Network/loadBalancers', variables('loadBalancerName'))]"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
|
@ -1,7 +0,0 @@
|
||||||
{
|
|
||||||
"itemDisplayName": "Deploy a Windows VM Scale Set",
|
|
||||||
"description": "This template allows you to deploy a VM Scale Set of Windows VMs using the lastest patched version of various Windows Versions. These VMs are behind a load balancer with NAT rules for rdp connections.",
|
|
||||||
"summary": "This template deploys a Windows VM Scale Set with custom script extension behind a load balancer with NAT rules for rdp connections. This template was taken from Azure GitHub repo and modified for Azure Stack.",
|
|
||||||
"githubUsername": "azurestack",
|
|
||||||
"dateUpdated": "2018-11-06"
|
|
||||||
}
|
|
|
@ -1,291 +0,0 @@
|
||||||
{
|
|
||||||
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json",
|
|
||||||
"contentVersion": "1.0.0.0",
|
|
||||||
"apiProfile": "2020-09-01-hybrid",
|
|
||||||
"parameters": {
|
|
||||||
"vmSku": {
|
|
||||||
"defaultValue": "Standard_D1",
|
|
||||||
"type": "String",
|
|
||||||
"metadata": {
|
|
||||||
"description": "Size of VMs in the VM Scale Set."
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"vmssName": {
|
|
||||||
"type": "String",
|
|
||||||
"defaultValue": "[substring(concat('vmss', uniquestring(replace(resourceGroup().Id,'-',''))), 0, 8)]",
|
|
||||||
"metadata": {
|
|
||||||
"description": "String used as a base for naming resources. Must be 3-10 characters in length and globally unique across Azure Stack. A hash is prepended to this string for some resources, and resource-specific information is appended."
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"instanceCount": {
|
|
||||||
"defaultValue": 2,
|
|
||||||
"maxValue": 20,
|
|
||||||
"type": "Int",
|
|
||||||
"metadata": {
|
|
||||||
"description": "Number of VM instances (20 or less)."
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"adminUsername": {
|
|
||||||
"type": "String",
|
|
||||||
"defaultValue": "azureuser",
|
|
||||||
"metadata": {
|
|
||||||
"description": "Admin username on all VMs."
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"adminPassword": {
|
|
||||||
"type": "SecureString",
|
|
||||||
"defaultValue": "[concat('Subscription#', subscription().subscriptionId)]",
|
|
||||||
"metadata": {
|
|
||||||
"description": "Admin password on all VMs."
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"osImagePublisher": {
|
|
||||||
"type": "string",
|
|
||||||
"defaultValue": "Canonical",
|
|
||||||
"metadata": {
|
|
||||||
"description": "Maps to the publisher in the Azure Stack Platform Image Repository manifest file."
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"osImageOffer": {
|
|
||||||
"type": "string",
|
|
||||||
"defaultValue": "UbuntuServer",
|
|
||||||
"metadata": {
|
|
||||||
"description": "Maps to the Offer in the Azure Stack Platform Image Repository manifest file."
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"osImageSku": {
|
|
||||||
"type": "string",
|
|
||||||
"defaultValue": "16.04-LTS",
|
|
||||||
"metadata": {
|
|
||||||
"description": "The Ubuntu version for the VM. This will pick a fully patched image of this given Ubuntu version. Default value: 14.04.3-LTS"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"variables": {
|
|
||||||
"location": "[resourceGroup().location]",
|
|
||||||
"vnetName": "[toLower(concat('vnet', uniqueString(resourceGroup().id)))]",
|
|
||||||
"subnetName": "[toLower(concat('subnet', uniqueString(resourceGroup().id)))]",
|
|
||||||
"storageAccountName": "[toLower(concat('SA', uniqueString(resourceGroup().id)))]",
|
|
||||||
"storageAccountContainerName": "[toLower(concat('SC', uniqueString(resourceGroup().id)))]",
|
|
||||||
"storageAccountType": "Standard_LRS",
|
|
||||||
"OSDiskName": "osdisk",
|
|
||||||
"vnetID": "[resourceId('Microsoft.Network/virtualNetworks', variables('vnetName'))]",
|
|
||||||
"subnetRef": "[concat(variables('vnetID'),'/subnets/', variables('subnetName'))]",
|
|
||||||
"publicIPAddressName": "[toLower(concat('pip', uniqueString(resourceGroup().id)))]",
|
|
||||||
"vmssDomainName": "[toLower(concat('pubdns', uniqueString(resourceGroup().id)))]",
|
|
||||||
"loadBalancerName": "[concat('LB', uniqueString(resourceGroup().id))]",
|
|
||||||
"loadBalancerFrontEndName": "[concat('LBFrontEnd', uniqueString(resourceGroup().id))]",
|
|
||||||
"loadBalancerBackEndName": "[concat('LBBackEnd', uniqueString(resourceGroup().id))]",
|
|
||||||
"loadBalancerProbeName": "[concat('LBHttpProbe', uniqueString(resourceGroup().id))]",
|
|
||||||
"loadBalancerNatPoolName": "[concat('LBNatPool', uniqueString(resourceGroup().id))]"
|
|
||||||
},
|
|
||||||
"resources": [
|
|
||||||
{
|
|
||||||
"type": "Microsoft.Storage/storageAccounts",
|
|
||||||
"apiVersion": "2019-06-01",
|
|
||||||
"name": "[variables('storageAccountName')]",
|
|
||||||
"location": "[variables('location')]",
|
|
||||||
"sku": {
|
|
||||||
"name": "[variables('storageAccountType')]"
|
|
||||||
},
|
|
||||||
"kind": "Storage"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Microsoft.Network/virtualNetworks",
|
|
||||||
"apiVersion": "2018-11-01",
|
|
||||||
"name": "[variables('vnetName')]",
|
|
||||||
"location": "[variables('location')]",
|
|
||||||
"properties": {
|
|
||||||
"addressSpace": {
|
|
||||||
"addressPrefixes": [
|
|
||||||
"10.0.0.0/16"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"subnets": [
|
|
||||||
{
|
|
||||||
"name": "[variables('subnetName')]",
|
|
||||||
"properties": {
|
|
||||||
"addressPrefix": "10.0.0.0/24"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Microsoft.Network/publicIPAddresses",
|
|
||||||
"apiVersion": "2018-11-01",
|
|
||||||
"name": "[variables('publicIPAddressName')]",
|
|
||||||
"location": "[variables('location')]",
|
|
||||||
"properties": {
|
|
||||||
"publicIPAllocationMethod": "Dynamic",
|
|
||||||
"dnsSettings": {
|
|
||||||
"domainNameLabel": "[variables('vmssDomainName')]"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Microsoft.Network/loadBalancers",
|
|
||||||
"apiVersion": "2018-11-01",
|
|
||||||
"name": "[variables('loadBalancerName')]",
|
|
||||||
"location": "[variables('location')]",
|
|
||||||
"properties": {
|
|
||||||
"frontendIPConfigurations": [
|
|
||||||
{
|
|
||||||
"name": "[variables('loadBalancerFrontEndName')]",
|
|
||||||
"properties": {
|
|
||||||
"publicIPAddress": {
|
|
||||||
"id": "[resourceId('Microsoft.Network/publicIPAddresses', variables('publicIPAddressName'))]"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"backendAddressPools": [
|
|
||||||
{
|
|
||||||
"name": "[variables('loadBalancerBackendName')]"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"loadBalancingRules": [
|
|
||||||
{
|
|
||||||
"name": "roundRobinLBRule",
|
|
||||||
"properties": {
|
|
||||||
"frontendIPConfiguration": {
|
|
||||||
"id": "[resourceId('Microsoft.Network/loadBalancers/frontendIPConfigurations', variables('loadBalancerName'), variables('loadBalancerFrontEndName'))]"
|
|
||||||
},
|
|
||||||
"backendAddressPool": {
|
|
||||||
"id": "[resourceId('Microsoft.Network/loadBalancers/backendAddressPools', variables('loadBalancerName'), variables('loadBalancerBackendName'))]"
|
|
||||||
},
|
|
||||||
"protocol": "tcp",
|
|
||||||
"frontendPort": 80,
|
|
||||||
"backendPort": 80,
|
|
||||||
"enableFloatingIP": false,
|
|
||||||
"idleTimeoutInMinutes": 5,
|
|
||||||
"probe": {
|
|
||||||
"id": "[resourceId('Microsoft.Network/loadBalancers/probes', variables('loadBalancerName'), variables('loadBalancerProbeName'))]"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"probes": [
|
|
||||||
{
|
|
||||||
"name": "[variables('loadBalancerProbeName')]",
|
|
||||||
"properties": {
|
|
||||||
"protocol": "tcp",
|
|
||||||
"port": 80,
|
|
||||||
"intervalInSeconds": 5,
|
|
||||||
"numberOfProbes": 2
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"inboundNatPools": [
|
|
||||||
{
|
|
||||||
"name": "[variables('loadBalancerNatPoolName')]",
|
|
||||||
"properties": {
|
|
||||||
"frontendIPConfiguration": {
|
|
||||||
"id": "[resourceId('Microsoft.Network/loadBalancers/frontendIPConfigurations', variables('loadBalancerName'), variables('loadBalancerFrontEndName'))]"
|
|
||||||
},
|
|
||||||
"protocol": "tcp",
|
|
||||||
"frontendPortRangeStart": 50000,
|
|
||||||
"frontendPortRangeEnd": 50019,
|
|
||||||
"backendPort": 3389
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"dependsOn": [
|
|
||||||
"[resourceId('Microsoft.Network/publicIPAddresses', variables('publicIPAddressName'))]"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Microsoft.Compute/virtualMachineScaleSets",
|
|
||||||
"apiVersion": "2020-06-01",
|
|
||||||
"sku": {
|
|
||||||
"name": "[parameters('vmSku')]",
|
|
||||||
"tier": "Standard",
|
|
||||||
"capacity": "[parameters('instanceCount')]"
|
|
||||||
},
|
|
||||||
"name": "[parameters('vmssName')]",
|
|
||||||
"location": "[variables('location')]",
|
|
||||||
"properties": {
|
|
||||||
"upgradePolicy": {
|
|
||||||
"mode": "Manual"
|
|
||||||
},
|
|
||||||
"virtualMachineProfile": {
|
|
||||||
"storageProfile": {
|
|
||||||
"osDisk": {
|
|
||||||
"vhdContainers": [
|
|
||||||
"[concat(reference(resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName')), providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]).primaryEndpoints.blob, variables('storageAccountContainerName'))]"
|
|
||||||
],
|
|
||||||
"name": "[variables('OSDiskName')]",
|
|
||||||
"caching": "ReadOnly",
|
|
||||||
"createOption": "FromImage"
|
|
||||||
},
|
|
||||||
"imageReference": {
|
|
||||||
"publisher": "[parameters('osImagePublisher')]",
|
|
||||||
"offer": "[parameters('osImageOffer')]",
|
|
||||||
"sku": "[parameters('osImageSku')]",
|
|
||||||
"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": "[variables('subnetRef')]"
|
|
||||||
},
|
|
||||||
"loadBalancerBackendAddressPools": [
|
|
||||||
{
|
|
||||||
"id": "[resourceId('Microsoft.Network/loadBalancers/backendAddressPools', variables('loadBalancerName'), variables('loadBalancerBackendName'))]"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"loadBalancerInboundNatPools": [
|
|
||||||
{
|
|
||||||
"id": "[resourceId('Microsoft.Network/loadBalancers/inboundNatPools', variables('loadBalancerName'), variables('loadBalancerNatPoolName'))]"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"extensionProfile": {
|
|
||||||
"extensions": [
|
|
||||||
{
|
|
||||||
"type": "Microsoft.Compute/virtualMachines/extensions",
|
|
||||||
"name": "[concat(parameters('vmssName'),'-LinuxCustomScriptExtension')]",
|
|
||||||
"properties": {
|
|
||||||
"publisher": "Microsoft.OSTCExtensions",
|
|
||||||
"type": "CustomScriptForLinux",
|
|
||||||
"typeHandlerVersion": "1.3",
|
|
||||||
"autoUpgradeMinorVersion": true,
|
|
||||||
"settings": {
|
|
||||||
"commandToExecute": "touch /test.txt",
|
|
||||||
"enableInternalDNSCheck": "false"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"dependsOn": [
|
|
||||||
"[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]",
|
|
||||||
"[resourceId('Microsoft.Network/virtualNetworks', variables('vnetName'))]",
|
|
||||||
"[resourceId('Microsoft.Network/loadBalancers', variables('loadBalancerName'))]"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
|
@ -1,7 +0,0 @@
|
||||||
{
|
|
||||||
"itemDisplayName": "Deploy a Linux VM Scale Set with a Custom Script Extension",
|
|
||||||
"description": "This template allows you to deploy a VM Scale Set of Linux VMs. These VMs have a custom script extension for customization and are behind a load balancer with NAT rules for rdp connections. Please note that extention sequencing (one extension depending upon another) is not yet supported with VM Scale Sets.",
|
|
||||||
"summary": "This template deploys a Linux VM Scale Set with custom script extension behind a load balancer with NAT rules for rdp connections. This template was taken from Azure GitHub repo and modified for Azure Stack.",
|
|
||||||
"githubUsername": "azurestack",
|
|
||||||
"dateUpdated": "2018-11-06"
|
|
||||||
}
|
|
|
@ -1,308 +0,0 @@
|
||||||
{
|
|
||||||
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json",
|
|
||||||
"contentVersion": "1.0.0.0",
|
|
||||||
"apiProfile": "2020-09-01-hybrid",
|
|
||||||
"parameters": {
|
|
||||||
"vmSku": {
|
|
||||||
"defaultValue": "Standard_D1",
|
|
||||||
"type": "String",
|
|
||||||
"metadata": {
|
|
||||||
"description": "Size of VMs in the VM Scale Set."
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"osImageSku": {
|
|
||||||
"type": "string",
|
|
||||||
"defaultValue": "2016-Datacenter",
|
|
||||||
"allowedValues": [
|
|
||||||
"2012-R2-Datacenter",
|
|
||||||
"2016-Datacenter-Server-Core",
|
|
||||||
"2016-Datacenter"
|
|
||||||
],
|
|
||||||
"metadata": {
|
|
||||||
"description": "The Windows version for the VM. This will pick a fully patched image of this given Windows version. Allowed values: 2008-R2-SP1, 2012-Datacenter, 2012-R2-Datacenter."
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"osImagePublisher": {
|
|
||||||
"type": "string",
|
|
||||||
"defaultValue": "MicrosoftWindowsServer",
|
|
||||||
"metadata": {
|
|
||||||
"description": "Maps to the publisher in the Azure Stack Platform Image Repository manifest file."
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"osImageOffer": {
|
|
||||||
"type": "string",
|
|
||||||
"defaultValue": "WindowsServer",
|
|
||||||
"metadata": {
|
|
||||||
"description": "Maps to the Offer in the Azure Stack Platform Image Repository manifest file."
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"vmssName": {
|
|
||||||
"defaultValue": "[substring(concat('vmss', uniquestring(replace(resourceGroup().Id,'-',''))), 0, 8)]",
|
|
||||||
"minLength": 3,
|
|
||||||
"maxLength": 10,
|
|
||||||
"type": "String",
|
|
||||||
"metadata": {
|
|
||||||
"description": "String used as a base for naming resources. Must be 3-10 characters in length and globally unique across Azure Stack. A hash is prepended to this string for some resources, and resource-specific information is appended."
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"instanceCount": {
|
|
||||||
"defaultValue": 2,
|
|
||||||
"maxValue": 20,
|
|
||||||
"type": "Int",
|
|
||||||
"metadata": {
|
|
||||||
"description": "Number of VM instances (20 or less)."
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"adminUsername": {
|
|
||||||
"defaultValue": "azureuser",
|
|
||||||
"type": "String",
|
|
||||||
"metadata": {
|
|
||||||
"description": "Admin username on all VMs."
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"adminPassword": {
|
|
||||||
"defaultValue": "[concat('Subscription#', subscription().subscriptionId)]",
|
|
||||||
"type": "SecureString",
|
|
||||||
"metadata": {
|
|
||||||
"description": "Admin password on all VMs."
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"_artifactsLocation": {
|
|
||||||
"defaultValue": "https://raw.githubusercontent.com/Azure/azurestack-quickstart-templates/master/201-vmss-windows-extension",
|
|
||||||
"type": "String",
|
|
||||||
"metadata": {
|
|
||||||
"description": "The base URI where artifacts required by this template are located. When the template is deployed using the accompanying scripts, a private location in the subscription will be used and this value will be automatically generated."
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"variables": {
|
|
||||||
"location": "[resourceGroup().location]",
|
|
||||||
"vnetName": "[toLower(concat('vnet', uniqueString(resourceGroup().id)))]",
|
|
||||||
"subnetName": "[toLower(concat('subnet', uniqueString(resourceGroup().id)))]",
|
|
||||||
"storageAccountName": "[toLower(concat('SA', uniqueString(resourceGroup().id)))]",
|
|
||||||
"storageAccountContainerName": "[toLower(concat('SC', uniqueString(resourceGroup().id)))]",
|
|
||||||
"storageAccountType": "Standard_LRS",
|
|
||||||
"OSDiskName": "osdisk",
|
|
||||||
"vnetID": "[resourceId('Microsoft.Network/virtualNetworks', variables('vnetName'))]",
|
|
||||||
"subnetRef": "[concat(variables('vnetID'),'/subnets/', variables('subnetName'))]",
|
|
||||||
"publicIPAddressName": "[toLower(concat('pip', uniqueString(resourceGroup().id)))]",
|
|
||||||
"vmssDomainName": "[toLower(concat('pubdns', uniqueString(resourceGroup().id)))]",
|
|
||||||
"loadBalancerName": "[concat('LB', uniqueString(resourceGroup().id))]",
|
|
||||||
"loadBalancerFrontEndName": "[concat('LBFrontEnd', uniqueString(resourceGroup().id))]",
|
|
||||||
"loadBalancerBackEndName": "[concat('LBBackEnd', uniqueString(resourceGroup().id))]",
|
|
||||||
"loadBalancerProbeName": "[concat('LBHttpProbe', uniqueString(resourceGroup().id))]",
|
|
||||||
"loadBalancerNatPoolName": "[concat('LBNatPool', uniqueString(resourceGroup().id))]"
|
|
||||||
},
|
|
||||||
"resources": [
|
|
||||||
{
|
|
||||||
"type": "Microsoft.Storage/storageAccounts",
|
|
||||||
"apiVersion": "2019-06-01",
|
|
||||||
"name": "[variables('storageAccountName')]",
|
|
||||||
"location": "[variables('location')]",
|
|
||||||
"sku": {
|
|
||||||
"name": "[variables('storageAccountType')]"
|
|
||||||
},
|
|
||||||
"kind": "Storage"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Microsoft.Network/virtualNetworks",
|
|
||||||
"apiVersion": "2018-11-01",
|
|
||||||
"name": "[variables('vnetName')]",
|
|
||||||
"location": "[variables('location')]",
|
|
||||||
"properties": {
|
|
||||||
"addressSpace": {
|
|
||||||
"addressPrefixes": [
|
|
||||||
"10.0.0.0/16"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"subnets": [
|
|
||||||
{
|
|
||||||
"name": "[variables('subnetName')]",
|
|
||||||
"properties": {
|
|
||||||
"addressPrefix": "10.0.0.0/24"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Microsoft.Network/publicIPAddresses",
|
|
||||||
"apiVersion": "2018-11-01",
|
|
||||||
"name": "[variables('publicIPAddressName')]",
|
|
||||||
"location": "[variables('location')]",
|
|
||||||
"properties": {
|
|
||||||
"publicIPAllocationMethod": "Dynamic",
|
|
||||||
"dnsSettings": {
|
|
||||||
"domainNameLabel": "[variables('vmssDomainName')]"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Microsoft.Network/loadBalancers",
|
|
||||||
"apiVersion": "2018-11-01",
|
|
||||||
"name": "[variables('loadBalancerName')]",
|
|
||||||
"location": "[variables('location')]",
|
|
||||||
"properties": {
|
|
||||||
"frontendIPConfigurations": [
|
|
||||||
{
|
|
||||||
"name": "[variables('loadBalancerFrontEndName')]",
|
|
||||||
"properties": {
|
|
||||||
"publicIPAddress": {
|
|
||||||
"id": "[resourceId('Microsoft.Network/publicIPAddresses', variables('publicIPAddressName'))]"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"backendAddressPools": [
|
|
||||||
{
|
|
||||||
"name": "[variables('loadBalancerBackendName')]"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"loadBalancingRules": [
|
|
||||||
{
|
|
||||||
"name": "roundRobinLBRule",
|
|
||||||
"properties": {
|
|
||||||
"frontendIPConfiguration": {
|
|
||||||
"id": "[resourceId('Microsoft.Network/loadBalancers/frontendIPConfigurations', variables('loadBalancerName'), variables('loadBalancerFrontEndName'))]"
|
|
||||||
},
|
|
||||||
"backendAddressPool": {
|
|
||||||
"id": "[resourceId('Microsoft.Network/loadBalancers/backendAddressPools', variables('loadBalancerName'), variables('loadBalancerBackendName'))]"
|
|
||||||
},
|
|
||||||
"protocol": "tcp",
|
|
||||||
"frontendPort": 80,
|
|
||||||
"backendPort": 80,
|
|
||||||
"enableFloatingIP": false,
|
|
||||||
"idleTimeoutInMinutes": 5,
|
|
||||||
"probe": {
|
|
||||||
"id": "[resourceId('Microsoft.Network/loadBalancers/probes', variables('loadBalancerName'), variables('loadBalancerProbeName'))]"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"probes": [
|
|
||||||
{
|
|
||||||
"name": "[variables('loadBalancerProbeName')]",
|
|
||||||
"properties": {
|
|
||||||
"protocol": "tcp",
|
|
||||||
"port": 80,
|
|
||||||
"intervalInSeconds": 5,
|
|
||||||
"numberOfProbes": 2
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"inboundNatPools": [
|
|
||||||
{
|
|
||||||
"name": "[variables('loadBalancerNatPoolName')]",
|
|
||||||
"properties": {
|
|
||||||
"frontendIPConfiguration": {
|
|
||||||
"id": "[resourceId('Microsoft.Network/loadBalancers/frontendIPConfigurations', variables('loadBalancerName'), variables('loadBalancerFrontEndName'))]"
|
|
||||||
},
|
|
||||||
"protocol": "tcp",
|
|
||||||
"frontendPortRangeStart": 50000,
|
|
||||||
"frontendPortRangeEnd": 50019,
|
|
||||||
"backendPort": 3389
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"dependsOn": [
|
|
||||||
"[resourceId('Microsoft.Network/publicIPAddresses', variables('publicIPAddressName'))]"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Microsoft.Compute/virtualMachineScaleSets",
|
|
||||||
"apiVersion": "2020-06-01",
|
|
||||||
"sku": {
|
|
||||||
"name": "[parameters('vmSku')]",
|
|
||||||
"tier": "Standard",
|
|
||||||
"capacity": "[parameters('instanceCount')]"
|
|
||||||
},
|
|
||||||
"name": "[parameters('vmssName')]",
|
|
||||||
"location": "[variables('location')]",
|
|
||||||
"properties": {
|
|
||||||
"upgradePolicy": {
|
|
||||||
"mode": "Manual"
|
|
||||||
},
|
|
||||||
"virtualMachineProfile": {
|
|
||||||
"storageProfile": {
|
|
||||||
"osDisk": {
|
|
||||||
"vhdContainers": [
|
|
||||||
"[concat(reference(resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName')), providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]).primaryEndpoints.blob, variables('storageAccountContainerName'))]"
|
|
||||||
],
|
|
||||||
"name": "[variables('OSDiskName')]",
|
|
||||||
"caching": "ReadOnly",
|
|
||||||
"createOption": "FromImage"
|
|
||||||
},
|
|
||||||
"imageReference": {
|
|
||||||
"publisher": "[parameters('osImagePublisher')]",
|
|
||||||
"offer": "[parameters('osImageOffer')]",
|
|
||||||
"sku": "[parameters('osImageSku')]",
|
|
||||||
"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": "[variables('subnetRef')]"
|
|
||||||
},
|
|
||||||
"loadBalancerBackendAddressPools": [
|
|
||||||
{
|
|
||||||
"id": "[resourceId('Microsoft.Network/loadBalancers/backendAddressPools', variables('loadBalancerName'), variables('loadBalancerBackendName'))]"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"loadBalancerInboundNatPools": [
|
|
||||||
{
|
|
||||||
"id": "[resourceId('Microsoft.Network/loadBalancers/inboundNatPools', variables('loadBalancerName'), variables('loadBalancerNatPoolName'))]"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"extensionProfile": {
|
|
||||||
"extensions": [
|
|
||||||
{
|
|
||||||
"name": "customScript",
|
|
||||||
"properties": {
|
|
||||||
"publisher": "Microsoft.Compute",
|
|
||||||
"type": "CustomScriptExtension",
|
|
||||||
"settings": {
|
|
||||||
"fileUris": [
|
|
||||||
"[concat(parameters('_artifactsLocation'), '/scripts/helloWorld.ps1')]"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"typeHandlerVersion": "1.8",
|
|
||||||
"autoUpgradeMinorVersion": true,
|
|
||||||
"protectedSettings": {
|
|
||||||
"commandToExecute": "powershell -ExecutionPolicy Unrestricted -File helloWorld.ps1"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"dependsOn": [
|
|
||||||
"[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]",
|
|
||||||
"[resourceId('Microsoft.Network/virtualNetworks', variables('vnetName'))]",
|
|
||||||
"[resourceId('Microsoft.Network/loadBalancers', variables('loadBalancerName'))]"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
|
@ -1,7 +0,0 @@
|
||||||
{
|
|
||||||
"itemDisplayName": "Deploy a Windows VM Scale Set with a Custom Script Extension",
|
|
||||||
"description": "This template allows you to deploy a VM Scale Set of Windows VMs using the lastest patched version of various Windows Versions. These VMs have a custom script extension for customization and are behind a load balancer with NAT rules for rdp connections.",
|
|
||||||
"summary": "This template deploys a Windows VM Scale Set with custom script extension behind a load balancer with NAT rules for rdp connections. This template was taken from Azure GitHub repo and modified for Azure Stack.",
|
|
||||||
"githubUsername": "gatneil",
|
|
||||||
"dateUpdated": "2018-11-06"
|
|
||||||
}
|
|
Загрузка…
Ссылка в новой задаче