Skip to content

Commit

Permalink
new template
Browse files Browse the repository at this point in the history
  • Loading branch information
mumian committed Mar 1, 2017
1 parent 9711a13 commit 16ea15b
Show file tree
Hide file tree
Showing 7 changed files with 215 additions and 6 deletions.
10 changes: 10 additions & 0 deletions 101-hdinsight-spark-linux-vnet/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Deploy an Azure VNet and an HDInsight Linux-based HBase cluster within the VNet

<a href="https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2Fazure-quickstart-templates%2Fmaster%2F101-hdinsight-hbase-linux-vnet%2Fazuredeploy.json" target="_blank">
<img src="http://azuredeploy.net/deploybutton.png"/>
</a>
<a href="http://armviz.io/#/?load=https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2Fazure-quickstart-templates%2Fmaster%2F101-hdinsight-hbase-linux-vnet%2Fazuredeploy.json" target="_blank">
<img src="http://armviz.io/visualizebutton.png"/>
</a>

This template allows you to create an Azure VNet and a HBase cluster within the VNet. For more information, see Create HBase clusters in Azure Virtual Network at https://azure.microsoft.com/en-us/documentation/articles/hdinsight-hbase-provision-vnet/.
171 changes: 171 additions & 0 deletions 101-hdinsight-spark-linux-vnet/azuredeploy.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
{
"$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",
"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",
"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"
},
"vNet":{
"name": "[concat(parameters('clusterName'),'-vnet')]",
"addressSpacePrefix": "10.0.0.0/16",
"subnetName": "subnet1",
"subnetPrefix": "10.0.0.0/24",
"id": "[resourceId('Microsoft.Network/virtualNetworks', concat(parameters('clusterName'),'-vnet'))]",
"subnet": "[concat(resourceId('Microsoft.Network/virtualNetworks', concat(parameters('clusterName'),'-vnet')), '/subnets/subnet1')]"
}
},
"resources": [
{
"type": "Microsoft.Network/virtualNetworks",
"name": "[variables('vNet').name]",
"apiVersion": "2016-03-30",
"location": "[resourceGroup().location]",
"properties": {
"addressSpace": {
"addressPrefixes": [
"[variables('vNet').addressSpacePrefix]"
]
},
"subnets": [
{
"name": "[variables('vNet').subnetName]",
"properties": {
"addressPrefix": "[variables('vNet').subnetPrefix]"
}
}
]
}
},
{
"type": "Microsoft.Storage/storageAccounts",
"name": "[variables('defaultStorageAccount').name]",
"location": "[resourceGroup().location]",
"apiVersion": "2016-01-01",
"sku": {
"name": "[variables('defaultStorageAccount').type]"
},
"kind": "Storage",
"properties": {}
},
{
"type": "Microsoft.HDInsight/clusters",
"name": "[parameters('clusterName')]",
"location": "[resourceGroup().location]",
"apiVersion": "2015-03-01-preview",
"dependsOn": [
"[concat('Microsoft.Storage/storageAccounts/',variables('defaultStorageAccount').name)]",
"[concat('Microsoft.Network/virtualNetworks/',variables('vNet').name)]"

],
"tags": {},
"properties": {
"clusterVersion": "3.5",
"osType": "Linux",
"tier": "Standard",
"clusterDefinition": {
"kind": "spark",
"configurations": {
"gateway": {
"restAuthCredential.isEnabled": true,
"restAuthCredential.username": "[parameters('clusterLoginUserName')]",
"restAuthCredential.password": "[parameters('clusterLoginPassword')]"
}
}
},
"storageProfile": {
"storageaccounts": [
{
"name": "[replace(replace(reference(resourceId('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": [
{
"name": "headnode",
"targetInstanceCount": "2",
"hardwareProfile": {
"vmSize": "Standard_D3"
},
"osProfile": {
"linuxOperatingSystemProfile": {
"username": "[parameters('sshUserName')]",
"password": "[parameters('sshPassword')]"
}
},
"virtualNetworkProfile": {
"id": "[variables('vNet').id]",
"subnet": "[variables('vNet').subnet]"
}
},
{
"name": "workernode",
"targetInstanceCount": "2",
"hardwareProfile": {
"vmSize": "Standard_D3"
},
"osProfile": {
"linuxOperatingSystemProfile": {
"username": "[parameters('sshUserName')]",
"password": "[parameters('sshPassword')]"
}
},
"virtualNetworkProfile": {
"id": "[variables('vNet').id]",
"subnet": "[variables('vNet').subnet]"
}
}
]
}
}
}
],
"outputs": {
"vnet": {
"type": "object",
"value": "[reference(resourceId('Microsoft.Network/virtualNetworks',variables('vNet').name))]"
},
"cluster": {
"type": "object",
"value": "[reference(resourceId('Microsoft.HDInsight/clusters',parameters('clusterName')))]"
}
}
}
21 changes: 21 additions & 0 deletions 101-hdinsight-spark-linux-vnet/azuredeploy.parameters.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"clusterName": {
"value": "GEN-UNIQUE"
},
"clusterLoginUserName": {
"value": "GEN-UNIQUE"
},
"clusterLoginPassword": {
"value": "GEN-PASSWORD"
},
"sshUserName": {
"value": "GEN-UNIQUE"
},
"sshPassword": {
"value": "GEN-PASSWORD"
}
}
}
7 changes: 7 additions & 0 deletions 101-hdinsight-spark-linux-vnet/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"itemDisplayName": "Deploy a VNet and a HBase cluster within the VNet",
"description": "This template allows you to create an Azure VNet and an HDInsight HBase cluster running Linux within the VNet.",
"summary": "Deploy an Azure VNet and an HDInsight Linux-based HBase cluster within the VNet",
"githubUsername": "mumian",
"dateUpdated": "2016-11-10"
}
2 changes: 1 addition & 1 deletion 101-hdinsight-spark-linux/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
<img src="http://armviz.io/visualizebutton.png"/>
</a>

This template allows you to create a Linux-based Spark cluster in HDInsight. For more information, see <a href="https://docs.microsoft.com/azure/hdinsight/hdinsight-apache-spark-jupyter-spark-sql">Get started: Create Apache Spark cluster on HDInsight Linux and run interactive queries using Spark SQL</a>.
This template allows you to create an Azure virtual network, a HDInsight cluster with the dependent Azure storage account in the virtual network.
2 changes: 1 addition & 1 deletion 101-hdinsight-spark-linux/azuredeploy.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
],
"tags": {},
"properties": {
"clusterVersion": "3.4",
"clusterVersion": "3.5",
"osType": "Linux",
"tier": "Standard",
"clusterDefinition": {
Expand Down
8 changes: 4 additions & 4 deletions 101-hdinsight-spark-linux/metadata.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"itemDisplayName": "Deploy a Linux-based Spark cluster in HDInsight",
"description": "This template allows you to create a Linux-based Spark cluster in Azure HDInsight. ",
"summary": "Deploy a Linux-based Spark cluster in Azure HDInsight",
"itemDisplayName": "Deploy a Azure virtual network and a Linux-based Spark cluster in the VNet",
"description": "This template allows you to create a Linux-based Spark cluster in an Azure VNet. ",
"summary": "Deploy a Linux-based Spark cluster in an Azure VNet",
"githubUsername": "mumian",
"dateUpdated": "2016-12-08"
"dateUpdated": "2017-03-01"
}

0 comments on commit 16ea15b

Please sign in to comment.