练习 - 预配 HDInsight 以执行即席分析

已完成

现在,我们知道 Interactive Query 的优点及其工作原理,接下来可以开始部署资源来构建房地产仪表板。

创建 Interactive Query 群集之前需满足的条件

在创建群集之前,需要 Azure 订阅和 Azure 存储帐户。 Azure 存储是一种稳健、通用的存储解决方案,它与 HDInsight 无缝集成。 HDInsight 可将 Azure 存储中的 Blob 容器用作群集的默认文件系统。 建议对默认群集存储和业务数据使用单独的存储容器,以便将 HDInsight 日志和临时文件与你自己的业务数据隔离开来。

Interactive Query 还可以使用模块 1 中讨论的 Azure Data Lake Storage Gen1 或 Azure Data Lake Storage Gen2:但无论 HDInsight 的工作原理如何,都只有 Azure 存储和 Azure Data Lake Storage Gen2 支持 Hive LLAP。 此过程使用 Azure 存储。

创建 Interactive Query 群集的位置

确定 Interactive Query 群集是解决方案的最佳群集类型后,可以在多个位置创建群集:Azure 门户、Azure CLI、Azure PowerShell、cURL、Azure 资源管理器模板、HDInsight .NET SDK,甚至可以使用 Azure 数据工厂按需创建群集。 此过程使用 Azure 门户部署 Interactive Query 群集。

在 Azure 门户中预配存储帐户

如果还没有资源,那么要部署的第一个资源就是 Azure 存储帐户。

  1. 使用免费订阅登录到 Azure 门户。

  2. 单击“创建资源”>“存储”>“存储帐户”

    Creating an HDInsight Interactive Query Solution in the Azure portal.

  3. 在“基本信息”页上,填写以下值:

    • 订阅:确保选择免费订阅。
    • 资源组:单击“新建”,然后将其命名为 hdinsightmodule6uid,其中 uid 是唯一标识符。
    • 存储帐户名称:请输入 hdinsightmodule6uid。
    • 位置:请选择最靠近用户的位置,以减少延迟。 请注意此区域,因为你将在同一区域中创建 HDInsight 群集。
    • 性能:保留默认值“标准”。
    • 帐户类型:保留默认值“StorageV2 (常规用途 v2)”
    • 复制:将值更改为本地冗余存储 (LRS)
    • 访问层(默认):保留默认值“热”。
  4. 单击“下一步: 网络”。

    HDInsight basics tab in the Azure portal.

  5. 在“网络”页上,保留“公共终结点(所有网络)”的连接方法,然后单击“下一页: 高级 >”

    HDInsight networking tab in the Azure portal.

  6. 在“高级”页上,填写以下值:

    • 安全性:保留默认值“已启用”。
    • Azure 文件:保留默认值“已禁用”
    • 数据保护:保留默认值“已禁用”。
    • Data Lake Storage Gen2:保留默认值“已禁用”,创建 Blob 存储帐户,然后单击“查看 + 创建 >”。
  7. 在”创建存储帐户”页上,确保将帐户类型设置为“StorageV2 (常规用途 v2)”,然后单击“创建”。

    HDInsight review screen in the Azure portal.

  8. 部署完成后,将显示以下消息:

    Screenshot that shows the Microsoft Storage Account overview page, stating that your deployment is complete.

创建存储帐户后,便可以部署 HDInsight Interactive Query 群集。

预配 HDInsight Interactive Query 群集

  1. 单击“创建资源”>“分析”>“Azure HDInsight”

    Screenshot that shows the Azure portal with Create a resource, Analytics, and Azure H D Insight highlighted.

  2. 在“基本信息”页上,单击“转到经典创建体验”

    Screenshot that shows the Basics page with Go to classic create experience highlighted.

  3. 在 HDInsight 页上,单击“自定义(大小、设置、应用)”

    Screenshot that shows the H D Insight page with Custom highlighted.

  4. 在“基本信息”页上,填写以下值:

    • 群集名称:请输入群集的唯一名称,例如 mslearnmodule6uid。 如果群集名称已验证并且可用,则名称旁边会出现绿色的勾号。
    • 订阅:确保选择免费订阅。
    • 群集类型:单击“配置必需设置”,然后在群集类型框中选择“Interactive Query ”,接下来在版本框中,选择“Interactive Query 3.1.0 (HDI 4.0)”
    • 群集登录用户名:保留默认值“admin”
    • 群集登录密码:输入用于群集登录的密码。
    • 安全外壳 (SSH) 用户名:保留默认值“sshuser”。
    • 资源组:选择之前创建的资源组 mslearnmodule6yourid。
    • 位置:选择创建存储帐户所在的同一区域。
  5. 然后单击“下一步”

    Screenshot shows the H D Insight, Basics, and Cluster configuration pages with multiple fields highlighted.

  6. 在“安全 + 网络”页上,单击“下一页”。

  7. 在“存储”页上,填写以下值:

    • 主存储类型:确保选择默认值“Azure 存储”。
    • 选择“存储帐户”,单击“配置必需设置”
    • 在“存储帐户”页上,搜索创建的存储帐户的名称 mslearnmodule6uid,并选择它。
  8. 将其他所有值保留默认值,然后单击“下一步”

    The storage page in the Azure portal.

  9. 在“应用程序(可选)”页上,单击“下一页”。

  10. 在“群集大小”页上,单击“下一页”。

  11. 在“脚本操作”页上,单击“可选”,然后单击“提交新项”

  12. 在“提交脚本操作”页中,填写以下值:

  13. 然后单击“创建”

    The script actions page in the Azure portal.

  14. 验证完成后,请在“脚本操作”页上单击“选择”,然后单击“下一页”

  15. 验证完成后,在“群集摘要”页中,确保将群集类型设置为 Interactive Query 3.1 (HDI 4.0),然后单击“创建”

    The HDInsight summary page in the Azure portal.

  16. 单击“通知”图标,监视部署进度。

    The deployment in progress notification in the Azure portal.

    部署成功后,消息将更改为“部署成功”。

  17. 在“通知”窗格中,单击“转到资源”。

    The HDInsight deployment succeeded screen in the Azure portal.

  18. 此时会显示 HDInsight 群集的“概述”页,其中包含有关群集的信息,并提供指向有用工具和报表的链接。 可以通过单击固定按钮将此资源添加到仪表板。

    The HDInsight overview screen in the Azure portal.