Update QuickStartTemplates to add apiprofile 1 (#392)
* Update QuickStartTemplates to add apiprofile 1 * Update QuickStartTemplates to add apiprofile 2 * Update QuickStartTemplates to add apiprofile 3 * Update QuickStartTemplates to add apiprofile 4 * Update QuickStartTemplates to add apiprofile 5 * Update QuickStartTemplates to add apiprofile 6 * Update QuickStartTemplates to add apiprofile perftemplates * Update QuickStartTemplates to add apiprofile missed one apiversion * Update to add apiprofile and bugfix 201-vmss-windows-extension * Update template to add apiprofile-201-webapp-and-serviceplan * Update template to add apiprofile for 101-acsengine-docker-swarm and acsengine-docker-swarmmode * Update template to add apiprofile for 201-vm-windows-pushcertificate * bug fix and Update template to add apiprofile 101-vm-windows-create-passwordfromkv
This commit is contained in:
Родитель
669df1d6d7
Коммит
c3acf15783
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"apiProfile": "2018-03-01-hybrid",
|
||||
"parameters": {
|
||||
"agentpublicCount": {
|
||||
"allowedValues": [
|
||||
|
@ -488,7 +489,6 @@
|
|||
"agentpublicVMSize": "[parameters('agentpublicVMSize')]",
|
||||
"agentpublicVMSizeTier": "[split(parameters('agentpublicVMSize'),'_')[0]]",
|
||||
"agentpublicVnetSubnetID": "[concat(variables('vnetID'),'/subnets/',variables('agentpublicSubnetName'))]",
|
||||
"apiVersionDefault": "2015-06-15",
|
||||
"apiVersionStorage": "2015-06-15",
|
||||
"clusterInstallParameters": "[concat(variables('orchestratorVersion'), ' ',variables('dockerComposeVersion'), ' ',variables('masterCount'), ' ',variables('masterVMNamePrefix'), ' ',variables('masterFirstAddrOctet4'), ' ',variables('adminUsername'),' ',variables('postInstallScriptURI'),' ',variables('masterFirstAddrPrefix'),' ', parameters('dockerEngineDownloadRepo'), ' ', parameters('dockerComposeDownloadURL'))]",
|
||||
"configureClusterScriptFile": "configure-swarm-cluster.sh",
|
||||
|
@ -905,7 +905,6 @@
|
|||
},
|
||||
"resources": [
|
||||
{
|
||||
"apiVersion": "[variables('apiVersionStorage')]",
|
||||
"copy": {
|
||||
"count": "[variables('agentpublicStorageAccountsCount')]",
|
||||
"name": "vmLoopNode"
|
||||
|
@ -921,7 +920,6 @@
|
|||
"type": "Microsoft.Storage/storageAccounts"
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersionDefault')]",
|
||||
"location": "[variables('location')]",
|
||||
"name": "[variables('agentpublicIPAddressName')]",
|
||||
"properties": {
|
||||
|
@ -933,7 +931,6 @@
|
|||
"type": "Microsoft.Network/publicIPAddresses"
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersionDefault')]",
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Network/publicIPAddresses/', variables('agentpublicIPAddressName'))]"
|
||||
],
|
||||
|
@ -1051,7 +1048,6 @@
|
|||
"type": "Microsoft.Network/loadBalancers"
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersionDefault')]",
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Network/publicIPAddresses/', variables('masterPublicIPAddressName'))]",
|
||||
"[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountPrefixes')[mod(add(0,variables('agentpublicStorageAccountOffset')),variables('storageAccountPrefixesCount'))],variables('storageAccountPrefixes')[div(add(0,variables('agentpublicStorageAccountOffset')),variables('storageAccountPrefixesCount'))],variables('agentpublicAccountName'))]",
|
||||
|
@ -1143,7 +1139,6 @@
|
|||
"type": "Microsoft.Compute/virtualMachineScaleSets"
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersionStorage')]",
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Network/publicIPAddresses/', variables('masterPublicIPAddressName'))]"
|
||||
],
|
||||
|
@ -1155,7 +1150,6 @@
|
|||
"type": "Microsoft.Storage/storageAccounts"
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersionDefault')]",
|
||||
"location": "[variables('location')]",
|
||||
"name": "[variables('virtualNetworkName')]",
|
||||
"properties": {
|
||||
|
@ -1183,14 +1177,12 @@
|
|||
"type": "Microsoft.Network/virtualNetworks"
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersionDefault')]",
|
||||
"location": "[variables('location')]",
|
||||
"name": "[variables('masterAvailabilitySet')]",
|
||||
"properties": { },
|
||||
"properties": {},
|
||||
"type": "Microsoft.Compute/availabilitySets"
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersionDefault')]",
|
||||
"location": "[variables('location')]",
|
||||
"name": "[variables('masterPublicIPAddressName')]",
|
||||
"properties": {
|
||||
|
@ -1202,7 +1194,6 @@
|
|||
"type": "Microsoft.Network/publicIPAddresses"
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersionDefault')]",
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Network/publicIPAddresses/', variables('masterPublicIPAddressName'))]"
|
||||
],
|
||||
|
@ -1228,7 +1219,7 @@
|
|||
"type": "Microsoft.Network/loadBalancers"
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersionDefault')]",
|
||||
"apiVersion": "2017-10-01",
|
||||
"copy": {
|
||||
"count": "[variables('masterCount')]",
|
||||
"name": "masterLbLoopNode"
|
||||
|
@ -1250,7 +1241,7 @@
|
|||
"type": "Microsoft.Network/loadBalancers/inboundNatRules"
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersionDefault')]",
|
||||
"apiVersion": "2017-10-01",
|
||||
"dependsOn": [
|
||||
"[variables('masterLbID')]"
|
||||
],
|
||||
|
@ -1268,7 +1259,6 @@
|
|||
"type": "Microsoft.Network/loadBalancers/inboundNatRules"
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersionDefault')]",
|
||||
"copy": {
|
||||
"count": "[variables('masterCount')]",
|
||||
"name": "nicLoopNode"
|
||||
|
@ -1304,7 +1294,6 @@
|
|||
"type": "Microsoft.Network/networkInterfaces"
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersionDefault')]",
|
||||
"copy": {
|
||||
"count": "[variables('masterCount')]",
|
||||
"name": "vmLoopNode"
|
||||
|
@ -1369,7 +1358,6 @@
|
|||
"type": "Microsoft.Compute/virtualMachines"
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersionDefault')]",
|
||||
"copy": {
|
||||
"count": "[variables('masterCount')]",
|
||||
"name": "vmLoopNode"
|
||||
|
@ -1384,7 +1372,7 @@
|
|||
"publisher": "Microsoft.OSTCExtensions",
|
||||
"settings": {
|
||||
"commandToExecute": "[variables('masterCustomScript')]",
|
||||
"fileUris": [ ]
|
||||
"fileUris": []
|
||||
},
|
||||
"type": "CustomScriptForLinux",
|
||||
"typeHandlerVersion": "1.4"
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"apiProfile": "2018-03-01-hybrid",
|
||||
"parameters": {
|
||||
"agentpublicCount": {
|
||||
"allowedValues": [
|
||||
|
@ -488,7 +489,6 @@
|
|||
"agentpublicVMSize": "[parameters('agentpublicVMSize')]",
|
||||
"agentpublicVMSizeTier": "[split(parameters('agentpublicVMSize'),'_')[0]]",
|
||||
"agentpublicVnetSubnetID": "[concat(variables('vnetID'),'/subnets/',variables('agentpublicSubnetName'))]",
|
||||
"apiVersionDefault": "2015-06-15",
|
||||
"apiVersionStorage": "2015-06-15",
|
||||
"clusterInstallParameters": "[concat(variables('orchestratorVersion'), ' ',variables('dockerComposeVersion'), ' ',variables('masterCount'), ' ',variables('masterVMNamePrefix'), ' ',variables('masterFirstAddrOctet4'), ' ',variables('adminUsername'),' ',variables('postInstallScriptURI'),' ',variables('masterFirstAddrPrefix'),' ', parameters('dockerEngineDownloadRepo'), ' ', parameters('dockerComposeDownloadURL'))]",
|
||||
"configureClusterScriptFile": "configure-swarmmode-cluster.sh",
|
||||
|
@ -905,7 +905,6 @@
|
|||
},
|
||||
"resources": [
|
||||
{
|
||||
"apiVersion": "[variables('apiVersionStorage')]",
|
||||
"copy": {
|
||||
"count": "[variables('agentpublicStorageAccountsCount')]",
|
||||
"name": "vmLoopNode"
|
||||
|
@ -921,7 +920,6 @@
|
|||
"type": "Microsoft.Storage/storageAccounts"
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersionDefault')]",
|
||||
"location": "[variables('location')]",
|
||||
"name": "[variables('agentpublicIPAddressName')]",
|
||||
"properties": {
|
||||
|
@ -933,7 +931,6 @@
|
|||
"type": "Microsoft.Network/publicIPAddresses"
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersionDefault')]",
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Network/publicIPAddresses/', variables('agentpublicIPAddressName'))]"
|
||||
],
|
||||
|
@ -1051,7 +1048,6 @@
|
|||
"type": "Microsoft.Network/loadBalancers"
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersionStorage')]",
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Network/publicIPAddresses/', variables('masterPublicIPAddressName'))]",
|
||||
"[variables('vnetID')]",
|
||||
|
@ -1138,7 +1134,6 @@
|
|||
"type": "Microsoft.Compute/virtualMachineScaleSets"
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersionStorage')]",
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Network/publicIPAddresses/', variables('masterPublicIPAddressName'))]"
|
||||
],
|
||||
|
@ -1150,7 +1145,6 @@
|
|||
"type": "Microsoft.Storage/storageAccounts"
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersionDefault')]",
|
||||
"location": "[variables('location')]",
|
||||
"name": "[variables('virtualNetworkName')]",
|
||||
"properties": {
|
||||
|
@ -1178,14 +1172,12 @@
|
|||
"type": "Microsoft.Network/virtualNetworks"
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersionStorage')]",
|
||||
"location": "[variables('location')]",
|
||||
"name": "[variables('masterAvailabilitySet')]",
|
||||
"properties": { },
|
||||
"properties": {},
|
||||
"type": "Microsoft.Compute/availabilitySets"
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersionDefault')]",
|
||||
"location": "[variables('location')]",
|
||||
"name": "[variables('masterPublicIPAddressName')]",
|
||||
"properties": {
|
||||
|
@ -1197,7 +1189,6 @@
|
|||
"type": "Microsoft.Network/publicIPAddresses"
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersionDefault')]",
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Network/publicIPAddresses/', variables('masterPublicIPAddressName'))]"
|
||||
],
|
||||
|
@ -1223,7 +1214,7 @@
|
|||
"type": "Microsoft.Network/loadBalancers"
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersionDefault')]",
|
||||
"apiVersion": "2017-10-01",
|
||||
"copy": {
|
||||
"count": "[variables('masterCount')]",
|
||||
"name": "masterLbLoopNode"
|
||||
|
@ -1245,7 +1236,7 @@
|
|||
"type": "Microsoft.Network/loadBalancers/inboundNatRules"
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersionDefault')]",
|
||||
"apiVersion": "2017-10-01",
|
||||
"dependsOn": [
|
||||
"[variables('masterLbID')]"
|
||||
],
|
||||
|
@ -1263,7 +1254,6 @@
|
|||
"type": "Microsoft.Network/loadBalancers/inboundNatRules"
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersionDefault')]",
|
||||
"copy": {
|
||||
"count": "[variables('masterCount')]",
|
||||
"name": "nicLoopNode"
|
||||
|
@ -1299,7 +1289,6 @@
|
|||
"type": "Microsoft.Network/networkInterfaces"
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersionStorage')]",
|
||||
"copy": {
|
||||
"count": "[variables('masterCount')]",
|
||||
"name": "vmLoopNode"
|
||||
|
@ -1364,7 +1353,6 @@
|
|||
"type": "Microsoft.Compute/virtualMachines"
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersionDefault')]",
|
||||
"copy": {
|
||||
"count": "[variables('masterCount')]",
|
||||
"name": "vmLoopNode"
|
||||
|
@ -1379,7 +1367,7 @@
|
|||
"publisher": "Microsoft.OSTCExtensions",
|
||||
"settings": {
|
||||
"commandToExecute": "[variables('masterCustomScript')]",
|
||||
"fileUris": [ ]
|
||||
"fileUris": []
|
||||
},
|
||||
"type": "CustomScriptForLinux",
|
||||
"typeHandlerVersion": "1.4"
|
||||
|
|
|
@ -1,351 +1,344 @@
|
|||
{
|
||||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"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"
|
||||
}
|
||||
},
|
||||
"vmNamePrefix": {
|
||||
"type": "string",
|
||||
"defaultValue": "vmset-",
|
||||
"metadata": {
|
||||
"description": "VM name prefix"
|
||||
}
|
||||
},
|
||||
"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"
|
||||
],
|
||||
"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."
|
||||
}
|
||||
}
|
||||
"apiProfile": "2018-03-01-hybrid",
|
||||
"parameters": {
|
||||
"adminUsername": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "The name of the Administrator of the new VMs"
|
||||
},
|
||||
"defaultValue": "vmadmin"
|
||||
},
|
||||
"variables": {
|
||||
"availabilitySetName": "[toLower(concat('aSet-', resourceGroup().name))]",
|
||||
"storageAccountType": "Standard_LRS",
|
||||
"VMSize": "Standard_A1",
|
||||
"dnsPrefix": "[tolower(concat('vmdns', resourceGroup().name))]",
|
||||
"windowsImageVersion": "latest",
|
||||
"dataDiskSize": 2,
|
||||
|
||||
"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": "[concat(variables('vnetID'),'/subnets/',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": "[concat(variables('publiclbID'),'/frontendIPConfigurations/',variables('lbFE'))]",
|
||||
|
||||
"publicIPAddressName": "[tolower(concat('public-ip',resourceGroup().name))]",
|
||||
"rdpPort": 3389,
|
||||
"nsgName": "[tolower(concat('vmnsg',resourceGroup().name))]",
|
||||
"nsgID": "[resourceId('Microsoft.Network/networkSecurityGroups',variables('nsgName'))]",
|
||||
"vmContainerName": "vhds"
|
||||
"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"
|
||||
}
|
||||
},
|
||||
"vmNamePrefix": {
|
||||
"type": "string",
|
||||
"defaultValue": "vmset-",
|
||||
"metadata": {
|
||||
"description": "VM name prefix"
|
||||
}
|
||||
},
|
||||
"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"
|
||||
],
|
||||
"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": {
|
||||
"availabilitySetName": "[toLower(concat('aSet-', resourceGroup().name))]",
|
||||
"storageAccountType": "Standard_LRS",
|
||||
"VMSize": "Standard_A1",
|
||||
"dnsPrefix": "[tolower(concat('vmdns', resourceGroup().name))]",
|
||||
"windowsImageVersion": "latest",
|
||||
"dataDiskSize": 2,
|
||||
|
||||
"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": "[concat(variables('vnetID'),'/subnets/',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": "[concat(variables('publiclbID'),'/frontendIPConfigurations/',variables('lbFE'))]",
|
||||
|
||||
"publicIPAddressName": "[tolower(concat('public-ip',resourceGroup().name))]",
|
||||
"rdpPort": 3389,
|
||||
"nsgName": "[tolower(concat('vmnsg',resourceGroup().name))]",
|
||||
"nsgID": "[resourceId('Microsoft.Network/networkSecurityGroups',variables('nsgName'))]",
|
||||
"vmContainerName": "vhds"
|
||||
},
|
||||
"resources": [
|
||||
{
|
||||
"type": "Microsoft.Storage/storageAccounts",
|
||||
"name": "[variables('storageName')]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"accountType": "[variables('storageAccountType')]"
|
||||
},
|
||||
"dependsOn": [
|
||||
"[variables('publiclbName')]"
|
||||
]
|
||||
"type": "Microsoft.Storage/storageAccounts",
|
||||
"name": "[variables('storageName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"accountType": "[variables('storageAccountType')]"
|
||||
},
|
||||
"dependsOn": [
|
||||
"[variables('publiclbName')]"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Network/networkSecurityGroups",
|
||||
"name": "[variables('nsgName')]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"securityRules": [
|
||||
{
|
||||
"name": "rule1",
|
||||
"properties": {
|
||||
"protocol": "*",
|
||||
"sourcePortRange": "*",
|
||||
"destinationPortRange": "*",
|
||||
"sourceAddressPrefix": "*",
|
||||
"destinationAddressPrefix": "*",
|
||||
"access": "Allow",
|
||||
"priority": 101,
|
||||
"direction": "Inbound"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Compute/availabilitySets",
|
||||
"name": "[variables('availabilitySetName')]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"platformFaultDomainCount": "1",
|
||||
"platformUpdateDomainCount": "1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Network/publicIPAddresses",
|
||||
"name": "[variables('publicIPAddressName')]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"publicIPAllocationMethod": "Dynamic",
|
||||
"dnsSettings": {
|
||||
"domainNameLabel": "[variables('dnsPrefix')]"
|
||||
"type": "Microsoft.Network/networkSecurityGroups",
|
||||
"name": "[variables('nsgName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"securityRules": [
|
||||
{
|
||||
"name": "rule1",
|
||||
"properties": {
|
||||
"protocol": "*",
|
||||
"sourcePortRange": "*",
|
||||
"destinationPortRange": "*",
|
||||
"sourceAddressPrefix": "*",
|
||||
"destinationAddressPrefix": "*",
|
||||
"access": "Allow",
|
||||
"priority": 101,
|
||||
"direction": "Inbound"
|
||||
}
|
||||
},
|
||||
"dependsOn": [
|
||||
"[variables('vnetID')]"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Network/virtualNetworks",
|
||||
"name": "[variables('virtualNetworkName')]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"addressSpace": {
|
||||
"addressPrefixes": [
|
||||
"[variables('addressPrefix')]"
|
||||
]
|
||||
},
|
||||
"subnets": [
|
||||
{
|
||||
"name": "[variables('subnetName')]",
|
||||
"properties": {
|
||||
"addressPrefix": "[variables('subnetPrefix')]",
|
||||
"networkSecurityGroup": {
|
||||
"id": "[variables('nsgID')]"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"dependsOn": [
|
||||
"[variables('nsgID')]"
|
||||
]
|
||||
"type": "Microsoft.Compute/availabilitySets",
|
||||
"name": "[variables('availabilitySetName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"platformFaultDomainCount": "1",
|
||||
"platformUpdateDomainCount": "1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "2015-06-15",
|
||||
"name": "[variables('publiclbName')]",
|
||||
"type": "Microsoft.Network/loadBalancers",
|
||||
"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/publicIPAddresses",
|
||||
"name": "[variables('publicIPAddressName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"publicIPAllocationMethod": "Dynamic",
|
||||
"dnsSettings": {
|
||||
"domainNameLabel": "[variables('dnsPrefix')]"
|
||||
}
|
||||
},
|
||||
"dependsOn": [
|
||||
"[variables('vnetID')]"
|
||||
]
|
||||
},
|
||||
{
|
||||
"apiVersion": "2015-06-15",
|
||||
"type": "Microsoft.Network/loadBalancers/inboundNatRules",
|
||||
"name": "[concat(variables('publicLBName'), '/RDP-VM', copyIndex())]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"copy": {
|
||||
"name": "lbNatLoop",
|
||||
"count": "[parameters('numberOfInstances')]"
|
||||
"type": "Microsoft.Network/virtualNetworks",
|
||||
"name": "[variables('virtualNetworkName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"addressSpace": {
|
||||
"addressPrefixes": [
|
||||
"[variables('addressPrefix')]"
|
||||
]
|
||||
},
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Network/loadBalancers/', variables('publiclbName'))]"
|
||||
],
|
||||
"properties": {
|
||||
"frontendIPConfiguration": {
|
||||
"id": "[variables('publiclbFEConfigID')]"
|
||||
},
|
||||
"protocol": "tcp",
|
||||
"frontendPort": "[copyIndex(5000)]",
|
||||
"backendPort": 3389,
|
||||
"enableFloatingIP": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Network/networkInterfaces",
|
||||
"name": "[concat(variables('NICPrefix'), parameters('vmNamePrefix'), copyIndex())]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"location": "[resourceGroup().location]",
|
||||
"copy": {
|
||||
"name": "nicLoop",
|
||||
"count": "[parameters('numberOfInstances')]"
|
||||
},
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]",
|
||||
"[concat('Microsoft.Network/loadBalancers/', variables('publicLBName'))]",
|
||||
"[concat('Microsoft.Network/loadBalancers/', variables('publicLBName'), '/inboundNatRules/', 'RDP-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/RDP-VM', copyIndex())]"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Compute/virtualMachines",
|
||||
"name": "[concat(parameters('vmNamePrefix'), copyIndex())]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"location": "[resourceGroup().location]",
|
||||
"copy": {
|
||||
"name": "virtualMachineLoop",
|
||||
"count": "[parameters('numberOfInstances')]"
|
||||
},
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Storage/storageAccounts/',variables('storageName'))]",
|
||||
"[resourceId('Microsoft.Network/networkInterfaces', concat(variables('NICPrefix'), parameters('vmNamePrefix'), copyIndex()))]",
|
||||
"[concat('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('windowsImageVersion')]"
|
||||
},
|
||||
"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)]"
|
||||
}
|
||||
"subnets": [
|
||||
{
|
||||
"name": "[variables('subnetName')]",
|
||||
"properties": {
|
||||
"addressPrefix": "[variables('subnetPrefix')]",
|
||||
"networkSecurityGroup": {
|
||||
"id": "[variables('nsgID')]"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"dependsOn": [
|
||||
"[variables('nsgID')]"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "[variables('publiclbName')]",
|
||||
"type": "Microsoft.Network/loadBalancers",
|
||||
"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"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "2017-10-01",
|
||||
"type": "Microsoft.Network/loadBalancers/inboundNatRules",
|
||||
"name": "[concat(variables('publicLBName'), '/RDP-VM', copyIndex())]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"copy": {
|
||||
"name": "lbNatLoop",
|
||||
"count": "[parameters('numberOfInstances')]"
|
||||
},
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Network/loadBalancers/', variables('publiclbName'))]"
|
||||
],
|
||||
"properties": {
|
||||
"frontendIPConfiguration": {
|
||||
"id": "[variables('publiclbFEConfigID')]"
|
||||
},
|
||||
"protocol": "tcp",
|
||||
"frontendPort": "[copyIndex(5000)]",
|
||||
"backendPort": 3389,
|
||||
"enableFloatingIP": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Network/networkInterfaces",
|
||||
"name": "[concat(variables('NICPrefix'), parameters('vmNamePrefix'), copyIndex())]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"copy": {
|
||||
"name": "nicLoop",
|
||||
"count": "[parameters('numberOfInstances')]"
|
||||
},
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]",
|
||||
"[concat('Microsoft.Network/loadBalancers/', variables('publicLBName'))]",
|
||||
"[concat('Microsoft.Network/loadBalancers/', variables('publicLBName'), '/inboundNatRules/', 'RDP-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/RDP-VM', copyIndex())]"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Compute/virtualMachines",
|
||||
"name": "[concat(parameters('vmNamePrefix'), copyIndex())]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"copy": {
|
||||
"name": "virtualMachineLoop",
|
||||
"count": "[parameters('numberOfInstances')]"
|
||||
},
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Storage/storageAccounts/',variables('storageName'))]",
|
||||
"[resourceId('Microsoft.Network/networkInterfaces', concat(variables('NICPrefix'), parameters('vmNamePrefix'), copyIndex()))]",
|
||||
"[concat('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('windowsImageVersion')]"
|
||||
},
|
||||
"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": { }
|
||||
"outputs": {}
|
||||
}
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"apiProfile": "2018-03-01-hybrid",
|
||||
"parameters": {
|
||||
"adminUsername": {
|
||||
"type": "string",
|
||||
|
@ -129,258 +130,250 @@
|
|||
},
|
||||
"resources": [
|
||||
{
|
||||
"type": "Microsoft.Storage/storageAccounts",
|
||||
"name": "[variables('storageName')]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"accountType": "[variables('storageAccountType')]"
|
||||
},
|
||||
"dependsOn": [
|
||||
"[variables('publiclbName')]"
|
||||
]
|
||||
"type": "Microsoft.Storage/storageAccounts",
|
||||
"name": "[variables('storageName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"accountType": "[variables('storageAccountType')]"
|
||||
},
|
||||
"dependsOn": [
|
||||
"[variables('publiclbName')]"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Network/networkSecurityGroups",
|
||||
"name": "[variables('nsgName')]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"securityRules": [
|
||||
{
|
||||
"name": "rule1",
|
||||
"properties": {
|
||||
"protocol": "*",
|
||||
"sourcePortRange": "*",
|
||||
"destinationPortRange": "*",
|
||||
"sourceAddressPrefix": "*",
|
||||
"destinationAddressPrefix": "*",
|
||||
"access": "Allow",
|
||||
"priority": 101,
|
||||
"direction": "Inbound"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Compute/availabilitySets",
|
||||
"name": "[variables('availabilitySetName')]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"platformFaultDomainCount": "1",
|
||||
"platformUpdateDomainCount": "1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Network/publicIPAddresses",
|
||||
"name": "[variables('publicIPAddressName')]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"publicIPAllocationMethod": "Dynamic",
|
||||
"dnsSettings": {
|
||||
"domainNameLabel": "[variables('dnsPrefix')]"
|
||||
"type": "Microsoft.Network/networkSecurityGroups",
|
||||
"name": "[variables('nsgName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"securityRules": [
|
||||
{
|
||||
"name": "rule1",
|
||||
"properties": {
|
||||
"protocol": "*",
|
||||
"sourcePortRange": "*",
|
||||
"destinationPortRange": "*",
|
||||
"sourceAddressPrefix": "*",
|
||||
"destinationAddressPrefix": "*",
|
||||
"access": "Allow",
|
||||
"priority": 101,
|
||||
"direction": "Inbound"
|
||||
}
|
||||
},
|
||||
"dependsOn": [
|
||||
"[variables('vnetID')]"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Network/virtualNetworks",
|
||||
"name": "[variables('virtualNetworkName')]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"addressSpace": {
|
||||
"addressPrefixes": [
|
||||
"[variables('addressPrefix')]"
|
||||
]
|
||||
},
|
||||
"subnets": [
|
||||
{
|
||||
"name": "[variables('subnetName')]",
|
||||
"properties": {
|
||||
"addressPrefix": "[variables('subnetPrefix')]",
|
||||
"networkSecurityGroup": {
|
||||
"id": "[variables('nsgID')]"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"dependsOn": [
|
||||
"[variables('nsgID')]"
|
||||
]
|
||||
"type": "Microsoft.Compute/availabilitySets",
|
||||
"name": "[variables('availabilitySetName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"platformFaultDomainCount": "1",
|
||||
"platformUpdateDomainCount": "1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "2015-06-15",
|
||||
"name": "[variables('publiclbName')]",
|
||||
"type": "Microsoft.Network/loadBalancers",
|
||||
"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/publicIPAddresses",
|
||||
"name": "[variables('publicIPAddressName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"publicIPAllocationMethod": "Dynamic",
|
||||
"dnsSettings": {
|
||||
"domainNameLabel": "[variables('dnsPrefix')]"
|
||||
}
|
||||
},
|
||||
"dependsOn": [
|
||||
"[variables('vnetID')]"
|
||||
]
|
||||
},
|
||||
{
|
||||
"apiVersion": "2015-06-15",
|
||||
"type": "Microsoft.Network/loadBalancers/inboundNatRules",
|
||||
"name": "[concat(variables('publicLBName'), '/ssh-VM', copyIndex())]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"copy": {
|
||||
"name": "lbNatLoop",
|
||||
"count": "[parameters('numberOfInstances')]"
|
||||
"type": "Microsoft.Network/virtualNetworks",
|
||||
"name": "[variables('virtualNetworkName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"addressSpace": {
|
||||
"addressPrefixes": [
|
||||
"[variables('addressPrefix')]"
|
||||
]
|
||||
},
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Network/loadBalancers/', variables('publiclbName'))]"
|
||||
],
|
||||
"properties": {
|
||||
"frontendIPConfiguration": {
|
||||
"id": "[variables('publiclbFEConfigID')]"
|
||||
},
|
||||
"protocol": "tcp",
|
||||
"frontendPort": "[copyIndex(2200)]",
|
||||
"backendPort": 22,
|
||||
"enableFloatingIP": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Network/networkInterfaces",
|
||||
"name": "[concat(variables('NICPrefix'), parameters('vmNamePrefix'), copyIndex())]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"location": "[resourceGroup().location]",
|
||||
"copy": {
|
||||
"name": "nicLoop",
|
||||
"count": "[parameters('numberOfInstances')]"
|
||||
},
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]",
|
||||
"[concat('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",
|
||||
"name": "[concat(parameters('vmNamePrefix'), copyIndex())]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"location": "[resourceGroup().location]",
|
||||
"copy": {
|
||||
"name": "virtualMachineLoop",
|
||||
"count": "[parameters('numberOfInstances')]"
|
||||
},
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Storage/storageAccounts/',variables('storageName'))]",
|
||||
"[resourceId('Microsoft.Network/networkInterfaces', concat(variables('NICPrefix'), parameters('vmNamePrefix'), copyIndex()))]",
|
||||
"[concat('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)]"
|
||||
}
|
||||
"subnets": [
|
||||
{
|
||||
"name": "[variables('subnetName')]",
|
||||
"properties": {
|
||||
"addressPrefix": "[variables('subnetPrefix')]",
|
||||
"networkSecurityGroup": {
|
||||
"id": "[variables('nsgID')]"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"dependsOn": [
|
||||
"[variables('nsgID')]"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "[variables('publiclbName')]",
|
||||
"type": "Microsoft.Network/loadBalancers",
|
||||
"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"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "2017-10-01",
|
||||
"type": "Microsoft.Network/loadBalancers/inboundNatRules",
|
||||
"name": "[concat(variables('publicLBName'), '/ssh-VM', copyIndex())]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"copy": {
|
||||
"name": "lbNatLoop",
|
||||
"count": "[parameters('numberOfInstances')]"
|
||||
},
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Network/loadBalancers/', variables('publiclbName'))]"
|
||||
],
|
||||
"properties": {
|
||||
"frontendIPConfiguration": {
|
||||
"id": "[variables('publiclbFEConfigID')]"
|
||||
},
|
||||
"protocol": "tcp",
|
||||
"frontendPort": "[copyIndex(2200)]",
|
||||
"backendPort": 22,
|
||||
"enableFloatingIP": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Network/networkInterfaces",
|
||||
"name": "[concat(variables('NICPrefix'), parameters('vmNamePrefix'), copyIndex())]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"copy": {
|
||||
"name": "nicLoop",
|
||||
"count": "[parameters('numberOfInstances')]"
|
||||
},
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]",
|
||||
"[concat('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",
|
||||
"name": "[concat(parameters('vmNamePrefix'), copyIndex())]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"copy": {
|
||||
"name": "virtualMachineLoop",
|
||||
"count": "[parameters('numberOfInstances')]"
|
||||
},
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Storage/storageAccounts/',variables('storageName'))]",
|
||||
"[resourceId('Microsoft.Network/networkInterfaces', concat(variables('NICPrefix'), parameters('vmNamePrefix'), copyIndex()))]",
|
||||
"[concat('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": { }
|
||||
"outputs": {}
|
||||
}
|
|
@ -1,43 +1,43 @@
|
|||
{
|
||||
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"parameters": {
|
||||
"newZoneName": {
|
||||
"type": "string",
|
||||
"defaultValue": "[concat(uniqueString(resourceGroup().id), '.azurestackquickstart.org')]",
|
||||
"metadata": {
|
||||
"description": "The name of the DNS zone to be created. Must have at least 2 segements, e.g. hostname.org"
|
||||
}
|
||||
},
|
||||
"newRecordName": {
|
||||
"type": "string",
|
||||
"defaultValue": "www",
|
||||
"metadata": {
|
||||
"description": "The name of the DNS record to be created. The name is relative to the zone, not the FQDN."
|
||||
}
|
||||
},
|
||||
"firstRecordIPAddress": {
|
||||
"type": "string",
|
||||
"defaultValue": "1.2.3.4",
|
||||
"metadata": {
|
||||
"description": "The ipv4Address for the first record."
|
||||
}
|
||||
},
|
||||
"secondRecordIPAddress": {
|
||||
"type": "string",
|
||||
"defaultValue": "1.2.3.5",
|
||||
"metadata": {
|
||||
"description": "The ipv4Address for the second record."
|
||||
}
|
||||
}
|
||||
"apiProfile": "2018-03-01-hybrid",
|
||||
"parameters": {
|
||||
"newZoneName": {
|
||||
"type": "string",
|
||||
"defaultValue": "[concat(uniqueString(resourceGroup().id), '.azurestackquickstart.org')]",
|
||||
"metadata": {
|
||||
"description": "The name of the DNS zone to be created. Must have at least 2 segements, e.g. hostname.org"
|
||||
}
|
||||
},
|
||||
"newRecordName": {
|
||||
"type": "string",
|
||||
"defaultValue": "www",
|
||||
"metadata": {
|
||||
"description": "The name of the DNS record to be created. The name is relative to the zone, not the FQDN."
|
||||
}
|
||||
},
|
||||
"firstRecordIPAddress": {
|
||||
"type": "string",
|
||||
"defaultValue": "1.2.3.4",
|
||||
"metadata": {
|
||||
"description": "The ipv4Address for the first record."
|
||||
}
|
||||
},
|
||||
"secondRecordIPAddress": {
|
||||
"type": "string",
|
||||
"defaultValue": "1.2.3.5",
|
||||
"metadata": {
|
||||
"description": "The ipv4Address for the second record."
|
||||
}
|
||||
}
|
||||
},
|
||||
"resources": [
|
||||
{
|
||||
"type": "Microsoft.Network/dnszones",
|
||||
"name": "[parameters('newZoneName')]",
|
||||
"apiVersion": "2016-04-01",
|
||||
"location": "global",
|
||||
"properties": { }
|
||||
"properties": {}
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Network/dnszones/a",
|
||||
|
@ -50,12 +50,12 @@
|
|||
"properties": {
|
||||
"TTL": 3600,
|
||||
"ARecords": [
|
||||
{
|
||||
"ipv4Address": "[parameters('firstRecordIPAddress')]"
|
||||
},
|
||||
{
|
||||
"ipv4Address": "[parameters('secondRecordIPAddress')]"
|
||||
}
|
||||
{
|
||||
"ipv4Address": "[parameters('firstRecordIPAddress')]"
|
||||
},
|
||||
{
|
||||
"ipv4Address": "[parameters('secondRecordIPAddress')]"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"apiProfile": "2018-03-01-hybrid",
|
||||
"parameters": { },
|
||||
"variables": {
|
||||
"networkSecurityGroupName": "mySG"
|
||||
|
@ -9,7 +10,6 @@
|
|||
{
|
||||
"name": "[variables('networkSecurityGroupName')]",
|
||||
"type": "Microsoft.Network/networkSecurityGroups",
|
||||
"apiVersion": "2015-06-15",
|
||||
"location": "[resourceGroup().location]",
|
||||
"tags": {
|
||||
"displayName": "NetworkSecurityGroup"
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"apiProfile": "2018-03-01-hybrid",
|
||||
"parameters": {
|
||||
"storageAccountType": {
|
||||
"type": "string",
|
||||
|
@ -20,7 +21,6 @@
|
|||
{
|
||||
"name": "[variables('storageAccountName')]",
|
||||
"type": "Microsoft.Storage/storageAccounts",
|
||||
"apiVersion": "2015-06-15",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"accountType": "[parameters('storageAccountType')]"
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"apiProfile": "2018-03-01-hybrid",
|
||||
"parameters": { },
|
||||
"variables": {
|
||||
"nicName": "myNic",
|
||||
|
@ -20,7 +21,6 @@
|
|||
{
|
||||
"name": "[variables('nsgName')]",
|
||||
"type": "Microsoft.Network/networkSecurityGroups",
|
||||
"apiVersion": "2015-06-15",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"securityRules": [
|
||||
|
@ -43,7 +43,6 @@
|
|||
{
|
||||
"name": "[variables('publicIPAddressName')]",
|
||||
"type": "Microsoft.Network/publicIPAddresses",
|
||||
"apiVersion": "2015-06-15",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"publicIPAllocationMethod": "[variables('publicIPAddressType')]"
|
||||
|
@ -52,7 +51,6 @@
|
|||
{
|
||||
"name": "[variables('vnetName')]",
|
||||
"type": "Microsoft.Network/virtualNetworks",
|
||||
"apiVersion": "2015-06-15",
|
||||
"location": "[resourceGroup().location]",
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Network/networkSecurityGroups/', variables('nsgName'))]"
|
||||
|
@ -79,7 +77,6 @@
|
|||
{
|
||||
"name": "[concat(variables('nicName'), copyindex())]",
|
||||
"type": "Microsoft.Network/networkInterfaces",
|
||||
"apiVersion": "2015-06-15",
|
||||
"location": "[resourceGroup().location]",
|
||||
"copy": {
|
||||
"name": "nicLoop",
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"apiProfile": "2018-03-01-hybrid",
|
||||
"parameters": { },
|
||||
"variables": {
|
||||
"vnetName": "myVNet",
|
||||
|
@ -14,7 +15,6 @@
|
|||
{
|
||||
"name": "[variables('nsgName')]",
|
||||
"type": "Microsoft.Network/networkSecurityGroups",
|
||||
"apiVersion": "2015-06-15",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"securityRules": [
|
||||
|
@ -37,7 +37,6 @@
|
|||
{
|
||||
"name": "[variables('vnetName')]",
|
||||
"type": "Microsoft.Network/virtualNetworks",
|
||||
"apiVersion": "2015-06-15",
|
||||
"location": "[resourceGroup().location]",
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Network/networkSecurityGroups/', variables('nsgName'))]"
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"apiProfile": "2018-03-01-hybrid",
|
||||
"parameters": { },
|
||||
"variables": {
|
||||
"vnetName": "myVNet",
|
||||
|
@ -11,7 +12,6 @@
|
|||
},
|
||||
"resources": [
|
||||
{
|
||||
"apiVersion": "2015-05-01-preview",
|
||||
"type": "Microsoft.Network/virtualNetworks",
|
||||
"name": "[variables('vnetName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"$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",
|
||||
|
@ -16,7 +17,6 @@
|
|||
{
|
||||
"type": "Microsoft.Compute/virtualMachines/extensions",
|
||||
"name": "[concat(parameters('vmName'),'/CustomScriptExtension')]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"publisher": "Microsoft.Compute",
|
||||
|
@ -32,7 +32,6 @@
|
|||
{
|
||||
"type": "Microsoft.Compute/virtualMachines/extensions",
|
||||
"name": "[concat(parameters('vmName'),'/BGInfo')]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"publisher": "Microsoft.Compute",
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"$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",
|
||||
|
@ -79,7 +80,6 @@
|
|||
},
|
||||
"resources": [
|
||||
{
|
||||
"apiVersion": "2015-05-01-preview",
|
||||
"type": "Microsoft.Network/networkSecurityGroups",
|
||||
"name": "[variables('networkSecurityGroupName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
|
@ -105,7 +105,6 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "2015-05-01-preview",
|
||||
"type": "Microsoft.Network/virtualNetworks",
|
||||
"name": "[variables('virtualNetworkName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
|
@ -128,11 +127,10 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "2015-05-01-preview",
|
||||
"type": "Microsoft.Network/networkInterfaces",
|
||||
"name": "[variables('nicName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
|
@ -154,7 +152,6 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "2015-06-15",
|
||||
"type": "Microsoft.Compute/virtualMachines",
|
||||
"name": "[variables('vmName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
|
@ -208,5 +205,5 @@
|
|||
}
|
||||
}
|
||||
],
|
||||
"outputs": { }
|
||||
"outputs": {}
|
||||
}
|
||||
|
|
|
@ -1,13 +1,14 @@
|
|||
{
|
||||
"$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 existing VM to apply Linux custom script to"
|
||||
},
|
||||
"defaultValue": "[substring(concat('simplelinuxvm',resourceGroup().Name),0,14)]"
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "Name of the existing VM to apply Linux custom script to"
|
||||
},
|
||||
"defaultValue": "[substring(concat('simplelinuxvm',resourceGroup().Name),0,14)]"
|
||||
}
|
||||
},
|
||||
"variables": {
|
||||
|
@ -16,7 +17,6 @@
|
|||
{
|
||||
"type": "Microsoft.Compute/virtualMachines/extensions",
|
||||
"name": "[concat(parameters('vmName'),'/LinuxCustomScriptExtension')]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"publisher": "Microsoft.OSTCExtensions",
|
||||
|
@ -29,5 +29,5 @@
|
|||
}
|
||||
}
|
||||
],
|
||||
"outputs": { }
|
||||
"outputs": {}
|
||||
}
|
||||
|
|
|
@ -1,13 +1,14 @@
|
|||
{
|
||||
"$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 existing VM to apply Docker extension to"
|
||||
},
|
||||
"defaultValue": "[substring(concat('simplelinuxvm',resourceGroup().Name),0,14)]"
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "Name of the existing VM to apply Docker extension to"
|
||||
},
|
||||
"defaultValue": "[substring(concat('simplelinuxvm',resourceGroup().Name),0,14)]"
|
||||
}
|
||||
},
|
||||
"variables": {
|
||||
|
@ -16,15 +17,14 @@
|
|||
{
|
||||
"type": "Microsoft.Compute/virtualMachines/extensions",
|
||||
"name": "[concat(parameters('vmName'),'/DockerExtension')]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"publisher": "Microsoft.Azure.Extensions",
|
||||
"type": "DockerExtension",
|
||||
"typeHandlerVersion": "1.2",
|
||||
"autoUpgradeMinorVersion": true,
|
||||
"settings": { },
|
||||
"protectedSettings": { }
|
||||
"settings": {},
|
||||
"protectedSettings": {}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,13 +1,14 @@
|
|||
{
|
||||
"$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 existing Linux VM to modify"
|
||||
},
|
||||
"defaultValue": "[substring(concat('simplelinuxvm',resourceGroup().Name),0,14)]"
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "Name of the existing Linux VM to modify"
|
||||
},
|
||||
"defaultValue": "[substring(concat('simplelinuxvm',resourceGroup().Name),0,14)]"
|
||||
},
|
||||
"username": {
|
||||
"type": "string",
|
||||
|
@ -29,14 +30,13 @@
|
|||
{
|
||||
"type": "Microsoft.Compute/virtualMachines/extensions",
|
||||
"name": "[concat(parameters('vmName'),'/LinuxVMAccessExtension')]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"publisher": "Microsoft.OSTCExtensions",
|
||||
"type": "VMAccessForLinux",
|
||||
"typeHandlerVersion": "1.4",
|
||||
"autoUpgradeMinorVersion": "true",
|
||||
"settings": { },
|
||||
"settings": {},
|
||||
"protectedSettings": {
|
||||
"username": "[parameters('username')]",
|
||||
"password": "[parameters('password')]"
|
||||
|
@ -44,5 +44,5 @@
|
|||
}
|
||||
}
|
||||
],
|
||||
"outputs": { }
|
||||
"outputs": {}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"apiProfile": "2018-03-01-hybrid",
|
||||
"parameters": {
|
||||
"adminUsername": {
|
||||
"type": "string",
|
||||
|
@ -66,14 +67,12 @@
|
|||
{
|
||||
"type": "Microsoft.Storage/storageAccounts",
|
||||
"name": "[toLower(variables('storageAccountName'))]",
|
||||
"apiVersion": "2015-05-01-preview",
|
||||
"location": "[variables('location')]",
|
||||
"properties": {
|
||||
"accountType": "[variables('storageAccountType')]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "2015-05-01-preview",
|
||||
"type": "Microsoft.Network/networkSecurityGroups",
|
||||
"name": "[variables('networkSecurityGroupName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
|
@ -97,7 +96,6 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "2015-05-01-preview",
|
||||
"type": "Microsoft.Network/virtualNetworks",
|
||||
"name": "[variables('virtualNetworkName')]",
|
||||
"location": "[variables('location')]",
|
||||
|
@ -118,7 +116,6 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "2015-05-01-preview",
|
||||
"type": "Microsoft.Network/networkInterfaces",
|
||||
"name": "[variables('nicName')]",
|
||||
"location": "[variables('location')]",
|
||||
|
@ -144,7 +141,6 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "2015-06-15",
|
||||
"type": "Microsoft.Compute/virtualMachines",
|
||||
"name": "[variables('vmName')]",
|
||||
"location": "[variables('location')]",
|
||||
|
|
|
@ -1,263 +1,256 @@
|
|||
{
|
||||
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"parameters": {
|
||||
"virtualMachineSize": {
|
||||
"type": "String",
|
||||
"defaultValue" : "Standard_D2"
|
||||
},
|
||||
"adminUsername": {
|
||||
"type": "String"
|
||||
},
|
||||
"adminPassword": {
|
||||
"type": "SecureString"
|
||||
},
|
||||
"_artifactsLocation": {
|
||||
|
||||
"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."
|
||||
|
||||
},
|
||||
|
||||
"defaultValue": "https://raw.githubusercontent.com/vpatelsj/AzureStack-QuickStart-Templates/master/101-vm-linux-minikube/"
|
||||
|
||||
},
|
||||
"imagePublisher": {
|
||||
"type": "string",
|
||||
"defaultValue": "Canonical",
|
||||
"metadata": {
|
||||
"description": "Maps to the publisher in the Azure Stack Platform Image Repository manifest file Eg: Canonical, Suse, OpenLogic "
|
||||
}
|
||||
},
|
||||
"imageOffer": {
|
||||
"type": "string",
|
||||
"defaultValue": "UbuntuServer",
|
||||
"metadata": {
|
||||
"description": "Maps to the Offer in the Azure Stack Platform Image Repository manifest file Eg: UbuntuServer, SlesServer, CentOS "
|
||||
}
|
||||
},
|
||||
"imageSku": {
|
||||
"type": "string",
|
||||
"defaultValue": "16.04-LTS",
|
||||
"metadata": {
|
||||
"description": "Maps to the sku in the Azure Stack Platform Image Repository manifest file Eg: 16.04-LTS, 14.04.5-LTS."
|
||||
}
|
||||
},
|
||||
"minikubeLink": {
|
||||
"type": "string",
|
||||
"defaultValue": "https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64",
|
||||
"metadata": {
|
||||
"description": "Minikube installation download link"
|
||||
}
|
||||
},
|
||||
"kubectlLink": {
|
||||
"type": "string",
|
||||
"defaultValue": "https://storage.googleapis.com/kubernetes-release/release/v1.8.0/bin/linux/amd64/kubectl",
|
||||
"metadata": {
|
||||
"description": "kubernetes installation download link"
|
||||
}
|
||||
},
|
||||
"dockerLink": {
|
||||
"type": "string",
|
||||
"defaultValue": "https://download.docker.com/linux/ubuntu",
|
||||
"metadata": {
|
||||
"description": "Docker installation download link"
|
||||
}
|
||||
}
|
||||
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"apiProfile": "2018-03-01-hybrid",
|
||||
"parameters": {
|
||||
"virtualMachineSize": {
|
||||
"type": "String",
|
||||
"defaultValue": "Standard_D2"
|
||||
},
|
||||
"variables": {
|
||||
"virtualMachineName" : "[toLower(concat('vm', uniqueString(resourceGroup().id)))]",
|
||||
"virtualNetworkName": "[toLower(concat('vnet', uniqueString(resourceGroup().id)))]",
|
||||
"networkInterfaceName" : "[toLower(concat('nic', uniqueString(resourceGroup().id)))]",
|
||||
"networkSecurityGroupName" : "[toLower(concat('nsg', uniqueString(resourceGroup().id)))]",
|
||||
"storageAccountName" : "[toLower(concat('sa', uniqueString(resourceGroup().id)))]",
|
||||
"storageAccountType" : "Standard_LRS",
|
||||
"diagnosticsStorageAccountName" : "[toLower(concat('dsa', uniqueString(resourceGroup().id)))]",
|
||||
"diagnosticsStorageAccountId" : "Microsoft.Storage/storageAccounts/[toLower(concat('dsa', uniqueString(resourceGroup().id)))]",
|
||||
"diagnosticsStorageAccountType" : "Standard_LRS",
|
||||
"addressPrefix" : "10.0.0.0/24",
|
||||
"subnetName" : "default",
|
||||
"subnetPrefix" : "10.0.0.0/24",
|
||||
"publicIpAddressName" : "[toLower(concat('pip', uniqueString(resourceGroup().id)))]",
|
||||
"publicIpAddressType" : "Dynamic",
|
||||
"vnetId": "[resourceId(resourceGroup().Name,'Microsoft.Network/virtualNetworks', variables('virtualNetworkName'))]",
|
||||
"subnetRef": "[concat(variables('vnetId'), '/subnets/', variables('subnetName'))]",
|
||||
"scriptName": "script",
|
||||
"scriptParameters": "[concat(parameters('minikubeLink'),' ',parameters('kubectlLink'),' ',parameters('dockerLink'))]"
|
||||
|
||||
"adminUsername": {
|
||||
"type": "String"
|
||||
},
|
||||
"resources": [
|
||||
{
|
||||
"type": "Microsoft.Storage/storageAccounts",
|
||||
"name": "[variables('storageAccountName')]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"accountType": "[variables('storageAccountType')]"
|
||||
}
|
||||
"adminPassword": {
|
||||
"type": "SecureString"
|
||||
},
|
||||
"_artifactsLocation": {
|
||||
|
||||
"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."
|
||||
|
||||
},
|
||||
|
||||
"defaultValue": "https://raw.githubusercontent.com/vpatelsj/AzureStack-QuickStart-Templates/master/101-vm-linux-minikube/"
|
||||
|
||||
},
|
||||
"imagePublisher": {
|
||||
"type": "string",
|
||||
"defaultValue": "Canonical",
|
||||
"metadata": {
|
||||
"description": "Maps to the publisher in the Azure Stack Platform Image Repository manifest file Eg: Canonical, Suse, OpenLogic "
|
||||
}
|
||||
},
|
||||
"imageOffer": {
|
||||
"type": "string",
|
||||
"defaultValue": "UbuntuServer",
|
||||
"metadata": {
|
||||
"description": "Maps to the Offer in the Azure Stack Platform Image Repository manifest file Eg: UbuntuServer, SlesServer, CentOS "
|
||||
}
|
||||
},
|
||||
"imageSku": {
|
||||
"type": "string",
|
||||
"defaultValue": "16.04-LTS",
|
||||
"metadata": {
|
||||
"description": "Maps to the sku in the Azure Stack Platform Image Repository manifest file Eg: 16.04-LTS, 14.04.5-LTS."
|
||||
}
|
||||
},
|
||||
"minikubeLink": {
|
||||
"type": "string",
|
||||
"defaultValue": "https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64",
|
||||
"metadata": {
|
||||
"description": "Minikube installation download link"
|
||||
}
|
||||
},
|
||||
"kubectlLink": {
|
||||
"type": "string",
|
||||
"defaultValue": "https://storage.googleapis.com/kubernetes-release/release/v1.8.0/bin/linux/amd64/kubectl",
|
||||
"metadata": {
|
||||
"description": "kubernetes installation download link"
|
||||
}
|
||||
},
|
||||
"dockerLink": {
|
||||
"type": "string",
|
||||
"defaultValue": "https://download.docker.com/linux/ubuntu",
|
||||
"metadata": {
|
||||
"description": "Docker installation download link"
|
||||
}
|
||||
}
|
||||
},
|
||||
"variables": {
|
||||
"virtualMachineName": "[toLower(concat('vm', uniqueString(resourceGroup().id)))]",
|
||||
"virtualNetworkName": "[toLower(concat('vnet', uniqueString(resourceGroup().id)))]",
|
||||
"networkInterfaceName": "[toLower(concat('nic', uniqueString(resourceGroup().id)))]",
|
||||
"networkSecurityGroupName": "[toLower(concat('nsg', uniqueString(resourceGroup().id)))]",
|
||||
"storageAccountName": "[toLower(concat('sa', uniqueString(resourceGroup().id)))]",
|
||||
"storageAccountType": "Standard_LRS",
|
||||
"diagnosticsStorageAccountName": "[toLower(concat('dsa', uniqueString(resourceGroup().id)))]",
|
||||
"diagnosticsStorageAccountId": "Microsoft.Storage/storageAccounts/[toLower(concat('dsa', uniqueString(resourceGroup().id)))]",
|
||||
"diagnosticsStorageAccountType": "Standard_LRS",
|
||||
"addressPrefix": "10.0.0.0/24",
|
||||
"subnetName": "default",
|
||||
"subnetPrefix": "10.0.0.0/24",
|
||||
"publicIpAddressName": "[toLower(concat('pip', uniqueString(resourceGroup().id)))]",
|
||||
"publicIpAddressType": "Dynamic",
|
||||
"vnetId": "[resourceId(resourceGroup().Name,'Microsoft.Network/virtualNetworks', variables('virtualNetworkName'))]",
|
||||
"subnetRef": "[concat(variables('vnetId'), '/subnets/', variables('subnetName'))]",
|
||||
"scriptName": "script",
|
||||
"scriptParameters": "[concat(parameters('minikubeLink'),' ',parameters('kubectlLink'),' ',parameters('dockerLink'))]"
|
||||
|
||||
},
|
||||
"resources": [
|
||||
{
|
||||
"type": "Microsoft.Storage/storageAccounts",
|
||||
"name": "[variables('storageAccountName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"accountType": "[variables('storageAccountType')]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Storage/storageAccounts",
|
||||
"name": "[variables('diagnosticsStorageAccountName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"accountType": "[variables('diagnosticsStorageAccountType')]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Network/publicIpAddresses",
|
||||
"name": "[variables('publicIpAddressName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"publicIpAllocationMethod": "[variables('publicIpAddressType')]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Network/virtualNetworks",
|
||||
"name": "[variables('virtualNetworkName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"addressSpace": {
|
||||
"addressPrefixes": [
|
||||
"[variables('addressPrefix')]"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Storage/storageAccounts",
|
||||
"name": "[variables('diagnosticsStorageAccountName')]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"location": "[resourceGroup().location]",
|
||||
"subnets": [
|
||||
{
|
||||
"name": "[variables('subnetName')]",
|
||||
"properties": {
|
||||
"accountType": "[variables('diagnosticsStorageAccountType')]"
|
||||
"addressPrefix": "[variables('subnetPrefix')]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Network/publicIpAddresses",
|
||||
"name": "[variables('publicIpAddressName')]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"location": "[resourceGroup().location]",
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Network/networkSecurityGroups",
|
||||
"name": "[variables('networkSecurityGroupName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"securityRules": [
|
||||
{
|
||||
"name": "default-allow-ssh",
|
||||
"properties": {
|
||||
"publicIpAllocationMethod": "[variables('publicIpAddressType')]"
|
||||
"priority": 1000,
|
||||
"sourceAddressPrefix": "*",
|
||||
"protocol": "TCP",
|
||||
"destinationPortRange": "22",
|
||||
"access": "Allow",
|
||||
"direction": "Inbound",
|
||||
"sourcePortRange": "*",
|
||||
"destinationAddressPrefix": "*"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Network/virtualNetworks",
|
||||
"name": "[variables('virtualNetworkName')]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"location": "[resourceGroup().location]",
|
||||
},
|
||||
{
|
||||
"name": "default-allow-remotedesktop",
|
||||
"properties": {
|
||||
"addressSpace": {
|
||||
"addressPrefixes": [
|
||||
"[variables('addressPrefix')]"
|
||||
]
|
||||
},
|
||||
"subnets": [
|
||||
{
|
||||
"name": "[variables('subnetName')]",
|
||||
"properties": {
|
||||
"addressPrefix": "[variables('subnetPrefix')]"
|
||||
}
|
||||
}
|
||||
]
|
||||
"priority": 1010,
|
||||
"sourceAddressPrefix": "*",
|
||||
"protocol": "TCP",
|
||||
"destinationPortRange": "3389",
|
||||
"access": "Allow",
|
||||
"direction": "Inbound",
|
||||
"sourcePortRange": "*",
|
||||
"destinationAddressPrefix": "*"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Network/networkSecurityGroups",
|
||||
"name": "[variables('networkSecurityGroupName')]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"location": "[resourceGroup().location]",
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Network/networkInterfaces",
|
||||
"name": "[variables('networkInterfaceName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"ipConfigurations": [
|
||||
{
|
||||
"name": "ipconfig1",
|
||||
"properties": {
|
||||
"securityRules": [
|
||||
{
|
||||
"name": "default-allow-ssh",
|
||||
"properties": {
|
||||
"priority": 1000,
|
||||
"sourceAddressPrefix": "*",
|
||||
"protocol": "TCP",
|
||||
"destinationPortRange": "22",
|
||||
"access": "Allow",
|
||||
"direction": "Inbound",
|
||||
"sourcePortRange": "*",
|
||||
"destinationAddressPrefix": "*"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "default-allow-remotedesktop",
|
||||
"properties": {
|
||||
"priority": 1010,
|
||||
"sourceAddressPrefix": "*",
|
||||
"protocol": "TCP",
|
||||
"destinationPortRange": "3389",
|
||||
"access": "Allow",
|
||||
"direction": "Inbound",
|
||||
"sourcePortRange": "*",
|
||||
"destinationAddressPrefix": "*"
|
||||
}
|
||||
}
|
||||
]
|
||||
"subnet": {
|
||||
"id": "[variables('subnetRef')]"
|
||||
},
|
||||
"privateIPAllocationMethod": "Dynamic",
|
||||
"publicIpAddress": {
|
||||
"id": "[resourceId(resourceGroup().Name,'Microsoft.Network/publicIpAddresses', variables('publicIpAddressName'))]"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"networkSecurityGroup": {
|
||||
"id": "[resourceId(resourceGroup().Name, 'Microsoft.Network/networkSecurityGroups', variables('networkSecurityGroupName'))]"
|
||||
}
|
||||
},
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]",
|
||||
"[concat('Microsoft.Network/publicIpAddresses/', variables('publicIpAddressName'))]",
|
||||
"[concat('Microsoft.Network/networkSecurityGroups/', variables('networkSecurityGroupName'))]"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Compute/virtualMachines",
|
||||
"name": "[variables('virtualMachineName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"osProfile": {
|
||||
"computerName": "[variables('virtualMachineName')]",
|
||||
"adminUsername": "[parameters('adminUsername')]",
|
||||
"adminPassword": "[parameters('adminPassword')]"
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Network/networkInterfaces",
|
||||
"name": "[variables('networkInterfaceName')]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"ipConfigurations": [
|
||||
{
|
||||
"name": "ipconfig1",
|
||||
"properties": {
|
||||
"subnet": {
|
||||
"id": "[variables('subnetRef')]"
|
||||
},
|
||||
"privateIPAllocationMethod": "Dynamic",
|
||||
"publicIpAddress": {
|
||||
"id": "[resourceId(resourceGroup().Name,'Microsoft.Network/publicIpAddresses', variables('publicIpAddressName'))]"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"networkSecurityGroup": {
|
||||
"id": "[resourceId(resourceGroup().Name, 'Microsoft.Network/networkSecurityGroups', variables('networkSecurityGroupName'))]"
|
||||
}
|
||||
"hardwareProfile": {
|
||||
"vmSize": "[parameters('virtualMachineSize')]"
|
||||
},
|
||||
"storageProfile": {
|
||||
"imageReference": {
|
||||
"publisher": "[parameters('imagePublisher')]",
|
||||
"offer": "[parameters('imageOffer')]",
|
||||
"sku": "[parameters('imageSku')]",
|
||||
"version": "latest"
|
||||
},
|
||||
"osDisk": {
|
||||
"createOption": "fromImage",
|
||||
"vhd": {
|
||||
"uri": "[concat(concat(reference(resourceId(resourceGroup().Name, 'Microsoft.Storage/storageAccounts', variables('storageAccountName')), '2015-06-15').primaryEndpoints['blob'], 'vhds/'), variables('virtualMachineName'), '20171129145808.vhd')]"
|
||||
},
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]",
|
||||
"[concat('Microsoft.Network/publicIpAddresses/', variables('publicIpAddressName'))]",
|
||||
"[concat('Microsoft.Network/networkSecurityGroups/', variables('networkSecurityGroupName'))]"
|
||||
]
|
||||
"name": "[variables('virtualMachineName')]"
|
||||
},
|
||||
"dataDisks": []
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Compute/virtualMachines",
|
||||
"name": "[variables('virtualMachineName')]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"osProfile": {
|
||||
"computerName": "[variables('virtualMachineName')]",
|
||||
"adminUsername": "[parameters('adminUsername')]",
|
||||
"adminPassword": "[parameters('adminPassword')]"
|
||||
},
|
||||
"hardwareProfile": {
|
||||
"vmSize": "[parameters('virtualMachineSize')]"
|
||||
},
|
||||
"storageProfile": {
|
||||
"imageReference": {
|
||||
"publisher": "[parameters('imagePublisher')]",
|
||||
"offer": "[parameters('imageOffer')]",
|
||||
"sku": "[parameters('imageSku')]",
|
||||
"version": "latest"
|
||||
},
|
||||
"osDisk": {
|
||||
"createOption": "fromImage",
|
||||
"vhd": {
|
||||
"uri": "[concat(concat(reference(resourceId(resourceGroup().Name, 'Microsoft.Storage/storageAccounts', variables('storageAccountName')), '2015-06-15').primaryEndpoints['blob'], 'vhds/'), variables('virtualMachineName'), '20171129145808.vhd')]"
|
||||
},
|
||||
"name": "[variables('virtualMachineName')]"
|
||||
},
|
||||
"dataDisks": []
|
||||
},
|
||||
"networkProfile": {
|
||||
"networkInterfaces": [
|
||||
{
|
||||
"id": "[resourceId('Microsoft.Network/networkInterfaces', variables('networkInterfaceName'))]"
|
||||
}
|
||||
]
|
||||
},
|
||||
"diagnosticsProfile": {
|
||||
"bootDiagnostics": {
|
||||
"enabled": true,
|
||||
"storageUri": "[reference(resourceId(resourceGroup().Name, 'Microsoft.Storage/storageAccounts', variables('diagnosticsStorageAccountName')), '2015-06-15').primaryEndpoints['blob']]"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Network/networkInterfaces/', variables('networkInterfaceName'))]",
|
||||
"[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]",
|
||||
"[concat('Microsoft.Storage/storageAccounts/', variables('diagnosticsStorageAccountName'))]"
|
||||
]
|
||||
"networkProfile": {
|
||||
"networkInterfaces": [
|
||||
{
|
||||
"id": "[resourceId('Microsoft.Network/networkInterfaces', variables('networkInterfaceName'))]"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"diagnosticsProfile": {
|
||||
"bootDiagnostics": {
|
||||
"enabled": true,
|
||||
"storageUri": "[reference(resourceId(resourceGroup().Name, 'Microsoft.Storage/storageAccounts', variables('diagnosticsStorageAccountName')), '2015-06-15').primaryEndpoints['blob']]"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Network/networkInterfaces/', variables('networkInterfaceName'))]",
|
||||
"[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]",
|
||||
"[concat('Microsoft.Storage/storageAccounts/', variables('diagnosticsStorageAccountName'))]"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Compute/virtualMachines/extensions",
|
||||
"name": "[concat(variables('virtualMachineName'),'/LinuxCustomScriptExtension')]",
|
||||
"apiVersion": "2016-03-30",
|
||||
"location": "[resourceGroup().location]",
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Compute/virtualMachines/', variables('virtualMachineName'))]"
|
||||
|
@ -271,13 +264,13 @@
|
|||
"fileUris": [
|
||||
"[concat(parameters('_artifactsLocation'), variables('scriptName'), '.sh')]"
|
||||
],
|
||||
"commandToExecute": "[concat('/usr/bin/nohup /bin/bash -c \"/bin/bash ', variables('scriptName'), '.sh ' , variables('scriptParameters'), ' >> /var/log/azure/minikube.log 2>&1 &\" &')]",
|
||||
"commandToExecute": "[concat('/usr/bin/nohup /bin/bash -c \"/bin/bash ', variables('scriptName'), '.sh ' , variables('scriptParameters'), ' >> /var/log/azure/minikube.log 2>&1 &\" &')]",
|
||||
"timestamp": "(Get-Date).Ticks",
|
||||
"enableInternalDNSCheck": "false"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"outputs": {
|
||||
}
|
||||
],
|
||||
"outputs": {
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,13 +1,14 @@
|
|||
{
|
||||
"$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 existing VM to apply BGInfo to"
|
||||
},
|
||||
"defaultValue": "[substring(concat('simplewinvm',resourceGroup().Name),0,12)]"
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "Name of the existing VM to apply BGInfo to"
|
||||
},
|
||||
"defaultValue": "[substring(concat('simplewinvm',resourceGroup().Name),0,12)]"
|
||||
}
|
||||
},
|
||||
"variables": {
|
||||
|
@ -16,7 +17,6 @@
|
|||
{
|
||||
"type": "Microsoft.Compute/virtualMachines/extensions",
|
||||
"name": "[concat(parameters('vmName'),'/BGInfo')]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"publisher": "Microsoft.Compute",
|
||||
|
@ -30,5 +30,5 @@
|
|||
}
|
||||
}
|
||||
],
|
||||
"outputs": { }
|
||||
"outputs": {}
|
||||
}
|
||||
|
|
|
@ -1,13 +1,14 @@
|
|||
{
|
||||
"$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 existing VM to apply the custom script to"
|
||||
},
|
||||
"defaultvalue": "[substring(concat('simplewinvm',resourceGroup().Name),0,12)]"
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "Name of the existing VM to apply the custom script to"
|
||||
},
|
||||
"defaultvalue": "[substring(concat('simplewinvm',resourceGroup().Name),0,12)]"
|
||||
}
|
||||
},
|
||||
"variables": {
|
||||
|
@ -16,7 +17,6 @@
|
|||
{
|
||||
"type": "Microsoft.Compute/virtualMachines/extensions",
|
||||
"name": "[concat(parameters('vmName'),'/CustomScriptExtension')]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"publisher": "Microsoft.Compute",
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"$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",
|
||||
|
@ -16,7 +17,6 @@
|
|||
{
|
||||
"type": "Microsoft.Compute/virtualMachines/extensions",
|
||||
"name": "[concat(parameters('vmName'),'/CustomScriptExtension')]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"publisher": "Microsoft.Compute",
|
||||
|
|
|
@ -1,13 +1,14 @@
|
|||
{
|
||||
"$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 existing VM to apply the custom script to"
|
||||
},
|
||||
"defaultvalue": "[substring(concat('simplewinvm',resourceGroup().Name),0,12)]"
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "Name of the existing VM to apply the custom script to"
|
||||
},
|
||||
"defaultvalue": "[substring(concat('simplewinvm',resourceGroup().Name),0,12)]"
|
||||
},
|
||||
"scriptFile": {
|
||||
"type": "string",
|
||||
|
@ -28,7 +29,6 @@
|
|||
{
|
||||
"type": "Microsoft.Compute/virtualMachines/extensions",
|
||||
"name": "[concat(parameters('vmName'),'/CustomScriptExtension')]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"publisher": "Microsoft.Compute",
|
||||
|
@ -42,5 +42,5 @@
|
|||
}
|
||||
}
|
||||
],
|
||||
"outputs": { }
|
||||
"outputs": {}
|
||||
}
|
||||
|
|
|
@ -1,67 +1,67 @@
|
|||
{
|
||||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"apiProfile": "2017-03-09-profile",
|
||||
"parameters": {
|
||||
"newStorageAccountName": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "Unique DNS Name for the Storage Account where the Virtual Machine's disks will be placed."
|
||||
},
|
||||
"defaultValue": "[substring(concat('vm',uniquestring(replace(resourceGroup().Id,'-',''))),0,8)]"
|
||||
},
|
||||
"vmName": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "Name of the VM."
|
||||
},
|
||||
"defaultValue": "[substring(concat('simplewinvm',resourceGroup().Name),0,12)]"
|
||||
},
|
||||
"adminUsername": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "Username for the Virtual Machine."
|
||||
},
|
||||
"defaultValue": "vmadmin1"
|
||||
},
|
||||
"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))]"
|
||||
},
|
||||
"windowsOSVersion": {
|
||||
"type": "string",
|
||||
"defaultValue": "2016-Datacenter",
|
||||
"allowedValues": [
|
||||
"2008-R2-SP1",
|
||||
"2012-Datacenter",
|
||||
"2012-R2-Datacenter",
|
||||
"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."
|
||||
}
|
||||
}
|
||||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"apiProfile": "2018-03-01-hybrid",
|
||||
"parameters": {
|
||||
"newStorageAccountName": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "Unique DNS Name for the Storage Account where the Virtual Machine's disks will be placed."
|
||||
},
|
||||
"defaultValue": "[substring(concat('vm',uniquestring(replace(resourceGroup().Id,'-',''))),0,8)]"
|
||||
},
|
||||
"variables": {
|
||||
"location": "[resourceGroup().location]",
|
||||
"imagePublisher": "MicrosoftWindowsServer",
|
||||
"imageOffer": "WindowsServer",
|
||||
"OSDiskName": "osdisk",
|
||||
"nicName": "[replace(replace(tolower(concat('nic',resourceGroup().name)), '-', ''), '.','')]",
|
||||
"addressPrefix": "10.0.0.0/24",
|
||||
"subnetName": "[replace(replace(tolower(concat('subnet',resourceGroup().name)), '-', ''), '.','')]",
|
||||
"subnetPrefix": "10.0.0.0/24",
|
||||
"storageAccountType": "Standard_LRS",
|
||||
"vmStorageAccountContainerName": "vhds",
|
||||
"vmSize": "Standard_A1",
|
||||
"virtualNetworkName": "[replace(replace(tolower(concat('vnet',resourceGroup().name)), '-', ''), '.','')]",
|
||||
"vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]",
|
||||
"subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]",
|
||||
"networkSecurityGroupName": "[replace(replace(tolower(concat('nsg',resourceGroup().name)), '-', ''), '.','')]"
|
||||
"vmName": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "Name of the VM."
|
||||
},
|
||||
"defaultValue": "[substring(concat('simplewinvm',resourceGroup().Name),0,12)]"
|
||||
},
|
||||
"adminUsername": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "Username for the Virtual Machine."
|
||||
},
|
||||
"defaultValue": "vmadmin1"
|
||||
},
|
||||
"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))]"
|
||||
},
|
||||
"windowsOSVersion": {
|
||||
"type": "string",
|
||||
"defaultValue": "2016-Datacenter",
|
||||
"allowedValues": [
|
||||
"2008-R2-SP1",
|
||||
"2012-Datacenter",
|
||||
"2012-R2-Datacenter",
|
||||
"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]",
|
||||
"imagePublisher": "MicrosoftWindowsServer",
|
||||
"imageOffer": "WindowsServer",
|
||||
"OSDiskName": "osdisk",
|
||||
"nicName": "[replace(replace(tolower(concat('nic',resourceGroup().name)), '-', ''), '.','')]",
|
||||
"addressPrefix": "10.0.0.0/24",
|
||||
"subnetName": "[replace(replace(tolower(concat('subnet',resourceGroup().name)), '-', ''), '.','')]",
|
||||
"subnetPrefix": "10.0.0.0/24",
|
||||
"storageAccountType": "Standard_LRS",
|
||||
"vmStorageAccountContainerName": "vhds",
|
||||
"vmSize": "Standard_A1",
|
||||
"virtualNetworkName": "[replace(replace(tolower(concat('vnet',resourceGroup().name)), '-', ''), '.','')]",
|
||||
"vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]",
|
||||
"subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]",
|
||||
"networkSecurityGroupName": "[replace(replace(tolower(concat('nsg',resourceGroup().name)), '-', ''), '.','')]"
|
||||
},
|
||||
"resources": [
|
||||
{
|
||||
"type": "Microsoft.Network/networkSecurityGroups",
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"apiProfile": "2018-03-01-hybrid",
|
||||
"parameters": {
|
||||
"adminUsername": {
|
||||
"type": "string",
|
||||
|
@ -29,29 +30,31 @@
|
|||
"allowedValues": [
|
||||
"2012-R2-Datacenter",
|
||||
"2016-Datacenter-Server-Core",
|
||||
"2016-Datacenter"
|
||||
"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, 2016-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."
|
||||
}
|
||||
}
|
||||
"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."
|
||||
}
|
||||
}
|
||||
},
|
||||
"variables": {
|
||||
"storageAccountName": "[concat(uniquestring(resourceGroup().id), 'sawinvm')]",
|
||||
"vmStorageAccountContainerName": "vhds",
|
||||
"OSDiskName": "osdisk",
|
||||
"nicName": "myVMNic",
|
||||
"addressPrefix": "10.0.0.0/16",
|
||||
"subnetName": "Subnet",
|
||||
|
@ -69,14 +72,12 @@
|
|||
{
|
||||
"type": "Microsoft.Storage/storageAccounts",
|
||||
"name": "[variables('storageAccountName')]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"accountType": "[variables('storageAccountType')]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "2015-06-15",
|
||||
"type": "Microsoft.Network/publicIPAddresses",
|
||||
"name": "[variables('publicIPAddressName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
|
@ -88,7 +89,6 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "2015-06-15",
|
||||
"type": "Microsoft.Network/virtualNetworks",
|
||||
"name": "[variables('virtualNetworkName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
|
@ -109,7 +109,6 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "2015-06-15",
|
||||
"type": "Microsoft.Network/networkInterfaces",
|
||||
"name": "[variables('nicName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
|
@ -135,7 +134,6 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "2015-06-15",
|
||||
"type": "Microsoft.Compute/virtualMachines",
|
||||
"name": "[variables('vmName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
|
@ -161,10 +159,10 @@
|
|||
},
|
||||
"osDisk": {
|
||||
"createOption": "FromImage",
|
||||
"name": "osdisk",
|
||||
"vhd": {
|
||||
"uri": "[concat('http://',variables('storageAccountName'),'.blob.local.azurestack.external/vhds/','osdisk', variables('vmName'), '.vhd')]"
|
||||
}
|
||||
"name": "osdisk",
|
||||
"vhd": {
|
||||
"uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName')), providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]).primaryEndpoints.blob, variables('vmStorageAccountContainerName'),'/',variables('OSDiskName'),'.vhd')]"
|
||||
}
|
||||
}
|
||||
},
|
||||
"networkProfile": {
|
||||
|
|
|
@ -15,9 +15,6 @@
|
|||
},
|
||||
"dnsLabelPrefix": {
|
||||
"value": "mydns882017"
|
||||
},
|
||||
"windowsOSVersion": {
|
||||
"value": "2016-Datacenter"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"apiProfile": "2018-03-01-hybrid",
|
||||
"parameters": {
|
||||
"vmsuffix": {
|
||||
"type": "string",
|
||||
|
@ -42,7 +43,7 @@
|
|||
},
|
||||
"variables": {
|
||||
"storage": {
|
||||
"storageAccounts": {
|
||||
"storageAccounts": {
|
||||
"name": "[concat('sa', uniquestring(resourceGroup().id))]",
|
||||
"type": "Standard_LRS"
|
||||
}
|
||||
|
@ -73,7 +74,6 @@
|
|||
},
|
||||
"resources": [
|
||||
{
|
||||
"apiVersion":"2015-05-01-preview",
|
||||
"type": "Microsoft.Network/networkSecurityGroups",
|
||||
"name": "[variables('networkSecurityGroupName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
|
@ -101,14 +101,12 @@
|
|||
{
|
||||
"type": "Microsoft.Storage/storageAccounts",
|
||||
"name": "[variables('storage').storageAccounts.name]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"accountType": "[variables('storage').storageAccounts.type]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "2015-05-01-preview",
|
||||
"type": "Microsoft.Network/virtualNetworks",
|
||||
"name": "[variables('virtualNetworkName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
|
@ -138,7 +136,6 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "2015-05-01-preview",
|
||||
"type": "Microsoft.Network/networkInterfaces",
|
||||
"name": "[variables('nicName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
|
@ -160,7 +157,6 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "2015-06-15",
|
||||
"type": "Microsoft.Compute/virtualMachines",
|
||||
"name": "[variables('vmName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
|
@ -212,7 +208,6 @@
|
|||
"name": "IaasDiagnosticsExtesnion",
|
||||
"type": "extensions",
|
||||
"location": "[resourceGroup().location]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]"
|
||||
],
|
||||
|
@ -238,5 +233,5 @@
|
|||
]
|
||||
}
|
||||
],
|
||||
"outputs": { }
|
||||
"outputs": {}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"apiProfile": "2018-03-01-hybrid",
|
||||
"parameters": {
|
||||
"newStorageAccountName": {
|
||||
"type": "string",
|
||||
|
@ -63,7 +64,6 @@
|
|||
},
|
||||
"resources": [
|
||||
{
|
||||
"apiVersion": "2015-05-01-preview",
|
||||
"type": "Microsoft.Network/networkSecurityGroups",
|
||||
"name": "[variables('networkSecurityGroupName')]",
|
||||
"location": "[variables('location')]",
|
||||
|
@ -91,14 +91,12 @@
|
|||
{
|
||||
"type": "Microsoft.Storage/storageAccounts",
|
||||
"name": "[toLower(parameters('newStorageAccountName'))]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"location": "[variables('location')]",
|
||||
"properties": {
|
||||
"accountType": "[variables('storageAccountType')]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "2015-05-01-preview",
|
||||
"type": "Microsoft.Network/virtualNetworks",
|
||||
"name": "[variables('virtualNetworkName')]",
|
||||
"location": "[variables('location')]",
|
||||
|
@ -125,7 +123,6 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "2015-05-01-preview",
|
||||
"type": "Microsoft.Network/networkInterfaces",
|
||||
"name": "[variables('nicName')]",
|
||||
"location": "[variables('location')]",
|
||||
|
@ -148,7 +145,6 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "2015-06-15",
|
||||
"type": "Microsoft.Compute/virtualMachines",
|
||||
"name": "[parameters('vmName')]",
|
||||
"location": "[variables('location')]",
|
||||
|
|
|
@ -1,206 +1,203 @@
|
|||
{
|
||||
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"parameters": {
|
||||
"vmName": {
|
||||
"type": "string",
|
||||
"defaultValue": "WindowsVM",
|
||||
"minLength": 1
|
||||
},
|
||||
"adminUsername": {
|
||||
"type": "string",
|
||||
"defaultValue": "vmadmin",
|
||||
"minLength": 1
|
||||
},
|
||||
"adminPassword": {
|
||||
"type": "securestring",
|
||||
"defaultValue": "[concat('Subscription#', subscription().subscriptionId)]"
|
||||
},
|
||||
"imageSku": {
|
||||
"type": "string",
|
||||
"defaultValue": "2016-Datacenter",
|
||||
"allowedValues": [
|
||||
"2008-R2-SP1",
|
||||
"2012-Datacenter",
|
||||
"2012-R2-Datacenter",
|
||||
"2016-Datacenter"
|
||||
]
|
||||
},
|
||||
"storageAccountType": {
|
||||
"type": "string",
|
||||
"defaultValue": "Standard_LRS",
|
||||
"allowedValues": [
|
||||
"Standard_LRS",
|
||||
"Premium_LRS"
|
||||
]
|
||||
},
|
||||
"vmCount": {
|
||||
"type": "int",
|
||||
"defaultValue": 25,
|
||||
"metadata": {
|
||||
"description": "Number of Windows VMs to create."
|
||||
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"apiProfile": "2018-03-01-hybrid",
|
||||
"parameters": {
|
||||
"vmName": {
|
||||
"type": "string",
|
||||
"defaultValue": "WindowsVM",
|
||||
"minLength": 1
|
||||
},
|
||||
"adminUsername": {
|
||||
"type": "string",
|
||||
"defaultValue": "vmadmin",
|
||||
"minLength": 1
|
||||
},
|
||||
"adminPassword": {
|
||||
"type": "securestring",
|
||||
"defaultValue": "[concat('Subscription#', subscription().subscriptionId)]"
|
||||
},
|
||||
"imageSku": {
|
||||
"type": "string",
|
||||
"defaultValue": "2016-Datacenter",
|
||||
"allowedValues": [
|
||||
"2008-R2-SP1",
|
||||
"2012-Datacenter",
|
||||
"2012-R2-Datacenter",
|
||||
"2016-Datacenter"
|
||||
]
|
||||
},
|
||||
"storageAccountType": {
|
||||
"type": "string",
|
||||
"defaultValue": "Standard_LRS",
|
||||
"allowedValues": [
|
||||
"Standard_LRS",
|
||||
"Premium_LRS"
|
||||
]
|
||||
},
|
||||
"vmCount": {
|
||||
"type": "int",
|
||||
"defaultValue": 25,
|
||||
"metadata": {
|
||||
"description": "Number of Windows VMs to create."
|
||||
}
|
||||
},
|
||||
"vmSize": {
|
||||
"type": "string",
|
||||
"defaultValue": "Standard_A1",
|
||||
"allowedValues": [
|
||||
"Basic_A0",
|
||||
"Basic_A1",
|
||||
"Basic_A2",
|
||||
"Basic_A3",
|
||||
"Basic_A4",
|
||||
"Standard_A0",
|
||||
"Standard_A1",
|
||||
"Standard_A2",
|
||||
"Standard_A3",
|
||||
"Standard_A4",
|
||||
"Standard_A5",
|
||||
"Standard_A6",
|
||||
"Standard_A7",
|
||||
"Standard_D1",
|
||||
"Standard_D2",
|
||||
"Standard_D3",
|
||||
"Standard_D4",
|
||||
"Standard_D11",
|
||||
"Standard_D12",
|
||||
"Standard_D13",
|
||||
"Standard_D14"
|
||||
]
|
||||
}
|
||||
},
|
||||
"variables": {
|
||||
"imagePublisher": "MicrosoftWindowsServer",
|
||||
"imageOffer": "WindowsServer",
|
||||
"osDiskName": "osDisk",
|
||||
"vnetID": "[resourceId('Microsoft.Network/virtualNetworks', 'virtualnetwork')]",
|
||||
"subnetRef": "[concat(variables('vnetID'), '/subnets/', variables('virtualnetworkSubnet1Name'))]",
|
||||
"vmStorageAccountContainerName": "vhds",
|
||||
"nicName": "[concat(parameters('vmName'), 'NetworkInterface')]",
|
||||
"virtualnetworkPrefix": "10.0.0.0/16",
|
||||
"virtualnetworkSubnet1Name": "Subnet-1",
|
||||
"virtualnetworkSubnet1Prefix": "10.0.0.0/24",
|
||||
"virtualnetworkSubnet2Name": "Subnet-2",
|
||||
"virtualnetworkSubnet2Prefix": "10.0.1.0/24",
|
||||
"storageAccountName": "[concat('sa', uniqueString(resourceGroup().id))]"
|
||||
},
|
||||
"resources": [
|
||||
{
|
||||
"name": "[concat(variables('nicName'),copyIndex())]",
|
||||
"type": "Microsoft.Network/networkInterfaces",
|
||||
"location": "[resourceGroup().location]",
|
||||
"copy": {
|
||||
"name": "windowsNicLoop",
|
||||
"count": "[parameters('vmCount')]"
|
||||
},
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Network/virtualNetworks/','virtualnetwork')]"
|
||||
],
|
||||
"properties": {
|
||||
"ipConfigurations": [
|
||||
{
|
||||
"name": "ipconfig1",
|
||||
"properties": {
|
||||
"privateIPAllocationMethod": "Dynamic",
|
||||
"subnet": {
|
||||
"id": "[variables('subnetRef')]"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "[concat(parameters('vmName'), copyIndex())]",
|
||||
"type": "Microsoft.Compute/virtualMachines",
|
||||
"location": "[resourceGroup().location]",
|
||||
"copy": {
|
||||
"name": "windowsVmLoop",
|
||||
"count": "[parameters('vmCount')]"
|
||||
},
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]",
|
||||
"[concat('Microsoft.Network/networkInterfaces/', variables('nicName'), copyIndex())]"
|
||||
],
|
||||
"properties": {
|
||||
"hardwareProfile": {
|
||||
"vmSize": "[parameters('vmSize')]"
|
||||
},
|
||||
"vmSize": {
|
||||
"type": "string",
|
||||
"defaultValue": "Standard_A1",
|
||||
"allowedValues": [
|
||||
"Basic_A0",
|
||||
"Basic_A1",
|
||||
"Basic_A2",
|
||||
"Basic_A3",
|
||||
"Basic_A4",
|
||||
"Standard_A0",
|
||||
"Standard_A1",
|
||||
"Standard_A2",
|
||||
"Standard_A3",
|
||||
"Standard_A4",
|
||||
"Standard_A5",
|
||||
"Standard_A6",
|
||||
"Standard_A7",
|
||||
"Standard_D1",
|
||||
"Standard_D2",
|
||||
"Standard_D3",
|
||||
"Standard_D4",
|
||||
"Standard_D11",
|
||||
"Standard_D12",
|
||||
"Standard_D13",
|
||||
"Standard_D14"
|
||||
"osProfile": {
|
||||
"computerName": "[parameters('vmName')]",
|
||||
"adminUsername": "[parameters('adminUsername')]",
|
||||
"adminPassword": "[parameters('adminPassword')]"
|
||||
},
|
||||
"storageProfile": {
|
||||
"imageReference": {
|
||||
"publisher": "[variables('imagePublisher')]",
|
||||
"offer": "[variables('imageOffer')]",
|
||||
"sku": "[parameters('imageSku')]",
|
||||
"version": "latest"
|
||||
},
|
||||
"osDisk": {
|
||||
"name": "WindowsVMOSDisk",
|
||||
"vhd": {
|
||||
"uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName')),providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]).primaryEndpoints.blob,variables('vmStorageAccountContainerName'),'/',concat(variables('osDiskName'),copyIndex()),'.vhd')]"
|
||||
},
|
||||
"caching": "ReadWrite",
|
||||
"createOption": "FromImage"
|
||||
}
|
||||
},
|
||||
"networkProfile": {
|
||||
"networkInterfaces": [
|
||||
{
|
||||
"id": "[resourceId('Microsoft.Network/networkInterfaces', concat(variables('nicName'),copyIndex()))]"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"variables": {
|
||||
"imagePublisher": "MicrosoftWindowsServer",
|
||||
"imageOffer": "WindowsServer",
|
||||
"osDiskName": "osDisk",
|
||||
"vnetID": "[resourceId('Microsoft.Network/virtualNetworks', 'virtualnetwork')]",
|
||||
"subnetRef": "[concat(variables('vnetID'), '/subnets/', variables('virtualnetworkSubnet1Name'))]",
|
||||
"vmStorageAccountContainerName": "vhds",
|
||||
"nicName": "[concat(parameters('vmName'), 'NetworkInterface')]",
|
||||
"virtualnetworkPrefix": "10.0.0.0/16",
|
||||
"virtualnetworkSubnet1Name": "Subnet-1",
|
||||
"virtualnetworkSubnet1Prefix": "10.0.0.0/24",
|
||||
"virtualnetworkSubnet2Name": "Subnet-2",
|
||||
"virtualnetworkSubnet2Prefix": "10.0.1.0/24",
|
||||
"storageAccountName": "[concat('sa', uniqueString(resourceGroup().id))]"
|
||||
{
|
||||
"name": "virtualnetwork",
|
||||
"type": "Microsoft.Network/virtualNetworks",
|
||||
"location": "[resourceGroup().location]",
|
||||
"dependsOn": [],
|
||||
"tags": {
|
||||
"displayName": "virtualnetwork"
|
||||
},
|
||||
"properties": {
|
||||
"addressSpace": {
|
||||
"addressPrefixes": [
|
||||
"[variables('virtualnetworkPrefix')]"
|
||||
]
|
||||
},
|
||||
"subnets": [
|
||||
{
|
||||
"name": "[variables('virtualnetworkSubnet1Name')]",
|
||||
"properties": {
|
||||
"addressPrefix": "[variables('virtualnetworkSubnet1Prefix')]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "[variables('virtualnetworkSubnet2Name')]",
|
||||
"properties": {
|
||||
"addressPrefix": "[variables('virtualnetworkSubnet2Prefix')]"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"resources": [
|
||||
{
|
||||
"name": "[concat(variables('nicName'),copyIndex())]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"type": "Microsoft.Network/networkInterfaces",
|
||||
"location": "[resourceGroup().location]",
|
||||
"copy": {
|
||||
"name": "windowsNicLoop",
|
||||
"count": "[parameters('vmCount')]"
|
||||
},
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Network/virtualNetworks/','virtualnetwork')]"
|
||||
],
|
||||
"properties": {
|
||||
"ipConfigurations": [
|
||||
{
|
||||
"name": "ipconfig1",
|
||||
"properties": {
|
||||
"privateIPAllocationMethod": "Dynamic",
|
||||
"subnet": {
|
||||
"id": "[variables('subnetRef')]"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "[concat(parameters('vmName'), copyIndex())]",
|
||||
"type": "Microsoft.Compute/virtualMachines",
|
||||
"location": "[resourceGroup().location]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"copy": {
|
||||
"name": "windowsVmLoop",
|
||||
"count": "[parameters('vmCount')]"
|
||||
},
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]",
|
||||
"[concat('Microsoft.Network/networkInterfaces/', variables('nicName'), copyIndex())]"
|
||||
],
|
||||
"properties": {
|
||||
"hardwareProfile": {
|
||||
"vmSize": "[parameters('vmSize')]"
|
||||
},
|
||||
"osProfile": {
|
||||
"computerName": "[parameters('vmName')]",
|
||||
"adminUsername": "[parameters('adminUsername')]",
|
||||
"adminPassword": "[parameters('adminPassword')]"
|
||||
},
|
||||
"storageProfile": {
|
||||
"imageReference": {
|
||||
"publisher": "[variables('imagePublisher')]",
|
||||
"offer": "[variables('imageOffer')]",
|
||||
"sku": "[parameters('imageSku')]",
|
||||
"version": "latest"
|
||||
},
|
||||
"osDisk": {
|
||||
"name": "WindowsVMOSDisk",
|
||||
"vhd": {
|
||||
"uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName')),providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]).primaryEndpoints.blob,variables('vmStorageAccountContainerName'),'/',concat(variables('osDiskName'),copyIndex()),'.vhd')]"
|
||||
},
|
||||
"caching": "ReadWrite",
|
||||
"createOption": "FromImage"
|
||||
}
|
||||
},
|
||||
"networkProfile": {
|
||||
"networkInterfaces": [
|
||||
{
|
||||
"id": "[resourceId('Microsoft.Network/networkInterfaces', concat(variables('nicName'),copyIndex()))]"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "virtualnetwork",
|
||||
"type": "Microsoft.Network/virtualNetworks",
|
||||
"location": "[resourceGroup().location]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"dependsOn": [],
|
||||
"tags": {
|
||||
"displayName": "virtualnetwork"
|
||||
},
|
||||
"properties": {
|
||||
"addressSpace": {
|
||||
"addressPrefixes": [
|
||||
"[variables('virtualnetworkPrefix')]"
|
||||
]
|
||||
},
|
||||
"subnets": [
|
||||
{
|
||||
"name": "[variables('virtualnetworkSubnet1Name')]",
|
||||
"properties": {
|
||||
"addressPrefix": "[variables('virtualnetworkSubnet1Prefix')]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "[variables('virtualnetworkSubnet2Name')]",
|
||||
"properties": {
|
||||
"addressPrefix": "[variables('virtualnetworkSubnet2Prefix')]"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "[variables('storageAccountName')]",
|
||||
"type": "Microsoft.Storage/storageAccounts",
|
||||
"location": "[resourceGroup().location]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"dependsOn": [],
|
||||
"tags": {
|
||||
"displayName": "sa"
|
||||
},
|
||||
"properties": {
|
||||
"accountType": "[parameters('storageAccountType')]"
|
||||
}
|
||||
}
|
||||
]
|
||||
{
|
||||
"name": "[variables('storageAccountName')]",
|
||||
"type": "Microsoft.Storage/storageAccounts",
|
||||
"location": "[resourceGroup().location]",
|
||||
"dependsOn": [],
|
||||
"tags": {
|
||||
"displayName": "sa"
|
||||
},
|
||||
"properties": {
|
||||
"accountType": "[parameters('storageAccountType')]"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,306 +1,301 @@
|
|||
{
|
||||
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"parameters": {
|
||||
"adminUsername": {
|
||||
"type": "string",
|
||||
"defaultValue": "vmadmin",
|
||||
"minLength": 1
|
||||
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"apiProfile": "2018-03-01-hybrid",
|
||||
"parameters": {
|
||||
"adminUsername": {
|
||||
"type": "string",
|
||||
"defaultValue": "vmadmin",
|
||||
"minLength": 1
|
||||
},
|
||||
"adminPassword": {
|
||||
"type": "securestring",
|
||||
"defaultValue": "[concat('Subscription#', subscription().subscriptionId)]"
|
||||
},
|
||||
"storageAccountType": {
|
||||
"type": "string",
|
||||
"defaultValue": "Standard_LRS",
|
||||
"allowedValues": [
|
||||
"Standard_LRS",
|
||||
"Premium_LRS"
|
||||
]
|
||||
},
|
||||
"vmSize": {
|
||||
"type": "string",
|
||||
"defaultValue": "Standard_A1",
|
||||
"allowedValues": [
|
||||
"Basic_A0",
|
||||
"Basic_A1",
|
||||
"Basic_A2",
|
||||
"Basic_A3",
|
||||
"Basic_A4",
|
||||
"Standard_A0",
|
||||
"Standard_A1",
|
||||
"Standard_A2",
|
||||
"Standard_A3",
|
||||
"Standard_A4",
|
||||
"Standard_A5",
|
||||
"Standard_A6",
|
||||
"Standard_A7",
|
||||
"Standard_D1",
|
||||
"Standard_D2",
|
||||
"Standard_D3",
|
||||
"Standard_D4",
|
||||
"Standard_D11",
|
||||
"Standard_D12",
|
||||
"Standard_D13",
|
||||
"Standard_D14"
|
||||
]
|
||||
},
|
||||
"windowsVMName": {
|
||||
"type": "string",
|
||||
"defaultValue": "WindowsVM",
|
||||
"minLength": 1
|
||||
},
|
||||
"windowsImageSku": {
|
||||
"type": "string",
|
||||
"defaultValue": "2016-Datacenter",
|
||||
"allowedValues": [
|
||||
"2008-R2-SP1",
|
||||
"2012-Datacenter",
|
||||
"2012-R2-Datacenter",
|
||||
"2016-Datacenter"
|
||||
]
|
||||
},
|
||||
"windowsVMCount": {
|
||||
"type": "int",
|
||||
"defaultValue": 25,
|
||||
"metadata": {
|
||||
"description": "Number of Windows VMs to create."
|
||||
}
|
||||
},
|
||||
"linuxVMName": {
|
||||
"type": "string",
|
||||
"defaultValue": "LinuxVM",
|
||||
"minLength": 1
|
||||
},
|
||||
"linuxImageSku": {
|
||||
"type": "string",
|
||||
"defaultValue": "16.04-LTS",
|
||||
"allowedValues": [
|
||||
"14.04-LTS",
|
||||
"16.04-LTS"
|
||||
]
|
||||
},
|
||||
"linuxVMCount": {
|
||||
"type": "int",
|
||||
"defaultValue": 25,
|
||||
"metadata": {
|
||||
"description": "Number of Linux VMs to create."
|
||||
}
|
||||
}
|
||||
},
|
||||
"variables": {
|
||||
"windowsImagePublisher": "MicrosoftWindowsServer",
|
||||
"windowsImageOffer": "WindowsServer",
|
||||
"windowsOSDiskName": "windowsOSDisk",
|
||||
"windowsVnetID": "[resourceId('Microsoft.Network/virtualNetworks', 'virtualnetwork')]",
|
||||
"windowsSubnetRef": "[concat(variables('windowsVnetID'), '/subnets/', variables('virtualnetworkSubnet1Name'))]",
|
||||
"windowsVMStorageAccountContainerName": "wvhds",
|
||||
"windowsNicName": "[concat(parameters('windowsVMName'), 'NetworkInterface')]",
|
||||
"virtualnetworkPrefix": "10.0.0.0/16",
|
||||
"virtualnetworkSubnet1Name": "Subnet-1",
|
||||
"virtualnetworkSubnet1Prefix": "10.0.0.0/24",
|
||||
"virtualnetworkSubnet2Name": "Subnet-2",
|
||||
"virtualnetworkSubnet2Prefix": "10.0.1.0/24",
|
||||
"storageAccountName": "[concat('sa', uniqueString(resourceGroup().id))]",
|
||||
"linuxImagePublisher": "Canonical",
|
||||
"linuxImageOffer": "UbuntuServer",
|
||||
"linuxOSDiskName": "linuxOSDisk",
|
||||
"linuxVnetID": "[resourceId('Microsoft.Network/virtualNetworks', 'virtualnetwork')]",
|
||||
"LinuxVMSubnetRef": "[concat(variables('linuxVnetID'), '/subnets/', variables('virtualnetworkSubnet2Name'))]",
|
||||
"linuxVMStorageAccountContainerName": "lvhds",
|
||||
"linuxNicName": "[concat(parameters('linuxVMName'), 'NetworkInterface')]"
|
||||
},
|
||||
"resources": [
|
||||
{
|
||||
"name": "[concat(variables('windowsNicName'),copyIndex())]",
|
||||
"type": "Microsoft.Network/networkInterfaces",
|
||||
"location": "[resourceGroup().location]",
|
||||
"copy": {
|
||||
"name": "windowsNicLoop",
|
||||
"count": "[parameters('windowsVMCount')]"
|
||||
},
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Network/virtualNetworks/','virtualnetwork')]"
|
||||
],
|
||||
"properties": {
|
||||
"ipConfigurations": [
|
||||
{
|
||||
"name": "ipconfig1",
|
||||
"properties": {
|
||||
"privateIPAllocationMethod": "Dynamic",
|
||||
"subnet": {
|
||||
"id": "[variables('windowsSubnetRef')]"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "[concat(parameters('windowsVMName'), copyIndex())]",
|
||||
"type": "Microsoft.Compute/virtualMachines",
|
||||
"location": "[resourceGroup().location]",
|
||||
"copy": {
|
||||
"name": "windowsVmLoop",
|
||||
"count": "[parameters('windowsVMCount')]"
|
||||
},
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]",
|
||||
"[concat('Microsoft.Network/networkInterfaces/', variables('windowsNicName'), copyIndex())]"
|
||||
],
|
||||
"properties": {
|
||||
"hardwareProfile": {
|
||||
"vmSize": "[parameters('vmSize')]"
|
||||
},
|
||||
"adminPassword": {
|
||||
"type": "securestring",
|
||||
"defaultValue": "[concat('Subscription#', subscription().subscriptionId)]"
|
||||
"osProfile": {
|
||||
"computerName": "[parameters('windowsVMName')]",
|
||||
"adminUsername": "[parameters('adminUsername')]",
|
||||
"adminPassword": "[parameters('adminPassword')]"
|
||||
},
|
||||
"storageAccountType": {
|
||||
"type": "string",
|
||||
"defaultValue": "Standard_LRS",
|
||||
"allowedValues": [
|
||||
"Standard_LRS",
|
||||
"Premium_LRS"
|
||||
]
|
||||
"storageProfile": {
|
||||
"imageReference": {
|
||||
"publisher": "[variables('windowsImagePublisher')]",
|
||||
"offer": "[variables('windowsImageOffer')]",
|
||||
"sku": "[parameters('windowsImageSku')]",
|
||||
"version": "latest"
|
||||
},
|
||||
"osDisk": {
|
||||
"name": "WindowsVMOSDisk",
|
||||
"vhd": {
|
||||
"uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName')),providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]).primaryEndpoints.blob,variables('windowsVMStorageAccountContainerName'),'/',concat(variables('windowsOSDiskName'),copyIndex()),'.vhd')]"
|
||||
},
|
||||
"caching": "ReadWrite",
|
||||
"createOption": "FromImage"
|
||||
}
|
||||
},
|
||||
"vmSize": {
|
||||
"type": "string",
|
||||
"defaultValue": "Standard_A1",
|
||||
"allowedValues": [
|
||||
"Basic_A0",
|
||||
"Basic_A1",
|
||||
"Basic_A2",
|
||||
"Basic_A3",
|
||||
"Basic_A4",
|
||||
"Standard_A0",
|
||||
"Standard_A1",
|
||||
"Standard_A2",
|
||||
"Standard_A3",
|
||||
"Standard_A4",
|
||||
"Standard_A5",
|
||||
"Standard_A6",
|
||||
"Standard_A7",
|
||||
"Standard_D1",
|
||||
"Standard_D2",
|
||||
"Standard_D3",
|
||||
"Standard_D4",
|
||||
"Standard_D11",
|
||||
"Standard_D12",
|
||||
"Standard_D13",
|
||||
"Standard_D14"
|
||||
"networkProfile": {
|
||||
"networkInterfaces": [
|
||||
{
|
||||
"id": "[resourceId('Microsoft.Network/networkInterfaces', concat(variables('windowsNicName'),copyIndex()))]"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "virtualnetwork",
|
||||
"type": "Microsoft.Network/virtualNetworks",
|
||||
"location": "[resourceGroup().location]",
|
||||
"dependsOn": [],
|
||||
"tags": {
|
||||
"displayName": "virtualnetwork"
|
||||
},
|
||||
"properties": {
|
||||
"addressSpace": {
|
||||
"addressPrefixes": [
|
||||
"[variables('virtualnetworkPrefix')]"
|
||||
]
|
||||
},
|
||||
"windowsVMName": {
|
||||
"type": "string",
|
||||
"defaultValue": "WindowsVM",
|
||||
"minLength": 1
|
||||
},
|
||||
"windowsImageSku": {
|
||||
"type": "string",
|
||||
"defaultValue": "2016-Datacenter",
|
||||
"allowedValues": [
|
||||
"2008-R2-SP1",
|
||||
"2012-Datacenter",
|
||||
"2012-R2-Datacenter",
|
||||
"2016-Datacenter"
|
||||
]
|
||||
},
|
||||
"windowsVMCount": {
|
||||
"type": "int",
|
||||
"defaultValue": 25,
|
||||
"metadata": {
|
||||
"description": "Number of Windows VMs to create."
|
||||
"subnets": [
|
||||
{
|
||||
"name": "[variables('virtualnetworkSubnet1Name')]",
|
||||
"properties": {
|
||||
"addressPrefix": "[variables('virtualnetworkSubnet1Prefix')]"
|
||||
}
|
||||
},
|
||||
"linuxVMName": {
|
||||
"type": "string",
|
||||
"defaultValue": "LinuxVM",
|
||||
"minLength": 1
|
||||
},
|
||||
"linuxImageSku": {
|
||||
"type": "string",
|
||||
"defaultValue": "16.04-LTS",
|
||||
"allowedValues": [
|
||||
"14.04-LTS",
|
||||
"16.04-LTS"
|
||||
]
|
||||
},
|
||||
"linuxVMCount": {
|
||||
"type": "int",
|
||||
"defaultValue": 25,
|
||||
"metadata": {
|
||||
"description": "Number of Linux VMs to create."
|
||||
},
|
||||
{
|
||||
"name": "[variables('virtualnetworkSubnet2Name')]",
|
||||
"properties": {
|
||||
"addressPrefix": "[variables('virtualnetworkSubnet2Prefix')]"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"variables": {
|
||||
"windowsImagePublisher": "MicrosoftWindowsServer",
|
||||
"windowsImageOffer": "WindowsServer",
|
||||
"windowsOSDiskName": "windowsOSDisk",
|
||||
"windowsVnetID": "[resourceId('Microsoft.Network/virtualNetworks', 'virtualnetwork')]",
|
||||
"windowsSubnetRef": "[concat(variables('windowsVnetID'), '/subnets/', variables('virtualnetworkSubnet1Name'))]",
|
||||
"windowsVMStorageAccountContainerName": "wvhds",
|
||||
"windowsNicName": "[concat(parameters('windowsVMName'), 'NetworkInterface')]",
|
||||
"virtualnetworkPrefix": "10.0.0.0/16",
|
||||
"virtualnetworkSubnet1Name": "Subnet-1",
|
||||
"virtualnetworkSubnet1Prefix": "10.0.0.0/24",
|
||||
"virtualnetworkSubnet2Name": "Subnet-2",
|
||||
"virtualnetworkSubnet2Prefix": "10.0.1.0/24",
|
||||
"storageAccountName": "[concat('sa', uniqueString(resourceGroup().id))]",
|
||||
"linuxImagePublisher": "Canonical",
|
||||
"linuxImageOffer": "UbuntuServer",
|
||||
"linuxOSDiskName": "linuxOSDisk",
|
||||
"linuxVnetID": "[resourceId('Microsoft.Network/virtualNetworks', 'virtualnetwork')]",
|
||||
"LinuxVMSubnetRef": "[concat(variables('linuxVnetID'), '/subnets/', variables('virtualnetworkSubnet2Name'))]",
|
||||
"linuxVMStorageAccountContainerName": "lvhds",
|
||||
"linuxNicName": "[concat(parameters('linuxVMName'), 'NetworkInterface')]"
|
||||
{
|
||||
"name": "[variables('storageAccountName')]",
|
||||
"type": "Microsoft.Storage/storageAccounts",
|
||||
"location": "[resourceGroup().location]",
|
||||
"dependsOn": [],
|
||||
"tags": {
|
||||
"displayName": "sa"
|
||||
},
|
||||
"properties": {
|
||||
"accountType": "[parameters('storageAccountType')]"
|
||||
}
|
||||
},
|
||||
"resources": [
|
||||
{
|
||||
"name": "[concat(variables('windowsNicName'),copyIndex())]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"type": "Microsoft.Network/networkInterfaces",
|
||||
"location": "[resourceGroup().location]",
|
||||
"copy": {
|
||||
"name": "windowsNicLoop",
|
||||
"count": "[parameters('windowsVMCount')]"
|
||||
},
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Network/virtualNetworks/','virtualnetwork')]"
|
||||
],
|
||||
{
|
||||
"name": "[concat(variables('linuxNicName'), copyIndex())]",
|
||||
"type": "Microsoft.Network/networkInterfaces",
|
||||
"location": "[resourceGroup().location]",
|
||||
"copy": {
|
||||
"name": "linuxNicLoop",
|
||||
"count": "[parameters('linuxVMCount')]"
|
||||
},
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Network/virtualNetworks/', 'virtualnetwork')]"
|
||||
],
|
||||
"properties": {
|
||||
"ipConfigurations": [
|
||||
{
|
||||
"name": "ipconfig1",
|
||||
"properties": {
|
||||
"ipConfigurations": [
|
||||
{
|
||||
"name": "ipconfig1",
|
||||
"properties": {
|
||||
"privateIPAllocationMethod": "Dynamic",
|
||||
"subnet": {
|
||||
"id": "[variables('windowsSubnetRef')]"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
"privateIPAllocationMethod": "Dynamic",
|
||||
"subnet": {
|
||||
"id": "[variables('LinuxVMSubnetRef')]"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "[concat(parameters('linuxVMName'), copyIndex())]",
|
||||
"type": "Microsoft.Compute/virtualMachines",
|
||||
"location": "[resourceGroup().location]",
|
||||
"copy": {
|
||||
"name": "linuxVmLoop",
|
||||
"count": "[parameters('linuxVMCount')]"
|
||||
},
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]",
|
||||
"[concat('Microsoft.Network/networkInterfaces/', variables('linuxNicName'), copyIndex())]"
|
||||
],
|
||||
"properties": {
|
||||
"hardwareProfile": {
|
||||
"vmSize": "[parameters('vmSize')]"
|
||||
},
|
||||
{
|
||||
"name": "[concat(parameters('windowsVMName'), copyIndex())]",
|
||||
"type": "Microsoft.Compute/virtualMachines",
|
||||
"location": "[resourceGroup().location]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"copy": {
|
||||
"name": "windowsVmLoop",
|
||||
"count": "[parameters('windowsVMCount')]"
|
||||
},
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]",
|
||||
"[concat('Microsoft.Network/networkInterfaces/', variables('windowsNicName'), copyIndex())]"
|
||||
],
|
||||
"properties": {
|
||||
"hardwareProfile": {
|
||||
"vmSize": "[parameters('vmSize')]"
|
||||
},
|
||||
"osProfile": {
|
||||
"computerName": "[parameters('windowsVMName')]",
|
||||
"adminUsername": "[parameters('adminUsername')]",
|
||||
"adminPassword": "[parameters('adminPassword')]"
|
||||
},
|
||||
"storageProfile": {
|
||||
"imageReference": {
|
||||
"publisher": "[variables('windowsImagePublisher')]",
|
||||
"offer": "[variables('windowsImageOffer')]",
|
||||
"sku": "[parameters('windowsImageSku')]",
|
||||
"version": "latest"
|
||||
},
|
||||
"osDisk": {
|
||||
"name": "WindowsVMOSDisk",
|
||||
"vhd": {
|
||||
"uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName')),providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]).primaryEndpoints.blob,variables('windowsVMStorageAccountContainerName'),'/',concat(variables('windowsOSDiskName'),copyIndex()),'.vhd')]"
|
||||
},
|
||||
"caching": "ReadWrite",
|
||||
"createOption": "FromImage"
|
||||
}
|
||||
},
|
||||
"networkProfile": {
|
||||
"networkInterfaces": [
|
||||
{
|
||||
"id": "[resourceId('Microsoft.Network/networkInterfaces', concat(variables('windowsNicName'),copyIndex()))]"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
"osProfile": {
|
||||
"computerName": "[parameters('linuxVMName')]",
|
||||
"adminUsername": "[parameters('adminUsername')]",
|
||||
"adminPassword": "[parameters('adminPassword')]"
|
||||
},
|
||||
{
|
||||
"name": "virtualnetwork",
|
||||
"type": "Microsoft.Network/virtualNetworks",
|
||||
"location": "[resourceGroup().location]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"dependsOn": [],
|
||||
"tags": {
|
||||
"displayName": "virtualnetwork"
|
||||
"storageProfile": {
|
||||
"imageReference": {
|
||||
"publisher": "[variables('linuxImagePublisher')]",
|
||||
"offer": "[variables('linuxImageOffer')]",
|
||||
"sku": "[parameters('linuxImageSku')]",
|
||||
"version": "latest"
|
||||
},
|
||||
"osDisk": {
|
||||
"name": "LinuxVMOSDisk",
|
||||
"vhd": {
|
||||
"uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName')),providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]).primaryEndpoints.blob,variables('linuxVMStorageAccountContainerName'),'/',concat(variables('linuxOSDiskName'),copyIndex()),'.vhd')]"
|
||||
},
|
||||
"properties": {
|
||||
"addressSpace": {
|
||||
"addressPrefixes": [
|
||||
"[variables('virtualnetworkPrefix')]"
|
||||
]
|
||||
},
|
||||
"subnets": [
|
||||
{
|
||||
"name": "[variables('virtualnetworkSubnet1Name')]",
|
||||
"properties": {
|
||||
"addressPrefix": "[variables('virtualnetworkSubnet1Prefix')]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "[variables('virtualnetworkSubnet2Name')]",
|
||||
"properties": {
|
||||
"addressPrefix": "[variables('virtualnetworkSubnet2Prefix')]"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
"caching": "ReadWrite",
|
||||
"createOption": "FromImage"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "[variables('storageAccountName')]",
|
||||
"type": "Microsoft.Storage/storageAccounts",
|
||||
"location": "[resourceGroup().location]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"dependsOn": [],
|
||||
"tags": {
|
||||
"displayName": "sa"
|
||||
},
|
||||
"properties": {
|
||||
"accountType": "[parameters('storageAccountType')]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "[concat(variables('linuxNicName'), copyIndex())]",
|
||||
"type": "Microsoft.Network/networkInterfaces",
|
||||
"location": "[resourceGroup().location]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"copy": {
|
||||
"name": "linuxNicLoop",
|
||||
"count": "[parameters('linuxVMCount')]"
|
||||
},
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Network/virtualNetworks/', 'virtualnetwork')]"
|
||||
],
|
||||
"properties": {
|
||||
"ipConfigurations": [
|
||||
{
|
||||
"name": "ipconfig1",
|
||||
"properties": {
|
||||
"privateIPAllocationMethod": "Dynamic",
|
||||
"subnet": {
|
||||
"id": "[variables('LinuxVMSubnetRef')]"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "[concat(parameters('linuxVMName'), copyIndex())]",
|
||||
"type": "Microsoft.Compute/virtualMachines",
|
||||
"location": "[resourceGroup().location]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"copy": {
|
||||
"name": "linuxVmLoop",
|
||||
"count": "[parameters('linuxVMCount')]"
|
||||
},
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]",
|
||||
"[concat('Microsoft.Network/networkInterfaces/', variables('linuxNicName'), copyIndex())]"
|
||||
],
|
||||
"properties": {
|
||||
"hardwareProfile": {
|
||||
"vmSize": "[parameters('vmSize')]"
|
||||
},
|
||||
"osProfile": {
|
||||
"computerName": "[parameters('linuxVMName')]",
|
||||
"adminUsername": "[parameters('adminUsername')]",
|
||||
"adminPassword": "[parameters('adminPassword')]"
|
||||
},
|
||||
"storageProfile": {
|
||||
"imageReference": {
|
||||
"publisher": "[variables('linuxImagePublisher')]",
|
||||
"offer": "[variables('linuxImageOffer')]",
|
||||
"sku": "[parameters('linuxImageSku')]",
|
||||
"version": "latest"
|
||||
},
|
||||
"osDisk": {
|
||||
"name": "LinuxVMOSDisk",
|
||||
"vhd": {
|
||||
"uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName')),providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]).primaryEndpoints.blob,variables('linuxVMStorageAccountContainerName'),'/',concat(variables('linuxOSDiskName'),copyIndex()),'.vhd')]"
|
||||
},
|
||||
"caching": "ReadWrite",
|
||||
"createOption": "FromImage"
|
||||
}
|
||||
},
|
||||
"networkProfile": {
|
||||
"networkInterfaces": [
|
||||
{
|
||||
"id": "[resourceId('Microsoft.Network/networkInterfaces', concat(variables('linuxNicName'), copyIndex()))]"
|
||||
}
|
||||
]
|
||||
}
|
||||
"networkProfile": {
|
||||
"networkInterfaces": [
|
||||
{
|
||||
"id": "[resourceId('Microsoft.Network/networkInterfaces', concat(variables('linuxNicName'), copyIndex()))]"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"apiProfile": "2018-03-01-hybrid",
|
||||
"parameters": {
|
||||
"vmSku": {
|
||||
"defaultValue": "Standard_A1",
|
||||
|
@ -82,7 +83,6 @@
|
|||
{
|
||||
"type": "Microsoft.Storage/storageAccounts",
|
||||
"name": "[variables('storageAccountName')]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"location": "[variables('location')]",
|
||||
"properties": {
|
||||
"accountType": "[variables('storageAccountType')]"
|
||||
|
@ -91,7 +91,6 @@
|
|||
{
|
||||
"type": "Microsoft.Network/virtualNetworks",
|
||||
"name": "[variables('vnetName')]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"location": "[variables('location')]",
|
||||
"properties": {
|
||||
"addressSpace": {
|
||||
|
@ -112,7 +111,6 @@
|
|||
{
|
||||
"type": "Microsoft.Network/publicIPAddresses",
|
||||
"name": "[variables('publicIPAddressName')]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"location": "[variables('location')]",
|
||||
"properties": {
|
||||
"publicIPAllocationMethod": "Dynamic",
|
||||
|
@ -124,7 +122,6 @@
|
|||
{
|
||||
"type": "Microsoft.Network/loadBalancers",
|
||||
"name": "[variables('loadBalancerName')]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"location": "[variables('location')]",
|
||||
"properties": {
|
||||
"frontendIPConfigurations": [
|
||||
|
@ -201,7 +198,6 @@
|
|||
"capacity": "[parameters('instanceCount')]"
|
||||
},
|
||||
"name": "[parameters('vmssName')]",
|
||||
"apiVersion": "2016-03-30",
|
||||
"location": "[variables('location')]",
|
||||
"properties": {
|
||||
"upgradePolicy": {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"apiProfile": "2018-03-01-hybrid",
|
||||
"parameters": {
|
||||
"vmSku": {
|
||||
"defaultValue": "Standard_A1",
|
||||
|
@ -87,7 +88,6 @@
|
|||
{
|
||||
"type": "Microsoft.Storage/storageAccounts",
|
||||
"name": "[variables('storageAccountName')]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"location": "[variables('location')]",
|
||||
"properties": {
|
||||
"accountType": "[variables('storageAccountType')]"
|
||||
|
@ -96,7 +96,6 @@
|
|||
{
|
||||
"type": "Microsoft.Network/virtualNetworks",
|
||||
"name": "[variables('vnetName')]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"location": "[variables('location')]",
|
||||
"properties": {
|
||||
"addressSpace": {
|
||||
|
@ -117,7 +116,6 @@
|
|||
{
|
||||
"type": "Microsoft.Network/publicIPAddresses",
|
||||
"name": "[variables('publicIPAddressName')]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"location": "[variables('location')]",
|
||||
"properties": {
|
||||
"publicIPAllocationMethod": "Dynamic",
|
||||
|
@ -129,7 +127,6 @@
|
|||
{
|
||||
"type": "Microsoft.Network/loadBalancers",
|
||||
"name": "[variables('loadBalancerName')]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"location": "[variables('location')]",
|
||||
"properties": {
|
||||
"frontendIPConfigurations": [
|
||||
|
@ -206,7 +203,6 @@
|
|||
"capacity": "[parameters('instanceCount')]"
|
||||
},
|
||||
"name": "[parameters('vmssName')]",
|
||||
"apiVersion": "2016-03-30",
|
||||
"location": "[variables('location')]",
|
||||
"properties": {
|
||||
"upgradePolicy": {
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"apiProfile": "2018-03-01-hybrid",
|
||||
"parameters": {
|
||||
"adminUsername": {
|
||||
"type": "string",
|
||||
|
@ -74,7 +75,6 @@
|
|||
{
|
||||
"type": "Microsoft.Storage/storageAccounts",
|
||||
"name": "[toLower(variables('storageAccountName'))]",
|
||||
"apiVersion": "2015-05-01-preview",
|
||||
"location": "[variables('location')]",
|
||||
"properties": {
|
||||
"accountType": "[variables('storageAccountType')]"
|
||||
|
@ -82,7 +82,6 @@
|
|||
},
|
||||
|
||||
{
|
||||
"apiVersion": "2017-10-01",
|
||||
"type": "Microsoft.Network/networkSecurityGroups",
|
||||
"name": "[variables('networkSecurityGroupName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
|
@ -107,7 +106,6 @@
|
|||
},
|
||||
|
||||
{
|
||||
"apiVersion": "2017-10-01",
|
||||
"type": "Microsoft.Network/virtualNetworks",
|
||||
"name": "[variables('virtualNetworkName')]",
|
||||
"location": "[variables('location')]",
|
||||
|
@ -130,7 +128,6 @@
|
|||
},
|
||||
|
||||
{
|
||||
"apiVersion": "2017-10-01",
|
||||
"type": "Microsoft.Network/networkInterfaces",
|
||||
"name": "[variables('nicName')]",
|
||||
"location": "[variables('location')]",
|
||||
|
@ -163,7 +160,6 @@
|
|||
"name": "Standard_LRS"
|
||||
},
|
||||
"name": "[concat(variables('vmName'),'-datadisk1')]",
|
||||
"apiVersion": "2017-03-30",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"creationData": {
|
||||
|
@ -173,7 +169,6 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "2017-03-30",
|
||||
"type": "Microsoft.Compute/virtualMachines",
|
||||
"name": "[variables('vmName')]",
|
||||
"location": "[variables('location')]",
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"apiProfile": "2018-03-01-hybrid",
|
||||
"parameters": {
|
||||
"adminUsername": {
|
||||
"type": "string",
|
||||
|
@ -74,7 +75,6 @@
|
|||
{
|
||||
"type": "Microsoft.Storage/storageAccounts",
|
||||
"name": "[toLower(variables('storageAccountName'))]",
|
||||
"apiVersion": "2015-05-01-preview",
|
||||
"location": "[variables('location')]",
|
||||
"properties": {
|
||||
"accountType": "[variables('storageAccountType')]"
|
||||
|
@ -82,7 +82,6 @@
|
|||
},
|
||||
|
||||
{
|
||||
"apiVersion": "2017-10-01",
|
||||
"type": "Microsoft.Network/networkSecurityGroups",
|
||||
"name": "[variables('networkSecurityGroupName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
|
@ -107,7 +106,6 @@
|
|||
},
|
||||
|
||||
{
|
||||
"apiVersion": "2017-10-01",
|
||||
"type": "Microsoft.Network/virtualNetworks",
|
||||
"name": "[variables('virtualNetworkName')]",
|
||||
"location": "[variables('location')]",
|
||||
|
@ -130,7 +128,6 @@
|
|||
},
|
||||
|
||||
{
|
||||
"apiVersion": "2017-10-01",
|
||||
"type": "Microsoft.Network/networkInterfaces",
|
||||
"name": "[variables('nicName')]",
|
||||
"location": "[variables('location')]",
|
||||
|
@ -159,7 +156,6 @@
|
|||
},
|
||||
|
||||
{
|
||||
"apiVersion": "2017-03-30",
|
||||
"type": "Microsoft.Compute/virtualMachines",
|
||||
"name": "[variables('vmName')]",
|
||||
"location": "[variables('location')]",
|
||||
|
|
|
@ -1,202 +1,198 @@
|
|||
{
|
||||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"parameters": {
|
||||
"vmName": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "Name of the VM."
|
||||
},
|
||||
"defaultValue": "[substring(concat('simplewinvm',resourceGroup().Name),0,12)]"
|
||||
},
|
||||
"adminUsername": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "Username for the Virtual Machine."
|
||||
},
|
||||
"defaultValue": "vmadmin1"
|
||||
},
|
||||
"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))]"
|
||||
},
|
||||
"windowsOSVersion": {
|
||||
"type": "string",
|
||||
"defaultValue": "2016-Datacenter",
|
||||
"allowedValues": [
|
||||
"2008-R2-SP1",
|
||||
"2012-Datacenter",
|
||||
"2012-R2-Datacenter",
|
||||
"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."
|
||||
}
|
||||
}
|
||||
"$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."
|
||||
},
|
||||
"defaultValue": "[substring(concat('simplewinvm',resourceGroup().Name),0,12)]"
|
||||
},
|
||||
"variables": {
|
||||
"location": "[resourceGroup().location]",
|
||||
"imagePublisher": "MicrosoftWindowsServer",
|
||||
"imageOffer": "WindowsServer",
|
||||
"OSDiskName": "osdisk",
|
||||
"nicName": "[replace(replace(tolower(concat('nic',resourceGroup().name)), '-', ''), '.','')]",
|
||||
"addressPrefix": "10.0.0.0/24",
|
||||
"subnetName": "[replace(replace(tolower(concat('subnet',resourceGroup().name)), '-', ''), '.','')]",
|
||||
"subnetPrefix": "10.0.0.0/24",
|
||||
"vmSize": "Standard_A1",
|
||||
"virtualNetworkName": "[replace(replace(tolower(concat('vnet',resourceGroup().name)), '-', ''), '.','')]",
|
||||
"vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]",
|
||||
"subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]",
|
||||
"networkSecurityGroupName": "[replace(replace(tolower(concat('nsg',resourceGroup().name)), '-', ''), '.','')]"
|
||||
"adminUsername": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "Username for the Virtual Machine."
|
||||
},
|
||||
"defaultValue": "vmadmin1"
|
||||
},
|
||||
"resources": [
|
||||
{
|
||||
"apiVersion": "2015-06-15",
|
||||
"type": "Microsoft.Network/networkSecurityGroups",
|
||||
"name": "[variables('networkSecurityGroupName')]",
|
||||
"location": "[variables('location')]",
|
||||
"tags": {
|
||||
"displayName": "NetworkSecurityGroup"
|
||||
"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))]"
|
||||
},
|
||||
"windowsOSVersion": {
|
||||
"type": "string",
|
||||
"defaultValue": "2016-Datacenter",
|
||||
"allowedValues": [
|
||||
"2008-R2-SP1",
|
||||
"2012-Datacenter",
|
||||
"2012-R2-Datacenter",
|
||||
"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]",
|
||||
"imagePublisher": "MicrosoftWindowsServer",
|
||||
"imageOffer": "WindowsServer",
|
||||
"OSDiskName": "osdisk",
|
||||
"nicName": "[replace(replace(tolower(concat('nic',resourceGroup().name)), '-', ''), '.','')]",
|
||||
"addressPrefix": "10.0.0.0/24",
|
||||
"subnetName": "[replace(replace(tolower(concat('subnet',resourceGroup().name)), '-', ''), '.','')]",
|
||||
"subnetPrefix": "10.0.0.0/24",
|
||||
"vmSize": "Standard_A1",
|
||||
"virtualNetworkName": "[replace(replace(tolower(concat('vnet',resourceGroup().name)), '-', ''), '.','')]",
|
||||
"vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]",
|
||||
"subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]",
|
||||
"networkSecurityGroupName": "[replace(replace(tolower(concat('nsg',resourceGroup().name)), '-', ''), '.','')]"
|
||||
},
|
||||
"resources": [
|
||||
{
|
||||
"type": "Microsoft.Network/networkSecurityGroups",
|
||||
"name": "[variables('networkSecurityGroupName')]",
|
||||
"location": "[variables('location')]",
|
||||
"tags": {
|
||||
"displayName": "NetworkSecurityGroup"
|
||||
},
|
||||
"properties": {
|
||||
"securityRules": [
|
||||
{
|
||||
"name": "rule1",
|
||||
"properties": {
|
||||
"protocol": "*",
|
||||
"sourcePortRange": "*",
|
||||
"destinationPortRange": "*",
|
||||
"sourceAddressPrefix": "*",
|
||||
"destinationAddressPrefix": "*",
|
||||
"access": "Allow",
|
||||
"priority": 101,
|
||||
"direction": "Inbound"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Network/virtualNetworks",
|
||||
"name": "[variables('virtualNetworkName')]",
|
||||
"location": "[variables('location')]",
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Network/networkSecurityGroups/', variables('networkSecurityGroupName'))]"
|
||||
],
|
||||
"properties": {
|
||||
"addressSpace": {
|
||||
"addressPrefixes": [
|
||||
"[variables('addressPrefix')]"
|
||||
]
|
||||
},
|
||||
"subnets": [
|
||||
{
|
||||
"name": "[variables('subnetName')]",
|
||||
"properties": {
|
||||
"addressPrefix": "[variables('subnetPrefix')]",
|
||||
"networkSecurityGroup": {
|
||||
"id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('networkSecurityGroupName'))]"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Network/networkInterfaces",
|
||||
"name": "[variables('nicName')]",
|
||||
"location": "[variables('location')]",
|
||||
"dependsOn": [
|
||||
|
||||
"[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]"
|
||||
],
|
||||
"properties": {
|
||||
"ipConfigurations": [
|
||||
{
|
||||
"name": "ipconfig1",
|
||||
"properties": {
|
||||
"privateIPAllocationMethod": "Dynamic",
|
||||
"subnet": {
|
||||
"id": "[variables('subnetRef')]"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Compute/disks",
|
||||
"sku": {
|
||||
"name": "Standard_LRS"
|
||||
},
|
||||
"name": "[concat(parameters('vmName'),'-datadisk1')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"creationData": {
|
||||
"createOption": "Empty"
|
||||
},
|
||||
"diskSizeGB": 10
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Compute/virtualMachines",
|
||||
"name": "[parameters('vmName')]",
|
||||
"location": "[variables('location')]",
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]",
|
||||
"[resourceId('Microsoft.Compute/disks/', concat(parameters('vmName'),'-datadisk1'))]"
|
||||
],
|
||||
"properties": {
|
||||
"hardwareProfile": {
|
||||
"vmSize": "[variables('vmSize')]"
|
||||
},
|
||||
"osProfile": {
|
||||
"computerName": "[parameters('vmName')]",
|
||||
"adminUsername": "[parameters('adminUsername')]",
|
||||
"adminPassword": "[parameters('adminPassword')]"
|
||||
},
|
||||
"storageProfile": {
|
||||
"imageReference": {
|
||||
"publisher": "[variables('imagePublisher')]",
|
||||
"offer": "[variables('imageOffer')]",
|
||||
"sku": "[parameters('windowsOSVersion')]",
|
||||
"version": "latest"
|
||||
},
|
||||
"osDisk": {
|
||||
"name": "osdisk",
|
||||
"createOption": "FromImage"
|
||||
},
|
||||
"dataDisks": [
|
||||
{
|
||||
"lun": 1,
|
||||
"name": "[concat(parameters('vmName'),'-datadisk1')]",
|
||||
"createOption": "attach",
|
||||
"managedDisk": {
|
||||
"id": "[resourceId('Microsoft.Compute/disks/', concat(parameters('vmName'),'-datadisk1'))]"
|
||||
}
|
||||
},
|
||||
"properties": {
|
||||
"securityRules": [
|
||||
{
|
||||
"name": "rule1",
|
||||
"properties": {
|
||||
"protocol": "*",
|
||||
"sourcePortRange": "*",
|
||||
"destinationPortRange": "*",
|
||||
"sourceAddressPrefix": "*",
|
||||
"destinationAddressPrefix": "*",
|
||||
"access": "Allow",
|
||||
"priority": 101,
|
||||
"direction": "Inbound"
|
||||
}
|
||||
}
|
||||
]
|
||||
{
|
||||
"diskSizeGB": 10,
|
||||
"lun": 2,
|
||||
"createOption": "Empty"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"apiVersion": "2015-06-15",
|
||||
"type": "Microsoft.Network/virtualNetworks",
|
||||
"name": "[variables('virtualNetworkName')]",
|
||||
"location": "[variables('location')]",
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Network/networkSecurityGroups/', variables('networkSecurityGroupName'))]"
|
||||
],
|
||||
"properties": {
|
||||
"addressSpace": {
|
||||
"addressPrefixes": [
|
||||
"[variables('addressPrefix')]"
|
||||
]
|
||||
},
|
||||
"subnets": [
|
||||
{
|
||||
"name": "[variables('subnetName')]",
|
||||
"properties": {
|
||||
"addressPrefix": "[variables('subnetPrefix')]",
|
||||
"networkSecurityGroup": {
|
||||
"id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('networkSecurityGroupName'))]"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "2015-06-15",
|
||||
"type": "Microsoft.Network/networkInterfaces",
|
||||
"name": "[variables('nicName')]",
|
||||
"location": "[variables('location')]",
|
||||
"dependsOn": [
|
||||
|
||||
"[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]"
|
||||
],
|
||||
"properties": {
|
||||
"ipConfigurations": [
|
||||
{
|
||||
"name": "ipconfig1",
|
||||
"properties": {
|
||||
"privateIPAllocationMethod": "Dynamic",
|
||||
"subnet": {
|
||||
"id": "[variables('subnetRef')]"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Compute/disks",
|
||||
"sku": {
|
||||
"name": "Standard_LRS"
|
||||
},
|
||||
"name": "[concat(parameters('vmName'),'-datadisk1')]",
|
||||
"apiVersion": "2017-03-30",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"creationData": {
|
||||
"createOption": "Empty"
|
||||
},
|
||||
"diskSizeGB": 10
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "2017-03-30",
|
||||
"type": "Microsoft.Compute/virtualMachines",
|
||||
"name": "[parameters('vmName')]",
|
||||
"location": "[variables('location')]",
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]",
|
||||
"[resourceId('Microsoft.Compute/disks/', concat(parameters('vmName'),'-datadisk1'))]"
|
||||
],
|
||||
"properties": {
|
||||
"hardwareProfile": {
|
||||
"vmSize": "[variables('vmSize')]"
|
||||
},
|
||||
"osProfile": {
|
||||
"computerName": "[parameters('vmName')]",
|
||||
"adminUsername": "[parameters('adminUsername')]",
|
||||
"adminPassword": "[parameters('adminPassword')]"
|
||||
},
|
||||
"storageProfile": {
|
||||
"imageReference": {
|
||||
"publisher": "[variables('imagePublisher')]",
|
||||
"offer": "[variables('imageOffer')]",
|
||||
"sku": "[parameters('windowsOSVersion')]",
|
||||
"version": "latest"
|
||||
},
|
||||
"osDisk": {
|
||||
"name": "osdisk",
|
||||
"createOption": "FromImage"
|
||||
},
|
||||
"dataDisks": [
|
||||
{
|
||||
"lun": 1,
|
||||
"name": "[concat(parameters('vmName'),'-datadisk1')]",
|
||||
"createOption": "attach",
|
||||
"managedDisk": {
|
||||
"id": "[resourceId('Microsoft.Compute/disks/', concat(parameters('vmName'),'-datadisk1'))]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"diskSizeGB": 10,
|
||||
"lun": 2,
|
||||
"createOption": "Empty"
|
||||
}
|
||||
]
|
||||
},
|
||||
"networkProfile": {
|
||||
"networkInterfaces": [
|
||||
{
|
||||
"id": "[resourceId('Microsoft.Network/networkInterfaces',variables('nicName'))]"
|
||||
}
|
||||
]
|
||||
}
|
||||
"networkProfile": {
|
||||
"networkInterfaces": [
|
||||
{
|
||||
"id": "[resourceId('Microsoft.Network/networkInterfaces',variables('nicName'))]"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"apiProfile": "2018-03-01-hybrid",
|
||||
"parameters": {
|
||||
"adminUsername": {
|
||||
"type": "string",
|
||||
|
@ -76,14 +77,12 @@
|
|||
{
|
||||
"type": "Microsoft.Storage/storageAccounts",
|
||||
"name": "[toLower(variables('storageAccountName'))]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"location": "[variables('location')]",
|
||||
"properties": {
|
||||
"accountType": "[variables('storageAccountType')]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "2015-06-15",
|
||||
"type": "Microsoft.Network/networkSecurityGroups",
|
||||
"name": "[variables('networkSecurityGroupName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
|
@ -107,7 +106,6 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "2015-06-15",
|
||||
"type": "Microsoft.Network/publicIPAddresses",
|
||||
"name": "[variables('publicIPAddressName')]",
|
||||
"location": "[variables('location')]",
|
||||
|
@ -119,7 +117,6 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "2015-06-15",
|
||||
"type": "Microsoft.Network/virtualNetworks",
|
||||
"name": "[variables('virtualNetworkName')]",
|
||||
"location": "[variables('location')]",
|
||||
|
@ -140,7 +137,6 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "2015-06-15",
|
||||
"type": "Microsoft.Network/networkInterfaces",
|
||||
"name": "[variables('nicName')]",
|
||||
"location": "[variables('location')]",
|
||||
|
@ -170,7 +166,6 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "2016-03-30",
|
||||
"type": "Microsoft.Compute/virtualMachines",
|
||||
"name": "[variables('vmName')]",
|
||||
"location": "[variables('location')]",
|
||||
|
@ -221,7 +216,6 @@
|
|||
{
|
||||
"type": "Microsoft.Compute/virtualMachines/extensions",
|
||||
"name": "[concat(variables('vmName'),'/LinuxCustomScriptExtension')]",
|
||||
"apiVersion": "2016-03-30",
|
||||
"location": "[resourceGroup().location]",
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]"
|
||||
|
@ -240,7 +234,6 @@
|
|||
{
|
||||
"type": "Microsoft.Compute/virtualMachines/extensions",
|
||||
"name": "[concat(variables('vmName'),'/installospatching')]",
|
||||
"apiVersion": "2016-03-30",
|
||||
"location": "[resourceGroup().location]",
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Compute/virtualMachines/', variables('vmName'),'/extensions/LinuxCustomScriptExtension')]"
|
||||
|
|
|
@ -1,303 +1,297 @@
|
|||
{
|
||||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"parameters": {
|
||||
"username": {
|
||||
"type": "string",
|
||||
"defaultValue": "localadmin",
|
||||
"metadata": {
|
||||
"description": "Username for the Virtual Machine. Default value is localadmin"
|
||||
}
|
||||
},
|
||||
"password": {
|
||||
"type": "securestring",
|
||||
"defaultValue": "[concat('Subscription#',substring(resourcegroup().id,15,36))]",
|
||||
"metadata": {
|
||||
"description": "Password for the Virtual Machine. Default value is 'Subscription#<subscription id>'"
|
||||
}
|
||||
},
|
||||
"rebootAfterPatch": {
|
||||
"type": "string",
|
||||
"defaultValue": "Auto",
|
||||
"metadata": {
|
||||
"description": "The reboot behavior after patching.Default value is Auto"
|
||||
},
|
||||
"allowedValues": [
|
||||
"RebootIfNeed",
|
||||
"Required",
|
||||
"NotRequired",
|
||||
"Auto"
|
||||
]
|
||||
},
|
||||
"category": {
|
||||
"type": "string",
|
||||
"defaultValue": "ImportantAndRecommended",
|
||||
"metadata": {
|
||||
"description": "Type of patches to install.Default value is ImportantAndRecommended"
|
||||
},
|
||||
"allowedValues": [
|
||||
"Important",
|
||||
"ImportantAndRecommended"
|
||||
]
|
||||
},
|
||||
"installDuration": {
|
||||
"type": "string",
|
||||
"defaultValue": "01:00",
|
||||
"metadata": {
|
||||
"description": "The allowed total time for installation.Default value is 01:00"
|
||||
}
|
||||
},
|
||||
"oneoff": {
|
||||
"type": "bool",
|
||||
"defaultValue": false,
|
||||
"metadata": {
|
||||
"description": "Patch the OS immediately.Default value is false"
|
||||
},
|
||||
"allowedValues": [
|
||||
true,
|
||||
false
|
||||
]
|
||||
},
|
||||
"dayOfWeek": {
|
||||
"type": "string",
|
||||
"defaultValue": "Sunday|Wednesday",
|
||||
"metadata": {
|
||||
"description": "The patching date (of the week)You can specify multiple days in a week."
|
||||
}
|
||||
},
|
||||
"startTime": {
|
||||
"type": "string",
|
||||
"defaultValue": "03:00",
|
||||
"metadata": {
|
||||
"description": "Start time of patching. Default value is 03:00"
|
||||
}
|
||||
},
|
||||
"idleTestScript": {
|
||||
"type": "string",
|
||||
"defaultValue": "",
|
||||
"metadata": {
|
||||
"description": "The uri of the VMStatus idle test script"
|
||||
}
|
||||
},
|
||||
"healthyTestScript": {
|
||||
"type": "string",
|
||||
"defaultValue": "",
|
||||
"metadata": {
|
||||
"description": "The uri of the VMStatus healthy test script"
|
||||
}
|
||||
},
|
||||
"storageAccountName": {
|
||||
"type": "string",
|
||||
"defaultValue": "",
|
||||
"metadata": {
|
||||
"description": "The name of storage account where the VMStatus scripts resides."
|
||||
}
|
||||
},
|
||||
"storageAccountKey": {
|
||||
"type": "string",
|
||||
"defaultValue": "",
|
||||
"metadata": {
|
||||
"description": "The access key of storage account where the VMStatus scripts resides."
|
||||
}
|
||||
}
|
||||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"apiProfile": "2018-03-01-hybrid",
|
||||
"parameters": {
|
||||
"username": {
|
||||
"type": "string",
|
||||
"defaultValue": "localadmin",
|
||||
"metadata": {
|
||||
"description": "Username for the Virtual Machine. Default value is localadmin"
|
||||
}
|
||||
},
|
||||
"variables": {
|
||||
"scenarioPrefix": "[concat('ospatchlinux',substring(uniquestring(resourceGroup().id),0,5))]",
|
||||
"imagePublisher": "Canonical",
|
||||
"imageOffer": "UbuntuServer",
|
||||
"ubuntuOSVersion": "14.04.3-LTS",
|
||||
"vmSize": "Standard_A1",
|
||||
"OSDiskName": "[concat(variables('scenarioPrefix'),'OSDisk')]",
|
||||
"nicName": "[concat(variables('scenarioPrefix'),'Nic')]",
|
||||
"vnetAddressPrefix": "10.0.0.0/16",
|
||||
"subnetName": "[concat(variables('scenarioPrefix'),'Subnet')]",
|
||||
"subnetPrefix": "10.0.0.0/24",
|
||||
"storageAccountName": "[concat(variables('scenarioPrefix'),'sa')]",
|
||||
"storageAccountType": "Standard_LRS",
|
||||
"publicIPAddressName": "[concat(variables('scenarioPrefix'),'PublicIp')]",
|
||||
"publicIPAddressType": "Dynamic",
|
||||
"dnsNameForPublicIP": "[tolower(concat(variables('scenarioPrefix'),'dns'))]",
|
||||
"vmStorageAccountContainerName": "vhds",
|
||||
"vmName": "[concat(variables('scenarioPrefix'),'VM')]",
|
||||
"virtualNetworkName": "[concat(variables('scenarioPrefix'),'Vnet')]",
|
||||
"vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]",
|
||||
"subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]",
|
||||
"networkSecurityGroupName": "[tolower(concat(variables('scenarioPrefix'),'nsg'))]"
|
||||
"password": {
|
||||
"type": "securestring",
|
||||
"defaultValue": "[concat('Subscription#',substring(resourcegroup().id,15,36))]",
|
||||
"metadata": {
|
||||
"description": "Password for the Virtual Machine. Default value is 'Subscription#<subscription id>'"
|
||||
}
|
||||
},
|
||||
"resources": [
|
||||
{
|
||||
"type": "Microsoft.Storage/storageAccounts",
|
||||
"name": "[variables('storageAccountName')]",
|
||||
"apiVersion": "2015-05-01-preview",
|
||||
"location": "[resourceGroup().location]",
|
||||
"rebootAfterPatch": {
|
||||
"type": "string",
|
||||
"defaultValue": "Auto",
|
||||
"metadata": {
|
||||
"description": "The reboot behavior after patching.Default value is Auto"
|
||||
},
|
||||
"allowedValues": [
|
||||
"RebootIfNeed",
|
||||
"Required",
|
||||
"NotRequired",
|
||||
"Auto"
|
||||
]
|
||||
},
|
||||
"category": {
|
||||
"type": "string",
|
||||
"defaultValue": "ImportantAndRecommended",
|
||||
"metadata": {
|
||||
"description": "Type of patches to install.Default value is ImportantAndRecommended"
|
||||
},
|
||||
"allowedValues": [
|
||||
"Important",
|
||||
"ImportantAndRecommended"
|
||||
]
|
||||
},
|
||||
"installDuration": {
|
||||
"type": "string",
|
||||
"defaultValue": "01:00",
|
||||
"metadata": {
|
||||
"description": "The allowed total time for installation.Default value is 01:00"
|
||||
}
|
||||
},
|
||||
"oneoff": {
|
||||
"type": "bool",
|
||||
"defaultValue": false,
|
||||
"metadata": {
|
||||
"description": "Patch the OS immediately.Default value is false"
|
||||
},
|
||||
"allowedValues": [
|
||||
true,
|
||||
false
|
||||
]
|
||||
},
|
||||
"dayOfWeek": {
|
||||
"type": "string",
|
||||
"defaultValue": "Sunday|Wednesday",
|
||||
"metadata": {
|
||||
"description": "The patching date (of the week)You can specify multiple days in a week."
|
||||
}
|
||||
},
|
||||
"startTime": {
|
||||
"type": "string",
|
||||
"defaultValue": "03:00",
|
||||
"metadata": {
|
||||
"description": "Start time of patching. Default value is 03:00"
|
||||
}
|
||||
},
|
||||
"idleTestScript": {
|
||||
"type": "string",
|
||||
"defaultValue": "",
|
||||
"metadata": {
|
||||
"description": "The uri of the VMStatus idle test script"
|
||||
}
|
||||
},
|
||||
"healthyTestScript": {
|
||||
"type": "string",
|
||||
"defaultValue": "",
|
||||
"metadata": {
|
||||
"description": "The uri of the VMStatus healthy test script"
|
||||
}
|
||||
},
|
||||
"storageAccountName": {
|
||||
"type": "string",
|
||||
"defaultValue": "",
|
||||
"metadata": {
|
||||
"description": "The name of storage account where the VMStatus scripts resides."
|
||||
}
|
||||
},
|
||||
"storageAccountKey": {
|
||||
"type": "string",
|
||||
"defaultValue": "",
|
||||
"metadata": {
|
||||
"description": "The access key of storage account where the VMStatus scripts resides."
|
||||
}
|
||||
}
|
||||
},
|
||||
"variables": {
|
||||
"scenarioPrefix": "[concat('ospatchlinux',substring(uniquestring(resourceGroup().id),0,5))]",
|
||||
"imagePublisher": "Canonical",
|
||||
"imageOffer": "UbuntuServer",
|
||||
"ubuntuOSVersion": "14.04.3-LTS",
|
||||
"vmSize": "Standard_A1",
|
||||
"OSDiskName": "[concat(variables('scenarioPrefix'),'OSDisk')]",
|
||||
"nicName": "[concat(variables('scenarioPrefix'),'Nic')]",
|
||||
"vnetAddressPrefix": "10.0.0.0/16",
|
||||
"subnetName": "[concat(variables('scenarioPrefix'),'Subnet')]",
|
||||
"subnetPrefix": "10.0.0.0/24",
|
||||
"storageAccountName": "[concat(variables('scenarioPrefix'),'sa')]",
|
||||
"storageAccountType": "Standard_LRS",
|
||||
"publicIPAddressName": "[concat(variables('scenarioPrefix'),'PublicIp')]",
|
||||
"publicIPAddressType": "Dynamic",
|
||||
"dnsNameForPublicIP": "[tolower(concat(variables('scenarioPrefix'),'dns'))]",
|
||||
"vmStorageAccountContainerName": "vhds",
|
||||
"vmName": "[concat(variables('scenarioPrefix'),'VM')]",
|
||||
"virtualNetworkName": "[concat(variables('scenarioPrefix'),'Vnet')]",
|
||||
"vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]",
|
||||
"subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]",
|
||||
"networkSecurityGroupName": "[tolower(concat(variables('scenarioPrefix'),'nsg'))]"
|
||||
},
|
||||
"resources": [
|
||||
{
|
||||
"type": "Microsoft.Storage/storageAccounts",
|
||||
"name": "[variables('storageAccountName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"accountType": "[variables('storageAccountType')]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Network/networkSecurityGroups",
|
||||
"name": "[variables('networkSecurityGroupName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"securityRules": [
|
||||
{
|
||||
"name": "ssh",
|
||||
"properties": {
|
||||
"accountType": "[variables('storageAccountType')]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "2015-05-01-preview",
|
||||
"type": "Microsoft.Network/networkSecurityGroups",
|
||||
"name": "[variables('networkSecurityGroupName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"securityRules": [
|
||||
{
|
||||
"name": "ssh",
|
||||
"properties": {
|
||||
"description": "Allow RDP",
|
||||
"protocol": "Tcp",
|
||||
"sourcePortRange": "*",
|
||||
"destinationPortRange": "22",
|
||||
"sourceAddressPrefix": "*",
|
||||
"destinationAddressPrefix": "*",
|
||||
"access": "Allow",
|
||||
"priority": 200,
|
||||
"direction": "Inbound"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "2015-05-01-preview",
|
||||
"type": "Microsoft.Network/publicIPAddresses",
|
||||
"name": "[variables('publicIPAddressName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"publicIPAllocationMethod": "[variables('publicIPAddressType')]",
|
||||
"dnsSettings": {
|
||||
"domainNameLabel": "[variables('dnsNameForPublicIP')]"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "2015-05-01-preview",
|
||||
"type": "Microsoft.Network/virtualNetworks",
|
||||
"name": "[variables('virtualNetworkName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"addressSpace": {
|
||||
"addressPrefixes": [
|
||||
"[variables('vnetAddressPrefix')]"
|
||||
]
|
||||
},
|
||||
"subnets": [
|
||||
{
|
||||
"name": "[variables('subnetName')]",
|
||||
"properties": {
|
||||
"addressPrefix": "[variables('subnetPrefix')]"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "2015-05-01-preview",
|
||||
"type": "Microsoft.Network/networkInterfaces",
|
||||
"name": "[variables('nicName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]",
|
||||
"[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]",
|
||||
"[variables('networkSecurityGroupName')]"
|
||||
],
|
||||
"properties": {
|
||||
"networkSecurityGroup": {
|
||||
"id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('networkSecurityGroupName'))]"
|
||||
},
|
||||
"ipConfigurations": [
|
||||
{
|
||||
"name": "ipconfig1",
|
||||
"properties": {
|
||||
"privateIPAllocationMethod": "Dynamic",
|
||||
"publicIPAddress": {
|
||||
"id": "[resourceId('Microsoft.Network/publicIPAddresses',variables('publicIPAddressName'))]"
|
||||
},
|
||||
"subnet": {
|
||||
"id": "[variables('subnetRef')]"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "2015-06-15",
|
||||
"type": "Microsoft.Compute/virtualMachines",
|
||||
"name": "[variables('vmName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]",
|
||||
"[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]"
|
||||
],
|
||||
"properties": {
|
||||
"hardwareProfile": {
|
||||
"vmSize": "[variables('vmSize')]"
|
||||
},
|
||||
"osProfile": {
|
||||
"computerName": "[variables('vmName')]",
|
||||
"adminUsername": "[parameters('username')]",
|
||||
"adminPassword": "[parameters('password')]"
|
||||
},
|
||||
"storageProfile": {
|
||||
"imageReference": {
|
||||
"publisher": "[variables('imagePublisher')]",
|
||||
"offer": "[variables('imageOffer')]",
|
||||
"sku": "[variables('ubuntuOSVersion')]",
|
||||
"version": "latest"
|
||||
},
|
||||
"osDisk": {
|
||||
"name": "osdisk1",
|
||||
"vhd": {
|
||||
"uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName')), providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]).primaryEndpoints.blob, variables('vmStorageAccountContainerName'),'/',variables('OSDiskName'),'.vhd')]"
|
||||
},
|
||||
"caching": "ReadWrite",
|
||||
"createOption": "FromImage"
|
||||
}
|
||||
},
|
||||
"networkProfile": {
|
||||
"networkInterfaces": [
|
||||
{
|
||||
"id": "[resourceId('Microsoft.Network/networkInterfaces',variables('nicName'))]"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Compute/virtualMachines/extensions",
|
||||
"name": "[concat(variables('vmName'),'/installospatching')]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"location": "[resourceGroup().location]",
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]"
|
||||
],
|
||||
"properties": {
|
||||
"publisher": "Microsoft.OSTCExtensions",
|
||||
"type": "OSPatchingForLinux",
|
||||
"typeHandlerVersion": "2.0",
|
||||
"autoUpgradeMinorVersion": true,
|
||||
"settings": {
|
||||
"disabled": false,
|
||||
"stop": false,
|
||||
"rebootAfterPatch": "[parameters('rebootAfterPatch')]",
|
||||
"category": "[parameters('category')]",
|
||||
"installDuration": "[parameters('installDuration')]",
|
||||
"oneoff": "[parameters('oneoff')]",
|
||||
"intervalOfWeeks": "1",
|
||||
"dayOfWeek": "[parameters('dayOfWeek')]",
|
||||
"startTime": "[parameters('startTime')]",
|
||||
"vmStatusTest": {
|
||||
"local": false,
|
||||
"idleTestScript": "[parameters('idleTestScript')]",
|
||||
"healthyTestScript": "[parameters('healthyTestScript')]"
|
||||
}
|
||||
},
|
||||
"protectedSettings": {
|
||||
"storageAccountName": "[parameters('storageAccountName')]",
|
||||
"storageAccountKey": "[parameters('storageAccountKey')]"
|
||||
}
|
||||
"description": "Allow RDP",
|
||||
"protocol": "Tcp",
|
||||
"sourcePortRange": "*",
|
||||
"destinationPortRange": "22",
|
||||
"sourceAddressPrefix": "*",
|
||||
"destinationAddressPrefix": "*",
|
||||
"access": "Allow",
|
||||
"priority": 200,
|
||||
"direction": "Inbound"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Network/publicIPAddresses",
|
||||
"name": "[variables('publicIPAddressName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"publicIPAllocationMethod": "[variables('publicIPAddressType')]",
|
||||
"dnsSettings": {
|
||||
"domainNameLabel": "[variables('dnsNameForPublicIP')]"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Network/virtualNetworks",
|
||||
"name": "[variables('virtualNetworkName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"addressSpace": {
|
||||
"addressPrefixes": [
|
||||
"[variables('vnetAddressPrefix')]"
|
||||
]
|
||||
},
|
||||
"subnets": [
|
||||
{
|
||||
"name": "[variables('subnetName')]",
|
||||
"properties": {
|
||||
"addressPrefix": "[variables('subnetPrefix')]"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Network/networkInterfaces",
|
||||
"name": "[variables('nicName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]",
|
||||
"[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]",
|
||||
"[variables('networkSecurityGroupName')]"
|
||||
],
|
||||
"properties": {
|
||||
"networkSecurityGroup": {
|
||||
"id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('networkSecurityGroupName'))]"
|
||||
},
|
||||
"ipConfigurations": [
|
||||
{
|
||||
"name": "ipconfig1",
|
||||
"properties": {
|
||||
"privateIPAllocationMethod": "Dynamic",
|
||||
"publicIPAddress": {
|
||||
"id": "[resourceId('Microsoft.Network/publicIPAddresses',variables('publicIPAddressName'))]"
|
||||
},
|
||||
"subnet": {
|
||||
"id": "[variables('subnetRef')]"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Compute/virtualMachines",
|
||||
"name": "[variables('vmName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]",
|
||||
"[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]"
|
||||
],
|
||||
"properties": {
|
||||
"hardwareProfile": {
|
||||
"vmSize": "[variables('vmSize')]"
|
||||
},
|
||||
"osProfile": {
|
||||
"computerName": "[variables('vmName')]",
|
||||
"adminUsername": "[parameters('username')]",
|
||||
"adminPassword": "[parameters('password')]"
|
||||
},
|
||||
"storageProfile": {
|
||||
"imageReference": {
|
||||
"publisher": "[variables('imagePublisher')]",
|
||||
"offer": "[variables('imageOffer')]",
|
||||
"sku": "[variables('ubuntuOSVersion')]",
|
||||
"version": "latest"
|
||||
},
|
||||
"osDisk": {
|
||||
"name": "osdisk1",
|
||||
"vhd": {
|
||||
"uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName')), providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]).primaryEndpoints.blob, variables('vmStorageAccountContainerName'),'/',variables('OSDiskName'),'.vhd')]"
|
||||
},
|
||||
"caching": "ReadWrite",
|
||||
"createOption": "FromImage"
|
||||
}
|
||||
},
|
||||
"networkProfile": {
|
||||
"networkInterfaces": [
|
||||
{
|
||||
"id": "[resourceId('Microsoft.Network/networkInterfaces',variables('nicName'))]"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Compute/virtualMachines/extensions",
|
||||
"name": "[concat(variables('vmName'),'/installospatching')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]"
|
||||
],
|
||||
"properties": {
|
||||
"publisher": "Microsoft.OSTCExtensions",
|
||||
"type": "OSPatchingForLinux",
|
||||
"typeHandlerVersion": "2.0",
|
||||
"autoUpgradeMinorVersion": true,
|
||||
"settings": {
|
||||
"disabled": false,
|
||||
"stop": false,
|
||||
"rebootAfterPatch": "[parameters('rebootAfterPatch')]",
|
||||
"category": "[parameters('category')]",
|
||||
"installDuration": "[parameters('installDuration')]",
|
||||
"oneoff": "[parameters('oneoff')]",
|
||||
"intervalOfWeeks": "1",
|
||||
"dayOfWeek": "[parameters('dayOfWeek')]",
|
||||
"startTime": "[parameters('startTime')]",
|
||||
"vmStatusTest": {
|
||||
"local": false,
|
||||
"idleTestScript": "[parameters('idleTestScript')]",
|
||||
"healthyTestScript": "[parameters('healthyTestScript')]"
|
||||
}
|
||||
},
|
||||
"protectedSettings": {
|
||||
"storageAccountName": "[parameters('storageAccountName')]",
|
||||
"storageAccountKey": "[parameters('storageAccountKey')]"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -1,357 +1,347 @@
|
|||
{
|
||||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"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#',subscription().subscriptionId)]"
|
||||
}
|
||||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"apiProfile": "2018-03-01-hybrid",
|
||||
"parameters": {
|
||||
"adminUsername": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "The name of the Administrator of the new VMs"
|
||||
},
|
||||
"defaultValue": "vmadmin"
|
||||
},
|
||||
"variables": {
|
||||
"storageAccountType": "Standard_LRS",
|
||||
"vmName": "[tolower(concat('vm', resourceGroup().name))]",
|
||||
"VMSize": "Standard_A3",
|
||||
"dnsPrefix": "[tolower(concat('vmdns', resourceGroup().name))]",
|
||||
"vmNetworkSubnet": "10.0.0.0/24",
|
||||
"virtualNetworkAddressRange": "10.0.0.0/16",
|
||||
"windowsImagePublisher": "MicrosoftWindowsServer",
|
||||
"windowsImageOffer": "WindowsServer",
|
||||
"windowsImageSKU": "2012-R2-Datacenter",
|
||||
"windowsImageVersion": "latest",
|
||||
"dataDiskSize": 2,
|
||||
"assetLocation": "https://raw.githubusercontent.com/Azure/AzureStack-QuickStart-Templates/master/201-vm-windows-comprehensive",
|
||||
"staticSubnetName": "vmstaticsubnet",
|
||||
"virtualNetworkName": "[tolower(concat('vmvnet',resourceGroup().name))]",
|
||||
"vnetID": "[resourceId('Microsoft.Network/virtualNetworks', variables('virtualNetworkName'))]",
|
||||
"staticSubnetRef": "[concat(variables('vnetID'),'/subnets/',variables('staticSubnetName'))]",
|
||||
"storageName": "[concat('sa', uniquestring(resourceGroup().id))]",
|
||||
"publicLBName": "[tolower(concat('vmplb', resourceGroup().name))]",
|
||||
"publicIPAddressName": "[tolower(concat('vmpip',resourceGroup().name))]",
|
||||
"lbFE": "[tolower(concat('vmlbfe',resourceGroup().name))]",
|
||||
"rpdNAT": "[tolower(concat('vmrdpnat',resourceGroup().name))]",
|
||||
"publiclbID": "[resourceId('Microsoft.Network/loadBalancers',variables('publicLBName'))]",
|
||||
"publiclbFEConfigID": "[concat(variables('publiclbID'),'/frontendIPConfigurations/',variables('lbFE'))]",
|
||||
"rdpPort": 3389,
|
||||
"rDPNATRuleID": "[concat(variables('publiclbID'),'/inboundNatRules/',variables('rpdNAT'))]",
|
||||
"nsgName": "[tolower(concat('vmnsg',resourceGroup().name))]",
|
||||
"nsgID": "[resourceId('Microsoft.Network/networkSecurityGroups',variables('nsgName'))]",
|
||||
"NICPrefix": "[tolower(concat('vmnic', resourceGroup().name))]",
|
||||
"vmContainerName": "vhds",
|
||||
"WindowsFeatureName": "Web-Server",
|
||||
"ModulesURL": "[concat(variables('assetLocation'),'/windowsFeature.zip')]",
|
||||
"ConfigurationFunction": "windowsFeature.ps1\\EnalbeWindowsFeature",
|
||||
"scriptFileName": "ValidateWindowsFeature.ps1",
|
||||
"scriptFile": "[concat(variables('assetLocation'),'/',variables('scriptFileName'))]"
|
||||
},
|
||||
"resources": [
|
||||
{
|
||||
"type": "Microsoft.Network/networkSecurityGroups",
|
||||
"name": "[variables('nsgName')]",
|
||||
"apiVersion": "2015-05-01-preview",
|
||||
"location": "[resourceGroup().location]",
|
||||
"adminPassword": {
|
||||
"type": "securestring",
|
||||
"metadata": {
|
||||
"description": "The password for the Administrator account of the new VMs. Default value is subscription id"
|
||||
},
|
||||
"defaultValue": "[concat('Subscription#',subscription().subscriptionId)]"
|
||||
}
|
||||
},
|
||||
"variables": {
|
||||
"storageAccountType": "Standard_LRS",
|
||||
"vmName": "[tolower(concat('vm', resourceGroup().name))]",
|
||||
"VMSize": "Standard_A3",
|
||||
"dnsPrefix": "[tolower(concat('vmdns', resourceGroup().name))]",
|
||||
"vmNetworkSubnet": "10.0.0.0/24",
|
||||
"virtualNetworkAddressRange": "10.0.0.0/16",
|
||||
"windowsImagePublisher": "MicrosoftWindowsServer",
|
||||
"windowsImageOffer": "WindowsServer",
|
||||
"windowsImageSKU": "2012-R2-Datacenter",
|
||||
"windowsImageVersion": "latest",
|
||||
"dataDiskSize": 2,
|
||||
"assetLocation": "https://raw.githubusercontent.com/Azure/AzureStack-QuickStart-Templates/master/201-vm-windows-comprehensive",
|
||||
"staticSubnetName": "vmstaticsubnet",
|
||||
"virtualNetworkName": "[tolower(concat('vmvnet',resourceGroup().name))]",
|
||||
"vnetID": "[resourceId('Microsoft.Network/virtualNetworks', variables('virtualNetworkName'))]",
|
||||
"staticSubnetRef": "[concat(variables('vnetID'),'/subnets/',variables('staticSubnetName'))]",
|
||||
"storageName": "[concat('sa', uniquestring(resourceGroup().id))]",
|
||||
"publicLBName": "[tolower(concat('vmplb', resourceGroup().name))]",
|
||||
"publicIPAddressName": "[tolower(concat('vmpip',resourceGroup().name))]",
|
||||
"lbFE": "[tolower(concat('vmlbfe',resourceGroup().name))]",
|
||||
"rpdNAT": "[tolower(concat('vmrdpnat',resourceGroup().name))]",
|
||||
"publiclbID": "[resourceId('Microsoft.Network/loadBalancers',variables('publicLBName'))]",
|
||||
"publiclbFEConfigID": "[concat(variables('publiclbID'),'/frontendIPConfigurations/',variables('lbFE'))]",
|
||||
"rdpPort": 3389,
|
||||
"rDPNATRuleID": "[concat(variables('publiclbID'),'/inboundNatRules/',variables('rpdNAT'))]",
|
||||
"nsgName": "[tolower(concat('vmnsg',resourceGroup().name))]",
|
||||
"nsgID": "[resourceId('Microsoft.Network/networkSecurityGroups',variables('nsgName'))]",
|
||||
"NICPrefix": "[tolower(concat('vmnic', resourceGroup().name))]",
|
||||
"vmContainerName": "vhds",
|
||||
"WindowsFeatureName": "Web-Server",
|
||||
"ModulesURL": "[concat(variables('assetLocation'),'/windowsFeature.zip')]",
|
||||
"ConfigurationFunction": "windowsFeature.ps1\\EnalbeWindowsFeature",
|
||||
"scriptFileName": "ValidateWindowsFeature.ps1",
|
||||
"scriptFile": "[concat(variables('assetLocation'),'/',variables('scriptFileName'))]"
|
||||
},
|
||||
"resources": [
|
||||
{
|
||||
"type": "Microsoft.Network/networkSecurityGroups",
|
||||
"name": "[variables('nsgName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"securityRules": [
|
||||
{
|
||||
"name": "rule1",
|
||||
"properties": {
|
||||
"securityRules": [
|
||||
{
|
||||
"name": "rule1",
|
||||
"properties": {
|
||||
"protocol": "*",
|
||||
"sourcePortRange": "*",
|
||||
"destinationPortRange": "*",
|
||||
"sourceAddressPrefix": "*",
|
||||
"destinationAddressPrefix": "*",
|
||||
"access": "Allow",
|
||||
"priority": 101,
|
||||
"direction": "Inbound"
|
||||
}
|
||||
}
|
||||
]
|
||||
"protocol": "*",
|
||||
"sourcePortRange": "*",
|
||||
"destinationPortRange": "*",
|
||||
"sourceAddressPrefix": "*",
|
||||
"destinationAddressPrefix": "*",
|
||||
"access": "Allow",
|
||||
"priority": 101,
|
||||
"direction": "Inbound"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Network/virtualNetworks",
|
||||
"name": "[variables('virtualNetworkName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"addressSpace": {
|
||||
"addressPrefixes": [
|
||||
"[variables('virtualNetworkAddressRange')]"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Network/virtualNetworks",
|
||||
"name": "[variables('virtualNetworkName')]",
|
||||
"apiVersion": "2015-05-01-preview",
|
||||
"location": "[resourceGroup().location]",
|
||||
"subnets": [
|
||||
{
|
||||
"name": "[variables('staticSubnetName')]",
|
||||
"properties": {
|
||||
"addressSpace": {
|
||||
"addressPrefixes": [
|
||||
"[variables('virtualNetworkAddressRange')]"
|
||||
]
|
||||
},
|
||||
"subnets": [
|
||||
{
|
||||
"name": "[variables('staticSubnetName')]",
|
||||
"properties": {
|
||||
"addressPrefix": "[variables('vmNetworkSubnet')]",
|
||||
"networkSecurityGroup": {
|
||||
"id": "[variables('nsgID')]"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"dependsOn": [
|
||||
"[variables('nsgID')]"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Network/publicIPAddresses",
|
||||
"name": "[variables('publicIPAddressName')]",
|
||||
"apiVersion": "2015-05-01-preview",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"publicIPAllocationMethod": "Dynamic",
|
||||
"dnsSettings": {
|
||||
"domainNameLabel": "[variables('dnsPrefix')]"
|
||||
}
|
||||
},
|
||||
"dependsOn": [
|
||||
"[variables('vnetID')]"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Network/loadBalancers",
|
||||
"name": "[variables('publiclbName')]",
|
||||
"apiVersion": "2015-05-01-preview",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"frontendIPConfigurations": [
|
||||
{
|
||||
"name": "[variables('lbFE')]",
|
||||
"properties": {
|
||||
"publicIPAddress": {
|
||||
"id": "[resourceId('Microsoft.Network/publicIPAddresses',variables('publicIPAddressName'))]"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"inboundNatRules": [
|
||||
{
|
||||
"name": "[variables('rpdNAT')]",
|
||||
"properties": {
|
||||
"frontendIPConfiguration": {
|
||||
"id": "[variables('publiclbFEConfigID')]"
|
||||
},
|
||||
"protocol": "tcp",
|
||||
"frontendPort": "[variables('rdpPort')]",
|
||||
"backendPort": 3389,
|
||||
"enableFloatingIP": false
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"dependsOn": [
|
||||
"[variables('publicIPAddressName')]"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Storage/storageAccounts",
|
||||
"name": "[variables('storageName')]",
|
||||
"apiVersion": "2015-05-01-preview",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"accountType": "[variables('storageAccountType')]"
|
||||
},
|
||||
"dependsOn": [
|
||||
"[variables('publiclbName')]"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Network/networkInterfaces",
|
||||
"name": "[concat(variables('NICPrefix'), '0')]",
|
||||
"apiVersion": "2015-05-01-preview",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"ipConfigurations": [
|
||||
{
|
||||
"name": "ipconfig1",
|
||||
"properties": {
|
||||
"privateIPAllocationMethod": "Dynamic",
|
||||
"subnet": {
|
||||
"id": "[variables('staticSubnetRef')]"
|
||||
},
|
||||
"loadBalancerInboundNatRules": [
|
||||
{
|
||||
"id": "[variables('rDPNATRuleID')]"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"dependsOn": [
|
||||
"[variables('vnetID')]",
|
||||
"[variables('publiclbName')]"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Network/networkInterfaces",
|
||||
"name": "[concat(variables('NICPrefix'), '1')]",
|
||||
"apiVersion": "2015-05-01-preview",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"ipConfigurations": [
|
||||
{
|
||||
"name": "ipconfig1",
|
||||
"properties": {
|
||||
"privateIPAllocationMethod": "Dynamic",
|
||||
"subnet": {
|
||||
"id": "[variables('staticSubnetRef')]"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"dependsOn": [
|
||||
"[variables('vnetID')]",
|
||||
"[variables('publiclbName')]"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Compute/virtualMachines",
|
||||
"name": "[concat(variables('vmName'), '0')]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"hardwareProfile": {
|
||||
"vmSize": "[variables('vmSize')]"
|
||||
},
|
||||
"osProfile": {
|
||||
"computerName": "[concat(variables('vmName'), '0')]",
|
||||
"adminUsername": "[parameters('adminUsername')]",
|
||||
"adminPassword": "[parameters('adminPassword')]"
|
||||
},
|
||||
"storageProfile": {
|
||||
"imageReference": {
|
||||
"publisher": "[variables('windowsImagePublisher')]",
|
||||
"offer": "[variables('windowsImageOffer')]",
|
||||
"sku": "[variables('windowsImageSKU')]",
|
||||
"version": "[variables('windowsImageVersion')]"
|
||||
},
|
||||
"osDisk": {
|
||||
"name": "osdisk",
|
||||
"vhd": {
|
||||
"uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('storageName')),providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]).primaryEndpoints.blob, variables('vmContainerName'),'/', variables('vmName'), '0','-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'),'/', variables('vmName'), '0','data-1.vhd')]"
|
||||
},
|
||||
"name": "[concat(variables('vmName'), '0','-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'),'/', variables('vmName'), '0','data-2.vhd')]"
|
||||
},
|
||||
"name": "[concat(variables('vmName'), '0','-data-disk2')]",
|
||||
"createOption": "Empty",
|
||||
"caching": "None",
|
||||
"diskSizeGB": "[variables('dataDiskSize')]",
|
||||
"lun": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
"networkProfile": {
|
||||
"networkInterfaces": [
|
||||
{
|
||||
"properties": {
|
||||
"primary": true
|
||||
},
|
||||
"id": "[resourceId('Microsoft.Network/networkInterfaces',concat(variables('NICPrefix'), '0'))]"
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"primary": false
|
||||
},
|
||||
"id": "[resourceId('Microsoft.Network/networkInterfaces',concat(variables('NICPrefix'), '1'))]"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"dependsOn": [
|
||||
"[resourceId('Microsoft.Network/networkInterfaces',concat(variables('NICPrefix'), '0'))]",
|
||||
"[resourceId('Microsoft.Network/networkInterfaces',concat(variables('NICPrefix'), '1'))]"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Compute/virtualMachines/extensions",
|
||||
"name": "[concat(variables('vmName'), '0','/DSCExtension-EnableWindowsFeature')]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"publisher": "Microsoft.Powershell",
|
||||
"type": "DSC",
|
||||
"typeHandlerVersion": "2.8",
|
||||
"autoUpgradeMinorVersion": "true",
|
||||
"settings": {
|
||||
"modulesUrl": "[variables('ModulesURL')]",
|
||||
"configurationFunction": "[variables('ConfigurationFunction')]",
|
||||
"properties": {
|
||||
"featureName": "[variables('WindowsFeatureName')]"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dependsOn": [
|
||||
"[concat(variables('vmName'), '0')]"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Compute/virtualMachines/extensions",
|
||||
"name": "[concat(variables('vmName'), '0','/BGInfoExtension')]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"publisher": "Microsoft.Compute",
|
||||
"autoUpgradeMinorVersion": true,
|
||||
"type": "BGInfo",
|
||||
"typeHandlerVersion": "2.1",
|
||||
"settings": {
|
||||
"Properties": [ ]
|
||||
}
|
||||
},
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Compute/virtualMachines/',variables('vmName'), '0','/extensions/DSCExtension-EnableWindowsFeature')]"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Compute/virtualMachines/extensions",
|
||||
"name": "[concat(variables('vmName'), '0','/CustomScriptExtension-VerifyWindowsFeature')]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"publisher": "Microsoft.Compute",
|
||||
"type": "CustomScriptExtension",
|
||||
"typeHandlerVersion": "1.4",
|
||||
"autoUpgradeMinorVersion": true,
|
||||
"settings": {
|
||||
"fileUris": [
|
||||
"[variables('scriptFile')]"
|
||||
],
|
||||
"commandToExecute": "[concat('powershell -ExecutionPolicy Unrestricted -file ',variables('scriptFileName'), ' ', variables('WindowsFeatureName'))]"
|
||||
}
|
||||
},
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Compute/virtualMachines/', variables('vmName'), '0','/extensions/BGInfoExtension')]"
|
||||
]
|
||||
"addressPrefix": "[variables('vmNetworkSubnet')]",
|
||||
"networkSecurityGroup": {
|
||||
"id": "[variables('nsgID')]"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"dependsOn": [
|
||||
"[variables('nsgID')]"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Network/publicIPAddresses",
|
||||
"name": "[variables('publicIPAddressName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"publicIPAllocationMethod": "Dynamic",
|
||||
"dnsSettings": {
|
||||
"domainNameLabel": "[variables('dnsPrefix')]"
|
||||
}
|
||||
],
|
||||
"outputs": { }
|
||||
},
|
||||
"dependsOn": [
|
||||
"[variables('vnetID')]"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Network/loadBalancers",
|
||||
"name": "[variables('publiclbName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"frontendIPConfigurations": [
|
||||
{
|
||||
"name": "[variables('lbFE')]",
|
||||
"properties": {
|
||||
"publicIPAddress": {
|
||||
"id": "[resourceId('Microsoft.Network/publicIPAddresses',variables('publicIPAddressName'))]"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"inboundNatRules": [
|
||||
{
|
||||
"name": "[variables('rpdNAT')]",
|
||||
"properties": {
|
||||
"frontendIPConfiguration": {
|
||||
"id": "[variables('publiclbFEConfigID')]"
|
||||
},
|
||||
"protocol": "tcp",
|
||||
"frontendPort": "[variables('rdpPort')]",
|
||||
"backendPort": 3389,
|
||||
"enableFloatingIP": false
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"dependsOn": [
|
||||
"[variables('publicIPAddressName')]"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Storage/storageAccounts",
|
||||
"name": "[variables('storageName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"accountType": "[variables('storageAccountType')]"
|
||||
},
|
||||
"dependsOn": [
|
||||
"[variables('publiclbName')]"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Network/networkInterfaces",
|
||||
"name": "[concat(variables('NICPrefix'), '0')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"ipConfigurations": [
|
||||
{
|
||||
"name": "ipconfig1",
|
||||
"properties": {
|
||||
"privateIPAllocationMethod": "Dynamic",
|
||||
"subnet": {
|
||||
"id": "[variables('staticSubnetRef')]"
|
||||
},
|
||||
"loadBalancerInboundNatRules": [
|
||||
{
|
||||
"id": "[variables('rDPNATRuleID')]"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"dependsOn": [
|
||||
"[variables('vnetID')]",
|
||||
"[variables('publiclbName')]"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Network/networkInterfaces",
|
||||
"name": "[concat(variables('NICPrefix'), '1')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"ipConfigurations": [
|
||||
{
|
||||
"name": "ipconfig1",
|
||||
"properties": {
|
||||
"privateIPAllocationMethod": "Dynamic",
|
||||
"subnet": {
|
||||
"id": "[variables('staticSubnetRef')]"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"dependsOn": [
|
||||
"[variables('vnetID')]",
|
||||
"[variables('publiclbName')]"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Compute/virtualMachines",
|
||||
"name": "[concat(variables('vmName'), '0')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"hardwareProfile": {
|
||||
"vmSize": "[variables('vmSize')]"
|
||||
},
|
||||
"osProfile": {
|
||||
"computerName": "[concat(variables('vmName'), '0')]",
|
||||
"adminUsername": "[parameters('adminUsername')]",
|
||||
"adminPassword": "[parameters('adminPassword')]"
|
||||
},
|
||||
"storageProfile": {
|
||||
"imageReference": {
|
||||
"publisher": "[variables('windowsImagePublisher')]",
|
||||
"offer": "[variables('windowsImageOffer')]",
|
||||
"sku": "[variables('windowsImageSKU')]",
|
||||
"version": "[variables('windowsImageVersion')]"
|
||||
},
|
||||
"osDisk": {
|
||||
"name": "osdisk",
|
||||
"vhd": {
|
||||
"uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('storageName')),providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]).primaryEndpoints.blob, variables('vmContainerName'),'/', variables('vmName'), '0','-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'),'/', variables('vmName'), '0','data-1.vhd')]"
|
||||
},
|
||||
"name": "[concat(variables('vmName'), '0','-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'),'/', variables('vmName'), '0','data-2.vhd')]"
|
||||
},
|
||||
"name": "[concat(variables('vmName'), '0','-data-disk2')]",
|
||||
"createOption": "Empty",
|
||||
"caching": "None",
|
||||
"diskSizeGB": "[variables('dataDiskSize')]",
|
||||
"lun": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
"networkProfile": {
|
||||
"networkInterfaces": [
|
||||
{
|
||||
"properties": {
|
||||
"primary": true
|
||||
},
|
||||
"id": "[resourceId('Microsoft.Network/networkInterfaces',concat(variables('NICPrefix'), '0'))]"
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"primary": false
|
||||
},
|
||||
"id": "[resourceId('Microsoft.Network/networkInterfaces',concat(variables('NICPrefix'), '1'))]"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"dependsOn": [
|
||||
"[resourceId('Microsoft.Network/networkInterfaces',concat(variables('NICPrefix'), '0'))]",
|
||||
"[resourceId('Microsoft.Network/networkInterfaces',concat(variables('NICPrefix'), '1'))]"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Compute/virtualMachines/extensions",
|
||||
"name": "[concat(variables('vmName'), '0','/DSCExtension-EnableWindowsFeature')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"publisher": "Microsoft.Powershell",
|
||||
"type": "DSC",
|
||||
"typeHandlerVersion": "2.8",
|
||||
"autoUpgradeMinorVersion": "true",
|
||||
"settings": {
|
||||
"modulesUrl": "[variables('ModulesURL')]",
|
||||
"configurationFunction": "[variables('ConfigurationFunction')]",
|
||||
"properties": {
|
||||
"featureName": "[variables('WindowsFeatureName')]"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dependsOn": [
|
||||
"[concat(variables('vmName'), '0')]"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Compute/virtualMachines/extensions",
|
||||
"name": "[concat(variables('vmName'), '0','/BGInfoExtension')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"publisher": "Microsoft.Compute",
|
||||
"autoUpgradeMinorVersion": true,
|
||||
"type": "BGInfo",
|
||||
"typeHandlerVersion": "2.1",
|
||||
"settings": {
|
||||
"Properties": []
|
||||
}
|
||||
},
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Compute/virtualMachines/',variables('vmName'), '0','/extensions/DSCExtension-EnableWindowsFeature')]"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Compute/virtualMachines/extensions",
|
||||
"name": "[concat(variables('vmName'), '0','/CustomScriptExtension-VerifyWindowsFeature')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"publisher": "Microsoft.Compute",
|
||||
"type": "CustomScriptExtension",
|
||||
"typeHandlerVersion": "1.4",
|
||||
"autoUpgradeMinorVersion": true,
|
||||
"settings": {
|
||||
"fileUris": [
|
||||
"[variables('scriptFile')]"
|
||||
],
|
||||
"commandToExecute": "[concat('powershell -ExecutionPolicy Unrestricted -file ',variables('scriptFileName'), ' ', variables('WindowsFeatureName'))]"
|
||||
}
|
||||
},
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Compute/virtualMachines/', variables('vmName'), '0','/extensions/BGInfoExtension')]"
|
||||
]
|
||||
}
|
||||
],
|
||||
"outputs": { }
|
||||
}
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"apiProfile": "2018-03-01-hybrid",
|
||||
"parameters": {
|
||||
"newStorageAccountName": {
|
||||
"type": "string",
|
||||
|
@ -61,7 +62,7 @@
|
|||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "Url of the certificate in Key Vault"
|
||||
},
|
||||
},
|
||||
"defaultValue": "https://testkv001.vault.local.azurestack.external:443/secrets/testcert002/xxxx"
|
||||
},
|
||||
"osImageSku": {
|
||||
|
@ -70,26 +71,26 @@
|
|||
"allowedValues": [
|
||||
"2012-R2-Datacenter",
|
||||
"2016-Datacenter-Server-Core",
|
||||
"2016-Datacenter"
|
||||
"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, 2016-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."
|
||||
}
|
||||
}
|
||||
"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."
|
||||
}
|
||||
}
|
||||
},
|
||||
"variables": {
|
||||
"vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]",
|
||||
|
@ -100,20 +101,18 @@
|
|||
"virtualNetworkName": "certVNET",
|
||||
"addressPrefix": "10.0.0.0/16",
|
||||
"publicIPName": "certPublicIP",
|
||||
"publicIPAddressType": "Dynamic"
|
||||
"publicIPAddressType": "Dynamic"
|
||||
},
|
||||
"resources": [
|
||||
{
|
||||
"type": "Microsoft.Storage/storageAccounts",
|
||||
"name": "[parameters('newStorageAccountName')]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"accountType": "[parameters('storageAccountType')]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "2015-06-15",
|
||||
"type": "Microsoft.Network/publicIPAddresses",
|
||||
"name": "[variables('publicIPName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
|
@ -122,7 +121,6 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "2015-06-15",
|
||||
"type": "Microsoft.Network/virtualNetworks",
|
||||
"name": "[variables('virtualNetworkName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
|
@ -143,7 +141,6 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "2015-06-15",
|
||||
"type": "Microsoft.Network/networkInterfaces",
|
||||
"name": "[variables('nicName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
|
@ -169,7 +166,6 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "2015-06-15",
|
||||
"type": "Microsoft.Compute/virtualMachines",
|
||||
"name": "[parameters('vmName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"apiProfile": "2018-03-01-hybrid",
|
||||
"parameters": {
|
||||
"vmSku": {
|
||||
"defaultValue": "Standard_A1",
|
||||
|
@ -89,7 +90,6 @@
|
|||
{
|
||||
"type": "Microsoft.Storage/storageAccounts",
|
||||
"name": "[variables('storageAccountName')]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"location": "[variables('location')]",
|
||||
"properties": {
|
||||
"accountType": "[variables('storageAccountType')]"
|
||||
|
@ -98,7 +98,6 @@
|
|||
{
|
||||
"type": "Microsoft.Network/publicIPAddresses",
|
||||
"name": "[variables('publicIPAddressName')]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"location": "[variables('location')]",
|
||||
"properties": {
|
||||
"publicIPAllocationMethod": "Dynamic",
|
||||
|
@ -110,7 +109,6 @@
|
|||
{
|
||||
"type": "Microsoft.Network/loadBalancers",
|
||||
"name": "[variables('loadBalancerName')]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"location": "[variables('location')]",
|
||||
"properties": {
|
||||
"frontendIPConfigurations": [
|
||||
|
@ -187,7 +185,6 @@
|
|||
"capacity": "[parameters('instanceCount')]"
|
||||
},
|
||||
"name": "[parameters('vmssName')]",
|
||||
"apiVersion": "2016-03-30",
|
||||
"location": "[variables('location')]",
|
||||
"properties": {
|
||||
"upgradePolicy": {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"apiProfile": "2018-03-01-hybrid",
|
||||
"parameters": {
|
||||
"vmSku": {
|
||||
"defaultValue": "Standard_D1",
|
||||
|
@ -82,7 +83,6 @@
|
|||
{
|
||||
"type": "Microsoft.Storage/storageAccounts",
|
||||
"name": "[variables('storageAccountName')]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"location": "[variables('location')]",
|
||||
"properties": {
|
||||
"accountType": "[variables('storageAccountType')]"
|
||||
|
@ -91,7 +91,6 @@
|
|||
{
|
||||
"type": "Microsoft.Network/virtualNetworks",
|
||||
"name": "[variables('vnetName')]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"location": "[variables('location')]",
|
||||
"properties": {
|
||||
"addressSpace": {
|
||||
|
@ -112,7 +111,6 @@
|
|||
{
|
||||
"type": "Microsoft.Network/publicIPAddresses",
|
||||
"name": "[variables('publicIPAddressName')]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"location": "[variables('location')]",
|
||||
"properties": {
|
||||
"publicIPAllocationMethod": "Dynamic",
|
||||
|
@ -124,7 +122,6 @@
|
|||
{
|
||||
"type": "Microsoft.Network/loadBalancers",
|
||||
"name": "[variables('loadBalancerName')]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"location": "[variables('location')]",
|
||||
"properties": {
|
||||
"frontendIPConfigurations": [
|
||||
|
@ -201,7 +198,6 @@
|
|||
"capacity": "[parameters('instanceCount')]"
|
||||
},
|
||||
"name": "[parameters('vmssName')]",
|
||||
"apiVersion": "2016-03-30",
|
||||
"location": "[variables('location')]",
|
||||
"properties": {
|
||||
"upgradePolicy": {
|
||||
|
|
|
@ -1,24 +1,24 @@
|
|||
{
|
||||
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"parameters": {
|
||||
"parameters": {
|
||||
"vmSku": {
|
||||
"value": "Standard_D1"
|
||||
},
|
||||
"vmssName": {
|
||||
"value" : "GEN-UNIQUE-vmssname"
|
||||
"value": "GEN-UNIQUE-vmssname"
|
||||
},
|
||||
"instanceCount": {
|
||||
"value": 2
|
||||
},
|
||||
"adminUsername": {
|
||||
"value": "GEN-UNIQUE-admin"
|
||||
"value": "GEN-UNIQUE-admin"
|
||||
},
|
||||
"adminPassword": {
|
||||
"value": "GEN-UNIQUE-admin@2018"
|
||||
"value": "GEN-UNIQUE-admin@2018"
|
||||
},
|
||||
"osImagePublisher": {
|
||||
"defaultValue": "Canonical"
|
||||
"value": "Canonical"
|
||||
},
|
||||
"osImageOffer": {
|
||||
"value": "UbuntuServer"
|
||||
|
@ -26,4 +26,5 @@
|
|||
"osImageSku": {
|
||||
"value": "16.04-LTS"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"apiProfile": "2018-03-01-hybrid",
|
||||
"parameters": {
|
||||
"vmSku": {
|
||||
"defaultValue": "Standard_A1",
|
||||
|
@ -91,7 +92,6 @@
|
|||
"type": "Microsoft.Storage/storageAccounts",
|
||||
"name": "[concat(variables('storageAccountSuffix'), copyIndex())]",
|
||||
"location": "[variables('location')]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"copy": {
|
||||
"name": "storageLoop",
|
||||
"count": "[variables('saCount')]"
|
||||
|
@ -103,7 +103,6 @@
|
|||
{
|
||||
"type": "Microsoft.Network/virtualNetworks",
|
||||
"name": "[variables('vnetName')]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"location": "[variables('location')]",
|
||||
"properties": {
|
||||
"addressSpace": {
|
||||
|
@ -124,7 +123,6 @@
|
|||
{
|
||||
"type": "Microsoft.Network/publicIPAddresses",
|
||||
"name": "[variables('publicIPAddressName')]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"location": "[variables('location')]",
|
||||
"properties": {
|
||||
"publicIPAllocationMethod": "Dynamic",
|
||||
|
@ -136,7 +134,6 @@
|
|||
{
|
||||
"type": "Microsoft.Network/loadBalancers",
|
||||
"name": "[variables('loadBalancerName')]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"location": "[variables('location')]",
|
||||
"properties": {
|
||||
"frontendIPConfigurations": [
|
||||
|
@ -213,7 +210,6 @@
|
|||
"capacity": "[parameters('instanceCount')]"
|
||||
},
|
||||
"name": "[parameters('vmssName')]",
|
||||
"apiVersion": "2016-03-30",
|
||||
"location": "[variables('location')]",
|
||||
"properties": {
|
||||
"upgradePolicy": {
|
||||
|
|
|
@ -1,17 +1,18 @@
|
|||
{
|
||||
"$schema":"http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json",
|
||||
"contentVersion":"1.0.0.0",
|
||||
"parameters":{
|
||||
"existingVmssName":{
|
||||
"type":"string",
|
||||
"metadata":{
|
||||
"description":"Name of existing VM Scale Set."
|
||||
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"apiProfile": "2018-03-01-hybrid",
|
||||
"parameters": {
|
||||
"existingVmssName": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "Name of existing VM Scale Set."
|
||||
}
|
||||
},
|
||||
"newCapacity":{
|
||||
"type":"int",
|
||||
"metadata":{
|
||||
"description":"Number of desired VM instances."
|
||||
"newCapacity": {
|
||||
"type": "int",
|
||||
"metadata": {
|
||||
"description": "Number of desired VM instances."
|
||||
}
|
||||
},
|
||||
"vmSku": {
|
||||
|
@ -22,16 +23,15 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"resources":[
|
||||
"resources": [
|
||||
{
|
||||
"type":"Microsoft.Compute/virtualMachineScaleSets",
|
||||
"apiVersion":"2016-03-30",
|
||||
"name":"[parameters('existingVmssName')]",
|
||||
"location":"[resourceGroup().location]",
|
||||
"sku":{
|
||||
"name":"[parameters('vmSku')]",
|
||||
"tier":"Standard",
|
||||
"capacity":"[parameters('newCapacity')]"
|
||||
"type": "Microsoft.Compute/virtualMachineScaleSets",
|
||||
"name": "[parameters('existingVmssName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"sku": {
|
||||
"name": "[parameters('vmSku')]",
|
||||
"tier": "Standard",
|
||||
"capacity": "[parameters('newCapacity')]"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"apiProfile": "2018-03-01-hybrid",
|
||||
"parameters": {
|
||||
"vmSku": {
|
||||
"defaultValue": "Standard_D1",
|
||||
|
@ -69,7 +70,6 @@
|
|||
{
|
||||
"type": "Microsoft.Storage/storageAccounts",
|
||||
"name": "[variables('storageAccountName')]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"location": "[variables('location')]",
|
||||
"properties": {
|
||||
"accountType": "[variables('storageAccountType')]"
|
||||
|
@ -78,7 +78,6 @@
|
|||
{
|
||||
"type": "Microsoft.Network/virtualNetworks",
|
||||
"name": "[variables('vnetName')]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"location": "[variables('location')]",
|
||||
"properties": {
|
||||
"addressSpace": {
|
||||
|
@ -99,7 +98,6 @@
|
|||
{
|
||||
"type": "Microsoft.Network/publicIPAddresses",
|
||||
"name": "[variables('publicIPAddressName')]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"location": "[variables('location')]",
|
||||
"properties": {
|
||||
"publicIPAllocationMethod": "Dynamic",
|
||||
|
@ -111,7 +109,6 @@
|
|||
{
|
||||
"type": "Microsoft.Network/loadBalancers",
|
||||
"name": "[variables('loadBalancerName')]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"location": "[variables('location')]",
|
||||
"properties": {
|
||||
"frontendIPConfigurations": [
|
||||
|
@ -188,7 +185,6 @@
|
|||
"capacity": "[parameters('instanceCount')]"
|
||||
},
|
||||
"name": "[parameters('vmssName')]",
|
||||
"apiVersion": "2016-03-30",
|
||||
"location": "[variables('location')]",
|
||||
"properties": {
|
||||
"upgradePolicy": {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"apiProfile": "2018-03-01-hybrid",
|
||||
"parameters": {
|
||||
"vmSku": {
|
||||
"defaultValue": "Standard_D1",
|
||||
|
@ -103,7 +104,6 @@
|
|||
{
|
||||
"type": "Microsoft.Storage/storageAccounts",
|
||||
"name": "[variables('storageAccountName')]",
|
||||
"apiVersion": "2018-02-01",
|
||||
"location": "[variables('location')]",
|
||||
"properties": {
|
||||
"accountType": "[variables('storageAccountType')]"
|
||||
|
@ -112,7 +112,6 @@
|
|||
{
|
||||
"type": "Microsoft.Network/virtualNetworks",
|
||||
"name": "[variables('vnetName')]",
|
||||
"apiVersion": "2018-04-01",
|
||||
"location": "[variables('location')]",
|
||||
"properties": {
|
||||
"addressSpace": {
|
||||
|
@ -133,7 +132,6 @@
|
|||
{
|
||||
"type": "Microsoft.Network/publicIPAddresses",
|
||||
"name": "[variables('publicIPAddressName')]",
|
||||
"apiVersion": "2017-06-01",
|
||||
"location": "[variables('location')]",
|
||||
"properties": {
|
||||
"publicIPAllocationMethod": "Dynamic",
|
||||
|
@ -145,7 +143,6 @@
|
|||
{
|
||||
"type": "Microsoft.Network/loadBalancers",
|
||||
"name": "[variables('loadBalancerName')]",
|
||||
"apiVersion": "2017-10-01",
|
||||
"location": "[variables('location')]",
|
||||
"properties": {
|
||||
"frontendIPConfigurations": [
|
||||
|
@ -222,7 +219,6 @@
|
|||
"capacity": "[parameters('instanceCount')]"
|
||||
},
|
||||
"name": "[parameters('vmssName')]",
|
||||
"apiVersion": "2018-04-01",
|
||||
"location": "[variables('location')]",
|
||||
"properties": {
|
||||
"upgradePolicy": {
|
||||
|
@ -284,9 +280,9 @@
|
|||
"extensions": [
|
||||
{
|
||||
"name": "customScript",
|
||||
"type": "CustomScriptExtension"
|
||||
"properties": {
|
||||
"publisher": "Microsoft.Compute",
|
||||
"type": "CustomScriptExtension",
|
||||
"settings": {
|
||||
"fileUris": [
|
||||
"[concat(parameters('_artifactsLocation'), '/scripts/helloWorld.ps1')]"
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"apiProfile": "2018-03-01-hybrid",
|
||||
"parameters": {
|
||||
"vmSku": {
|
||||
"defaultValue": "Standard_D1",
|
||||
|
@ -96,7 +97,6 @@
|
|||
"type": "Microsoft.Storage/storageAccounts",
|
||||
"name": "[concat(variables('storageAccountSuffix'), copyIndex())]",
|
||||
"location": "[variables('location')]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"copy": {
|
||||
"name": "storageLoop",
|
||||
"count": "[variables('saCount')]"
|
||||
|
@ -108,7 +108,6 @@
|
|||
{
|
||||
"type": "Microsoft.Network/virtualNetworks",
|
||||
"name": "[variables('vnetName')]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"location": "[variables('location')]",
|
||||
"properties": {
|
||||
"addressSpace": {
|
||||
|
@ -129,7 +128,6 @@
|
|||
{
|
||||
"type": "Microsoft.Network/publicIPAddresses",
|
||||
"name": "[variables('publicIPAddressName')]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"location": "[variables('location')]",
|
||||
"properties": {
|
||||
"publicIPAllocationMethod": "Dynamic",
|
||||
|
@ -141,7 +139,6 @@
|
|||
{
|
||||
"type": "Microsoft.Network/loadBalancers",
|
||||
"name": "[variables('loadBalancerName')]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"location": "[variables('location')]",
|
||||
"properties": {
|
||||
"frontendIPConfigurations": [
|
||||
|
@ -218,7 +215,6 @@
|
|||
"capacity": "[parameters('instanceCount')]"
|
||||
},
|
||||
"name": "[parameters('vmssName')]",
|
||||
"apiVersion": "2016-03-30",
|
||||
"location": "[variables('location')]",
|
||||
"properties": {
|
||||
"upgradePolicy": {
|
||||
|
|
|
@ -1,68 +1,67 @@
|
|||
{
|
||||
"$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"parameters": {
|
||||
"appname": {
|
||||
"type": "String"
|
||||
},
|
||||
"hostingPlanName": {
|
||||
"type": "String"
|
||||
},
|
||||
"hostingEnvironment": {
|
||||
"type": "String"
|
||||
},
|
||||
"location": {
|
||||
"type": "String"
|
||||
},
|
||||
"sku": {
|
||||
"type": "String"
|
||||
},
|
||||
"skuCode": {
|
||||
"type": "String"
|
||||
},
|
||||
"workerSize": {
|
||||
"type": "String"
|
||||
},
|
||||
"serverFarmResourceGroup": {
|
||||
"type": "String"
|
||||
},
|
||||
"subscriptionId": {
|
||||
"type": "String"
|
||||
}
|
||||
"$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"apiProfile": "2018-03-01-hybrid",
|
||||
"parameters": {
|
||||
"appname": {
|
||||
"type": "String"
|
||||
},
|
||||
"resources": [
|
||||
{
|
||||
"type": "Microsoft.Web/sites",
|
||||
"name": "[parameters('appname')]",
|
||||
"apiVersion": "2016-03-01",
|
||||
"location": "[parameters('location')]",
|
||||
"tags": {
|
||||
"[concat('hidden-related:', '/subscriptions/', parameters('subscriptionId'),'/resourcegroups/', parameters('serverFarmResourceGroup'), '/providers/Microsoft.Web/serverfarms/', parameters('hostingPlanName'))]": "empty"
|
||||
},
|
||||
"properties": {
|
||||
"name": "[parameters('appname')]",
|
||||
"serverFarmId": "[concat('/subscriptions/', parameters('subscriptionId'),'/resourcegroups/', parameters('serverFarmResourceGroup'), '/providers/Microsoft.Web/serverfarms/', parameters('hostingPlanName'))]",
|
||||
"hostingEnvironment": "[parameters('hostingEnvironment')]"
|
||||
},
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Web/serverfarms/', parameters('hostingPlanName'))]"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Web/serverfarms",
|
||||
"sku": {
|
||||
"Tier": "[parameters('sku')]",
|
||||
"Name": "[parameters('skuCode')]"
|
||||
},
|
||||
"name": "[parameters('hostingPlanName')]",
|
||||
"apiVersion": "2016-09-01",
|
||||
"location": "[parameters('location')]",
|
||||
"properties": {
|
||||
"name": "[parameters('hostingPlanName')]",
|
||||
"workerSizeId": "[parameters('workerSize')]",
|
||||
"numberOfWorkers": "1",
|
||||
"hostingEnvironment": "[parameters('hostingEnvironment')]"
|
||||
}
|
||||
}
|
||||
]
|
||||
"hostingPlanName": {
|
||||
"type": "String"
|
||||
},
|
||||
"hostingEnvironment": {
|
||||
"type": "String"
|
||||
},
|
||||
"location": {
|
||||
"type": "String"
|
||||
},
|
||||
"sku": {
|
||||
"type": "String"
|
||||
},
|
||||
"skuCode": {
|
||||
"type": "String"
|
||||
},
|
||||
"workerSize": {
|
||||
"type": "String"
|
||||
},
|
||||
"serverFarmResourceGroup": {
|
||||
"type": "String"
|
||||
},
|
||||
"subscriptionId": {
|
||||
"type": "String"
|
||||
}
|
||||
},
|
||||
"resources": [
|
||||
{
|
||||
"type": "Microsoft.Web/sites",
|
||||
"name": "[parameters('appname')]",
|
||||
"location": "[parameters('location')]",
|
||||
"tags": {
|
||||
"[concat('hidden-related:', '/subscriptions/', parameters('subscriptionId'),'/resourcegroups/', parameters('serverFarmResourceGroup'), '/providers/Microsoft.Web/serverfarms/', parameters('hostingPlanName'))]": "empty"
|
||||
},
|
||||
"properties": {
|
||||
"name": "[parameters('appname')]",
|
||||
"serverFarmId": "[concat('/subscriptions/', parameters('subscriptionId'),'/resourcegroups/', parameters('serverFarmResourceGroup'), '/providers/Microsoft.Web/serverfarms/', parameters('hostingPlanName'))]",
|
||||
"hostingEnvironment": "[parameters('hostingEnvironment')]"
|
||||
},
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Web/serverfarms/', parameters('hostingPlanName'))]"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Web/serverfarms",
|
||||
"sku": {
|
||||
"Tier": "[parameters('sku')]",
|
||||
"Name": "[parameters('skuCode')]"
|
||||
},
|
||||
"name": "[parameters('hostingPlanName')]",
|
||||
"location": "[parameters('location')]",
|
||||
"properties": {
|
||||
"name": "[parameters('hostingPlanName')]",
|
||||
"workerSizeId": "[parameters('workerSize')]",
|
||||
"numberOfWorkers": "1",
|
||||
"hostingEnvironment": "[parameters('hostingEnvironment')]"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
|
@ -4,19 +4,21 @@
|
|||
|
||||
"contentVersion": "1.0.0.0",
|
||||
|
||||
"apiProfile": "2018-03-01-hybrid",
|
||||
|
||||
"parameters": {
|
||||
|
||||
"vmName": {
|
||||
|
||||
"type": "string",
|
||||
"type": "string",
|
||||
|
||||
"metadata": {
|
||||
"metadata": {
|
||||
|
||||
"description": "Name of the existing VM to apply the custom script to"
|
||||
"description": "Name of the existing VM to apply the custom script to"
|
||||
|
||||
},
|
||||
},
|
||||
|
||||
"defaultvalue": "[substring(concat('simplewinvm',resourceGroup().Name),0,12)]"
|
||||
"defaultvalue": "[substring(concat('simplewinvm',resourceGroup().Name),0,12)]"
|
||||
|
||||
}
|
||||
|
||||
|
@ -34,8 +36,6 @@
|
|||
|
||||
"name": "[concat(parameters('vmName'),'/CustomScriptExtension')]",
|
||||
|
||||
"apiVersion": "2017-03-30",
|
||||
|
||||
"location": "[resourceGroup().location]",
|
||||
|
||||
"properties": {
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
|
||||
"contentVersion": "1.0.0.0",
|
||||
|
||||
"apiProfile": "2018-03-01-hybrid",
|
||||
|
||||
"parameters": {
|
||||
"vmSku": {
|
||||
"defaultValue": "Standard_A1",
|
||||
|
@ -94,7 +96,6 @@
|
|||
{
|
||||
"type": "Microsoft.Storage/storageAccounts",
|
||||
"name": "[variables('storageAccountName')]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"location": "[variables('location')]",
|
||||
"properties": {
|
||||
"accountType": "[variables('storageAccountType')]"
|
||||
|
@ -104,7 +105,6 @@
|
|||
{
|
||||
"type": "Microsoft.Network/virtualNetworks",
|
||||
"name": "[variables('vnetName')]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"location": "[variables('location')]",
|
||||
"properties": {
|
||||
"addressSpace": {
|
||||
|
@ -127,7 +127,6 @@
|
|||
{
|
||||
"type": "Microsoft.Network/publicIPAddresses",
|
||||
"name": "[variables('publicIPAddressName')]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"location": "[variables('location')]",
|
||||
"properties": {
|
||||
"publicIPAllocationMethod": "Dynamic",
|
||||
|
@ -140,10 +139,10 @@
|
|||
{
|
||||
"type": "Microsoft.Network/loadBalancers",
|
||||
"name": "[variables('loadBalancerName')]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"location": "[variables('location')]",
|
||||
"properties": {
|
||||
"frontendIPConfigurations": [ {
|
||||
"frontendIPConfigurations": [
|
||||
{
|
||||
|
||||
"name": "[variables('loadBalancerFrontEndName')]",
|
||||
"properties": {
|
||||
|
@ -226,7 +225,6 @@
|
|||
},
|
||||
|
||||
"name": "[parameters('vmssName')]",
|
||||
"apiVersion": "2017-03-30",
|
||||
"location": "[variables('location')]",
|
||||
"properties": {
|
||||
"upgradePolicy": {
|
||||
|
@ -256,12 +254,12 @@
|
|||
"networkProfile": {
|
||||
"networkInterfaceConfigurations": [
|
||||
{
|
||||
"name": "nic",
|
||||
"name": "nic",
|
||||
"properties": {
|
||||
"primary": "true",
|
||||
"ipConfigurations": [
|
||||
{
|
||||
"name": "ipconfig",
|
||||
"name": "ipconfig",
|
||||
"properties": {
|
||||
"subnet": {
|
||||
"id": "[variables('subnetRef')]"
|
||||
|
|
|
@ -1,51 +1,51 @@
|
|||
{
|
||||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"parameters": {
|
||||
"vmName": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "Name of an existing Windows VM to install the MMA agent and link to an existing OMS workspace"
|
||||
},
|
||||
"defaultValue": "AzureStackVMname"
|
||||
},
|
||||
"workspaceId": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "Target an existing Azure OMS workspace ID e.g. XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX "
|
||||
},
|
||||
"defaultValue": "Existing-Azure-OMS-workspace-ID"
|
||||
},
|
||||
"workspaceKey": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "Target Azure OMS workspace key"
|
||||
}
|
||||
}
|
||||
"$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 an existing Windows VM to install the MMA agent and link to an existing OMS workspace"
|
||||
},
|
||||
"defaultValue": "AzureStackVMname"
|
||||
},
|
||||
"variables": {
|
||||
"vmExtensionName": "MicrosoftMonitoringAgent"
|
||||
"workspaceId": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "Target an existing Azure OMS workspace ID e.g. XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX "
|
||||
},
|
||||
"defaultValue": "Existing-Azure-OMS-workspace-ID"
|
||||
},
|
||||
"resources": [
|
||||
{
|
||||
"apiVersion": "2015-06-15",
|
||||
"type": "Microsoft.Compute/virtualMachines/extensions",
|
||||
"name": "[concat(parameters('vmName'),'/', variables('vmExtensionName'))]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"dependsOn": [
|
||||
],
|
||||
"properties": {
|
||||
"publisher": "Microsoft.EnterpriseCloud.Monitoring",
|
||||
"type": "MicrosoftMonitoringAgent",
|
||||
"typeHandlerVersion": "1.0",
|
||||
"autoUpgradeMinorVersion": "true",
|
||||
"settings": {
|
||||
"workspaceId": "[parameters('workspaceId')]"
|
||||
},
|
||||
"protectedSettings": {
|
||||
"workspaceKey" : "[parameters('workspaceKey')]"
|
||||
}
|
||||
}
|
||||
"workspaceKey": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "Target Azure OMS workspace key"
|
||||
}
|
||||
}
|
||||
},
|
||||
"variables": {
|
||||
"vmExtensionName": "MicrosoftMonitoringAgent"
|
||||
},
|
||||
"resources": [
|
||||
{
|
||||
"type": "Microsoft.Compute/virtualMachines/extensions",
|
||||
"name": "[concat(parameters('vmName'),'/', variables('vmExtensionName'))]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"dependsOn": [
|
||||
],
|
||||
"properties": {
|
||||
"publisher": "Microsoft.EnterpriseCloud.Monitoring",
|
||||
"type": "MicrosoftMonitoringAgent",
|
||||
"typeHandlerVersion": "1.0",
|
||||
"autoUpgradeMinorVersion": "true",
|
||||
"settings": {
|
||||
"workspaceId": "[parameters('workspaceId')]"
|
||||
},
|
||||
"protectedSettings": {
|
||||
"workspaceKey": "[parameters('workspaceKey')]"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
|
||||
"apiProfile": "2018-03-01-hybrid",
|
||||
"parameters": {
|
||||
"adminUsername": {
|
||||
"type": "string",
|
||||
|
@ -27,11 +27,11 @@
|
|||
3,
|
||||
4,
|
||||
5,
|
||||
8,
|
||||
10,
|
||||
15,
|
||||
20,
|
||||
25
|
||||
8,
|
||||
10,
|
||||
15,
|
||||
20,
|
||||
25
|
||||
],
|
||||
|
||||
"metadata": {
|
||||
|
@ -43,9 +43,9 @@
|
|||
"type": "int",
|
||||
"defaultValue": 1,
|
||||
"allowedValues": [
|
||||
1,
|
||||
2,
|
||||
10,
|
||||
1,
|
||||
2,
|
||||
10,
|
||||
100,
|
||||
500,
|
||||
750,
|
||||
|
@ -144,278 +144,270 @@
|
|||
|
||||
"resources": [
|
||||
{
|
||||
"type": "Microsoft.Storage/storageAccounts",
|
||||
"name": "[variables('storageName')]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"accountType": "[variables('storageAccountType')]"
|
||||
},
|
||||
"type": "Microsoft.Storage/storageAccounts",
|
||||
"name": "[variables('storageName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"accountType": "[variables('storageAccountType')]"
|
||||
},
|
||||
|
||||
"dependsOn": [
|
||||
"[variables('publiclbName')]"
|
||||
"dependsOn": [
|
||||
"[variables('publiclbName')]"
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
"type": "Microsoft.Network/networkSecurityGroups",
|
||||
"name": "[variables('nsgName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"securityRules": [
|
||||
{
|
||||
"name": "rule1",
|
||||
"properties": {
|
||||
"protocol": "*",
|
||||
"sourcePortRange": "*",
|
||||
"destinationPortRange": "*",
|
||||
"sourceAddressPrefix": "*",
|
||||
"destinationAddressPrefix": "*",
|
||||
"access": "Allow",
|
||||
"priority": 101,
|
||||
"direction": "Inbound"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"type": "Microsoft.Network/networkSecurityGroups",
|
||||
"name": "[variables('nsgName')]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"securityRules": [
|
||||
{
|
||||
"name": "rule1",
|
||||
"properties": {
|
||||
"protocol": "*",
|
||||
"sourcePortRange": "*",
|
||||
"destinationPortRange": "*",
|
||||
"sourceAddressPrefix": "*",
|
||||
"destinationAddressPrefix": "*",
|
||||
"access": "Allow",
|
||||
"priority": 101,
|
||||
"direction": "Inbound"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"type": "Microsoft.Compute/availabilitySets",
|
||||
"name": "[variables('availabilitySetName')]",
|
||||
"apiVersion": "2017-03-30",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"platformFaultDomainCount": "3",
|
||||
"platformUpdateDomainCount": "5"
|
||||
},
|
||||
"sku": {
|
||||
"type": "Microsoft.Compute/availabilitySets",
|
||||
"name": "[variables('availabilitySetName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"platformFaultDomainCount": "3",
|
||||
"platformUpdateDomainCount": "5"
|
||||
},
|
||||
"sku": {
|
||||
"name": "Aligned"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"type": "Microsoft.Network/publicIPAddresses",
|
||||
"name": "[variables('publicIPAddressName')]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"publicIPAllocationMethod": "Dynamic",
|
||||
"dnsSettings": {
|
||||
"domainNameLabel": "[variables('dnsPrefix')]"
|
||||
"type": "Microsoft.Network/publicIPAddresses",
|
||||
"name": "[variables('publicIPAddressName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"publicIPAllocationMethod": "Dynamic",
|
||||
"dnsSettings": {
|
||||
"domainNameLabel": "[variables('dnsPrefix')]"
|
||||
}
|
||||
},
|
||||
|
||||
"dependsOn": [
|
||||
"[variables('vnetID')]"
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
"type": "Microsoft.Network/virtualNetworks",
|
||||
"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('vnetID')]"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
"dependsOn": [
|
||||
"[variables('nsgID')]"
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
"type": "Microsoft.Network/virtualNetworks",
|
||||
"name": "[variables('virtualNetworkName')]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"addressSpace": {
|
||||
"addressPrefixes": [
|
||||
"[variables('addressPrefix')]"
|
||||
]
|
||||
},
|
||||
"name": "[variables('publiclbName')]",
|
||||
"type": "Microsoft.Network/loadBalancers",
|
||||
"location": "[resourceGroup().location]",
|
||||
"dependsOn": [
|
||||
"[variables('vnetID')]",
|
||||
"[variables('publicIPAddressName')]"
|
||||
],
|
||||
|
||||
"subnets": [
|
||||
{
|
||||
"name": "[variables('subnetName')]",
|
||||
"properties": {
|
||||
"addressPrefix": "[variables('subnetPrefix')]",
|
||||
"networkSecurityGroup": {
|
||||
"id": "[variables('nsgID')]"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
"dependsOn": [
|
||||
"[variables('nsgID')]"
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
"apiVersion": "2015-06-15",
|
||||
"name": "[variables('publiclbName')]",
|
||||
"type": "Microsoft.Network/loadBalancers",
|
||||
"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"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
|
||||
"apiVersion": "2015-06-15",
|
||||
"type": "Microsoft.Network/loadBalancers/inboundNatRules",
|
||||
"name": "[concat(variables('publicLBName'), '/ssh-VM', copyIndex())]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"copy": {
|
||||
"name": "lbNatLoop",
|
||||
"count": "[parameters('numberOfInstances')]"
|
||||
},
|
||||
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Network/loadBalancers/', variables('publiclbName'))]"
|
||||
],
|
||||
|
||||
"properties": {
|
||||
"frontendIPConfiguration": {
|
||||
"id": "[variables('publiclbFEConfigID')]"
|
||||
},
|
||||
|
||||
"protocol": "tcp",
|
||||
"frontendPort": "[copyIndex(2200)]",
|
||||
"backendPort": 22,
|
||||
"enableFloatingIP": false
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"type": "Microsoft.Network/networkInterfaces",
|
||||
"name": "[concat(variables('NICPrefix'), parameters('vmNamePrefix'), copyIndex())]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"location": "[resourceGroup().location]",
|
||||
"copy": {
|
||||
"name": "nicLoop",
|
||||
"count": "[parameters('numberOfInstances')]"
|
||||
},
|
||||
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]",
|
||||
"[concat('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",
|
||||
"name": "[concat(parameters('vmNamePrefix'), copyIndex())]",
|
||||
"apiVersion": "2017-03-30",
|
||||
"location": "[resourceGroup().location]",
|
||||
|
||||
"copy": {
|
||||
"name": "virtualMachineLoop",
|
||||
"count": "[parameters('numberOfInstances')]"
|
||||
},
|
||||
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Storage/storageAccounts/',variables('storageName'))]",
|
||||
"[resourceId('Microsoft.Network/networkInterfaces', concat(variables('NICPrefix'), parameters('vmNamePrefix'), copyIndex()))]",
|
||||
"[concat('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": {
|
||||
"createOption": "FromImage"
|
||||
},
|
||||
|
||||
"dataDisks": [
|
||||
{
|
||||
"createOption": "Empty",
|
||||
"diskSizeGB": "[variables('dataDiskSize')]",
|
||||
"lun": 0
|
||||
},
|
||||
{
|
||||
"createOption": "Empty",
|
||||
"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)]"
|
||||
}
|
||||
"properties": {
|
||||
"frontendIPConfigurations": [
|
||||
{
|
||||
"name": "[variables('lbFE')]",
|
||||
"properties": {
|
||||
"publicIPAddress": {
|
||||
"id": "[resourceId('Microsoft.Network/publicIPAddresses',variables('publicIPAddressName'))]"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
"backendAddressPools": [
|
||||
{
|
||||
"name": "LoadBalancerBackend"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
|
||||
"apiVersion": "2017-10-01",
|
||||
"type": "Microsoft.Network/loadBalancers/inboundNatRules",
|
||||
"name": "[concat(variables('publicLBName'), '/ssh-VM', copyIndex())]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"copy": {
|
||||
"name": "lbNatLoop",
|
||||
"count": "[parameters('numberOfInstances')]"
|
||||
},
|
||||
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Network/loadBalancers/', variables('publiclbName'))]"
|
||||
],
|
||||
|
||||
"properties": {
|
||||
"frontendIPConfiguration": {
|
||||
"id": "[variables('publiclbFEConfigID')]"
|
||||
},
|
||||
|
||||
"protocol": "tcp",
|
||||
"frontendPort": "[copyIndex(2200)]",
|
||||
"backendPort": 22,
|
||||
"enableFloatingIP": false
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"type": "Microsoft.Network/networkInterfaces",
|
||||
"name": "[concat(variables('NICPrefix'), parameters('vmNamePrefix'), copyIndex())]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"copy": {
|
||||
"name": "nicLoop",
|
||||
"count": "[parameters('numberOfInstances')]"
|
||||
},
|
||||
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]",
|
||||
"[concat('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",
|
||||
"name": "[concat(parameters('vmNamePrefix'), copyIndex())]",
|
||||
"location": "[resourceGroup().location]",
|
||||
|
||||
"copy": {
|
||||
"name": "virtualMachineLoop",
|
||||
"count": "[parameters('numberOfInstances')]"
|
||||
},
|
||||
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Storage/storageAccounts/',variables('storageName'))]",
|
||||
"[resourceId('Microsoft.Network/networkInterfaces', concat(variables('NICPrefix'), parameters('vmNamePrefix'), copyIndex()))]",
|
||||
"[concat('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": {
|
||||
"createOption": "FromImage"
|
||||
},
|
||||
|
||||
"dataDisks": [
|
||||
{
|
||||
"createOption": "Empty",
|
||||
"diskSizeGB": "[variables('dataDiskSize')]",
|
||||
"lun": 0
|
||||
},
|
||||
{
|
||||
"createOption": "Empty",
|
||||
"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)]"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
|
||||
"apiProfile": "2018-03-01-hybrid",
|
||||
"parameters": {
|
||||
"adminUsername": {
|
||||
"type": "string",
|
||||
|
@ -27,11 +27,11 @@
|
|||
3,
|
||||
4,
|
||||
5,
|
||||
8,
|
||||
10,
|
||||
15,
|
||||
20,
|
||||
25
|
||||
8,
|
||||
10,
|
||||
15,
|
||||
20,
|
||||
25
|
||||
],
|
||||
|
||||
"metadata": {
|
||||
|
@ -43,9 +43,9 @@
|
|||
"type": "int",
|
||||
"defaultValue": 1,
|
||||
"allowedValues": [
|
||||
1,
|
||||
2,
|
||||
10,
|
||||
1,
|
||||
2,
|
||||
10,
|
||||
100,
|
||||
500,
|
||||
750,
|
||||
|
@ -110,11 +110,11 @@
|
|||
"osImageSku": {
|
||||
"type": "string",
|
||||
"defaultValue": "2016-Datacenter",
|
||||
"allowedValues": [
|
||||
"2012-R2-Datacenter",
|
||||
"2016-Datacenter-Server-Core",
|
||||
"2016-Datacenter"
|
||||
],
|
||||
"allowedValues": [
|
||||
"2012-R2-Datacenter",
|
||||
"2016-Datacenter-Server-Core",
|
||||
"2016-Datacenter"
|
||||
],
|
||||
"metadata": {
|
||||
"description": "Maps to the sku in the Azure Stack Platform Image Repository."
|
||||
}
|
||||
|
@ -149,278 +149,270 @@
|
|||
|
||||
"resources": [
|
||||
{
|
||||
"type": "Microsoft.Storage/storageAccounts",
|
||||
"name": "[variables('storageName')]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"accountType": "[variables('storageAccountType')]"
|
||||
},
|
||||
"type": "Microsoft.Storage/storageAccounts",
|
||||
"name": "[variables('storageName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"accountType": "[variables('storageAccountType')]"
|
||||
},
|
||||
|
||||
"dependsOn": [
|
||||
"[variables('publiclbName')]"
|
||||
"dependsOn": [
|
||||
"[variables('publiclbName')]"
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
"type": "Microsoft.Network/networkSecurityGroups",
|
||||
"name": "[variables('nsgName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"securityRules": [
|
||||
{
|
||||
"name": "rule1",
|
||||
"properties": {
|
||||
"protocol": "*",
|
||||
"sourcePortRange": "*",
|
||||
"destinationPortRange": "*",
|
||||
"sourceAddressPrefix": "*",
|
||||
"destinationAddressPrefix": "*",
|
||||
"access": "Allow",
|
||||
"priority": 101,
|
||||
"direction": "Inbound"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"type": "Microsoft.Network/networkSecurityGroups",
|
||||
"name": "[variables('nsgName')]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"securityRules": [
|
||||
{
|
||||
"name": "rule1",
|
||||
"properties": {
|
||||
"protocol": "*",
|
||||
"sourcePortRange": "*",
|
||||
"destinationPortRange": "*",
|
||||
"sourceAddressPrefix": "*",
|
||||
"destinationAddressPrefix": "*",
|
||||
"access": "Allow",
|
||||
"priority": 101,
|
||||
"direction": "Inbound"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"type": "Microsoft.Compute/availabilitySets",
|
||||
"name": "[variables('availabilitySetName')]",
|
||||
"apiVersion": "2017-03-30",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"platformFaultDomainCount": "3",
|
||||
"platformUpdateDomainCount": "5"
|
||||
},
|
||||
"sku": {
|
||||
"type": "Microsoft.Compute/availabilitySets",
|
||||
"name": "[variables('availabilitySetName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"platformFaultDomainCount": "3",
|
||||
"platformUpdateDomainCount": "5"
|
||||
},
|
||||
"sku": {
|
||||
"name": "Aligned"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"type": "Microsoft.Network/publicIPAddresses",
|
||||
"name": "[variables('publicIPAddressName')]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"publicIPAllocationMethod": "Dynamic",
|
||||
"dnsSettings": {
|
||||
"domainNameLabel": "[variables('dnsPrefix')]"
|
||||
"type": "Microsoft.Network/publicIPAddresses",
|
||||
"name": "[variables('publicIPAddressName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"publicIPAllocationMethod": "Dynamic",
|
||||
"dnsSettings": {
|
||||
"domainNameLabel": "[variables('dnsPrefix')]"
|
||||
}
|
||||
},
|
||||
|
||||
"dependsOn": [
|
||||
"[variables('vnetID')]"
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
"type": "Microsoft.Network/virtualNetworks",
|
||||
"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('vnetID')]"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
"dependsOn": [
|
||||
"[variables('nsgID')]"
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
"type": "Microsoft.Network/virtualNetworks",
|
||||
"name": "[variables('virtualNetworkName')]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"addressSpace": {
|
||||
"addressPrefixes": [
|
||||
"[variables('addressPrefix')]"
|
||||
]
|
||||
},
|
||||
"name": "[variables('publiclbName')]",
|
||||
"type": "Microsoft.Network/loadBalancers",
|
||||
"location": "[resourceGroup().location]",
|
||||
"dependsOn": [
|
||||
"[variables('vnetID')]",
|
||||
"[variables('publicIPAddressName')]"
|
||||
],
|
||||
|
||||
"subnets": [
|
||||
{
|
||||
"name": "[variables('subnetName')]",
|
||||
"properties": {
|
||||
"addressPrefix": "[variables('subnetPrefix')]",
|
||||
"networkSecurityGroup": {
|
||||
"id": "[variables('nsgID')]"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
"dependsOn": [
|
||||
"[variables('nsgID')]"
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
"apiVersion": "2015-06-15",
|
||||
"name": "[variables('publiclbName')]",
|
||||
"type": "Microsoft.Network/loadBalancers",
|
||||
"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"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
|
||||
"apiVersion": "2015-06-15",
|
||||
"type": "Microsoft.Network/loadBalancers/inboundNatRules",
|
||||
"name": "[concat(variables('publicLBName'), '/ssh-VM', copyIndex())]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"copy": {
|
||||
"name": "lbNatLoop",
|
||||
"count": "[parameters('numberOfInstances')]"
|
||||
},
|
||||
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Network/loadBalancers/', variables('publiclbName'))]"
|
||||
],
|
||||
|
||||
"properties": {
|
||||
"frontendIPConfiguration": {
|
||||
"id": "[variables('publiclbFEConfigID')]"
|
||||
},
|
||||
|
||||
"protocol": "tcp",
|
||||
"frontendPort": "[copyIndex(2200)]",
|
||||
"backendPort": 22,
|
||||
"enableFloatingIP": false
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"type": "Microsoft.Network/networkInterfaces",
|
||||
"name": "[concat(variables('NICPrefix'), parameters('vmNamePrefix'), copyIndex())]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"location": "[resourceGroup().location]",
|
||||
"copy": {
|
||||
"name": "nicLoop",
|
||||
"count": "[parameters('numberOfInstances')]"
|
||||
},
|
||||
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]",
|
||||
"[concat('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",
|
||||
"name": "[concat(parameters('vmNamePrefix'), copyIndex())]",
|
||||
"apiVersion": "2017-03-30",
|
||||
"location": "[resourceGroup().location]",
|
||||
|
||||
"copy": {
|
||||
"name": "virtualMachineLoop",
|
||||
"count": "[parameters('numberOfInstances')]"
|
||||
},
|
||||
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Storage/storageAccounts/',variables('storageName'))]",
|
||||
"[resourceId('Microsoft.Network/networkInterfaces', concat(variables('NICPrefix'), parameters('vmNamePrefix'), copyIndex()))]",
|
||||
"[concat('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": {
|
||||
"createOption": "FromImage"
|
||||
},
|
||||
|
||||
"dataDisks": [
|
||||
{
|
||||
"createOption": "Empty",
|
||||
"diskSizeGB": "[variables('dataDiskSize')]",
|
||||
"lun": 0
|
||||
},
|
||||
{
|
||||
"createOption": "Empty",
|
||||
"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)]"
|
||||
}
|
||||
"properties": {
|
||||
"frontendIPConfigurations": [
|
||||
{
|
||||
"name": "[variables('lbFE')]",
|
||||
"properties": {
|
||||
"publicIPAddress": {
|
||||
"id": "[resourceId('Microsoft.Network/publicIPAddresses',variables('publicIPAddressName'))]"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
"backendAddressPools": [
|
||||
{
|
||||
"name": "LoadBalancerBackend"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
|
||||
"apiVersion": "2017-10-01",
|
||||
"type": "Microsoft.Network/loadBalancers/inboundNatRules",
|
||||
"name": "[concat(variables('publicLBName'), '/ssh-VM', copyIndex())]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"copy": {
|
||||
"name": "lbNatLoop",
|
||||
"count": "[parameters('numberOfInstances')]"
|
||||
},
|
||||
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Network/loadBalancers/', variables('publiclbName'))]"
|
||||
],
|
||||
|
||||
"properties": {
|
||||
"frontendIPConfiguration": {
|
||||
"id": "[variables('publiclbFEConfigID')]"
|
||||
},
|
||||
|
||||
"protocol": "tcp",
|
||||
"frontendPort": "[copyIndex(2200)]",
|
||||
"backendPort": 22,
|
||||
"enableFloatingIP": false
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"type": "Microsoft.Network/networkInterfaces",
|
||||
"name": "[concat(variables('NICPrefix'), parameters('vmNamePrefix'), copyIndex())]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"copy": {
|
||||
"name": "nicLoop",
|
||||
"count": "[parameters('numberOfInstances')]"
|
||||
},
|
||||
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]",
|
||||
"[concat('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",
|
||||
"name": "[concat(parameters('vmNamePrefix'), copyIndex())]",
|
||||
"location": "[resourceGroup().location]",
|
||||
|
||||
"copy": {
|
||||
"name": "virtualMachineLoop",
|
||||
"count": "[parameters('numberOfInstances')]"
|
||||
},
|
||||
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Storage/storageAccounts/',variables('storageName'))]",
|
||||
"[resourceId('Microsoft.Network/networkInterfaces', concat(variables('NICPrefix'), parameters('vmNamePrefix'), copyIndex()))]",
|
||||
"[concat('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": {
|
||||
"createOption": "FromImage"
|
||||
},
|
||||
|
||||
"dataDisks": [
|
||||
{
|
||||
"createOption": "Empty",
|
||||
"diskSizeGB": "[variables('dataDiskSize')]",
|
||||
"lun": 0
|
||||
},
|
||||
{
|
||||
"createOption": "Empty",
|
||||
"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)]"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,19 +1,20 @@
|
|||
{
|
||||
|
||||
"$schema":"http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json",
|
||||
"contentVersion":"1.0.0.0",
|
||||
"parameters":{
|
||||
"existingVMSSName":{
|
||||
"type":"string",
|
||||
"metadata":{
|
||||
"description":"Name of existing VM Scale Set"
|
||||
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"apiProfile": "2018-03-01-hybrid",
|
||||
"parameters": {
|
||||
"existingVMSSName": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "Name of existing VM Scale Set"
|
||||
}
|
||||
},
|
||||
|
||||
"newCapacity":{
|
||||
"type":"int",
|
||||
"metadata":{
|
||||
"description":"Number of desired VM instances"
|
||||
"newCapacity": {
|
||||
"type": "int",
|
||||
"metadata": {
|
||||
"description": "Number of desired VM instances"
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -26,16 +27,15 @@
|
|||
}
|
||||
},
|
||||
|
||||
"resources":[
|
||||
"resources": [
|
||||
{
|
||||
"type":"Microsoft.Compute/virtualMachineScaleSets",
|
||||
"apiVersion":"2017-03-30",
|
||||
"name":"[parameters('existingVMSSName')]",
|
||||
"location":"[resourceGroup().location]",
|
||||
"sku":{
|
||||
"name":"[parameters('vmSku')]",
|
||||
"tier":"Standard",
|
||||
"capacity":"[parameters('newCapacity')]"
|
||||
"type": "Microsoft.Compute/virtualMachineScaleSets",
|
||||
"name": "[parameters('existingVMSSName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"sku": {
|
||||
"name": "[parameters('vmSku')]",
|
||||
"tier": "Standard",
|
||||
"capacity": "[parameters('newCapacity')]"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
|
@ -1,221 +1,217 @@
|
|||
{
|
||||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"parameters": {
|
||||
"vmName": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "Name of the Virtual Machine to be created"
|
||||
},
|
||||
"defaultValue": "[substring(concat('simplewinvm',resourceGroup().Name),0,12)]"
|
||||
},
|
||||
"adminUsername": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "Username for the Virtual Machine local administrator"
|
||||
},
|
||||
"defaultValue": "vmadmin"
|
||||
},
|
||||
"adminPassword": {
|
||||
"type": "securestring",
|
||||
"metadata": {
|
||||
"description": "Password for the Virtual Machine local administrator. Default value is subscription id"
|
||||
},
|
||||
"defaultValue": "[concat('Subscription#',substring(resourcegroup().id,15,36))]"
|
||||
},
|
||||
"dcResourceGroupName": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "Name of the resource group that cointains the domain controller"
|
||||
},
|
||||
"defaultValue": "[resourceGroup().name]"
|
||||
},
|
||||
"dcVNetName": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "Name of the extisting VNet that contains the domain controller"
|
||||
},
|
||||
"defaultValue": "[concat('ADVNET',resourceGroup().name)]"
|
||||
},
|
||||
"dcSubnetName": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "Name of the existing subnet that contains the domain controller"
|
||||
},
|
||||
"defaultValue": "[concat('ADStaticSubnet',resourceGroup().name)]"
|
||||
},
|
||||
"domainToJoin": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "FQDN of the AD domain to join"
|
||||
},
|
||||
"defaultValue": "contoso.com"
|
||||
},
|
||||
"ouToJoin": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "Specifies an organizational unit (OU) for the domain account. Enter the full distinguished name of the OU in quotation marks. Example: 'OU=testOU; DC=domain; DC=Domain; DC=com'. This value can be empty"
|
||||
},
|
||||
"defaultValue": ""
|
||||
},
|
||||
"domainJoinOptions": {
|
||||
"type": "int",
|
||||
"metadata": {
|
||||
"description": "Set of bit flags that define the join options. Default value of 3 is a combination of NETSETUP_JOIN_DOMAIN (0x00000001) & NETSETUP_ACCT_CREATE (0x00000002) i.e. will join the domain and create the account on the domain. For more information see https://msdn.microsoft.com/en-us/library/aa392154(v=vs.85).aspx"
|
||||
},
|
||||
"defaultValue": 3
|
||||
},
|
||||
"domainUserName": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "Username of the domain account to be used for joining the domain"
|
||||
},
|
||||
"defaultValue": "vmadmin"
|
||||
},
|
||||
"domainPassword": {
|
||||
"type": "securestring",
|
||||
"metadata": {
|
||||
"description": "Password of the domain account to be used for joining the domain"
|
||||
},
|
||||
"defaultValue": "[concat('Subscription#',subscription().subscriptionId)]"
|
||||
}
|
||||
"$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 Virtual Machine to be created"
|
||||
},
|
||||
"defaultValue": "[substring(concat('simplewinvm',resourceGroup().Name),0,12)]"
|
||||
},
|
||||
"variables": {
|
||||
"vmExtensionName": "JsonADDomainExtension",
|
||||
"storageAccountName": "[toLower(concat(resourceGroup().name,'sa'))]",
|
||||
"storageAccountType": "Standard_LRS",
|
||||
"vmStorageAccountContainerName": "vhds",
|
||||
"vmSize": "Standard_A2",
|
||||
"imagePublisher": "MicrosoftWindowsServer",
|
||||
"imageOffer": "WindowsServer",
|
||||
"imageSKU": "2016-Datacenter",
|
||||
"imageVersion": "latest",
|
||||
"OSDiskName": "osdisk",
|
||||
"publicIPAddressName": "[concat(parameters('vmName'),'-pip')]",
|
||||
"nicName": "[concat(parameters('vmName'),'-nic')]",
|
||||
"vnetID": "[resourceId(parameters('dcResourceGroupName'), 'Microsoft.Network/virtualNetworks', parameters('dcVNetName'))]",
|
||||
"subnetRef": "[concat(variables('vnetID'),'/subnets/', parameters('dcSubnetName'))]"
|
||||
"adminUsername": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "Username for the Virtual Machine local administrator"
|
||||
},
|
||||
"defaultValue": "vmadmin"
|
||||
},
|
||||
"resources": [
|
||||
{
|
||||
"type": "Microsoft.Storage/storageAccounts",
|
||||
"name": "[variables('storageAccountName')]",
|
||||
"apiVersion": "2015-05-01-preview",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"accountType": "[variables('storageAccountType')]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "2015-05-01-preview",
|
||||
"type": "Microsoft.Network/publicIPAddresses",
|
||||
"name": "[variables('publicIPAddressName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"publicIPAllocationMethod": "Dynamic",
|
||||
"dnsSettings": {
|
||||
"domainNameLabel": "[parameters('vmName')]"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "2015-05-01-preview",
|
||||
"type": "Microsoft.Network/networkInterfaces",
|
||||
"name": "[variables('nicName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]"
|
||||
],
|
||||
"properties": {
|
||||
"ipConfigurations": [
|
||||
{
|
||||
"name": "ipconfig1",
|
||||
"properties": {
|
||||
"privateIPAllocationMethod": "Dynamic",
|
||||
"publicIPAddress": {
|
||||
"id": "[resourceId('Microsoft.Network/publicIPAddresses',variables('publicIPAddressName'))]"
|
||||
},
|
||||
"subnet": {
|
||||
"id": "[variables('subnetRef')]"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "2015-06-15",
|
||||
"type": "Microsoft.Compute/virtualMachines",
|
||||
"name": "[parameters('vmName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]",
|
||||
"[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]"
|
||||
],
|
||||
"properties": {
|
||||
"hardwareProfile": {
|
||||
"vmSize": "[variables('vmSize')]"
|
||||
},
|
||||
"osProfile": {
|
||||
"computerName": "[parameters('vmName')]",
|
||||
"adminUsername": "[parameters('adminUsername')]",
|
||||
"adminPassword": "[parameters('adminPassword')]"
|
||||
},
|
||||
"storageProfile": {
|
||||
"imageReference": {
|
||||
"publisher": "[variables('imagePublisher')]",
|
||||
"offer": "[variables('imageOffer')]",
|
||||
"sku": "[variables('imageSKU')]",
|
||||
"version": "[variables('imageVersion')]"
|
||||
},
|
||||
"osDisk": {
|
||||
"name": "[variables('OSDiskName')]",
|
||||
"vhd": {
|
||||
"uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName')), providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]).primaryEndpoints.blob, variables('vmStorageAccountContainerName'),'/',variables('OSDiskName'),'.vhd')]"
|
||||
},
|
||||
"caching": "ReadWrite",
|
||||
"createOption": "FromImage"
|
||||
}
|
||||
},
|
||||
"networkProfile": {
|
||||
"networkInterfaces": [
|
||||
{
|
||||
"id": "[resourceId('Microsoft.Network/networkInterfaces',variables('nicName'))]"
|
||||
}
|
||||
]
|
||||
},
|
||||
"diagnosticsProfile": {
|
||||
"bootDiagnostics": {
|
||||
"enabled": "true",
|
||||
"storageUri": "[reference(concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName')), providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]).primaryEndpoints.blob]"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "2015-06-15",
|
||||
"type": "Microsoft.Compute/virtualMachines/extensions",
|
||||
"name": "[concat(parameters('vmName'),'/', variables('vmExtensionName'))]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Compute/virtualMachines/', parameters('vmName'))]"
|
||||
],
|
||||
"properties": {
|
||||
"publisher": "Microsoft.Compute",
|
||||
"type": "JsonADDomainExtension",
|
||||
"typeHandlerVersion": "1.3",
|
||||
"autoUpgradeMinorVersion": true,
|
||||
"settings": {
|
||||
"Name": "[parameters('domainToJoin')]",
|
||||
"OUPath": "[parameters('ouToJoin')]",
|
||||
"User": "[concat(parameters('domainToJoin'), '\\', parameters('domainUserName'))]",
|
||||
"Restart": "true",
|
||||
"Options": "[parameters('domainJoinOptions')]"
|
||||
},
|
||||
"protectedsettings": {
|
||||
"Password": "[parameters('domainPassword')]"
|
||||
}
|
||||
}
|
||||
"adminPassword": {
|
||||
"type": "securestring",
|
||||
"metadata": {
|
||||
"description": "Password for the Virtual Machine local administrator. Default value is subscription id"
|
||||
},
|
||||
"defaultValue": "[concat('Subscription#',substring(resourcegroup().id,15,36))]"
|
||||
},
|
||||
"dcResourceGroupName": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "Name of the resource group that cointains the domain controller"
|
||||
},
|
||||
"defaultValue": "[resourceGroup().name]"
|
||||
},
|
||||
"dcVNetName": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "Name of the extisting VNet that contains the domain controller"
|
||||
},
|
||||
"defaultValue": "[concat('ADVNET',resourceGroup().name)]"
|
||||
},
|
||||
"dcSubnetName": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "Name of the existing subnet that contains the domain controller"
|
||||
},
|
||||
"defaultValue": "[concat('ADStaticSubnet',resourceGroup().name)]"
|
||||
},
|
||||
"domainToJoin": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "FQDN of the AD domain to join"
|
||||
},
|
||||
"defaultValue": "contoso.com"
|
||||
},
|
||||
"ouToJoin": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "Specifies an organizational unit (OU) for the domain account. Enter the full distinguished name of the OU in quotation marks. Example: 'OU=testOU; DC=domain; DC=Domain; DC=com'. This value can be empty"
|
||||
},
|
||||
"defaultValue": ""
|
||||
},
|
||||
"domainJoinOptions": {
|
||||
"type": "int",
|
||||
"metadata": {
|
||||
"description": "Set of bit flags that define the join options. Default value of 3 is a combination of NETSETUP_JOIN_DOMAIN (0x00000001) & NETSETUP_ACCT_CREATE (0x00000002) i.e. will join the domain and create the account on the domain. For more information see https://msdn.microsoft.com/en-us/library/aa392154(v=vs.85).aspx"
|
||||
},
|
||||
"defaultValue": 3
|
||||
},
|
||||
"domainUserName": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "Username of the domain account to be used for joining the domain"
|
||||
},
|
||||
"defaultValue": "vmadmin"
|
||||
},
|
||||
"domainPassword": {
|
||||
"type": "securestring",
|
||||
"metadata": {
|
||||
"description": "Password of the domain account to be used for joining the domain"
|
||||
},
|
||||
"defaultValue": "[concat('Subscription#',subscription().subscriptionId)]"
|
||||
}
|
||||
},
|
||||
"variables": {
|
||||
"vmExtensionName": "JsonADDomainExtension",
|
||||
"storageAccountName": "[toLower(concat(resourceGroup().name,'sa'))]",
|
||||
"storageAccountType": "Standard_LRS",
|
||||
"vmStorageAccountContainerName": "vhds",
|
||||
"vmSize": "Standard_A2",
|
||||
"imagePublisher": "MicrosoftWindowsServer",
|
||||
"imageOffer": "WindowsServer",
|
||||
"imageSKU": "2016-Datacenter",
|
||||
"imageVersion": "latest",
|
||||
"OSDiskName": "osdisk",
|
||||
"publicIPAddressName": "[concat(parameters('vmName'),'-pip')]",
|
||||
"nicName": "[concat(parameters('vmName'),'-nic')]",
|
||||
"vnetID": "[resourceId(parameters('dcResourceGroupName'), 'Microsoft.Network/virtualNetworks', parameters('dcVNetName'))]",
|
||||
"subnetRef": "[concat(variables('vnetID'),'/subnets/', parameters('dcSubnetName'))]"
|
||||
},
|
||||
"resources": [
|
||||
{
|
||||
"type": "Microsoft.Storage/storageAccounts",
|
||||
"name": "[variables('storageAccountName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"accountType": "[variables('storageAccountType')]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Network/publicIPAddresses",
|
||||
"name": "[variables('publicIPAddressName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"publicIPAllocationMethod": "Dynamic",
|
||||
"dnsSettings": {
|
||||
"domainNameLabel": "[parameters('vmName')]"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Network/networkInterfaces",
|
||||
"name": "[variables('nicName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]"
|
||||
],
|
||||
"properties": {
|
||||
"ipConfigurations": [
|
||||
{
|
||||
"name": "ipconfig1",
|
||||
"properties": {
|
||||
"privateIPAllocationMethod": "Dynamic",
|
||||
"publicIPAddress": {
|
||||
"id": "[resourceId('Microsoft.Network/publicIPAddresses',variables('publicIPAddressName'))]"
|
||||
},
|
||||
"subnet": {
|
||||
"id": "[variables('subnetRef')]"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Compute/virtualMachines",
|
||||
"name": "[parameters('vmName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]",
|
||||
"[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]"
|
||||
],
|
||||
"properties": {
|
||||
"hardwareProfile": {
|
||||
"vmSize": "[variables('vmSize')]"
|
||||
},
|
||||
"osProfile": {
|
||||
"computerName": "[parameters('vmName')]",
|
||||
"adminUsername": "[parameters('adminUsername')]",
|
||||
"adminPassword": "[parameters('adminPassword')]"
|
||||
},
|
||||
"storageProfile": {
|
||||
"imageReference": {
|
||||
"publisher": "[variables('imagePublisher')]",
|
||||
"offer": "[variables('imageOffer')]",
|
||||
"sku": "[variables('imageSKU')]",
|
||||
"version": "[variables('imageVersion')]"
|
||||
},
|
||||
"osDisk": {
|
||||
"name": "[variables('OSDiskName')]",
|
||||
"vhd": {
|
||||
"uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName')), providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]).primaryEndpoints.blob, variables('vmStorageAccountContainerName'),'/',variables('OSDiskName'),'.vhd')]"
|
||||
},
|
||||
"caching": "ReadWrite",
|
||||
"createOption": "FromImage"
|
||||
}
|
||||
},
|
||||
"networkProfile": {
|
||||
"networkInterfaces": [
|
||||
{
|
||||
"id": "[resourceId('Microsoft.Network/networkInterfaces',variables('nicName'))]"
|
||||
}
|
||||
]
|
||||
},
|
||||
"diagnosticsProfile": {
|
||||
"bootDiagnostics": {
|
||||
"enabled": "true",
|
||||
"storageUri": "[reference(concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName')), providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]).primaryEndpoints.blob]"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Compute/virtualMachines/extensions",
|
||||
"name": "[concat(parameters('vmName'),'/', variables('vmExtensionName'))]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Compute/virtualMachines/', parameters('vmName'))]"
|
||||
],
|
||||
"properties": {
|
||||
"publisher": "Microsoft.Compute",
|
||||
"type": "JsonADDomainExtension",
|
||||
"typeHandlerVersion": "1.3",
|
||||
"autoUpgradeMinorVersion": true,
|
||||
"settings": {
|
||||
"Name": "[parameters('domainToJoin')]",
|
||||
"OUPath": "[parameters('ouToJoin')]",
|
||||
"User": "[concat(parameters('domainToJoin'), '\\', parameters('domainUserName'))]",
|
||||
"Restart": "true",
|
||||
"Options": "[parameters('domainJoinOptions')]"
|
||||
},
|
||||
"protectedsettings": {
|
||||
"Password": "[parameters('domainPassword')]"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -1,202 +1,200 @@
|
|||
{
|
||||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"parameters": {
|
||||
"windowsImagePublisher": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "The Publisher of Windows Image"
|
||||
},
|
||||
"defaultValue": "MicrosoftWindowsServer"
|
||||
},
|
||||
"windowsImageOffer": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "The offer of Windows Image"
|
||||
},
|
||||
"defaultValue": "WindowsServer"
|
||||
},
|
||||
"windowsImageSKU": {
|
||||
"type": "string",
|
||||
"allowedValues": [
|
||||
"2012-R2-Datacenter",
|
||||
"2016-Datacenter"
|
||||
],
|
||||
"metadata": {
|
||||
"description": "The SKU Name of Windows Image"
|
||||
},
|
||||
"defaultValue": "2016-Datacenter"
|
||||
},
|
||||
"windowsImageVersion": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "The Version of Windows Image"
|
||||
},
|
||||
"defaultValue": "latest"
|
||||
},
|
||||
"dataDiskSize": {
|
||||
"type": "int",
|
||||
"metadata": {
|
||||
"description": "Size of the VM data disk in GB"
|
||||
},
|
||||
"defaultValue": 2
|
||||
},
|
||||
"vmName": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "The VM Name"
|
||||
}
|
||||
},
|
||||
"storageAccount": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "The Storage Account Name"
|
||||
}
|
||||
},
|
||||
"storageAccountType": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "The type of the Storage Account created"
|
||||
},
|
||||
"defaultValue": "Standard_LRS"
|
||||
},
|
||||
"adminUsername": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "The name of the Administrator of the new VMs and Domain"
|
||||
}
|
||||
},
|
||||
"adminPassword": {
|
||||
"type": "securestring",
|
||||
"metadata": {
|
||||
"description": "The password for the Administrator account of the new VMs and Domain"
|
||||
}
|
||||
},
|
||||
"vmSize": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "The size of the AD VMs Created"
|
||||
},
|
||||
"defaultValue": "Standard_A2"
|
||||
},
|
||||
"subnetResourceID": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "the resource id of the subnet"
|
||||
}
|
||||
},
|
||||
"adRDPNATRuleID": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "the resource id of the RDP NAT rule"
|
||||
}
|
||||
},
|
||||
"adDNicName": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "Name of the Nic attached to the ad VM"
|
||||
}
|
||||
},
|
||||
"primaryAdIpAddress": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "PrimaryIPAddress if AD VM"
|
||||
}
|
||||
}
|
||||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"apiProfile": "2018-03-01-hybrid",
|
||||
"parameters": {
|
||||
"windowsImagePublisher": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "The Publisher of Windows Image"
|
||||
},
|
||||
"defaultValue": "MicrosoftWindowsServer"
|
||||
},
|
||||
"variables": {
|
||||
"vmvhdContainerName": "vhds"
|
||||
"windowsImageOffer": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "The offer of Windows Image"
|
||||
},
|
||||
"defaultValue": "WindowsServer"
|
||||
},
|
||||
"resources": [
|
||||
{
|
||||
"name": "[parameters('storageAccount')]",
|
||||
"type": "Microsoft.Storage/storageAccounts",
|
||||
"location": "[resourceGroup().location]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"windowsImageSKU": {
|
||||
"type": "string",
|
||||
"allowedValues": [
|
||||
"2012-R2-Datacenter",
|
||||
"2016-Datacenter"
|
||||
],
|
||||
"metadata": {
|
||||
"description": "The SKU Name of Windows Image"
|
||||
},
|
||||
"defaultValue": "2016-Datacenter"
|
||||
},
|
||||
"windowsImageVersion": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "The Version of Windows Image"
|
||||
},
|
||||
"defaultValue": "latest"
|
||||
},
|
||||
"dataDiskSize": {
|
||||
"type": "int",
|
||||
"metadata": {
|
||||
"description": "Size of the VM data disk in GB"
|
||||
},
|
||||
"defaultValue": 2
|
||||
},
|
||||
"vmName": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "The VM Name"
|
||||
}
|
||||
},
|
||||
"storageAccount": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "The Storage Account Name"
|
||||
}
|
||||
},
|
||||
"storageAccountType": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "The type of the Storage Account created"
|
||||
},
|
||||
"defaultValue": "Standard_LRS"
|
||||
},
|
||||
"adminUsername": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "The name of the Administrator of the new VMs and Domain"
|
||||
}
|
||||
},
|
||||
"adminPassword": {
|
||||
"type": "securestring",
|
||||
"metadata": {
|
||||
"description": "The password for the Administrator account of the new VMs and Domain"
|
||||
}
|
||||
},
|
||||
"vmSize": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "The size of the AD VMs Created"
|
||||
},
|
||||
"defaultValue": "Standard_A2"
|
||||
},
|
||||
"subnetResourceID": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "the resource id of the subnet"
|
||||
}
|
||||
},
|
||||
"adRDPNATRuleID": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "the resource id of the RDP NAT rule"
|
||||
}
|
||||
},
|
||||
"adDNicName": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "Name of the Nic attached to the ad VM"
|
||||
}
|
||||
},
|
||||
"primaryAdIpAddress": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "PrimaryIPAddress if AD VM"
|
||||
}
|
||||
}
|
||||
},
|
||||
"variables": {
|
||||
"vmvhdContainerName": "vhds"
|
||||
},
|
||||
"resources": [
|
||||
{
|
||||
"name": "[parameters('storageAccount')]",
|
||||
"type": "Microsoft.Storage/storageAccounts",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"accountType": "[parameters('storageAccountType')]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "[parameters('adDNicName')]",
|
||||
"type": "Microsoft.Network/networkInterfaces",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"ipConfigurations": [
|
||||
{
|
||||
"name": "ipconfig1",
|
||||
"properties": {
|
||||
"accountType": "[parameters('storageAccountType')]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "[parameters('adDNicName')]",
|
||||
"type": "Microsoft.Network/networkInterfaces",
|
||||
"location": "[resourceGroup().location]",
|
||||
"apiVersion": "2015-05-01-preview",
|
||||
"properties": {
|
||||
"ipConfigurations": [
|
||||
{
|
||||
"name": "ipconfig1",
|
||||
"properties": {
|
||||
"privateIPAllocationMethod": "Static",
|
||||
"privateIPAddress": "[parameters('primaryAdIpAddress')]",
|
||||
"subnet": {
|
||||
"id": "[parameters('subnetResourceID')]"
|
||||
},
|
||||
"loadBalancerInboundNatRules": [
|
||||
{
|
||||
"id": "[parameters('adRDPNATRuleID')]"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "[parameters('vmName')]",
|
||||
"type": "Microsoft.Compute/virtualMachines",
|
||||
"location": "[resourceGroup().location]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"dependsOn": [
|
||||
"[resourceId('Microsoft.Storage/storageAccounts',parameters('storageAccount'))]",
|
||||
"[resourceId('Microsoft.Network/networkInterfaces',parameters('adDNicName'))]"
|
||||
],
|
||||
"properties": {
|
||||
"hardwareProfile": {
|
||||
"vmSize": "[parameters('vmSize')]"
|
||||
},
|
||||
"osProfile": {
|
||||
"computerName": "[parameters('vmName')]",
|
||||
"adminUsername": "[parameters('adminUsername')]",
|
||||
"adminPassword": "[parameters('adminPassword')]"
|
||||
},
|
||||
"storageProfile": {
|
||||
"imageReference": {
|
||||
"publisher": "[parameters('windowsImagePublisher')]",
|
||||
"offer": "[parameters('windowsImageOffer')]",
|
||||
"sku": "[parameters('windowsImageSKU')]",
|
||||
"version": "[parameters('windowsImageVersion')]"
|
||||
},
|
||||
"osDisk": {
|
||||
"name": "osdisk",
|
||||
"vhd": {
|
||||
"uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', parameters('storageAccount')),providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]).primaryEndpoints.blob ,variables('vmvhdContainerName'),'/', parameters('vmName'), '0','-osdisk.vhd')]"
|
||||
},
|
||||
"caching": "ReadWrite",
|
||||
"createOption": "FromImage"
|
||||
},
|
||||
"dataDisks": [
|
||||
{
|
||||
"vhd": {
|
||||
"uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', parameters('storageAccount')),providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]).primaryEndpoints.blob ,variables('vmvhdContainerName'),'/', parameters('vmName'), '0','data-1.vhd')]"
|
||||
},
|
||||
"name": "[concat(parameters('vmName'), '0','-data-disk1')]",
|
||||
"createOption": "Empty",
|
||||
"caching": "None",
|
||||
"diskSizeGB": "[parameters('dataDiskSize')]",
|
||||
"lun": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
"networkProfile": {
|
||||
"networkInterfaces": [
|
||||
{
|
||||
"id": "[resourceId('Microsoft.Network/networkInterfaces',parameters('adDNicName'))]"
|
||||
}
|
||||
]
|
||||
"privateIPAllocationMethod": "Static",
|
||||
"privateIPAddress": "[parameters('primaryAdIpAddress')]",
|
||||
"subnet": {
|
||||
"id": "[parameters('subnetResourceID')]"
|
||||
},
|
||||
"loadBalancerInboundNatRules": [
|
||||
{
|
||||
"id": "[parameters('adRDPNATRuleID')]"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "[parameters('vmName')]",
|
||||
"type": "Microsoft.Compute/virtualMachines",
|
||||
"location": "[resourceGroup().location]",
|
||||
"dependsOn": [
|
||||
"[resourceId('Microsoft.Storage/storageAccounts',parameters('storageAccount'))]",
|
||||
"[resourceId('Microsoft.Network/networkInterfaces',parameters('adDNicName'))]"
|
||||
],
|
||||
"properties": {
|
||||
"hardwareProfile": {
|
||||
"vmSize": "[parameters('vmSize')]"
|
||||
},
|
||||
"osProfile": {
|
||||
"computerName": "[parameters('vmName')]",
|
||||
"adminUsername": "[parameters('adminUsername')]",
|
||||
"adminPassword": "[parameters('adminPassword')]"
|
||||
},
|
||||
"storageProfile": {
|
||||
"imageReference": {
|
||||
"publisher": "[parameters('windowsImagePublisher')]",
|
||||
"offer": "[parameters('windowsImageOffer')]",
|
||||
"sku": "[parameters('windowsImageSKU')]",
|
||||
"version": "[parameters('windowsImageVersion')]"
|
||||
},
|
||||
"osDisk": {
|
||||
"name": "osdisk",
|
||||
"vhd": {
|
||||
"uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', parameters('storageAccount')),providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]).primaryEndpoints.blob ,variables('vmvhdContainerName'),'/', parameters('vmName'), '0','-osdisk.vhd')]"
|
||||
},
|
||||
"caching": "ReadWrite",
|
||||
"createOption": "FromImage"
|
||||
},
|
||||
"dataDisks": [
|
||||
{
|
||||
"vhd": {
|
||||
"uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', parameters('storageAccount')),providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]).primaryEndpoints.blob ,variables('vmvhdContainerName'),'/', parameters('vmName'), '0','data-1.vhd')]"
|
||||
},
|
||||
"name": "[concat(parameters('vmName'), '0','-data-disk1')]",
|
||||
"createOption": "Empty",
|
||||
"caching": "None",
|
||||
"diskSizeGB": "[parameters('dataDiskSize')]",
|
||||
"lun": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
"networkProfile": {
|
||||
"networkInterfaces": [
|
||||
{
|
||||
"id": "[resourceId('Microsoft.Network/networkInterfaces',parameters('adDNicName'))]"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"outputs": { }
|
||||
}
|
||||
}
|
||||
],
|
||||
"outputs": {}
|
||||
}
|
||||
|
|
|
@ -1,281 +1,275 @@
|
|||
{
|
||||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"parameters": {
|
||||
"domainName": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "The domain name needs to be consisting of one or more labels separated by . E.g. contoso.com"
|
||||
},
|
||||
"defaultValue": "contoso.com"
|
||||
},
|
||||
"adminUsername": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "The name of the Administrator of the new VMs and Domain"
|
||||
},
|
||||
"defaultValue": "vmadmin"
|
||||
},
|
||||
"adminPassword": {
|
||||
"type": "securestring",
|
||||
"metadata": {
|
||||
"description": "The password for the Administrator account of the new VMs and Domain"
|
||||
},
|
||||
"defaultValue": "[concat('Subscription#',subscription().subscriptionId)]"
|
||||
}
|
||||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"apiProfile": "2018-03-01-hybrid",
|
||||
"parameters": {
|
||||
"domainName": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "The domain name needs to be consisting of one or more labels separated by . E.g. contoso.com"
|
||||
},
|
||||
"defaultValue": "contoso.com"
|
||||
},
|
||||
"variables": {
|
||||
"assetLocation": "https://raw.githubusercontent.com/Azure/AzureStack-QuickStart-Templates/master/ad-non-ha",
|
||||
"adVMSize": "Standard_A1",
|
||||
"adOSVersion": "2016-Datacenter",
|
||||
"vmNetworkSubnet": "10.0.0.0/24",
|
||||
"virtualNetworkAddressRange": "10.0.0.0/16",
|
||||
"primaryAdIpAddress": "10.0.0.4",
|
||||
"storageAccountType": "Standard_LRS",
|
||||
"adTemplateURL": "[concat(variables('assetLocation'),'/adVmTemplate.json')]",
|
||||
"adStorageName": "[tolower(concat('adsa',resourceGroup().name))]",
|
||||
"dnsPrefix": "[tolower(concat(resourceGroup().name,'dc'))]",
|
||||
"adVmDeployment": "CreateADVMs",
|
||||
"adVmDeploymentId": "[concat('Microsoft.Resources/deployments/', variables('adVmDeployment'))]",
|
||||
"adPDCVMName": "[substring(concat('ADVM',resourceGroup().Name),0,5)]",
|
||||
"deployPrimaryAdTemplateURL": "[concat(variables('assetLocation'),'/deployPrimaryAD.json')]",
|
||||
"deployPrimaryAd": "ConfigureAD",
|
||||
"deployPrimaryAdId": "[concat('Microsoft.Resources/deployments/', variables('deployPrimaryAd'))]",
|
||||
"updateVNetDNS1": "UpdateVNetDNS",
|
||||
"vnetwithDNSTemplateURL": "[concat(variables('assetLocation'),'/vnet-with-dns-server.json')]",
|
||||
"publicLBName": "[concat('ADPLB',resourceGroup().name)]",
|
||||
"publicIPAddressName": "[concat('ADlbPublicIP',resourceGroup().name)]",
|
||||
"lbFE": "[concat('ADLBFE',resourceGroup().name)]",
|
||||
"rpdNAT": "[concat('ADRDPNAT',resourceGroup().name)]",
|
||||
"publicIPAddressID": "[resourceId('Microsoft.Network/publicIPAddresses',variables('publicIPAddressName'))]",
|
||||
"publiclbID": "[resourceId('Microsoft.Network/loadBalancers',variables('publicLBName'))]",
|
||||
"publiclbFEConfigID": "[concat(variables('publiclbID'),'/frontendIPConfigurations/',variables('lbFE'))]",
|
||||
"rdpPort": 3389,
|
||||
"adRDPNATRuleID": "[concat(variables('publiclbID'),'/inboundNatRules/',variables('rpdNAT'))]",
|
||||
"nsgName": "[concat('ADNsg',resourceGroup().name)]",
|
||||
"nsgID": "[resourceId('Microsoft.Network/networkSecurityGroups',variables('nsgName'))]",
|
||||
"adNICName": "[concat('ADNic',resourceGroup().name)]",
|
||||
"staticSubnetName": "[concat('ADStaticSubnet',resourceGroup().name)]",
|
||||
"virtualNetworkName": "[concat('ADVNET',resourceGroup().name)]",
|
||||
"vnetID": "[resourceId('Microsoft.Network/virtualNetworks', variables('virtualNetworkName'))]",
|
||||
"staticSubnetID": "[concat(variables('vnetID'),'/subnets/',variables('staticSubnetName'))]",
|
||||
"subnets": [
|
||||
{
|
||||
"name": "[variables('staticSubnetName')]",
|
||||
"properties": {
|
||||
"addressPrefix": "[variables('vmNetworkSubnet')]",
|
||||
"networkSecurityGroup": {
|
||||
"id": "[variables('nsgID')]"
|
||||
}
|
||||
}
|
||||
"adminUsername": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "The name of the Administrator of the new VMs and Domain"
|
||||
},
|
||||
"defaultValue": "vmadmin"
|
||||
},
|
||||
"adminPassword": {
|
||||
"type": "securestring",
|
||||
"metadata": {
|
||||
"description": "The password for the Administrator account of the new VMs and Domain"
|
||||
},
|
||||
"defaultValue": "[concat('Subscription#',subscription().subscriptionId)]"
|
||||
}
|
||||
},
|
||||
"variables": {
|
||||
"assetLocation": "https://raw.githubusercontent.com/Azure/AzureStack-QuickStart-Templates/master/ad-non-ha",
|
||||
"adVMSize": "Standard_A1",
|
||||
"adOSVersion": "2016-Datacenter",
|
||||
"vmNetworkSubnet": "10.0.0.0/24",
|
||||
"virtualNetworkAddressRange": "10.0.0.0/16",
|
||||
"primaryAdIpAddress": "10.0.0.4",
|
||||
"storageAccountType": "Standard_LRS",
|
||||
"adTemplateURL": "[concat(variables('assetLocation'),'/adVmTemplate.json')]",
|
||||
"adStorageName": "[tolower(concat('adsa',resourceGroup().name))]",
|
||||
"dnsPrefix": "[tolower(concat(resourceGroup().name,'dc'))]",
|
||||
"adVmDeployment": "CreateADVMs",
|
||||
"adVmDeploymentId": "[concat('Microsoft.Resources/deployments/', variables('adVmDeployment'))]",
|
||||
"adPDCVMName": "[substring(concat('ADVM',resourceGroup().Name),0,5)]",
|
||||
"deployPrimaryAdTemplateURL": "[concat(variables('assetLocation'),'/deployPrimaryAD.json')]",
|
||||
"deployPrimaryAd": "ConfigureAD",
|
||||
"deployPrimaryAdId": "[concat('Microsoft.Resources/deployments/', variables('deployPrimaryAd'))]",
|
||||
"updateVNetDNS1": "UpdateVNetDNS",
|
||||
"vnetwithDNSTemplateURL": "[concat(variables('assetLocation'),'/vnet-with-dns-server.json')]",
|
||||
"publicLBName": "[concat('ADPLB',resourceGroup().name)]",
|
||||
"publicIPAddressName": "[concat('ADlbPublicIP',resourceGroup().name)]",
|
||||
"lbFE": "[concat('ADLBFE',resourceGroup().name)]",
|
||||
"rpdNAT": "[concat('ADRDPNAT',resourceGroup().name)]",
|
||||
"publicIPAddressID": "[resourceId('Microsoft.Network/publicIPAddresses',variables('publicIPAddressName'))]",
|
||||
"publiclbID": "[resourceId('Microsoft.Network/loadBalancers',variables('publicLBName'))]",
|
||||
"publiclbFEConfigID": "[concat(variables('publiclbID'),'/frontendIPConfigurations/',variables('lbFE'))]",
|
||||
"rdpPort": 3389,
|
||||
"adRDPNATRuleID": "[concat(variables('publiclbID'),'/inboundNatRules/',variables('rpdNAT'))]",
|
||||
"nsgName": "[concat('ADNsg',resourceGroup().name)]",
|
||||
"nsgID": "[resourceId('Microsoft.Network/networkSecurityGroups',variables('nsgName'))]",
|
||||
"adNICName": "[concat('ADNic',resourceGroup().name)]",
|
||||
"staticSubnetName": "[concat('ADStaticSubnet',resourceGroup().name)]",
|
||||
"virtualNetworkName": "[concat('ADVNET',resourceGroup().name)]",
|
||||
"vnetID": "[resourceId('Microsoft.Network/virtualNetworks', variables('virtualNetworkName'))]",
|
||||
"staticSubnetID": "[concat(variables('vnetID'),'/subnets/',variables('staticSubnetName'))]",
|
||||
"subnets": [
|
||||
{
|
||||
"name": "[variables('staticSubnetName')]",
|
||||
"properties": {
|
||||
"addressPrefix": "[variables('vmNetworkSubnet')]",
|
||||
"networkSecurityGroup": {
|
||||
"id": "[variables('nsgID')]"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"resources": [
|
||||
{
|
||||
"name": "[variables('nsgName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"type": "Microsoft.Network/networkSecurityGroups",
|
||||
"properties": {
|
||||
"securityRules": [
|
||||
{
|
||||
"name": "rule1",
|
||||
"properties": {
|
||||
"protocol": "*",
|
||||
"sourcePortRange": "*",
|
||||
"destinationPortRange": "*",
|
||||
"sourceAddressPrefix": "*",
|
||||
"destinationAddressPrefix": "*",
|
||||
"access": "Allow",
|
||||
"priority": 101,
|
||||
"direction": "Inbound"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"resources": [
|
||||
{
|
||||
"name": "[variables('nsgName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"type": "Microsoft.Network/networkSecurityGroups",
|
||||
"apiVersion": "2015-06-15",
|
||||
"properties": {
|
||||
"securityRules": [
|
||||
{
|
||||
"name": "rule1",
|
||||
"properties": {
|
||||
"protocol": "*",
|
||||
"sourcePortRange": "*",
|
||||
"destinationPortRange": "*",
|
||||
"sourceAddressPrefix": "*",
|
||||
"destinationAddressPrefix": "*",
|
||||
"access": "Allow",
|
||||
"priority": 101,
|
||||
"direction": "Inbound"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
{
|
||||
"name": "[variables('virtualNetworkName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"type": "Microsoft.Network/virtualNetworks",
|
||||
"dependsOn": [
|
||||
"[variables('nsgID')]"
|
||||
],
|
||||
"properties": {
|
||||
"addressSpace": {
|
||||
"addressPrefixes": [
|
||||
"[variables('virtualNetworkAddressRange')]"
|
||||
],
|
||||
"networkSecurityGroup": {
|
||||
"id": "[variables('nsgID')]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "[variables('virtualNetworkName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"type": "Microsoft.Network/virtualNetworks",
|
||||
"apiVersion": "2015-06-15",
|
||||
"dependsOn": [
|
||||
"[variables('nsgID')]"
|
||||
],
|
||||
"properties": {
|
||||
"addressSpace": {
|
||||
"addressPrefixes": [
|
||||
"[variables('virtualNetworkAddressRange')]"
|
||||
],
|
||||
"networkSecurityGroup": {
|
||||
"id": "[variables('nsgID')]"
|
||||
}
|
||||
},
|
||||
"subnets": "[variables('subnets')]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "[variables('publicIPAddressName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"type": "Microsoft.Network/publicIPAddresses",
|
||||
"apiVersion": "2015-06-15",
|
||||
"dependsOn": [
|
||||
"[variables('vnetID')]"
|
||||
],
|
||||
"properties": {
|
||||
"publicIPAllocationMethod": "Dynamic",
|
||||
"dnsSettings": {
|
||||
"domainNameLabel": "[variables('dnsPrefix')]"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "[variables('publiclbName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"type": "Microsoft.Network/loadBalancers",
|
||||
"apiVersion": "2015-06-15",
|
||||
"dependsOn": [
|
||||
"[variables('publicIPAddressID')]"
|
||||
],
|
||||
"properties": {
|
||||
"frontendIPConfigurations": [
|
||||
{
|
||||
"name": "[variables('lbFE')]",
|
||||
"properties": {
|
||||
"publicIPAddress": {
|
||||
"id": "[variables('publicIPAddressID')]"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"inboundNatRules": [
|
||||
{
|
||||
"name": "[variables('rpdNAT')]",
|
||||
"properties": {
|
||||
"frontendIPConfiguration": {
|
||||
"id": "[variables('publiclbFEConfigID')]"
|
||||
},
|
||||
"protocol": "tcp",
|
||||
"frontendPort": "[variables('rdpPort')]",
|
||||
"backendPort": 3389,
|
||||
"enableFloatingIP": false
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "[variables('adVmDeployment')]",
|
||||
"type": "Microsoft.Resources/deployments",
|
||||
"apiVersion": "2015-01-01",
|
||||
"dependsOn": [
|
||||
"[variables('publiclbID')]"
|
||||
],
|
||||
"properties": {
|
||||
"mode": "Incremental",
|
||||
"templateLink": {
|
||||
"uri": "[variables('adTemplateURL')]",
|
||||
"contentVersion": "1.0.0.0"
|
||||
},
|
||||
"parameters": {
|
||||
"adminUsername": {
|
||||
"value": "[parameters('adminUsername')]"
|
||||
},
|
||||
"adminPassword": {
|
||||
"value": "[parameters('adminPassword')]"
|
||||
},
|
||||
"adRDPNATRuleID": {
|
||||
"value": "[variables('adRDPNATRuleID')]"
|
||||
},
|
||||
"storageAccount": {
|
||||
"value": "[variables('adStorageName')]"
|
||||
},
|
||||
"subnetResourceID": {
|
||||
"value": "[variables('staticSubnetID')]"
|
||||
},
|
||||
"storageAccountType": {
|
||||
"value": "[variables('storageAccountType')]"
|
||||
},
|
||||
"windowsImageSKU": {
|
||||
"value": "[variables('adOSVersion')]"
|
||||
},
|
||||
"vmName": {
|
||||
"value": "[variables('adPDCVMName')]"
|
||||
},
|
||||
"vmSize": {
|
||||
"value": "[variables('adVMSize')]"
|
||||
},
|
||||
"adDNicName": {
|
||||
"value": "[variables('adNICName')]"
|
||||
},
|
||||
"primaryAdIpAddress": {
|
||||
"value": "[variables('primaryAdIpAddress')]"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "[variables('deployPrimaryAd')]",
|
||||
"type": "Microsoft.Resources/deployments",
|
||||
"apiVersion": "2015-01-01",
|
||||
"dependsOn": [
|
||||
"[variables('adVmDeploymentId')]"
|
||||
],
|
||||
"properties": {
|
||||
"mode": "Incremental",
|
||||
"templateLink": {
|
||||
"uri": "[variables('deployPrimaryAdTemplateURL')]",
|
||||
"contentVersion": "1.0.0.0"
|
||||
},
|
||||
"parameters": {
|
||||
"primaryADName": {
|
||||
"value": "[variables('adPDCVMName')]"
|
||||
},
|
||||
"domainName": {
|
||||
"value": "[parameters('domainName')]"
|
||||
},
|
||||
"adminUsername": {
|
||||
"value": "[parameters('adminUsername')]"
|
||||
},
|
||||
"adminPassword": {
|
||||
"value": "[parameters('adminPassword')]"
|
||||
},
|
||||
"assetLocation": {
|
||||
"value": "[variables('assetLocation')]"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "[variables('updateVNetDNS1')]",
|
||||
"type": "Microsoft.Resources/deployments",
|
||||
"apiVersion": "2015-01-01",
|
||||
"dependsOn": [
|
||||
"[variables('deployPrimaryAdId')]"
|
||||
],
|
||||
"properties": {
|
||||
"mode": "Incremental",
|
||||
"templateLink": {
|
||||
"uri": "[variables('vnetwithDNSTemplateURL')]",
|
||||
"contentVersion": "1.0.0.0"
|
||||
},
|
||||
"parameters": {
|
||||
"virtualNetworkName": {
|
||||
"value": "[variables('virtualNetworkName')]"
|
||||
},
|
||||
"virtualNetworkAddressRange": {
|
||||
"value": "[variables('virtualNetworkAddressRange')]"
|
||||
},
|
||||
"subnets": {
|
||||
"value": "[variables('subnets')]"
|
||||
},
|
||||
"dnsServerAddress": {
|
||||
"value": [ "[variables('primaryAdIpAddress')]" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
"subnets": "[variables('subnets')]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "[variables('publicIPAddressName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"type": "Microsoft.Network/publicIPAddresses",
|
||||
"dependsOn": [
|
||||
"[variables('vnetID')]"
|
||||
],
|
||||
"properties": {
|
||||
"publicIPAllocationMethod": "Dynamic",
|
||||
"dnsSettings": {
|
||||
"domainNameLabel": "[variables('dnsPrefix')]"
|
||||
}
|
||||
],
|
||||
"outputs": { }
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "[variables('publiclbName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"type": "Microsoft.Network/loadBalancers",
|
||||
"dependsOn": [
|
||||
"[variables('publicIPAddressID')]"
|
||||
],
|
||||
"properties": {
|
||||
"frontendIPConfigurations": [
|
||||
{
|
||||
"name": "[variables('lbFE')]",
|
||||
"properties": {
|
||||
"publicIPAddress": {
|
||||
"id": "[variables('publicIPAddressID')]"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"inboundNatRules": [
|
||||
{
|
||||
"name": "[variables('rpdNAT')]",
|
||||
"properties": {
|
||||
"frontendIPConfiguration": {
|
||||
"id": "[variables('publiclbFEConfigID')]"
|
||||
},
|
||||
"protocol": "tcp",
|
||||
"frontendPort": "[variables('rdpPort')]",
|
||||
"backendPort": 3389,
|
||||
"enableFloatingIP": false
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "[variables('adVmDeployment')]",
|
||||
"type": "Microsoft.Resources/deployments",
|
||||
"dependsOn": [
|
||||
"[variables('publiclbID')]"
|
||||
],
|
||||
"properties": {
|
||||
"mode": "Incremental",
|
||||
"templateLink": {
|
||||
"uri": "[variables('adTemplateURL')]",
|
||||
"contentVersion": "1.0.0.0"
|
||||
},
|
||||
"parameters": {
|
||||
"adminUsername": {
|
||||
"value": "[parameters('adminUsername')]"
|
||||
},
|
||||
"adminPassword": {
|
||||
"value": "[parameters('adminPassword')]"
|
||||
},
|
||||
"adRDPNATRuleID": {
|
||||
"value": "[variables('adRDPNATRuleID')]"
|
||||
},
|
||||
"storageAccount": {
|
||||
"value": "[variables('adStorageName')]"
|
||||
},
|
||||
"subnetResourceID": {
|
||||
"value": "[variables('staticSubnetID')]"
|
||||
},
|
||||
"storageAccountType": {
|
||||
"value": "[variables('storageAccountType')]"
|
||||
},
|
||||
"windowsImageSKU": {
|
||||
"value": "[variables('adOSVersion')]"
|
||||
},
|
||||
"vmName": {
|
||||
"value": "[variables('adPDCVMName')]"
|
||||
},
|
||||
"vmSize": {
|
||||
"value": "[variables('adVMSize')]"
|
||||
},
|
||||
"adDNicName": {
|
||||
"value": "[variables('adNICName')]"
|
||||
},
|
||||
"primaryAdIpAddress": {
|
||||
"value": "[variables('primaryAdIpAddress')]"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "[variables('deployPrimaryAd')]",
|
||||
"type": "Microsoft.Resources/deployments",
|
||||
"dependsOn": [
|
||||
"[variables('adVmDeploymentId')]"
|
||||
],
|
||||
"properties": {
|
||||
"mode": "Incremental",
|
||||
"templateLink": {
|
||||
"uri": "[variables('deployPrimaryAdTemplateURL')]",
|
||||
"contentVersion": "1.0.0.0"
|
||||
},
|
||||
"parameters": {
|
||||
"primaryADName": {
|
||||
"value": "[variables('adPDCVMName')]"
|
||||
},
|
||||
"domainName": {
|
||||
"value": "[parameters('domainName')]"
|
||||
},
|
||||
"adminUsername": {
|
||||
"value": "[parameters('adminUsername')]"
|
||||
},
|
||||
"adminPassword": {
|
||||
"value": "[parameters('adminPassword')]"
|
||||
},
|
||||
"assetLocation": {
|
||||
"value": "[variables('assetLocation')]"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "[variables('updateVNetDNS1')]",
|
||||
"type": "Microsoft.Resources/deployments",
|
||||
"dependsOn": [
|
||||
"[variables('deployPrimaryAdId')]"
|
||||
],
|
||||
"properties": {
|
||||
"mode": "Incremental",
|
||||
"templateLink": {
|
||||
"uri": "[variables('vnetwithDNSTemplateURL')]",
|
||||
"contentVersion": "1.0.0.0"
|
||||
},
|
||||
"parameters": {
|
||||
"virtualNetworkName": {
|
||||
"value": "[variables('virtualNetworkName')]"
|
||||
},
|
||||
"virtualNetworkAddressRange": {
|
||||
"value": "[variables('virtualNetworkAddressRange')]"
|
||||
},
|
||||
"subnets": {
|
||||
"value": "[variables('subnets')]"
|
||||
},
|
||||
"dnsServerAddress": {
|
||||
"value": [ "[variables('primaryAdIpAddress')]" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"outputs": {}
|
||||
}
|
|
@ -1,72 +1,72 @@
|
|||
{
|
||||
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"parameters": {
|
||||
"primaryADName": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "The VM name of Primary AD"
|
||||
}
|
||||
},
|
||||
"domainName": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "The domain name"
|
||||
}
|
||||
},
|
||||
"adminUsername": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "The name of the Administrator of the new VMs and Domain"
|
||||
},
|
||||
"defaultValue": "sqlAdministrator"
|
||||
},
|
||||
"adminPassword": {
|
||||
"type": "securestring",
|
||||
"metadata": {
|
||||
"description": "The password for the Administrator account of the new VMs and Domain"
|
||||
}
|
||||
},
|
||||
"assetLocation": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "The location of resources that the script is dependent on such as linked templates and DSC modules"
|
||||
}
|
||||
}
|
||||
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"apiProfile": "2018-03-01-hybrid",
|
||||
"parameters": {
|
||||
"primaryADName": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "The VM name of Primary AD"
|
||||
}
|
||||
},
|
||||
"variables": {
|
||||
"adPDCModulesURL": "[concat(parameters('assetLocation'),'/CreateADPDC.ps1.zip')]",
|
||||
"adPDCConfigurationFunction": "CreateADPDC.ps1\\CreateADPDC"
|
||||
"domainName": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "The domain name"
|
||||
}
|
||||
},
|
||||
"resources": [
|
||||
{
|
||||
"name": "[concat(parameters('primaryADName'),'/InstallDomainController')]",
|
||||
"type": "Microsoft.Compute/virtualMachines/extensions",
|
||||
"location": "[resourceGroup().location]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"properties": {
|
||||
"publisher": "Microsoft.Powershell",
|
||||
"type": "DSC",
|
||||
"typeHandlerVersion": "2.8",
|
||||
"autoUpgradeMinorVersion": "true",
|
||||
"settings": {
|
||||
"modulesUrl": "[variables('adPDCModulesURL')]",
|
||||
"configurationFunction": "[variables('adPDCConfigurationFunction')]",
|
||||
"properties": {
|
||||
"domainName": "[parameters('domainName')]",
|
||||
"adminCreds": {
|
||||
"userName": "[parameters('adminUserName')]",
|
||||
"password": "PrivateSettingsRef:adminPassword"
|
||||
}
|
||||
}
|
||||
},
|
||||
"protectedSettings": {
|
||||
"items": {
|
||||
"adminPassword": "[parameters('adminPassword')]"
|
||||
}
|
||||
}
|
||||
"adminUsername": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "The name of the Administrator of the new VMs and Domain"
|
||||
},
|
||||
"defaultValue": "sqlAdministrator"
|
||||
},
|
||||
"adminPassword": {
|
||||
"type": "securestring",
|
||||
"metadata": {
|
||||
"description": "The password for the Administrator account of the new VMs and Domain"
|
||||
}
|
||||
},
|
||||
"assetLocation": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "The location of resources that the script is dependent on such as linked templates and DSC modules"
|
||||
}
|
||||
}
|
||||
},
|
||||
"variables": {
|
||||
"adPDCModulesURL": "[concat(parameters('assetLocation'),'/CreateADPDC.ps1.zip')]",
|
||||
"adPDCConfigurationFunction": "CreateADPDC.ps1\\CreateADPDC"
|
||||
},
|
||||
"resources": [
|
||||
{
|
||||
"name": "[concat(parameters('primaryADName'),'/InstallDomainController')]",
|
||||
"type": "Microsoft.Compute/virtualMachines/extensions",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"publisher": "Microsoft.Powershell",
|
||||
"type": "DSC",
|
||||
"typeHandlerVersion": "2.8",
|
||||
"autoUpgradeMinorVersion": "true",
|
||||
"settings": {
|
||||
"modulesUrl": "[variables('adPDCModulesURL')]",
|
||||
"configurationFunction": "[variables('adPDCConfigurationFunction')]",
|
||||
"properties": {
|
||||
"domainName": "[parameters('domainName')]",
|
||||
"adminCreds": {
|
||||
"userName": "[parameters('adminUserName')]",
|
||||
"password": "PrivateSettingsRef:adminPassword"
|
||||
}
|
||||
}
|
||||
},
|
||||
"protectedSettings": {
|
||||
"items": {
|
||||
"adminPassword": "[parameters('adminPassword')]"
|
||||
}
|
||||
}
|
||||
],
|
||||
"outputs": { }
|
||||
}
|
||||
}
|
||||
],
|
||||
"outputs": {}
|
||||
}
|
|
@ -1,38 +1,38 @@
|
|||
{
|
||||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"parameters": {
|
||||
"nicName": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "The name of the NIC to Create or Update"
|
||||
}
|
||||
},
|
||||
"ipConfigurations": {
|
||||
"type": "array",
|
||||
"metadata": {
|
||||
"description": "The IP configurations of the NIC"
|
||||
}
|
||||
},
|
||||
"dnsServers": {
|
||||
"type": "array",
|
||||
"metadata": {
|
||||
"description": "The DNS Servers of the NIC"
|
||||
}
|
||||
}
|
||||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"apiProfile": "2018-03-01-hybrid",
|
||||
"parameters": {
|
||||
"nicName": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "The name of the NIC to Create or Update"
|
||||
}
|
||||
},
|
||||
"resources": [
|
||||
{
|
||||
"name": "[parameters('nicName')]",
|
||||
"type": "Microsoft.Network/networkInterfaces",
|
||||
"location": "[resourcegroup().location]",
|
||||
"apiVersion": "2015-05-01-preview",
|
||||
"properties": {
|
||||
"ipConfigurations": "[parameters('ipConfigurations')]",
|
||||
"dnsSettings": {
|
||||
"dnsServers": "[parameters('dnsServers')]"
|
||||
}
|
||||
}
|
||||
"ipConfigurations": {
|
||||
"type": "array",
|
||||
"metadata": {
|
||||
"description": "The IP configurations of the NIC"
|
||||
}
|
||||
},
|
||||
"dnsServers": {
|
||||
"type": "array",
|
||||
"metadata": {
|
||||
"description": "The DNS Servers of the NIC"
|
||||
}
|
||||
}
|
||||
},
|
||||
"resources": [
|
||||
{
|
||||
"name": "[parameters('nicName')]",
|
||||
"type": "Microsoft.Network/networkInterfaces",
|
||||
"location": "[resourcegroup().location]",
|
||||
"properties": {
|
||||
"ipConfigurations": "[parameters('ipConfigurations')]",
|
||||
"dnsSettings": {
|
||||
"dnsServers": "[parameters('dnsServers')]"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -1,51 +1,51 @@
|
|||
{
|
||||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"parameters": {
|
||||
"virtualNetworkName": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "The name of the Virtual Network"
|
||||
}
|
||||
},
|
||||
"virtualNetworkAddressRange": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "The address range of the VNET in CIDR format"
|
||||
}
|
||||
},
|
||||
"subnets": {
|
||||
"type": "array",
|
||||
"metadata": {
|
||||
"description": "The subnet definition for the VNET"
|
||||
}
|
||||
},
|
||||
"DNSServerAddress": {
|
||||
"type": "array",
|
||||
"metadata": {
|
||||
"description": "The DNS address(es) of the DNS Server(s) used by the VNET"
|
||||
}
|
||||
}
|
||||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"apiProfile": "2018-03-01-hybrid",
|
||||
"parameters": {
|
||||
"virtualNetworkName": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "The name of the Virtual Network"
|
||||
}
|
||||
},
|
||||
"variables": {
|
||||
"virtualNetworkAddressRange": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "The address range of the VNET in CIDR format"
|
||||
}
|
||||
},
|
||||
"resources": [
|
||||
{
|
||||
"name": "[parameters('virtualNetworkName')]",
|
||||
"type": "Microsoft.Network/virtualNetworks",
|
||||
"location": "[resourceGroup().location]",
|
||||
"apiVersion": "2015-05-01-preview",
|
||||
"properties": {
|
||||
"addressSpace": {
|
||||
"addressPrefixes": [
|
||||
"[parameters('virtualNetworkAddressRange')]"
|
||||
]
|
||||
},
|
||||
"dhcpOptions": {
|
||||
"dnsServers": "[parameters('DNSServerAddress')]"
|
||||
},
|
||||
"subnets": "[parameters('subnets')]"
|
||||
}
|
||||
}
|
||||
]
|
||||
"subnets": {
|
||||
"type": "array",
|
||||
"metadata": {
|
||||
"description": "The subnet definition for the VNET"
|
||||
}
|
||||
},
|
||||
"DNSServerAddress": {
|
||||
"type": "array",
|
||||
"metadata": {
|
||||
"description": "The DNS address(es) of the DNS Server(s) used by the VNET"
|
||||
}
|
||||
}
|
||||
},
|
||||
"variables": {
|
||||
},
|
||||
"resources": [
|
||||
{
|
||||
"name": "[parameters('virtualNetworkName')]",
|
||||
"type": "Microsoft.Network/virtualNetworks",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"addressSpace": {
|
||||
"addressPrefixes": [
|
||||
"[parameters('virtualNetworkAddressRange')]"
|
||||
]
|
||||
},
|
||||
"dhcpOptions": {
|
||||
"dnsServers": "[parameters('DNSServerAddress')]"
|
||||
},
|
||||
"subnets": "[parameters('subnets')]"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,219 +1,213 @@
|
|||
{
|
||||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"parameters": {
|
||||
"adminUsername": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "Username for the Virtual Machine."
|
||||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"apiProfile": "2018-03-01-hybrid",
|
||||
"parameters": {
|
||||
"adminUsername": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "Username for the Virtual Machine."
|
||||
},
|
||||
"defaultValue": "Administrator"
|
||||
},
|
||||
"adminPassword": {
|
||||
"type": "securestring",
|
||||
"metadata": {
|
||||
"description": "Password for the Virtual Machine."
|
||||
},
|
||||
"defaultValue": "[concat('Subscription#',subscription().subscriptionId)]"
|
||||
}
|
||||
},
|
||||
"variables": {
|
||||
"vmName": "[substring(concat('simplewinvm',resourceGroup().Name),0,12)]",
|
||||
"vmExtensionName": "IaaSAntimalware",
|
||||
"storageAccountName": "[toLower(concat(resourceGroup().name,'amsa'))]",
|
||||
"storageAccountType": "Standard_LRS",
|
||||
"vmStorageAccountContainerName": "vhds",
|
||||
"vmSize": "Standard_A2",
|
||||
"imagePublisher": "MicrosoftWindowsServer",
|
||||
"imageOffer": "WindowsServer",
|
||||
"imageSKU": "2012-R2-Datacenter",
|
||||
"imageVersion": "latest",
|
||||
"OSDiskName": "osdisk",
|
||||
"networkSecurityGroupName": "[concat(resourceGroup().name,'-amsg')]",
|
||||
"publicIPAddressName": "[concat(resourceGroup().name,'-amip')]",
|
||||
"dnsName": "[concat(resourceGroup().name,'-amdns')]",
|
||||
"virtualNetworkName": "[concat(resourceGroup().name,'-amvnet')]",
|
||||
"addressPrefix": "10.0.0.0/24",
|
||||
"subnetName": "[concat(resourceGroup().name,'-amsubnet')]",
|
||||
"subnetPrefix": "10.0.0.0/24",
|
||||
"nicName": "[concat(resourceGroup().name,'-amvnic')]",
|
||||
"vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]",
|
||||
"subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]"
|
||||
},
|
||||
"resources": [
|
||||
{
|
||||
"type": "Microsoft.Network/networkSecurityGroups",
|
||||
"name": "[variables('networkSecurityGroupName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"securityRules": [
|
||||
{
|
||||
"name": "rule1",
|
||||
"properties": {
|
||||
"protocol": "*",
|
||||
"sourcePortRange": "*",
|
||||
"destinationPortRange": "*",
|
||||
"sourceAddressPrefix": "*",
|
||||
"destinationAddressPrefix": "*",
|
||||
"access": "Allow",
|
||||
"priority": 101,
|
||||
"direction": "Inbound"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Storage/storageAccounts",
|
||||
"name": "[variables('storageAccountName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"accountType": "[variables('storageAccountType')]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Network/publicIPAddresses",
|
||||
"name": "[variables('publicIPAddressName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"publicIPAllocationMethod": "Dynamic",
|
||||
"dnsSettings": {
|
||||
"domainNameLabel": "[variables('dnsName')]"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Network/virtualNetworks",
|
||||
"name": "[variables('virtualNetworkName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Network/networkSecurityGroups/', variables('networkSecurityGroupName'))]"
|
||||
],
|
||||
"properties": {
|
||||
"addressSpace": {
|
||||
"addressPrefixes": [
|
||||
"[variables('addressPrefix')]"
|
||||
]
|
||||
},
|
||||
"subnets": [
|
||||
{
|
||||
"name": "[variables('subnetName')]",
|
||||
"properties": {
|
||||
"addressPrefix": "[variables('subnetPrefix')]",
|
||||
"networkSecurityGroup": {
|
||||
"id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('networkSecurityGroupName'))]"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Network/networkInterfaces",
|
||||
"name": "[variables('nicName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]",
|
||||
"[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]"
|
||||
],
|
||||
"properties": {
|
||||
"dnsSettings": {
|
||||
},
|
||||
"ipConfigurations": [
|
||||
{
|
||||
"name": "ipconfig1",
|
||||
"properties": {
|
||||
"privateIPAllocationMethod": "Dynamic",
|
||||
"publicIPAddress": {
|
||||
"id": "[resourceId('Microsoft.Network/publicIPAddresses',variables('publicIPAddressName'))]"
|
||||
},
|
||||
"subnet": {
|
||||
"id": "[variables('subnetRef')]"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Compute/virtualMachines",
|
||||
"name": "[variables('vmName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]",
|
||||
"[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]"
|
||||
],
|
||||
"properties": {
|
||||
"hardwareProfile": {
|
||||
"vmSize": "[variables('vmSize')]"
|
||||
},
|
||||
"osProfile": {
|
||||
"computerName": "[variables('vmName')]",
|
||||
"adminUsername": "[parameters('adminUsername')]",
|
||||
"adminPassword": "[parameters('adminPassword')]"
|
||||
},
|
||||
"storageProfile": {
|
||||
"imageReference": {
|
||||
"publisher": "[variables('imagePublisher')]",
|
||||
"offer": "[variables('imageOffer')]",
|
||||
"sku": "[variables('imageSKU')]",
|
||||
"version": "[variables('imageVersion')]"
|
||||
},
|
||||
"osDisk": {
|
||||
"name": "[variables('OSDiskName')]",
|
||||
"vhd": {
|
||||
"uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName')), providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]).primaryEndpoints.blob, variables('vmStorageAccountContainerName'),'/',variables('OSDiskName'),'.vhd')]"
|
||||
},
|
||||
"defaultValue": "Administrator"
|
||||
"caching": "ReadWrite",
|
||||
"createOption": "FromImage"
|
||||
}
|
||||
},
|
||||
"adminPassword": {
|
||||
"type": "securestring",
|
||||
"metadata": {
|
||||
"description": "Password for the Virtual Machine."
|
||||
},
|
||||
"defaultValue": "[concat('Subscription#',subscription().subscriptionId)]"
|
||||
"networkProfile": {
|
||||
"networkInterfaces": [
|
||||
{
|
||||
"id": "[resourceId('Microsoft.Network/networkInterfaces',variables('nicName'))]"
|
||||
}
|
||||
]
|
||||
},
|
||||
"diagnosticsProfile": {
|
||||
"bootDiagnostics": {
|
||||
"enabled": "true",
|
||||
"storageUri": "[reference(concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName')), providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]).primaryEndpoints.blob]"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"variables": {
|
||||
"vmName": "[substring(concat('simplewinvm',resourceGroup().Name),0,12)]",
|
||||
"vmExtensionName": "IaaSAntimalware",
|
||||
"storageAccountName": "[toLower(concat(resourceGroup().name,'amsa'))]",
|
||||
"storageAccountType": "Standard_LRS",
|
||||
"vmStorageAccountContainerName": "vhds",
|
||||
"vmSize": "Standard_A2",
|
||||
"imagePublisher": "MicrosoftWindowsServer",
|
||||
"imageOffer": "WindowsServer",
|
||||
"imageSKU": "2012-R2-Datacenter",
|
||||
"imageVersion": "latest",
|
||||
"OSDiskName": "osdisk",
|
||||
"networkSecurityGroupName": "[concat(resourceGroup().name,'-amsg')]",
|
||||
"publicIPAddressName": "[concat(resourceGroup().name,'-amip')]",
|
||||
"dnsName": "[concat(resourceGroup().name,'-amdns')]",
|
||||
"virtualNetworkName": "[concat(resourceGroup().name,'-amvnet')]",
|
||||
"addressPrefix": "10.0.0.0/24",
|
||||
"subnetName": "[concat(resourceGroup().name,'-amsubnet')]",
|
||||
"subnetPrefix": "10.0.0.0/24",
|
||||
"nicName": "[concat(resourceGroup().name,'-amvnic')]",
|
||||
"vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]",
|
||||
"subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]"
|
||||
},
|
||||
"resources": [
|
||||
{
|
||||
"apiVersion": "2015-05-01-preview",
|
||||
"type": "Microsoft.Network/networkSecurityGroups",
|
||||
"name": "[variables('networkSecurityGroupName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"securityRules": [
|
||||
{
|
||||
"name": "rule1",
|
||||
"properties": {
|
||||
"protocol": "*",
|
||||
"sourcePortRange": "*",
|
||||
"destinationPortRange": "*",
|
||||
"sourceAddressPrefix": "*",
|
||||
"destinationAddressPrefix": "*",
|
||||
"access": "Allow",
|
||||
"priority": 101,
|
||||
"direction": "Inbound"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Storage/storageAccounts",
|
||||
"name": "[variables('storageAccountName')]",
|
||||
"apiVersion": "2015-05-01-preview",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"accountType": "[variables('storageAccountType')]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "2015-05-01-preview",
|
||||
"type": "Microsoft.Network/publicIPAddresses",
|
||||
"name": "[variables('publicIPAddressName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"publicIPAllocationMethod": "Dynamic",
|
||||
"dnsSettings": {
|
||||
"domainNameLabel": "[variables('dnsName')]"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "2015-05-01-preview",
|
||||
"type": "Microsoft.Network/virtualNetworks",
|
||||
"name": "[variables('virtualNetworkName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Network/networkSecurityGroups/', variables('networkSecurityGroupName'))]"
|
||||
],
|
||||
"properties": {
|
||||
"addressSpace": {
|
||||
"addressPrefixes": [
|
||||
"[variables('addressPrefix')]"
|
||||
]
|
||||
},
|
||||
"subnets": [
|
||||
{
|
||||
"name": "[variables('subnetName')]",
|
||||
"properties": {
|
||||
"addressPrefix": "[variables('subnetPrefix')]",
|
||||
"networkSecurityGroup": {
|
||||
"id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('networkSecurityGroupName'))]"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "2015-05-01-preview",
|
||||
"type": "Microsoft.Network/networkInterfaces",
|
||||
"name": "[variables('nicName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]",
|
||||
"[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]"
|
||||
],
|
||||
"properties": {
|
||||
"dnsSettings": {
|
||||
},
|
||||
"ipConfigurations": [
|
||||
{
|
||||
"name": "ipconfig1",
|
||||
"properties": {
|
||||
"privateIPAllocationMethod": "Dynamic",
|
||||
"publicIPAddress": {
|
||||
"id": "[resourceId('Microsoft.Network/publicIPAddresses',variables('publicIPAddressName'))]"
|
||||
},
|
||||
"subnet": {
|
||||
"id": "[variables('subnetRef')]"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "2015-06-15",
|
||||
"type": "Microsoft.Compute/virtualMachines",
|
||||
"name": "[variables('vmName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]",
|
||||
"[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]"
|
||||
],
|
||||
"properties": {
|
||||
"hardwareProfile": {
|
||||
"vmSize": "[variables('vmSize')]"
|
||||
},
|
||||
"osProfile": {
|
||||
"computerName": "[variables('vmName')]",
|
||||
"adminUsername": "[parameters('adminUsername')]",
|
||||
"adminPassword": "[parameters('adminPassword')]"
|
||||
},
|
||||
"storageProfile": {
|
||||
"imageReference": {
|
||||
"publisher": "[variables('imagePublisher')]",
|
||||
"offer": "[variables('imageOffer')]",
|
||||
"sku": "[variables('imageSKU')]",
|
||||
"version": "[variables('imageVersion')]"
|
||||
},
|
||||
"osDisk": {
|
||||
"name": "[variables('OSDiskName')]",
|
||||
"vhd": {
|
||||
"uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName')), providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]).primaryEndpoints.blob, variables('vmStorageAccountContainerName'),'/',variables('OSDiskName'),'.vhd')]"
|
||||
},
|
||||
"caching": "ReadWrite",
|
||||
"createOption": "FromImage"
|
||||
}
|
||||
},
|
||||
"networkProfile": {
|
||||
"networkInterfaces": [
|
||||
{
|
||||
"id": "[resourceId('Microsoft.Network/networkInterfaces',variables('nicName'))]"
|
||||
}
|
||||
]
|
||||
},
|
||||
"diagnosticsProfile": {
|
||||
"bootDiagnostics": {
|
||||
"enabled": "true",
|
||||
"storageUri": "[reference(concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName')), providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]).primaryEndpoints.blob]"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "2015-06-15",
|
||||
"type": "Microsoft.Compute/virtualMachines/extensions",
|
||||
"name": "[concat(variables('vmName'),'/', variables('vmExtensionName'))]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]"
|
||||
],
|
||||
"properties": {
|
||||
"publisher": "Microsoft.Azure.Security",
|
||||
"type": "IaaSAntimalware",
|
||||
"typeHandlerVersion": "1.4",
|
||||
"autoUpgradeMinorVersion": true,
|
||||
"settings": {
|
||||
"AntimalwareEnabled": true,
|
||||
"RealtimeProtectionEnabled": "true",
|
||||
"ScheduledScanSettings": {
|
||||
"isEnabled": "true",
|
||||
"scanType": "Quick",
|
||||
"day": "7",
|
||||
"time": "120"
|
||||
}
|
||||
}
|
||||
}
|
||||
{
|
||||
"type": "Microsoft.Compute/virtualMachines/extensions",
|
||||
"name": "[concat(variables('vmName'),'/', variables('vmExtensionName'))]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]"
|
||||
],
|
||||
"properties": {
|
||||
"publisher": "Microsoft.Azure.Security",
|
||||
"type": "IaaSAntimalware",
|
||||
"typeHandlerVersion": "1.4",
|
||||
"autoUpgradeMinorVersion": true,
|
||||
"settings": {
|
||||
"AntimalwareEnabled": true,
|
||||
"RealtimeProtectionEnabled": "true",
|
||||
"ScheduledScanSettings": {
|
||||
"isEnabled": "true",
|
||||
"scanType": "Quick",
|
||||
"day": "7",
|
||||
"time": "120"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
||||
"contentVersion": "1.16.08.15",
|
||||
"apiProfile": "2018-03-01-hybrid",
|
||||
"parameters": {
|
||||
"azureAccountUsername": {
|
||||
"type": "string",
|
||||
|
@ -85,7 +86,7 @@
|
|||
"subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]",
|
||||
"nsgName": "[concat('ng', resourceGroup().name)]",
|
||||
"nsgID": "[resourceId('Microsoft.Network/networkSecurityGroups',variables('nsgName'))]",
|
||||
"modulesPath": "https://raw.githubusercontent.com/Azure/AzureStack-QuickStart-Templates/master/bootstorm-vm-boot-time/",
|
||||
"modulesPath": "https://raw.githubusercontent.com/Azure/AzureStack-QuickStart-Templates/master/bootstorm-vm-boot-time/",
|
||||
"moduleVMBootAll": "VMBootAll.zip",
|
||||
"modulesUrlVMBootAll": "[concat(variables('modulesPath'),variables('moduleVMBootAll'))]",
|
||||
"configurationFunctionVMBootAll": "VMBootAll.ps1\\ConfigureVMBootAll",
|
||||
|
@ -95,7 +96,6 @@
|
|||
},
|
||||
"resources": [
|
||||
{
|
||||
"apiVersion": "2015-06-15",
|
||||
"type": "Microsoft.Storage/storageAccounts",
|
||||
"name": "[tolower(variables('uniqueStorageAccountName'))]",
|
||||
"location": "[variables('location')]",
|
||||
|
@ -104,7 +104,6 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "2015-06-15",
|
||||
"type": "Microsoft.Network/networkSecurityGroups",
|
||||
"name": "[variables('nsgName')]",
|
||||
"location": "[variables('location')]",
|
||||
|
@ -127,7 +126,6 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "2015-06-15",
|
||||
"type": "Microsoft.Network/virtualNetworks",
|
||||
"name": "[variables('virtualNetworkName')]",
|
||||
"location": "[variables('location')]",
|
||||
|
@ -152,22 +150,20 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Network/publicIPAddresses",
|
||||
"name": "[variables('publicIPAddressName')]",
|
||||
"apiVersion": "2015-05-01-preview",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"publicIPAllocationMethod": "Dynamic",
|
||||
"dnsSettings": {
|
||||
"domainNameLabel": "[variables('dnsPrefix')]"
|
||||
}
|
||||
},
|
||||
"dependsOn": [
|
||||
"[variables('vnetID')]"
|
||||
]
|
||||
},
|
||||
"type": "Microsoft.Network/publicIPAddresses",
|
||||
"name": "[variables('publicIPAddressName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"publicIPAllocationMethod": "Dynamic",
|
||||
"dnsSettings": {
|
||||
"domainNameLabel": "[variables('dnsPrefix')]"
|
||||
}
|
||||
},
|
||||
"dependsOn": [
|
||||
"[variables('vnetID')]"
|
||||
]
|
||||
},
|
||||
{
|
||||
"apiVersion": "2015-06-15",
|
||||
"type": "Microsoft.Network/networkInterfaces",
|
||||
"name": "[variables('vmNicName')]",
|
||||
"location": "[variables('location')]",
|
||||
|
@ -186,14 +182,13 @@
|
|||
},
|
||||
"publicIPAddress": {
|
||||
"id": "[resourceId('Microsoft.Network/publicIPAddresses',variables('publicIPAddressName'))]"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "2015-06-15",
|
||||
"type": "Microsoft.Network/networkInterfaces",
|
||||
"name": "[concat(variables('vmNicName'),copyIndex())]",
|
||||
"location": "[variables('location')]",
|
||||
|
@ -212,14 +207,13 @@
|
|||
"privateIPAllocationMethod": "Dynamic",
|
||||
"subnet": {
|
||||
"id": "[variables('subnetRef')]"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "2015-06-15",
|
||||
"type": "Microsoft.Compute/virtualMachines",
|
||||
"name": "[variables('vmName')]",
|
||||
"location": "[variables('location')]",
|
||||
|
@ -267,7 +261,6 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "2015-06-15",
|
||||
"type": "Microsoft.Compute/virtualMachines",
|
||||
"name": "[concat(variables('vmName'),copyIndex())]",
|
||||
"location": "[variables('location')]",
|
||||
|
@ -322,7 +315,6 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "2015-06-15",
|
||||
"type": "Microsoft.Compute/virtualMachines/extensions",
|
||||
"name": "[concat(variables('vmName'),'/dscExtension')]",
|
||||
"location": "[variables('location')]",
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
||||
"contentVersion": "1.16.07.29",
|
||||
"apiProfile": "2018-03-01-hybrid",
|
||||
"parameters": {
|
||||
"vmCount": {
|
||||
"type": "int",
|
||||
|
@ -181,7 +182,6 @@
|
|||
},
|
||||
"resources": [
|
||||
{
|
||||
"apiVersion": "2015-06-15",
|
||||
"type": "Microsoft.Storage/storageAccounts",
|
||||
"name": "[tolower(variables('uniqueStorageAccountName'))]",
|
||||
"location": "[variables('location')]",
|
||||
|
@ -190,7 +190,6 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "2015-06-15",
|
||||
"type": "Microsoft.Network/networkSecurityGroups",
|
||||
"name": "[variables('nsgName')]",
|
||||
"location": "[variables('location')]",
|
||||
|
@ -213,7 +212,6 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "2015-06-15",
|
||||
"type": "Microsoft.Network/virtualNetworks",
|
||||
"name": "[variables('virtualNetworkName')]",
|
||||
"location": "[variables('location')]",
|
||||
|
@ -238,22 +236,20 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Network/publicIPAddresses",
|
||||
"name": "[variables('publicIPAddressName')]",
|
||||
"apiVersion": "2015-05-01-preview",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"publicIPAllocationMethod": "Dynamic",
|
||||
"dnsSettings": {
|
||||
"domainNameLabel": "[variables('dnsPrefix')]"
|
||||
}
|
||||
},
|
||||
"dependsOn": [
|
||||
"[variables('vnetID')]"
|
||||
]
|
||||
"type": "Microsoft.Network/publicIPAddresses",
|
||||
"name": "[variables('publicIPAddressName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"publicIPAllocationMethod": "Dynamic",
|
||||
"dnsSettings": {
|
||||
"domainNameLabel": "[variables('dnsPrefix')]"
|
||||
}
|
||||
},
|
||||
"dependsOn": [
|
||||
"[variables('vnetID')]"
|
||||
]
|
||||
},
|
||||
{
|
||||
"apiVersion": "2015-06-15",
|
||||
"type": "Microsoft.Network/networkInterfaces",
|
||||
"name": "[variables('vmNicName')]",
|
||||
"location": "[variables('location')]",
|
||||
|
@ -279,7 +275,6 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "2015-06-15",
|
||||
"type": "Microsoft.Network/networkInterfaces",
|
||||
"name": "[concat(variables('vmNicName'),copyIndex())]",
|
||||
"location": "[variables('location')]",
|
||||
|
@ -305,7 +300,6 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "2015-06-15",
|
||||
"type": "Microsoft.Compute/virtualMachines",
|
||||
"name": "[variables('vmName')]",
|
||||
"location": "[variables('location')]",
|
||||
|
@ -315,7 +309,7 @@
|
|||
],
|
||||
"properties": {
|
||||
"hardwareProfile": {
|
||||
"vmSize": "[parameters('vmSize')]"
|
||||
"vmSize": "[parameters('vmSize')]"
|
||||
},
|
||||
"osProfile": {
|
||||
"computerName": "[variables('vmName')]",
|
||||
|
@ -354,7 +348,6 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "2015-06-15",
|
||||
"type": "Microsoft.Compute/virtualMachines",
|
||||
"name": "[concat(variables('vmName'),copyIndex())]",
|
||||
"location": "[variables('location')]",
|
||||
|
@ -424,7 +417,6 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "2015-06-15",
|
||||
"type": "Microsoft.Compute/virtualMachines/extensions",
|
||||
"name": "[concat(variables('vmName'),'/dscExtension')]",
|
||||
"location": "[variables('location')]",
|
||||
|
@ -450,7 +442,7 @@
|
|||
"AzureStorageAccount": "[variables('uniqueStorageAccountName')]",
|
||||
"AzureStorageAccessKey": "[listKeys(concat('Microsoft.Storage/storageAccounts/', variables('uniqueStorageAccountName')), '2015-06-15').key1]",
|
||||
"AzureStorageEndpoint": "[reference(resourceId('Microsoft.Storage/storageAccounts', variables('uniqueStorageAccountName')), '2015-06-15').primaryEndpoints['blob']]",
|
||||
"WaitForIoStormCompletion" : "[parameters('WaitForIoStormCompletion')]",
|
||||
"WaitForIoStormCompletion": "[parameters('WaitForIoStormCompletion')]",
|
||||
"FixedIops": "[parameters('vmFixedIops')]",
|
||||
"RunFixedIoLatencyTestAfterGoalSeek": "[parameters('vmRunFixedIoLatencyTestAfterGoalSeek')]",
|
||||
"DataDisks": "[parameters('vmDataDiskCount')]"
|
||||
|
@ -459,7 +451,6 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "2015-06-15",
|
||||
"type": "Microsoft.Compute/virtualMachines/extensions",
|
||||
"name": "[concat(variables('vmName'),copyIndex(),'/dscExtension')]",
|
||||
"location": "[variables('location')]",
|
||||
|
|
|
@ -1,52 +1,52 @@
|
|||
{
|
||||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"parameters": {
|
||||
"vmName": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "Name of an existing Windows VM to update"
|
||||
},
|
||||
"defaultValue": "[substring(concat('simplewinvm',resourceGroup().Name),0,12)]"
|
||||
},
|
||||
"userName": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "Username of a new or existing user"
|
||||
},
|
||||
"defaultValue": "localvmuser"
|
||||
},
|
||||
"password": {
|
||||
"type": "securestring",
|
||||
"metadata": {
|
||||
"description": "Password for the new or existing user"
|
||||
},
|
||||
"defaultValue": "[concat('Subscription#',subscription().subscriptionId)]"
|
||||
}
|
||||
"$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 an existing Windows VM to update"
|
||||
},
|
||||
"defaultValue": "[substring(concat('simplewinvm',resourceGroup().Name),0,12)]"
|
||||
},
|
||||
"variables": {
|
||||
"vmExtensionName": "WindowsVMAccessAgent"
|
||||
"userName": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "Username of a new or existing user"
|
||||
},
|
||||
"defaultValue": "localvmuser"
|
||||
},
|
||||
"resources": [
|
||||
{
|
||||
"apiVersion": "2015-06-15",
|
||||
"type": "Microsoft.Compute/virtualMachines/extensions",
|
||||
"name": "[concat(parameters('vmName'),'/', variables('vmExtensionName'))]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"dependsOn": [
|
||||
],
|
||||
"properties": {
|
||||
"publisher": "Microsoft.Compute",
|
||||
"type": "VMAccessAgent",
|
||||
"typeHandlerVersion": "2.0",
|
||||
"autoUpgradeMinorVersion": "true",
|
||||
"settings": {
|
||||
"UserName": "[parameters('userName')]"
|
||||
},
|
||||
"protectedSettings": {
|
||||
"Password" : "[parameters('password')]"
|
||||
}
|
||||
}
|
||||
"password": {
|
||||
"type": "securestring",
|
||||
"metadata": {
|
||||
"description": "Password for the new or existing user"
|
||||
},
|
||||
"defaultValue": "[concat('Subscription#',subscription().subscriptionId)]"
|
||||
}
|
||||
},
|
||||
"variables": {
|
||||
"vmExtensionName": "WindowsVMAccessAgent"
|
||||
},
|
||||
"resources": [
|
||||
{
|
||||
"type": "Microsoft.Compute/virtualMachines/extensions",
|
||||
"name": "[concat(parameters('vmName'),'/', variables('vmExtensionName'))]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"dependsOn": [
|
||||
],
|
||||
"properties": {
|
||||
"publisher": "Microsoft.Compute",
|
||||
"type": "VMAccessAgent",
|
||||
"typeHandlerVersion": "2.0",
|
||||
"autoUpgradeMinorVersion": "true",
|
||||
"settings": {
|
||||
"UserName": "[parameters('userName')]"
|
||||
},
|
||||
"protectedSettings": {
|
||||
"Password": "[parameters('password')]"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче