{ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0", "parameters": { "clusterVNetSubnetName": { "type": "string", "defaultValue": "VSNET01", "metadata": { "description": "The name of the subnet to create in the virtual network." } }, "clusterVNetSubnetAddressRange": { "type": "string", "defaultValue": "10.0.0.0/24", "metadata": { "description": "The subnet's address range in CIDR notation. It must be contained by the address space of the virtual network." } }, "clusterName": { "type": "string", "metadata": { "description": "The name of the HDInsight cluster to create." } }, "clusterType": { "type": "string", "defaultValue": "spark", "allowedValues": [ "hadoop", "spark" ], "metadata": { "description": "The type of HDInsight cluster to create." } }, "clusterLoginUserName": { "type": "string", "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." } }, "sshUserName": { "type": "string", "metadata": { "description": "These credentials can be used to remotely access the cluster and the edge node virtual machine." } }, "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." } }, "clusterStorageAccountName": { "type": "string", "metadata": { "description": "The name of the storage account to be created and be used as the cluster's storage." } }, "clusterWorkerNodeCount": { "type": "int", "defaultValue": 4, "metadata": { "description": "The number of nodes in the HDInsight cluster." } }, "scriptActionUri": { "type": "string", "defaultValue": "https://raw.githubusercontent.com/unravel-data/public/master/hdi/hdinsight-unravel-spark-script-action/unravel_hdi_spark_bootstrap_3.0.sh", "metadata": { "description": "A public http(s) uri that points to a script action which will setup unravel on header worker and edge nodes." } } }, "variables": { "defaultApiVersion": "2015-05-01-preview", "clusterApiVersion": "2015-03-01-preview", "clusterVNetName": "VNET01", "virtualNetworkName": "VNET01", "applicationName": "spark-edge", "hadoopZookeeperSize": "Standard_A1", "sparkZookeeperSize": "Standard_A2" }, "resources": [ { "name": "[parameters('clusterName')]", "type": "Microsoft.HDInsight/clusters", "location": "[resourceGroup().location]", "apiVersion": "2015-03-01-preview", "tags": {}, "properties": { "clusterVersion": "3.6", "osType": "Linux", "clusterDefinition": { "kind": "[parameters('clusterType')]", "componentVersion": { "Spark": "2.1" }, "configurations": { "gateway": { "restAuthCredential.isEnabled": true, "restAuthCredential.username": "[parameters('clusterLoginUserName')]", "restAuthCredential.password": "[parameters('clusterLoginPassword')]" } } }, "storageProfile": { "storageaccounts": [ { "name": "[concat(parameters('clusterStorageAccountName'),'.blob.core.windows.net')]", "isDefault": true, "container": "[parameters('clusterName')]", "key": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', parameters('clusterStorageAccountName')), variables('defaultApiVersion')).key1]" } ] }, "computeProfile": { "roles": [ { "name": "headnode", "targetInstanceCount": "2", "hardwareProfile": { "vmSize": "Standard_D3_v2" }, "osProfile": { "linuxOperatingSystemProfile": { "username": "[parameters('sshUserName')]", "password": "[parameters('sshPassword')]" } }, "virtualNetworkProfile": { "id": "[resourceId('Microsoft.Network/virtualNetworks', variables('clusterVNetName'))]", "subnet": "[concat(resourceId('Microsoft.Network/virtualNetworks', variables('clusterVNetName')), '/subnets/', parameters('clusterVNetSubnetName'))]" }, "scriptActions": [ { "name": "unravelsetup", "uri": "[parameters('scriptActionUri')]", "parameters": "--unravel-server 10.10.1.29:3000 --spark-version 2.1.0" } ] }, { "name": "workernode", "targetInstanceCount": "[parameters('clusterWorkerNodeCount')]", "hardwareProfile": { "vmSize": "Standard_D3_v2" }, "osProfile": { "linuxOperatingSystemProfile": { "username": "[parameters('sshUserName')]", "password": "[parameters('sshPassword')]" } }, "virtualNetworkProfile": { "id": "[resourceId('Microsoft.Network/virtualNetworks', variables('clusterVNetName'))]", "subnet": "[concat(resourceId('Microsoft.Network/virtualNetworks', variables('clusterVNetName')), '/subnets/', parameters('clusterVNetSubnetName'))]" }, "scriptActions": [ { "name": "unravelsetup", "uri": "[parameters('scriptActionUri')]", "parameters": "--unravel-server 10.10.1.29:3000 --spark-version 2.1.0" } ] }, { "name": "zookeepernode", "targetInstanceCount": "3", "hardwareProfile": { "vmSize": "[variables(concat(parameters('clusterType'),'ZookeeperSize'))]" }, "osProfile": { "linuxOperatingSystemProfile": { "username": "[parameters('sshUserName')]", "password": "[parameters('sshPassword')]" } }, "virtualNetworkProfile": { "id": "[resourceId('Microsoft.Network/virtualNetworks', variables('clusterVNetName'))]", "subnet": "[concat(resourceId('Microsoft.Network/virtualNetworks', variables('clusterVNetName')), '/subnets/', parameters('clusterVNetSubnetName'))]" } } ] } } }, { "name": "[concat(parameters('clusterName'),'/', variables('applicationName'))]", "type": "Microsoft.HDInsight/clusters/applications", "apiVersion": "2015-03-01-preview", "dependsOn": [ "[concat('Microsoft.HDInsight/clusters/',parameters('clusterName'))]" ], "properties": { "marketPlaceIdentifier": "EmptyNode", "computeProfile": { "roles": [{ "name": "edgenode", "targetInstanceCount": 1, "hardwareProfile": { "vmSize": "Standard_D3_v2" } }] }, "installScriptActions": [{ "name": "[concat('emptynode','-' ,uniquestring(variables('applicationName')))]", "uri": "[parameters('scriptActionUri')]", "parameters": "--unravel-server 10.10.1.29:3000 --spark-version 2.1.0", "roles": ["edgenode"] }], "uninstallScriptActions": [], "httpsEndpoints": [], "applicationType": "CustomApplication" } } ], "outputs": { "cluster": { "type": "object", "value": "[reference(resourceId('Microsoft.HDInsight/clusters',parameters('clusterName')))]" } } }