Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
461 lines (460 sloc) 20.9 KB
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json# ",
"contentVersion": "1.0.0.0",
"parameters": {
"commonSettings": {
"type": "object",
"metadata": {
"Description": "Common settings object"
}
},
"networkSettings": {
"type": "object",
"metadata": {
"Description": "Network settings object"
}
},
"machineSettings": {
"type": "object",
"metadata": {
"Description": "Machine settings object"
}
},
"storageAccountName": {
"type": "string",
"metadata": {
"Description": "Name of the storage account the VM is assigned to"
}
},
"nodeId": {
"type": "int",
"metadata": {
"Description": "Number of cluster nodes per storage account. One storage account cannot support more than 40 disks."
}
},
"vmSize": {
"type": "string",
"metadata": {
"Description": "Size of the VM"
}
},
"vmScripts": {
"type": "object",
"metadata": {
"Description": "Sripts to download and run on the VM"
}
},
"commandToExecute": {
"type": "string",
"metadata": {
"Description": "Command to run for the script extension."
}
}
},
"variables": {
"vmStorageAccountContainerName": "vhd",
"subnetRef": "[concat(resourceId('Microsoft.Network/virtualNetworks', parameters('networkSettings').virtualNetworkName), '/subnets/', parameters('networkSettings').subnet.name)]"
},
"resources": [
{
"apiVersion": "2015-05-01-preview",
"type": "Microsoft.Network/networkInterfaces",
"name": "[concat('nic', parameters('nodeId'))]",
"location": "[parameters('commonSettings').region]",
"properties": {
"ipConfigurations": [
{
"name": "ipconfig1",
"properties": {
"privateIPAllocationMethod": "Static",
"privateIPAddress": "[concat(parameters('networkSettings').nodesIpPrefix, parameters('nodeId'))]",
"subnet": {
"id": "[variables('subnetRef')]"
}
}
}
]
}
},
{
"apiVersion": "2015-05-01-preview",
"type": "Microsoft.Compute/virtualMachines",
"name": "[concat(parameters('machineSettings').machineNamePrefix, parameters('nodeId'))]",
"location": "[parameters('commonSettings').region]",
"dependsOn": [
"[concat('Microsoft.Network/networkInterfaces/', 'nic', parameters('nodeId'))]"
],
"properties": {
"availabilitySet": {
"id": "[resourceId('Microsoft.Compute/availabilitySets', parameters('commonSettings').availabilitySet)]"
},
"hardwareProfile": {
"vmSize": "[parameters('vmSize')]"
},
"osProfile": {
"computerName": "[concat(parameters('machineSettings').machineNamePrefix, parameters('nodeId'))]",
"adminUsername": "[parameters('machineSettings').adminUsername]",
"adminPassword": "[parameters('machineSettings').adminPassword]"
},
"storageProfile": {
"imageReference": "[parameters('machineSettings').imageReference]",
"osDisk": {
"name": "osdisk",
"vhd": {
"uri": "[concat('http://', parameters('storageAccountName'), '.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', parameters('machineSettings').machineNamePrefix, parameters('nodeId'),'os-disk.vhd')]"
},
"caching": "ReadWrite",
"createOption": "FromImage"
},
"dataDisks": [
{
"name": "datadisk0",
"diskSizeGB": "[parameters('machineSettings').dataDiskSize]",
"lun": 0,
"caching": "None",
"createOption": "Empty",
"vhd": {
"Uri": "[concat('http://', parameters('storageAccountName'), '.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', parameters('machineSettings').machineNamePrefix, parameters('nodeId'),'dataDisk0' ,'.vhd')]"
}
},
{
"name": "datadisk1",
"diskSizeGB": "[parameters('machineSettings').dataDiskSize]",
"lun": 1,
"caching": "None",
"createOption": "Empty",
"vhd": {
"Uri": "[concat('http://', parameters('storageAccountName'), '.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', parameters('machineSettings').machineNamePrefix, parameters('nodeId') ,'dataDisk1','.vhd')]"
}
},
{
"name": "datadisk2",
"diskSizeGB": "[parameters('machineSettings').dataDiskSize]",
"lun": 2,
"caching": "None",
"createOption": "Empty",
"vhd": {
"Uri": "[concat('http://', parameters('storageAccountName'), '.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', parameters('machineSettings').machineNamePrefix, parameters('nodeId') ,'dataDisk2','.vhd')]"
}
},
{
"name": "datadisk3",
"diskSizeGB": "[parameters('machineSettings').dataDiskSize]",
"lun": 3,
"caching": "None",
"createOption": "Empty",
"vhd": {
"Uri": "[concat('http://', parameters('storageAccountName'), '.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', parameters('machineSettings').machineNamePrefix, parameters('nodeId') ,'dataDisk3','.vhd')]"
}
},
{
"name": "datadisk4",
"diskSizeGB": "[parameters('machineSettings').dataDiskSize]",
"lun": 4,
"caching": "None",
"createOption": "Empty",
"vhd": {
"Uri": "[concat('http://', parameters('storageAccountName'), '.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', parameters('machineSettings').machineNamePrefix, parameters('nodeId'),'dataDisk4' ,'.vhd')]"
}
},
{
"name": "datadisk5",
"diskSizeGB": "[parameters('machineSettings').dataDiskSize]",
"lun": 5,
"caching": "None",
"createOption": "Empty",
"vhd": {
"Uri": "[concat('http://', parameters('storageAccountName'), '.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', parameters('machineSettings').machineNamePrefix, parameters('nodeId') ,'dataDisk5','.vhd')]"
}
},
{
"name": "datadisk6",
"diskSizeGB": "[parameters('machineSettings').dataDiskSize]",
"lun": 6,
"caching": "None",
"createOption": "Empty",
"vhd": {
"Uri": "[concat('http://', parameters('storageAccountName'), '.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', parameters('machineSettings').machineNamePrefix, parameters('nodeId') ,'dataDisk6','.vhd')]"
}
},
{
"name": "datadisk7",
"diskSizeGB": "[parameters('machineSettings').dataDiskSize]",
"lun": 7,
"caching": "None",
"createOption": "Empty",
"vhd": {
"Uri": "[concat('http://', parameters('storageAccountName'), '.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', parameters('machineSettings').machineNamePrefix, parameters('nodeId') ,'dataDisk7','.vhd')]"
}
},
{
"name": "datadisk8",
"diskSizeGB": "[parameters('machineSettings').dataDiskSize]",
"lun": 8,
"caching": "None",
"createOption": "Empty",
"vhd": {
"Uri": "[concat('http://', parameters('storageAccountName'), '.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', parameters('machineSettings').machineNamePrefix, parameters('nodeId'),'dataDisk8' ,'.vhd')]"
}
},
{
"name": "datadisk9",
"diskSizeGB": "[parameters('machineSettings').dataDiskSize]",
"lun": 9,
"caching": "None",
"createOption": "Empty",
"vhd": {
"Uri": "[concat('http://', parameters('storageAccountName'), '.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', parameters('machineSettings').machineNamePrefix, parameters('nodeId') ,'dataDisk9','.vhd')]"
}
},
{
"name": "datadisk10",
"diskSizeGB": "[parameters('machineSettings').dataDiskSize]",
"lun": 10,
"caching": "None",
"createOption": "Empty",
"vhd": {
"Uri": "[concat('http://', parameters('storageAccountName'), '.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', parameters('machineSettings').machineNamePrefix, parameters('nodeId') ,'dataDisk10','.vhd')]"
}
},
{
"name": "datadisk11",
"diskSizeGB": "[parameters('machineSettings').dataDiskSize]",
"lun": 11,
"caching": "None",
"createOption": "Empty",
"vhd": {
"Uri": "[concat('http://', parameters('storageAccountName'), '.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', parameters('machineSettings').machineNamePrefix, parameters('nodeId') ,'dataDisk11','.vhd')]"
}
},
{
"name": "datadisk12",
"diskSizeGB": "[parameters('machineSettings').dataDiskSize]",
"lun": 12,
"caching": "None",
"createOption": "Empty",
"vhd": {
"Uri": "[concat('http://', parameters('storageAccountName'), '.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/',parameters('machineSettings').machineNamePrefix, parameters('nodeId'),'dataDisk12' ,'.vhd')]"
}
},
{
"name": "datadisk13",
"diskSizeGB": "[parameters('machineSettings').dataDiskSize]",
"lun": 13,
"caching": "None",
"createOption": "Empty",
"vhd": {
"Uri": "[concat('http://', parameters('storageAccountName'), '.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', parameters('machineSettings').machineNamePrefix, parameters('nodeId') ,'dataDisk13','.vhd')]"
}
},
{
"name": "datadisk14",
"diskSizeGB": "[parameters('machineSettings').dataDiskSize]",
"lun": 14,
"caching": "None",
"createOption": "Empty",
"vhd": {
"Uri": "[concat('http://', parameters('storageAccountName'), '.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', parameters('machineSettings').machineNamePrefix, parameters('nodeId') ,'dataDisk14','.vhd')]"
}
},
{
"name": "datadisk15",
"diskSizeGB": "[parameters('machineSettings').dataDiskSize]",
"lun": 15,
"caching": "None",
"createOption": "Empty",
"vhd": {
"Uri": "[concat('http://', parameters('storageAccountName'), '.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', parameters('machineSettings').machineNamePrefix, parameters('nodeId') ,'dataDisk15','.vhd')]"
}
},
{
"name": "datadisk16",
"diskSizeGB": "[parameters('machineSettings').dataDiskSize]",
"lun": 16,
"caching": "None",
"createOption": "Empty",
"vhd": {
"Uri": "[concat('http://', parameters('storageAccountName'), '.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', parameters('machineSettings').machineNamePrefix, parameters('nodeId'),'dataDisk16' ,'.vhd')]"
}
},
{
"name": "datadisk17",
"diskSizeGB": "[parameters('machineSettings').dataDiskSize]",
"lun": 17,
"caching": "None",
"createOption": "Empty",
"vhd": {
"Uri": "[concat('http://', parameters('storageAccountName'), '.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', parameters('machineSettings').machineNamePrefix, parameters('nodeId') ,'dataDisk17','.vhd')]"
}
},
{
"name": "datadisk18",
"diskSizeGB": "[parameters('machineSettings').dataDiskSize]",
"lun": 18,
"caching": "None",
"createOption": "Empty",
"vhd": {
"Uri": "[concat('http://', parameters('storageAccountName'), '.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', parameters('machineSettings').machineNamePrefix, parameters('nodeId') ,'dataDisk18','.vhd')]"
}
},
{
"name": "datadisk19",
"diskSizeGB": "[parameters('machineSettings').dataDiskSize]",
"lun": 19,
"caching": "None",
"createOption": "Empty",
"vhd": {
"Uri": "[concat('http://', parameters('storageAccountName'), '.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', parameters('machineSettings').machineNamePrefix, parameters('nodeId') ,'dataDisk19','.vhd')]"
}
},
{
"name": "datadisk20",
"diskSizeGB": "[parameters('machineSettings').dataDiskSize]",
"lun": 20,
"caching": "None",
"createOption": "Empty",
"vhd": {
"Uri": "[concat('http://', parameters('storageAccountName'), '.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', parameters('machineSettings').machineNamePrefix, parameters('nodeId'),'dataDisk20' ,'.vhd')]"
}
},
{
"name": "datadisk21",
"diskSizeGB": "[parameters('machineSettings').dataDiskSize]",
"lun": 21,
"caching": "None",
"createOption": "Empty",
"vhd": {
"Uri": "[concat('http://', parameters('storageAccountName'), '.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', parameters('machineSettings').machineNamePrefix, parameters('nodeId') ,'dataDisk21','.vhd')]"
}
},
{
"name": "datadisk22",
"diskSizeGB": "[parameters('machineSettings').dataDiskSize]",
"lun": 22,
"caching": "None",
"createOption": "Empty",
"vhd": {
"Uri": "[concat('http://', parameters('storageAccountName'), '.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', parameters('machineSettings').machineNamePrefix, parameters('nodeId') ,'dataDisk22','.vhd')]"
}
},
{
"name": "datadisk23",
"diskSizeGB": "[parameters('machineSettings').dataDiskSize]",
"lun": 23,
"caching": "None",
"createOption": "Empty",
"vhd": {
"Uri": "[concat('http://', parameters('storageAccountName'), '.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', parameters('machineSettings').machineNamePrefix, parameters('nodeId') ,'dataDisk23','.vhd')]"
}
},
{
"name": "datadisk24",
"diskSizeGB": "[parameters('machineSettings').dataDiskSize]",
"lun": 24,
"caching": "None",
"createOption": "Empty",
"vhd": {
"Uri": "[concat('http://', parameters('storageAccountName'), '.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', parameters('machineSettings').machineNamePrefix, parameters('nodeId'),'dataDisk24' ,'.vhd')]"
}
},
{
"name": "datadisk25",
"diskSizeGB": "[parameters('machineSettings').dataDiskSize]",
"lun": 25,
"caching": "None",
"createOption": "Empty",
"vhd": {
"Uri": "[concat('http://', parameters('storageAccountName'), '.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', parameters('machineSettings').machineNamePrefix, parameters('nodeId') ,'dataDisk25','.vhd')]"
}
},
{
"name": "datadisk26",
"diskSizeGB": "[parameters('machineSettings').dataDiskSize]",
"lun": 26,
"caching": "None",
"createOption": "Empty",
"vhd": {
"Uri": "[concat('http://', parameters('storageAccountName'), '.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', parameters('machineSettings').machineNamePrefix, parameters('nodeId') ,'dataDisk26','.vhd')]"
}
},
{
"name": "datadisk27",
"diskSizeGB": "[parameters('machineSettings').dataDiskSize]",
"lun": 27,
"vhd": {
"caching": "None",
"createOption": "Empty",
"Uri": "[concat('http://', parameters('storageAccountName'), '.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', parameters('machineSettings').machineNamePrefix, parameters('nodeId') ,'dataDisk27','.vhd')]"
}
},
{
"name": "datadisk28",
"diskSizeGB": "[parameters('machineSettings').dataDiskSize]",
"lun": 28,
"caching": "None",
"createOption": "Empty",
"vhd": {
"Uri": "[concat('http://', parameters('storageAccountName'), '.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', parameters('machineSettings').machineNamePrefix, parameters('nodeId'),'dataDisk28' ,'.vhd')]"
}
},
{
"name": "datadisk29",
"diskSizeGB": "[parameters('machineSettings').dataDiskSize]",
"lun": 29,
"caching": "None",
"createOption": "Empty",
"vhd": {
"Uri": "[concat('http://', parameters('storageAccountName'), '.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', parameters('machineSettings').machineNamePrefix, parameters('nodeId') ,'dataDisk29','.vhd')]"
}
},
{
"name": "datadisk30",
"diskSizeGB": "[parameters('machineSettings').dataDiskSize]",
"lun": 30,
"caching": "None",
"createOption": "Empty",
"vhd": {
"Uri": "[concat('http://', parameters('storageAccountName'), '.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', parameters('machineSettings').machineNamePrefix, parameters('nodeId') ,'dataDisk30','.vhd')]"
}
},
{
"name": "datadisk31",
"diskSizeGB": "[parameters('machineSettings').dataDiskSize]",
"lun": 31,
"caching": "None",
"createOption": "Empty",
"vhd": {
"Uri": "[concat('http://', parameters('storageAccountName'), '.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', parameters('machineSettings').machineNamePrefix, parameters('nodeId') ,'dataDisk31','.vhd')]"
}
}
]
},
"networkProfile": {
"networkInterfaces": [
{
"id": "[resourceId('Microsoft.Network/networkInterfaces',concat('nic', parameters('nodeId')))]"
}
]
}
}
},
{
"type": "Microsoft.Compute/virtualMachines/extensions",
"name": "[concat(parameters('machineSettings').machineNamePrefix, parameters('nodeId'), '/installcouchbase')]",
"apiVersion": "2015-05-01-preview",
"location": "[parameters('commonSettings').region]",
"dependsOn": [
"[concat('Microsoft.Compute/virtualMachines/', parameters('machineSettings').machineNamePrefix, parameters('nodeId'))]"
],
"properties": {
"publisher": "Microsoft.OSTCExtensions",
"type": "CustomScriptForLinux",
"typeHandlerVersion": "1.2",
"settings": {
"fileUris": "[parameters('vmScripts').scriptsToDownload]",
"commandToExecute": "[parameters('commandToExecute')]"
}
}
}
]
}
You can’t perform that action at this time.