|
| 1 | +--- |
| 2 | +title: 'Quickstart: Create Apache Hadoop cluster in Azure HDInsight using Bicep' |
| 3 | +description: In this quickstart, you create Apache Hadoop cluster in Azure HDInsight using Bicep |
| 4 | +author: schaffererin |
| 5 | +ms.author: v-eschaffer |
| 6 | +ms.service: hdinsight |
| 7 | +ms.topic: quickstart |
| 8 | +ms.custom: subject-armqs, mode-arm |
| 9 | +ms.date: 04/14/2022 |
| 10 | +#Customer intent: As a data analyst, I need to create a Hadoop cluster in Azure HDInsight using Bicep |
| 11 | +--- |
| 12 | + |
| 13 | +# Quickstart: Create Apache Hadoop cluster in Azure HDInsight using Bicep |
| 14 | + |
| 15 | +In this quickstart, you use Bicep to create an [Apache Hadoop](./apache-hadoop-introduction.md) cluster in Azure HDInsight. Hadoop was the original open-source framework for distributed processing and analysis of big data sets on clusters. The Hadoop ecosystem includes related software and utilities, including Apache Hive, Apache HBase, Spark, Kafka, and many others. |
| 16 | + |
| 17 | +[!INCLUDE [About Bicep](../../../includes/resource-manager-quickstart-bicep-introduction.md)] |
| 18 | + |
| 19 | +Currently HDInsight comes with [seven different cluster types](../hdinsight-overview.md#cluster-types-in-hdinsight). Each cluster type supports a different set of components. All cluster types support Hive. For a list of supported components in HDInsight, see [What's new in the Hadoop cluster versions provided by HDInsight?](../hdinsight-component-versioning.md) |
| 20 | + |
| 21 | +## Prerequisites |
| 22 | + |
| 23 | +If you don't have an Azure subscription, create a [free account](https://azure.microsoft.com/free/?WT.mc_id=A261C142F) before you begin. |
| 24 | + |
| 25 | +## Review the Bicep file |
| 26 | + |
| 27 | +The Bicep file used in this quickstart is from [Azure Quickstart Templates](https://azure.microsoft.com/resources/templates/hdinsight-linux-ssh-password/). |
| 28 | + |
| 29 | +:::code language="bicep" source="~/quickstart-templates/quickstarts/microsoft.hdinsight/hdinsight-linux-ssh-password/main.bicep"::: |
| 30 | + |
| 31 | +Two Azure resources are defined in the Bicep file: |
| 32 | + |
| 33 | +* [Microsoft.Storage/storageAccounts](/azure/templates/microsoft.storage/storageaccounts): create an Azure Storage Account. |
| 34 | +* [Microsoft.HDInsight/cluster](/azure/templates/microsoft.hdinsight/clusters): create an HDInsight cluster. |
| 35 | + |
| 36 | +## Deploy the Bicep file |
| 37 | + |
| 38 | +1. Save the Bicep file as **main.bicep** to your local computer. |
| 39 | +1. Deploy the Bicep file using either Azure CLI or Azure PowerShell. |
| 40 | + |
| 41 | + # [CLI](#tab/CLI) |
| 42 | + |
| 43 | + ```azurecli |
| 44 | + az group create --name exampleRG --location eastus |
| 45 | + az deployment group create --resource-group exampleRG --template-file main.bicep --parameters clusterName=<cluster-name> clusterType=<cluster-type> clusterLoginUserName=<cluster-username> sshUserName=<ssh-username> |
| 46 | + ``` |
| 47 | +
|
| 48 | + # [PowerShell](#tab/PowerShell) |
| 49 | +
|
| 50 | + ```azurepowershell |
| 51 | + New-AzResourceGroup -Name exampleRG -Location eastus |
| 52 | + New-AzResourceGroupDeployment -ResourceGroupName exampleRG -TemplateFile ./main.bicep -clusterName "<cluster-name>" -clusterType "<cluster-type>" -clusterLoginUserName "<cluster-username>" -sshUserName "<ssh-username>" |
| 53 | + ``` |
| 54 | +
|
| 55 | + --- |
| 56 | +
|
| 57 | + You need to provide values for the parameters: |
| 58 | +
|
| 59 | + * Replace **\<cluster-name\>** with the name of the HDInsight cluster to create. |
| 60 | + * Replace **\<cluster-type\>** with the type of the HDInsight cluster to create. Allowed strings include: `hadoop`, `interactivehive`, `hbase`, `storm`, and `spark`. |
| 61 | + * Replace **\<cluster-username\>** with the credentials used to submit jobs to the cluster and to log in to cluster dashboards. |
| 62 | + * Replace **\<ssh-username\>** with the credentials used to remotely access the cluster. The username cannot be admin. |
| 63 | +
|
| 64 | + You'll also be prompted to enter the following: |
| 65 | +
|
| 66 | + * **clusterLoginPassword**, which must be at least 10 characters long and contain one digit, one uppercase letter, one lowercase letter, and one non-alphanumeric character except single-quote, double-quote, backslash, right-bracket, full-stop. It also must not contain three consecutive characters from the cluster username or SSH username. |
| 67 | + * **sshPassword**, which must be 6-72 characters long and must contain at least one digit, one uppercase letter, and one lowercase letter. It must not contain any three consecutive characters from the cluster login name. |
| 68 | +
|
| 69 | + > [!NOTE] |
| 70 | + > When the deployment finishes, you should see a message indicating the deployment succeeded. |
| 71 | +
|
| 72 | +## Review deployed resources |
| 73 | +
|
| 74 | +Use the Azure portal, Azure CLI, or Azure PowerShell to list the deployed resources in the resource group. |
| 75 | +
|
| 76 | +# [CLI](#tab/CLI) |
| 77 | +
|
| 78 | +```azurecli-interactive |
| 79 | +az resource list --resource-group exampleRG |
| 80 | +``` |
| 81 | + |
| 82 | +# [PowerShell](#tab/PowerShell) |
| 83 | + |
| 84 | +```azurepowershell-interactive |
| 85 | +Get-AzResource -ResourceGroupName exampleRG |
| 86 | +``` |
| 87 | + |
| 88 | +--- |
| 89 | + |
| 90 | +## Clean up resources |
| 91 | + |
| 92 | +When no longer needed, use the Azure portal, Azure CLI, or Azure PowerShell to delete the resource group and its resources. |
| 93 | + |
| 94 | +# [CLI](#tab/CLI) |
| 95 | + |
| 96 | +```azurecli-interactive |
| 97 | +az group delete --name exampleRG |
| 98 | +``` |
| 99 | + |
| 100 | +# [PowerShell](#tab/PowerShell) |
| 101 | + |
| 102 | +```azurepowershell-interactive |
| 103 | +Remove-AzResourceGroup -Name exampleRG |
| 104 | +``` |
| 105 | + |
| 106 | +--- |
| 107 | + |
| 108 | +## Next steps |
| 109 | + |
| 110 | +In this quickstart, you learned how to create an Apache Hadoop cluster in HDInsight using Bicep. In the next article, you learn how to perform an extract, transform, and load (ETL) operation using Hadoop on HDInsight. |
| 111 | + |
| 112 | +> [!div class="nextstepaction"] |
| 113 | +> [Extract, transform, and load data using Interactive Query on HDInsight](../interactive-query/interactive-query-tutorial-analyze-flight-data.md) |
0 commit comments