{ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", "contentVersion": "1.0.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", "minLength": 10, "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", "defaultValue": "sshuser", "metadata": { "description": "These credentials can be used to remotely access the cluster." } }, "sshPassword": { "type": "securestring", "minLength": 10, "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." } }, "clusterVersion": { "type": "string", "defaultValue": "3.5", "allowedValues": [ "3.3", "3.4", "3.5", "3.6" ], "metadata": { "description": "Select the HDInsight version that you wish to deploy." } }, "clusterWorkerNodeCount": { "type": "int", "defaultValue": 4, "metadata": { "description": "The number of nodes in the HDInsight cluster." } }, "openTsdbVersion": { "type": "string", "defaultValue": "2.3.0", "allowedValues": [ "2.2.0", "2.3.0" ] }, "openTsdbTopology": { "type": "string", "defaultValue": "Load Balanced", "allowedValues": [ "Edge Node", "Load Balanced" ], "metadata": { "description": "Select the deployment topology for OpenTSDB on the cluster. 'Edge Node' installs 1 TSD instance on the edge node. 'Load Balanced' installs a TSD instance of every region server in the cluster and a load balancer on the edge node distributes traffic." } }, "edgeNodeSize": { "type": "string", "metadata": { "description": "Size of the edge node that hosts the application" }, "defaultValue": "Standard_D3_V2", "allowedValues": [ "Standard_A1", "Standard_A2", "Standard_A3", "Standard_A4", "Standard_D1_V2", "Standard_D2_V2", "Standard_D3_V2", "Standard_D4_V2" ] }, "tsdPortNumber": { "type": "int", "defaultValue": 4242, "metadata": { "description": "The port number that the TSD services should listen to requests on." } } }, "variables": { "defaultApiVersion": "2015-05-01-preview", "clusterApiVersion": "2015-03-01-preview", "clusterStorageAccountName": "[concat(parameters('clusterName'),'store')]", "applicationName": "opentsdb", "galleryPackageIdentity": "opentsdb", "edgeNodeSuffix": "tdb", "scriptBaseUri": "https://raw.githubusercontent.com/hdinsight/Iaas-Applications/master/Scripts/", "templateBaseUri": "[concat(variables('scriptBaseUri'), 'Templates/')]", "appInfoBaseUri": "https://raw.githubusercontent.com/hdinsight/Iaas-Applications/master/OpenTSDB/", "edgeNodeSignatureTag": "opentsdb-edgenode-signature-tag", "topologies": { "Edge Node": { "OPENTSDB_TSD": ["edge"], "OPENTSDB_PROXY": [] }, "Load Balanced": { "OPENTSDB_TSD": ["region"], "OPENTSDB_PROXY": ["edge"] } }, "selectedTopology": "[variables('topologies')[parameters('openTsdbTopology')]]", "extraConfiguration": { "opentsdb-site": { "tsd.network.port": "[parameters('tsdPortNumber')]", "opentsdb.opentsdb_version": "[parameters('openTsdbVersion')]" } }, "singleQuote": "'" }, "resources": [ { "name": "[variables('clusterStorageAccountName')]", "type": "Microsoft.Storage/storageAccounts", "location": "[resourceGroup().location]", "apiVersion": "[variables('defaultApiVersion')]", "dependsOn": [], "tags": {}, "properties": { "accountType": "Standard_LRS" } }, { "name": "[parameters('clusterName')]", "type": "Microsoft.HDInsight/clusters", "location": "[resourceGroup().location]", "apiVersion": "[variables('clusterApiVersion')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/',variables('clusterStorageAccountName'))]" ], "tags": {}, "properties": { "clusterVersion": "[parameters('clusterVersion')]", "osType": "Linux", "clusterDefinition": { "kind": "hbase", "configurations": { "gateway": { "restAuthCredential.isEnabled": true, "restAuthCredential.username": "[parameters('clusterLoginUserName')]", "restAuthCredential.password": "[parameters('clusterLoginPassword')]" } } }, "storageProfile": { "storageaccounts": [ { "name": "[concat(variables('clusterStorageAccountName'),'.blob.core.windows.net')]", "isDefault": true, "container": "[parameters('clusterName')]", "key": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('clusterStorageAccountName')), variables('defaultApiVersion')).key1]" } ] }, "computeProfile": { "roles": [ { "name": "headnode", "targetInstanceCount": "2", "hardwareProfile": { "vmSize": "Standard_D3_v2" }, "osProfile": { "linuxOperatingSystemProfile": { "username": "[parameters('sshUserName')]", "password": "[parameters('sshPassword')]" } }, "scriptActions": [ { "name": "install-opentsdb", "uri": "[concat(variables('scriptBaseUri'), 'install_ambari_app_bootstrap.sh')]", "parameters": "[concat(variables('scriptBaseUri'), ' -c ', variables('appInfoBaseUri'), 'config/opentsdb-service-config.json', ' -u ', parameters('clusterLoginUserName'), ' -p ', parameters('clusterLoginPassword'), ' --component-topologies ', variables('singleQuote'), string(variables('selectedTopology')), variables('singleQuote'), ' -x ', variables('singleQuote'), string(variables('extraConfiguration')), variables('singleQuote'), ' -s ', variables('edgeNodeSuffix'), ' -n ', variables('edgeNodeSignatureTag'), ' -z ', variables('templateBaseUri'), ' -e 1 -v DEBUG')]", "isHeadNode": true } ] }, { "name": "workernode", "targetInstanceCount": "[parameters('clusterWorkerNodeCount')]", "hardwareProfile": { "vmSize": "Standard_D3_v2" }, "osProfile": { "linuxOperatingSystemProfile": { "username": "[parameters('sshUserName')]", "password": "[parameters('sshPassword')]" } } } ] } } }, { "name": "[concat(parameters('clusterName'),'/', variables('applicationName'))]", "type": "Microsoft.HDInsight/clusters/applications", "dependsOn": [ "[concat('Microsoft.HDInsight/clusters/', parameters('clusterName'))]" ], "apiVersion": "[variables('clusterApiVersion')]", "properties": { "marketPlaceIdentifier": "[variables('galleryPackageIdentity')]", "computeProfile": { "roles": [ { "name": "edgenode", "targetInstanceCount": 1, "hardwareProfile": { "vmSize": "[parameters('edgeNodeSize')]" } } ] }, "installScriptActions": [ { "name": "install-opentsdb-proxy", "uri": "[concat(variables('scriptBaseUri'), 'install-edgenode-placeholder.sh')]", "parameters": "[concat(parameters('clusterLoginUserName'), ' ', parameters('clusterLoginPassword'), ' ', variables('edgeNodeSignatureTag'))]", "roles": [ "edgenode" ] } ], "uninstallScriptActions": [], "httpsEndpoints": [ { "subDomainSuffix": "[variables('edgeNodeSuffix')]", "destinationPort": "[parameters('tsdPortNumber')]", "accessModes": [ "webpage" ] } ], "applicationType": "CustomApplication" } } ], "outputs": { "cluster": { "type": "object", "value": "[reference(resourceId('Microsoft.HDInsight/clusters',parameters('clusterName')))]" } } }