教程:测试服务套餐Tutorial: Test a service offering

在上一篇教程中,你已为用户创建套餐。In the previous tutorial, you created an offer for users. 本教程介绍如何使用该套餐创建订阅,以此测试该套餐。This tutorial shows you how to test that offer, by using it to create a subscription. 然后,创建资源并将其部署到订阅提供的基础服务。You then create and deploy resources to the foundational services entitled by the subscription.

本教程介绍如何执行下列操作:In this tutorial, you learn how to:

  • 创建订阅Create a subscription
  • 创建并部署资源Create and deploy resources

先决条件Prerequisites

在开始学习本教程之前,必须满意以下先决条件:Before starting this tutorial, you must complete the following prerequisites:

  • 完成向用户提供服务教程。Complete the Offer a service to users tutorial. 此教程介绍了如何创建本教程所用的套餐。In it, you learn how to create the offer used by this tutorial.

  • 使用本教程中订阅的套餐可以部署虚拟机 (VM) 资源。The offer you subscribe to in this tutorial enables deployment of a virtual machine (VM) resource. 若要测试 VM 部署,必须先从 Azure 市场下载 VM 映像,并在 Azure Stack Hub 市场中提供该映像。If you'd like to test VM deployment, you must first make a VM image available in Azure Stack Hub Marketplace, by downloading it from Azure Marketplace. 有关说明,请参阅将市场项从 Azure 下载到 Azure Stack HubSee Download marketplace items from Azure to Azure Stack Hub for instructions.

订阅套餐Subscribe to the offer

  1. 使用用户帐户登录到用户门户Sign in to the user portal with a user account

    • 对于集成系统,URL 根据操作员所在的区域和外部域名的不同而异,格式为 https://portal.<region>.<FQDN> 。For an integrated system, the URL varies based on your operator's region and external domain name, using the format https://portal.<region>.<FQDN>.
    • 如果使用的是 Azure Stack 开发工具包,则门户地址为 https://portal.local.azurestack.externalIf you're using the Azure Stack Development Kit, the portal address is https://portal.local.azurestack.external.
  2. 选择“获取订阅”磁贴。Select the Get a Subscription tile.

    获取订阅

  3. 在“获取订阅”中的“显示名称”字段内输入新订阅的名称。 In Get a Subscription, enter a name for your new subscription in the Display Name field. 选择“套餐”,然后从“选择套餐”列表中选择在上一篇教程中创建的套餐。 Select Offer, and then choose the offer you created in the previous tutorial, from the Choose an offer list. 选择“创建” 。Select Create.

    创建产品

  4. 若要查看订阅,请选择“所有服务”,然后在“常规”类别下选择“订阅”。To view the subscription, select All services, and then under the GENERAL category select Subscriptions. 选择新订阅以查看与其关联的套餐和套餐属性。Select your new subscription to view the offer it's associated with, and its properties.

    备注

    订阅套餐之后,可能需要刷新门户才能看到哪些服务包含在新订阅中。After you subscribe to an offer, you might have to refresh the portal to see which services are part of the new subscription.

部署存储帐户资源Deploy a storage account resource

在用户门户中,可以使用上一部分中创建的订阅来预配存储帐户。From the user portal, you provision a storage account using the subscription you created in the previous section.

  1. 使用用户帐户登录到用户门户。Sign in to the user portal with a user account.

  2. 选择“+创建资源” > “数据 + 存储” > “存储帐户 - Blob、文件、表、队列” 。Select +Create a resource > Data + Storage > Storage account - blob, file, table, queue.

  3. 在“创建存储帐户”中提供以下信息:In Create storage account, provide the following information:

    • 输入名称Enter a Name
    • 选择新订阅Select your new Subscription
    • 选择一个资源组(或创建新的资源组)。Select a Resource group (or create a one.)
    • 选择“创建”以创建存储帐户。Select Create to create the storage account.
  4. 部署开始后,你将返回到仪表板。Once deployment starts, you return to the dashboard. 若要查看新存储帐户,请选择“所有资源”。To see the new storage account, select All resources. 搜索该存储帐户,然后从搜索结果中选择其名称。Search for the storage account and select its name from the search results. 可在此处管理存储帐户及其内容。From here, you can manage the storage account and its contents.

部署虚拟机资源Deploy a virtual machine resource

在用户门户中,可以使用上一部分中创建的订阅来预配虚拟机。From the user portal, you provision a virtual machine using the subscription you created in the previous section.

  1. 使用用户帐户登录到用户门户。Sign in to the user portal with a user account.

  2. 选择“+创建资源” > “计算” > “<image-name>”,其中“image-name”是在先决条件部分下载的虚拟机名称 。Select +Create a resource > Compute > <image-name>, where "image-name" is the name of the virtual machine you downloaded in prerequisites.

  3. 在“创建虚拟机” / “基本信息”中提供以下信息: In Create virtual machine / Basics, provide the following information:

    • 输入 VM 的名称Enter a Name for the VM.
    • 输入一个用户名作为管理员帐户。Enter a User name for the administrator account.
    • 对于 Linux VM,请选择“密码”作为“身份验证类型”。For Linux VMs, select "Password" for Authentication type.
    • 输入管理员帐户的密码,并在“确认密码”中输入相同的密码。Enter a Password and the same for Confirm password, for the administrator account.
    • 选择新订阅Select your new Subscription.
    • 选择一个资源组(或创建新的资源组)。Select a Resource group (or create a one).
    • 选择“确定”以验证此信息并继续。Select OK to validate this information and continue.
  4. 在“选择大小”中,根据需要筛选列表,选择 VM SKU,然后选择“选择”。 In Choose a size, filter the list if necessary, select a VM SKU, and select Select.

  5. 在“设置”中的“选择公共入站端口”下,选择要打开的端口,然后选择“确定”。 In Settings, specify the port(s) to be opened under Select public inbound ports, and select OK.

    备注

    例如,选择“RDP (3389)”可在 VM 运行时远程连接到该 VM。Selecting "RDP(3389)", for example, allows you to connect to the VM remotely when it's running.

  6. 在“摘要”中查看所做的选择,然后选择“确定”以创建虚拟机。 In Summary, review your choices, then select OK to create the virtual machine.

  7. 部署开始后,你将返回到仪表板。Once deployment starts, you return to the dashboard. 若要查看新虚拟机,请选择“所有资源”。To see the new virtual machine, select All resources. 搜索该虚拟机,然后从搜索结果中选择其名称。Search for the virtual machine and select its name from the search results. 在此处可以访问和管理虚拟机。From here, you can access and manage the virtual machine.

    备注

    完整部署和启动 VM 可能需要几分钟的时间。Full deployment and starting of the VM can take several minutes. VM 可供使用之后,状态将更改为“正在运行”。Once the VM is ready for use, the status will change to "Running".

部署虚拟机资源(1901 和更低版本)Deploy a virtual machine resource (1901 and earlier)

在用户门户中使用新订阅预配虚拟机。From the user portal, you provision a virtual machine using the new subscription.

  1. 使用用户帐户登录到用户门户。Sign in to the user portal with a user account.

  2. 在仪表板上,选择“+创建资源” > “计算” > “Windows Server 2016 Datacenter Eval”,然后选择“创建”。 On the dashboard, select +Create a resource > Compute > Windows Server 2016 Datacenter Eval, and then select Create.

  3. 在“基本信息”中提供以下信息:In Basics, provide the following information:

    • 输入名称Enter a Name
    • 输入用户名Enter a User name
    • 输入密码Enter a Password
    • 选择新订阅Choose your new Subscription
    • 创建资源组(或选择现有的资源组)。Create a Resource group (or select an existing one.)
    • 选择“确定”保存此信息。Select OK to save this information.
  4. 在“选择大小”中,选择“A1 标准”,然后选择“选择” 。In Choose a size, select A1 Standard, and then Select.

  5. 在“设置”中,选择“虚拟网络”。 In Settings, select Virtual network.

  6. 在“选择虚拟网络”中,选择“新建”。 In Choose virtual network, select Create new.

  7. 在“创建虚拟网络”中接受所有默认值,然后选择“确定”。 In Create virtual network, accept all the defaults, and select OK.

  8. 在“设置”中选择“确定”,以保存网络配置。 Select OK in Settings to save the network configuration.

  9. 在“摘要”中,选择“确定”创建虚拟机。 In Summary, select OK to create the virtual machine.

  10. 若要查看新虚拟机,请选择“所有资源”。To see the new virtual machine, select All resources. 搜索该虚拟机,然后从搜索结果中选择其名称。Search for the virtual machine and select its name from the search results.

后续步骤Next steps

本教程介绍了如何:In this tutorial you learned how to:

  • 创建订阅Create a subscription
  • 创建并部署资源Create and deploy resources

接下来,请了解如何为增值服务部署资源提供程序。Next, learn about deploying resource providers for value-add services. 使用这些资源提供程序可为计划中的用户提供更多的服务:They allow you to offer even more services to users in your plans: