189 строки
8.2 KiB
JSON
189 строки
8.2 KiB
JSON
|
{
|
||
|
"$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json#",
|
||
|
"contentVersion": "0.9.0.0",
|
||
|
"parameters": {
|
||
|
"clusterName": {
|
||
|
"type": "string",
|
||
|
"metadata": {
|
||
|
"description": "The name of the HDInsight cluster to create."
|
||
|
}
|
||
|
},
|
||
|
"clusterLoginUserName": {
|
||
|
"type": "string",
|
||
|
"defaultValue": "admin",
|
||
|
"metadata": {
|
||
|
"description": "These credentials can be used to submit jobs to the cluster and to log into cluster dashboards."
|
||
|
}
|
||
|
},
|
||
|
"clusterLoginPassword": {
|
||
|
"type": "securestring",
|
||
|
"metadata": {
|
||
|
"description": "The password must be at least 10 characters in length and must contain at least one digit, one non-alphanumeric character, and one upper or lower case letter."
|
||
|
}
|
||
|
},
|
||
|
"location": {
|
||
|
"type": "string",
|
||
|
"defaultValue": "westus2",
|
||
|
"metadata": {
|
||
|
"description": "The location where all azure resources will be deployed."
|
||
|
}
|
||
|
},
|
||
|
"clusterWorkerNodeCount": {
|
||
|
"type": "int",
|
||
|
"defaultValue": 3,
|
||
|
"metadata": {
|
||
|
"description": "The number of nodes in the HDInsight cluster. Make sure to set this to at least 3."
|
||
|
}
|
||
|
},
|
||
|
"sshUserName": {
|
||
|
"type": "string",
|
||
|
"defaultValue": "sshuser",
|
||
|
"metadata": {
|
||
|
"description": "These credentials can be used to remotely access the cluster."
|
||
|
}
|
||
|
},
|
||
|
"sshPassword": {
|
||
|
"type": "securestring",
|
||
|
"metadata": {
|
||
|
"description": "The password must be at least 10 characters in length and must contain at least one digit, one non-alphanumeric character, and one upper or lower case letter."
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
"variables": {
|
||
|
"defaultStorageAccount": {
|
||
|
"name": "[uniqueString(resourceGroup().id)]",
|
||
|
"type": "Standard_LRS"
|
||
|
}
|
||
|
},
|
||
|
"resources": [
|
||
|
{
|
||
|
"apiVersion": "2015-03-01-preview",
|
||
|
"name": "[parameters('clusterName')]",
|
||
|
"type": "Microsoft.HDInsight/clusters",
|
||
|
"location": "[parameters('location')]",
|
||
|
"dependsOn": [
|
||
|
"[concat('Microsoft.Storage/storageAccounts/',variables('defaultStorageAccount').name)]"
|
||
|
],
|
||
|
"properties": {
|
||
|
"clusterVersion": "3.6",
|
||
|
"osType": "Linux",
|
||
|
"tier": "standard",
|
||
|
"clusterDefinition": {
|
||
|
"kind": "MLSERVICES",
|
||
|
"configurations": {
|
||
|
"gateway": {
|
||
|
"restAuthCredential.isEnabled": true,
|
||
|
"restAuthCredential.username": "[parameters('clusterLoginUserName')]",
|
||
|
"restAuthCredential.password": "[parameters('clusterLoginPassword')]"
|
||
|
},
|
||
|
"rserver": {
|
||
|
"rstudio": true
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
"storageProfile": {
|
||
|
"storageaccounts": [
|
||
|
{
|
||
|
"name": "[replace(replace(concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('defaultStorageAccount').name), '2016-01-01').primaryEndpoints.blob),'https:',''),'/','')]",
|
||
|
"isDefault": true,
|
||
|
"container": "[parameters('clusterName')]",
|
||
|
"key": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('defaultStorageAccount').name), '2016-01-01').keys[0].value]"
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
"computeProfile": {
|
||
|
"roles": [
|
||
|
{
|
||
|
"autoscale": null,
|
||
|
"name": "headnode",
|
||
|
"minInstanceCount": 1,
|
||
|
"targetInstanceCount": 2,
|
||
|
"hardwareProfile": {
|
||
|
"vmSize": "Standard_D12_V2"
|
||
|
},
|
||
|
"osProfile": {
|
||
|
"linuxOperatingSystemProfile": {
|
||
|
"username": "[parameters('sshUserName')]",
|
||
|
"password": "[parameters('sshPassword')]"
|
||
|
}
|
||
|
},
|
||
|
"virtualNetworkProfile": null,
|
||
|
"scriptActions": []
|
||
|
},
|
||
|
{
|
||
|
"autoscale": null,
|
||
|
"name": "workernode",
|
||
|
"targetInstanceCount": "[parameters('clusterWorkerNodeCount')]",
|
||
|
"hardwareProfile": {
|
||
|
"vmSize": "Standard_D4_V2"
|
||
|
},
|
||
|
"osProfile": {
|
||
|
"linuxOperatingSystemProfile": {
|
||
|
"username": "[parameters('sshUserName')]",
|
||
|
"password": "[parameters('sshPassword')]"
|
||
|
}
|
||
|
},
|
||
|
"virtualNetworkProfile": null,
|
||
|
"scriptActions": []
|
||
|
},
|
||
|
{
|
||
|
"autoscale": null,
|
||
|
"name": "zookeepernode",
|
||
|
"minInstanceCount": 1,
|
||
|
"targetInstanceCount": 3,
|
||
|
"hardwareProfile": {
|
||
|
"vmSize": "Standard_A2_V2"
|
||
|
},
|
||
|
"osProfile": {
|
||
|
"linuxOperatingSystemProfile": {
|
||
|
"username": "[parameters('sshUserName')]",
|
||
|
"password": "[parameters('sshPassword')]"
|
||
|
}
|
||
|
},
|
||
|
"virtualNetworkProfile": null,
|
||
|
"scriptActions": []
|
||
|
},
|
||
|
{
|
||
|
"autoscale": null,
|
||
|
"name": "edgenode",
|
||
|
"minInstanceCount": 1,
|
||
|
"targetInstanceCount": 1,
|
||
|
"hardwareProfile": {
|
||
|
"vmSize": "Standard_D4_V2"
|
||
|
},
|
||
|
"osProfile": {
|
||
|
"linuxOperatingSystemProfile": {
|
||
|
"username": "[parameters('sshUserName')]",
|
||
|
"password": "[parameters('sshPassword')]"
|
||
|
}
|
||
|
},
|
||
|
"virtualNetworkProfile": null,
|
||
|
"scriptActions": [
|
||
|
{
|
||
|
"name": "hdisetup",
|
||
|
"uri": "https://raw.githubusercontent.com/Microsoft/r-server-loan-chargeoff/master/HDI/ActionScripts/loanchargeoffsetup.sh",
|
||
|
"parameters": "",
|
||
|
"isHeadNode": false,
|
||
|
"isWorkerNode": false,
|
||
|
"isPersisted": true,
|
||
|
"isZookeeperNode": false,
|
||
|
"isEdgeNode": true,
|
||
|
"applicationName": null
|
||
|
}
|
||
|
]
|
||
|
}
|
||
|
]
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"type": "Microsoft.Storage/storageAccounts",
|
||
|
"name": "[variables('defaultStorageAccount').name]",
|
||
|
"apiVersion": "2015-05-01-preview",
|
||
|
"location": "[parameters('location')]",
|
||
|
"properties": {
|
||
|
"accountType": "Standard_LRS"
|
||
|
}
|
||
|
}
|
||
|
]
|
||
|
}
|