Last active
December 4, 2018 07:09
-
-
Save psykidellic/7646d6155da74a53aa18bb4f9338b9fc to your computer and use it in GitHub Desktop.
ARM to deploy two kinds of nodex
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "apiVersion": "[variables('apiVersion')]", | |
| "type": "Microsoft.Compute/virtualMachines", | |
| "name": "[concat(resourceGroup().name, '-cdh-', add(copyIndex(),1))]", | |
| "copy": { | |
| "name": "CDHNODEASG1", | |
| "count": "[int(variables('Settings').nodemaxSize.size)]" | |
| }, | |
| "location": "[variables('location')]", | |
| "dependsOn": [ | |
| "[concat('Microsoft.Storage/storageAccounts/', concat(resourceGroup().name, 'hddlrs'))]", | |
| "[concat('Microsoft.Network/networkInterfaces/', concat(resourceGroup().name, '-cdh-', add(copyIndex(),1), '-nic'))]" | |
| ], | |
| "properties": { | |
| "hardwareProfile": { | |
| "vmSize": "[variables('Settings').nodeinstanceType.size]" | |
| }, | |
| "osProfile": { | |
| "computerName": "[concat('cdh-', add(copyIndex(),1))]", | |
| "adminUsername": "[parameters('adminUsername')]", | |
| "linuxConfiguration": { | |
| "disablePasswordAuthentication": "true", | |
| "ssh": { | |
| "publicKeys": [ | |
| { | |
| "path": "[variables('sshKeyPath')]", | |
| "keyData": "[parameters('sshKeyData')]" | |
| } | |
| ] | |
| } | |
| } | |
| }, | |
| "storageProfile": { | |
| "osDisk": { | |
| "name": "[concat(resourceGroup().name, '-cdh-', add(copyIndex(),1),'-osDisk')]", | |
| "osType": "Linux", | |
| "caching": "ReadWrite", | |
| "createOption": "FromImage", | |
| "diskSizeGB": "[parameters('computeOsDiskSize')]", | |
| "image": { | |
| "uri": "[parameters('computeOsDiskVhdUri')]" | |
| }, | |
| "vhd": { | |
| "uri": "[concat(variables('vhds'),'cdh',uniquestring(resourceGroup().id),add(copyIndex(),1),'computeOsDisk.vhd')]" | |
| } | |
| }, | |
| "copy": [{ | |
| "name": "dataDisks", | |
| "count": "[parameters('computeDataDiskCount')]", | |
| "input": { | |
| "diskSizeGB": "[variables('Settings').nodedisks1.datanode]", | |
| "createOption": "Empty", | |
| "name": "[concat('disk-', copyIndex('dataDisks'), '-', add(copyIndex('dataDisks'),1))]", | |
| "lun": "[add(copyIndex('dataDisks'),1)]" | |
| } | |
| }] | |
| }, | |
| "networkProfile": { | |
| "networkInterfaces": [ | |
| { | |
| "id": "[resourceId('Microsoft.Network/networkInterfaces',concat(resourceGroup().name, '-cdh-', add(copyIndex(),1), '-nic'))]" | |
| } | |
| ] | |
| }, | |
| "diagnosticsProfile": { | |
| "bootDiagnostics": { | |
| "enabled": "true", | |
| "storageUri": "[concat('http://',resourceGroup().name, 'hddlrs','.blob.core.windows.net')]" | |
| } | |
| } | |
| }, | |
| "tags": { | |
| "image": "[parameters('computeOsDiskVhdUri')]" | |
| } | |
| } | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "apiVersion": "[variables('apiVersion')]", | |
| "type": "Microsoft.Compute/virtualMachines", | |
| "name": "[concat(resourceGroup().name, '-an-node')]", | |
| "location": "[variables('location')]", | |
| "dependsOn": [ | |
| "[concat('Microsoft.Storage/storageAccounts/', concat(resourceGroup().name, 'hddlrs'))]", | |
| "[concat('Microsoft.Network/networkInterfaces/', concat(resourceGroup().name, '-an-node-nic'))]", | |
| "CDHNODEASG1" | |
| ], | |
| "properties": { | |
| "hardwareProfile": { | |
| "vmSize": "[variables('Settings').aninstanceType.size]" | |
| }, | |
| "osProfile": { | |
| "computerName": "an-node", | |
| "adminUsername": "[parameters('adminUsername')]", | |
| "linuxConfiguration": { | |
| "disablePasswordAuthentication": "true", | |
| "ssh": { | |
| "publicKeys": [ | |
| { | |
| "path": "[variables('sshKeyPath')]", | |
| "keyData": "[parameters('sshKeyData')]" | |
| } | |
| ] | |
| } | |
| } | |
| }, | |
| "storageProfile": { | |
| "osDisk": { | |
| "name": "[concat(resourceGroup().name, '-an-node-','osDisk')]", | |
| "osType": "Linux", | |
| "caching": "ReadWrite", | |
| "createOption": "FromImage", | |
| "diskSizeGB": "[parameters('edgeOsDiskSize')]", | |
| "image": { | |
| "uri": "[parameters('edgeOsDiskVhdUri')]" | |
| } | |
| }, | |
| "dataDisks": [ | |
| ] | |
| }, | |
| "networkProfile": { | |
| "networkInterfaces": [ | |
| { | |
| "id": "[resourceId('Microsoft.Network/networkInterfaces',concat(resourceGroup().name, '-an-node-nic'))]" | |
| } | |
| ] | |
| }, | |
| "diagnosticsProfile": { | |
| "bootDiagnostics": { | |
| "enabled": "true", | |
| "storageUri": "[concat('http://',resourceGroup().name, 'hddlrs','.blob.core.windows.net')]" | |
| } | |
| } | |
| }, | |
| "tags": { | |
| "image": "[parameters('edgeOsDiskVhdUri')]" | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "apiVersion": "[variables('apiVersion')]", | |
| "type": "Microsoft.Compute/virtualMachines", | |
| "name": "[concat(resourceGroup().name, '-an-node')]", | |
| "location": "[variables('location')]", | |
| "dependsOn": [ | |
| "[concat('Microsoft.Storage/storageAccounts/', concat(resourceGroup().name, 'hddlrs'))]", | |
| "[concat('Microsoft.Network/networkInterfaces/', concat(resourceGroup().name, '-an-node-nic'))]", | |
| "CDHNODEASG1" | |
| ], | |
| "properties": { | |
| "hardwareProfile": { | |
| "vmSize": "[variables('Settings').aninstanceType.size]" | |
| }, | |
| "osProfile": { | |
| "computerName": "an-node", | |
| "adminUsername": "[parameters('adminUsername')]", | |
| "linuxConfiguration": { | |
| "disablePasswordAuthentication": "true", | |
| "ssh": { | |
| "publicKeys": [ | |
| { | |
| "path": "[variables('sshKeyPath')]", | |
| "keyData": "[parameters('sshKeyData')]" | |
| } | |
| ] | |
| } | |
| } | |
| }, | |
| "storageProfile": { | |
| "osDisk": { | |
| "name": "[concat(resourceGroup().name, '-an-node-','osDisk')]", | |
| "osType": "Linux", | |
| "caching": "ReadWrite", | |
| "createOption": "FromImage", | |
| "diskSizeGB": "[parameters('edgeOsDiskSize')]", | |
| "image": { | |
| "uri": "[parameters('edgeOsDiskVhdUri')]" | |
| }, | |
| "vhd": { | |
| "uri": "[concat(variables('vhds'),'an',uniquestring(resourceGroup().id),'osDisk.vhd')]" | |
| } | |
| }, | |
| "dataDisks": [ | |
| ] | |
| }, | |
| "networkProfile": { | |
| "networkInterfaces": [ | |
| { | |
| "id": "[resourceId('Microsoft.Network/networkInterfaces',concat(resourceGroup().name, '-an-node-nic'))]" | |
| } | |
| ] | |
| }, | |
| "diagnosticsProfile": { | |
| "bootDiagnostics": { | |
| "enabled": "true", | |
| "storageUri": "[concat('http://',resourceGroup().name, 'hddlrs','.blob.core.windows.net')]" | |
| } | |
| } | |
| }, | |
| "tags": { | |
| "image": "[parameters('edgeOsDiskVhdUri')]" | |
| } | |
| }, | |
| { | |
| "apiVersion": "[variables('apiVersion')]", | |
| "type": "Microsoft.Compute/virtualMachines", | |
| "name": "[concat(resourceGroup().name, '-cdh-', add(copyIndex(),1))]", | |
| "copy": { | |
| "name": "CDHNODEASG1", | |
| "count": "[int(variables('Settings').nodemaxSize.size)]" | |
| }, | |
| "location": "[variables('location')]", | |
| "dependsOn": [ | |
| "[concat('Microsoft.Storage/storageAccounts/', concat(resourceGroup().name, 'hddlrs'))]", | |
| "[concat('Microsoft.Network/networkInterfaces/', concat(resourceGroup().name, '-cdh-', add(copyIndex(),1), '-nic'))]" | |
| ], | |
| "properties": { | |
| "hardwareProfile": { | |
| "vmSize": "[variables('Settings').nodeinstanceType.size]" | |
| }, | |
| "osProfile": { | |
| "computerName": "[concat('cdh-', add(copyIndex(),1))]", | |
| "adminUsername": "[parameters('adminUsername')]", | |
| "linuxConfiguration": { | |
| "disablePasswordAuthentication": "true", | |
| "ssh": { | |
| "publicKeys": [ | |
| { | |
| "path": "[variables('sshKeyPath')]", | |
| "keyData": "[parameters('sshKeyData')]" | |
| } | |
| ] | |
| } | |
| } | |
| }, | |
| "storageProfile": { | |
| "osDisk": { | |
| "name": "[concat(resourceGroup().name, '-cdh-', add(copyIndex(),1),'-osDisk')]", | |
| "osType": "Linux", | |
| "caching": "ReadWrite", | |
| "createOption": "FromImage", | |
| "diskSizeGB": "[parameters('computeOsDiskSize')]", | |
| "image": { | |
| "uri": "[parameters('computeOsDiskVhdUri')]" | |
| }, | |
| "vhd": { | |
| "uri": "[concat(variables('vhds'),'cdh',uniquestring(resourceGroup().id),add(copyIndex(),1),'computeOsDisk.vhd')]" | |
| } | |
| }, | |
| "copy": [{ | |
| "name": "dataDisks", | |
| "count": "[parameters('computeDataDiskCount')]", | |
| "input": { | |
| "diskSizeGB": "[variables('Settings').nodedisks1.datanode]", | |
| "createOption": "Empty", | |
| "name": "[concat('disk-', copyIndex('dataDisks'), '-', add(copyIndex('dataDisks'),1))]", | |
| "lun": "[add(copyIndex('dataDisks'),1)]", | |
| "vhd": { | |
| "Uri": "[concat(variables('datavhds'),concat(resourceGroup().name, '-cdh-', add(copyIndex(),1)),'data-', add(copyIndex('dataDisks'),1), '.vhd')]" | |
| } | |
| } | |
| }] | |
| }, | |
| "networkProfile": { | |
| "networkInterfaces": [ | |
| { | |
| "id": "[resourceId('Microsoft.Network/networkInterfaces',concat(resourceGroup().name, '-cdh-', add(copyIndex(),1), '-nic'))]" | |
| } | |
| ] | |
| }, | |
| "diagnosticsProfile": { | |
| "bootDiagnostics": { | |
| "enabled": "true", | |
| "storageUri": "[concat('http://',resourceGroup().name, 'hddlrs','.blob.core.windows.net')]" | |
| } | |
| } | |
| }, | |
| "tags": { | |
| "image": "[parameters('computeOsDiskVhdUri')]" | |
| } | |
| } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment