通过 Azure 门户创建使用 Data Lake Storage Gen2 的群集Create a cluster with Data Lake Storage Gen2 using the Azure portal

Azure 门户是一种基于 Web 的管理工具,用于管理 Microsoft Azure 云中托管的服务和资源。The Azure portal is a web-based management tool for services and resources hosted in the Microsoft Azure cloud. 本文介绍如何使用门户创建基于 Linux 的 Azure HDInsight 群集。In this article, you learn how to create Linux-based Azure HDInsight clusters by using the portal. 创建 HDInsight 群集一文提供了其他详细信息。Additional details are available from Create HDInsight clusters.

警告

HDInsight 群集是基于分钟按比例计费,而不管用户是否使用它们。Billing for HDInsight clusters is prorated per minute, whether you use them or not. 请务必在使用完群集之后将其删除。Be sure to delete your cluster after you finish using it. 请参阅如何删除 HDInsight 群集See how to delete an HDInsight cluster.

如果没有 Azure 订阅,可在开始前创建一个试用订阅If you don't have an Azure subscription, create a Trial Subscription before you begin.

若要创建将 Data Lake Storage Gen2 用作存储的 HDInsight 群集,请按照以下步骤操作,配置具有分层命名空间的存储帐户。To create an HDInsight cluster that uses Data Lake Storage Gen2 for storage, follow these steps to configure a storage account that has a hierarchical namespace.

创建用户分配的托管标识Create a user-assigned managed identity

创建用户分配的托管标识(如果还没有)。Create a user-assigned managed identity, if you don’t already have one.

  1. 登录到 Azure 门户Sign in to the Azure portal.
  2. 在左上角,单击“创建资源”。In the upper-left click Create a resource .
  3. 在搜索框中键入“用户分配”并单击“用户分配的托管标识”。In the search box, type user assigned and click User Assigned Managed Identity .
  4. 单击 创建Click Create .
  5. 输入托管标识的名称,选择正确的订阅、资源组和位置。Enter a name for your managed identity, select the correct subscription, resource group, and location.
  6. 单击 创建Click Create .

有关 Azure HDInsight 中托管标识的工作原理的详细信息,请参阅 Azure HDInsight 中的托管标识For more information on how managed identities work in Azure HDInsight, see Managed identities in Azure HDInsight.

创建用户分配的托管标识

创建与 Data Lake Storage Gen2 配合使用的存储帐户Create a storage account to use with Data Lake Storage Gen2

创建与 Azure Data Lake Storage Gen2 配合使用的存储帐户。Create an storage account to use with Azure Data Lake Storage Gen2.

  1. 登录到 Azure 门户Sign in to the Azure portal.
  2. 在左上角,单击“创建资源”。In the upper-left click Create a resource .
  3. 在搜索框中,键入“存储”,然后单击“存储帐户” 。In the search box, type storage and click storage account .
  4. 单击 创建Click Create .
  5. 在“创建存储帐户”屏幕上:On the Create storage account screen:
    1. 选择正确的订阅和资源组。Select the correct subscription and resource group.
    2. 为要与 Data Lake Storage Gen2 配合使用的存储帐户输入名称。Enter a name for your storage account with Data Lake Storage Gen2.
    3. 单击“高级”选项卡。Click on the Advanced tab.
    4. 单击 Data Lake Storage Gen2 下的“分层命名空间”旁边的“启用”。Click Enabled next to Hierarchical namespace under Data Lake Storage Gen2 .
    5. 单击“查看 + 创建”。Click Review + create .
    6. 单击“创建” Click Create

有关存储帐户创建过程中其他选项的详细信息,请参阅快速入门:为 Azure Data Lake Storage Gen2 创建存储帐户For more information on other options during storage account creation, see Quickstart: Create a storage account for Azure Data Lake Storage Gen2.

显示 Azure 门户中存储帐户创建情况的屏幕截图

在 Data Lake Storage Gen2 上设置托管标识的权限Set up permissions for the managed identity on the Data Lake Storage Gen2

将托管标识分配到存储帐户上的“存储 Blob 数据所有者”角色。Assign the managed identity to the Storage Blob Data Owner role on the storage account.

  1. Azure 门户中转到自己的存储帐户。In the Azure portal, go to your storage account.

  2. 选择存储帐户,然后选择“访问控制(IAM)”以显示该帐户的访问控制设置。Select your storage account, then select Access control (IAM) to display the access control settings for the account. 选择“角色分配”选项卡以查看角色分配列表。Select the Role assignments tab to see the list of role assignments.

    显示存储访问控制设置的屏幕截图

  3. 选择“+ 添加角色分配”按钮以添加一个新角色。Select the + Add role assignment button to add a new role.

  4. 在“添加角色分配”窗口中,选择“存储 Blob 数据所有者”角色 。In the Add role assignment window, select the Storage Blob Data Owner role. 然后,选择具有托管标识和存储帐户的订阅。Then, select the subscription that has the managed identity and storage account. 接下来,搜索并找到之前创建的用户分配托管标识。Next, search to locate the user-assigned managed identity that you created previously. 最后,选择托管标识,它将在“选定成员”下列出。Finally, select the managed identity, and it will be listed under Selected members .

    显示如何分配 Azure 角色的屏幕截图

  5. 选择“保存” 。Select Save . 现在,选定的用户分配的标识会列在选定的角色下。The user-assigned identity that you selected is now listed under the selected role.

  6. 此初始设置完成后,可通过门户创建群集。After this initial setup is complete, you can create a cluster through the portal. 群集必须与存储帐户位于同一 Azure 区域中。The cluster must be in the same Azure region as the storage account. 在群集创建菜单的“存储”选项卡中,选择以下选项:In the Storage tab of the cluster creation menu, select the following options:

    • 对于“主要存储类型”,请选择“Azure Data Lake Storage Gen2” 。For Primary storage type , select Azure Data Lake Storage Gen2 .

    • 在“主存储帐户”下,搜索并选择新建的 Data Lake Storage Gen2 存储的存储帐户。Under Primary Storage account , search for and select the newly created storage account with Data Lake Storage Gen2 storage.

    • 在“标识”下,选择新建的用户分配的托管标识。Under Identity , select the newly created user-assigned managed identity.

      用于配合使用 Data Lake Storage Gen2 和 Azure HDInsight 的存储设置

    备注

    • 若要在存储帐户级别向 Data Lake Storage Gen2 添加辅助存储帐户,只需将先前创建的托管标识分配给要添加的新 Data Lake Storage Gen2 即可。To add a secondary storage account with Data Lake Storage Gen2, at the storage account level, simply assign the managed identity created earlier to the new Data Lake Storage Gen2 that you want to add. 请注意,不支持通过 HDInsight 上的“其他存储帐户”边栏选项卡向 Data Lake Storage Gen2 添加辅助存储帐户。Please be advised that adding a secondary storage account with Data Lake Storage Gen2 via the "Additional storage accounts" blade on HDInsight isn't supported.
    • 可以在 HDInsight 使用的 Azure Blob 存储帐户上启用 RA-GRS 或 RA-ZRS。You can enable RA-GRS or RA-ZRS on the Azure Blob storage account that HDInsight uses. 但是,不支持针对 RA-GRS 或 RA-ZRS 辅助终结点创建群集。However, creating a cluster against the RA-GRS or RA-ZRS secondary endpoint isn't supported.

删除群集Delete the cluster

请参阅使用浏览器、PowerShell 或 Azure CLI 删除 HDInsight 群集See Delete an HDInsight cluster using your browser, PowerShell, or the Azure CLI.

故障排除Troubleshoot

如果在创建 HDInsight 群集时遇到问题,请参阅访问控制要求If you run into issues with creating HDInsight clusters, see access control requirements.

后续步骤Next steps

你已成功创建 HDInsight 群集。You've successfully created an HDInsight cluster. 现在可以了解如何使用群集了。Now learn how to work with your cluster.

Apache Spark 群集Apache Spark clusters

Apache Hadoop 群集Apache Hadoop clusters

Apache HBase 群集Apache HBase clusters