你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

快速入门:部署 Azure 市场托管应用程序

在本快速入门中,你将部署 Azure 市场托管应用程序,并在 Azure 中验证资源部署。 市场托管应用程序发布者会收取维护应用程序的费用,并且在部署期间,将向发布者授予对应用程序的受管理资源组的访问权限。 作为客户,你对已部署的资源具有有限的访问权限,但可以从 Azure 订阅中删除托管应用程序。

为了避免托管应用程序的 Azure 资源产生不必要的成本,请在完成后转到清理资源

先决条件

具有活动订阅的 Azure 帐户。 如果没有帐户,请在开始之前创建一个免费帐户

查找托管应用程序

若要从 Azure 门户获取托管应用程序,请使用以下步骤。

  1. 登录 Azure 门户

  2. 搜索“市场”,然后在可用选项中选择它。 或者,如果你最近使用过市场,请从列表中选择它。

    Screenshot of the Azure portal home page to search for Marketplace or select it from the list of Azure services.

  3. 在“市场”页上,搜索“Microsoft 社区培训”。

  4. 选择“Microsoft 社区培训(预览版)”。

    Screenshot of the Azure Marketplace that shows the managed application to select for deployment.

  5. 选择“基本”计划,然后选择“创建”。

    Screenshot that shows the Basic plan is selected and the create button is highlighted.

部署托管应用程序

  1. 在“基本信息”选项卡上输入所需的信息。

    Screenshot that shows the form's Basics tab to deploy the managed application.

    • 订阅:选择 Azure 订阅。
    • 资源组:创建新的资源组。 对于此示例,请使用 demo-marketplace-app
    • 区域:选择一个区域,例如美国西部
    • 应用程序名称:输入一个名称,例如 demotrainingapp
    • 受管理资源组:使用此示例的默认名称。 格式为 mrg-microsoft-community-training-<dateTime>。 但是,可以根据需要更改此名称。
  2. 选择“下一步:设置门户”。

  3. 在“设置门户”选项卡上,输入所需的信息。

    Screenshot that shows the form's Setup your portal tab to deploy the managed application.

    • 网站名称:输入符合表单上指定条件的名称,例如 demotrainingsite。 网站名称在 Azure 中应该是全局唯一的。
    • 组织名称:输入组织的名称。
    • 联系人电子邮件地址:输入至少一个有效的电子邮件地址。
  4. 选择“下一步:设置登录类型”。

  5. 在“设置登录类型”选项卡上,输入所需的信息。

    Screenshot that shows the form's Setup your login type tab to deploy the managed application.

    • 登录类型:对于此示例,选择“移动”。
    • 组织管理员的手机号码:输入有效的移动电话号码,包括国家/地区代码,格式为 +1 1234567890。 电话号码用于登录到培训站点。
  6. 在完成时选择“下一步:查看 + 创建”。

  7. 显示“已通过验证”后,验证信息是否正确。

  8. 阅读“共同管理员访问权限”并选中该框以同意条款。

    Screenshot that shows the validation passed, the co-admin permission box is selected, and create button is highlighted.

  9. 选择创建

部署将开始,由于创建了许多资源,因此 Azure 部署大约需要 20 分钟才能完成。 可以在网站可用之前验证 Azure 部署。

验证托管应用程序部署

托管应用程序部署完成后,可以验证资源。

  1. 转到资源组 demo-marketplace-app 并选择托管应用程序。

    Screenshot of the resource group where the managed application is installed that highlights the application name.

  2. 选择“概述”选项卡,以显示托管应用程序和指向受管理资源组的链接。

    Screenshot of the managed application that highlights the link to the managed resource group.

  3. 受管理资源组显示已部署的资源和创建资源的部署。

    Screenshot of the managed resource group that highlights the deployments and list of deployed resources.

  4. 若要查看发布者在受管理资源组中的权限,请选择“访问控制(IAM)”>“角色分配”。

    你还可以验证拒绝分配

对于此示例,网站的可用性不是必需的。 本文旨在介绍如何部署 Azure 市场托管应用程序和验证资源。 为了避免不必要的成本,请在完成后转到清理资源

启动网站(可选)

部署完成后,可以从受管理资源组转到应用服务资源并启动网站。

Screenshot of the App Service with the website link highlighted.

站点可能会响应一个页面,提示部署仍在处理中。

Screenshot that shows the website deployment is in progress.

当网站可用时,将显示默认登录页。 可以使用部署期间使用的移动电话号码登录,并且你会收到一条确认短信。 完成后,请务必注销培训网站。

清理资源

处理完托管应用程序后,可以删除资源组,这将删除你创建的所有 Azure 资源。 例如,在本快速入门中,你创建了资源组 demo-marketplace-app 和前缀为 mrg-microsoft-community-training 的受管理资源组。

删除 demo-marketplace-app 资源组时,将删除托管应用程序、受管理资源组和所有 Azure 资源。

  1. 转到 demo-marketplace-app 资源组并删除资源组

    Screenshot of the highlighted delete resource group button.

  2. 若要确认删除,请输入资源组名称,然后选择“删除”。

    Screenshot that shows the delete resource group confirmation.

后续步骤