在 Azure Stack Hub 中为用户创建服务产品Create a service offering for users in Azure Stack Hub

本教程介绍操作员如何创建套餐。This tutorial shows an operator how to create an offer. 套餐可以通过订阅的方式向用户提供服务。An offer makes services available to users on a subscription basis. 订阅套餐之后,用户有权在套餐指定的服务中创建和部署资源。Once subscribed to an offer, a user is entitled to create and deploy resources within the services specified by the offer.

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

  • 创建套餐。Create an offer.
  • 创建一个计划。Create a plan.
  • 将服务和配额分配到计划。Assign services and quotas to a plan.
  • 将计划分配到套餐。Assign a plan to an offer.

概述Overview

套餐由一个或多个计划组成。An offer consists of one or more plans. 计划可以通过指定每个服务的相应资源提供程序和配额,来授予对一个或多个服务的访问权限。A plan entitles access to one or more services, by specifying each service's corresponding resource provider and a quota. 可将计划作为基本计划添加到套餐,或者将套餐扩展为附加计划。Plans can be added to an offer as the base plan, or they can extend the offer as an add-on plan. 有关详细信息,请参阅服务、计划、套餐和订阅概述To learn more, see the Service, plan, offer, subscription overview.

Azure Stack Hub 中的订阅、套餐和计划

资源提供程序Resource providers

资源提供程序支持以服务的形式创建、部署和管理其资源。A resource provider supports creation, deployment, and management of its resources as services. 常见示例是可用于创建和部署虚拟机 (VM) 的 Microsoft.Compute 资源提供程序。A common example is the Microsoft.Compute resource provider, which offers the ability to create and deploy virtual machines (VMs). 有关 Azure 资源管理模型的概述,请参阅 Azure 资源管理器See Azure Resource Manager for an overview of the Azure resource management model.

Azure Stack Hub 中有两个常规资源提供程序类别:一个将资源部署为基础服务,另一个将资源部署为增值服务。In Azure Stack Hub, there are two general categories of resource providers: ones that deploy resources as foundational services, and ones that deploy as value-add services.

基本服务Foundational services

备注

本教程将介绍如何根据基础服务创建套餐。In this tutorial, you learn how to create an offer based on foundational services.

以下资源提供程序支持基础服务,每次安装 Azure Stack Hub 都会原生提供这些资源提供程序:Foundational services are supported by the following resource providers, which are available natively with every installation of Azure Stack Hub:

资源提供程序Resource Provider 示例资源Example resources
Microsoft.ComputeMicrosoft.Compute VM、磁盘、虚拟机规模集VMs, disks, virtual machine scale sets
Microsoft.KeyVaultMicrosoft.KeyVault Key Vault、机密Key Vaults, secrets
Microsoft.NetworkMicrosoft.Network 虚拟网络、公共 IP 地址、负载均衡器Virtual networks, public IP addresses, load balancers
Microsoft.StorageMicrosoft.Storage 存储帐户、Blob、队列、表Storage accounts, blobs, queues, tables

增值服务Value-add services

备注

若要提供增值服务,必须先在 Azure Stack Hub 市场中安装相应的资源提供程序。In order to offer a value-add service, the corresponding resource provider must first be installed in Azure Stack Hub Marketplace. 安装之后,其资源将通过与基础服务相同的方式提供给用户。Once installed, its resources are offered to users in the same way as foundational services. 有关目前支持增值服务产品的资源提供程序集,请参阅目录中的操作指南部分。Please see the How-to guides section of the TOC for the current set of resource providers that support value-add service offerings.

部署 Azure Stack Hub 后安装的资源提供程序支持增值服务。Value-add services are supported by resource providers that are installed after Azure Stack Hub has been deployed. 示例包括:Examples include:

资源提供程序Resource Provider 示例资源Example resources
Microsoft.WebMicrosoft.Web 应用服务函数应用、Web 应用、API 应用App Service function apps, web apps, API apps
Microsoft.MySqlAdapterMicrosoft.MySqlAdapter MySQL 托管服务器、MySQL 数据库MySQL hosting server, MySQL database
Microsoft.SqlAdapterMicrosoft.SqlAdapter SQL Server 托管服务器、SQL Server 数据库SQL Server hosting server, SQL Server database
Microsoft.EventHubMicrosoft.EventHub 事件中心Event Hubs

创建产品Create an offer

在创建套餐的过程中,需同时创建套餐和计划。During the offer creation process, you create both an offer and a plan. 计划用作套餐的基本计划。The plan is used as the offer's base plan. 在创建计划期间,需指定计划中提供的服务,及其相应的配额。During plan creation, you specify the services made available in the plan and their respective quotas.

  1. 使用云管理员帐户登录到管理员门户。Sign in to the administrator portal with a cloud admin account.

    • 对于集成系统,URL 根据操作员所在区域和外部域名的不同而异。For an integrated system, the URL varies based on your operator's region and external domain name. URL 使用 https://adminportal.<region>.<FQDN> 格式。The URL uses the format https://adminportal.<region>.<FQDN>.
    • 如果使用的是 Azure Stack 开发工具包,则 URL 为 https://adminportal.local.azurestack.externalIf you're using the Azure Stack Development Kit, the URL is https://adminportal.local.azurestack.external.

    然后选择“+ 创建资源” > “套餐 + 计划” > “套餐” 。Then select + Create a resource > Offers + Plans > Offer.

    在 Azure Stack Hub 管理门户中新建套餐

  2. 在“创建新套餐”中的“基本信息”选项卡下,输入显示名称资源名称,然后选择现有的或创建新的资源组In Create a new offer under the Basics tab, enter a Display name, Resource name, and select an existing or create a new Resource group. “显示名称”是套餐的友好名称。The Display name is the offer's friendly name. 只有云操作员可以看到资源名称,管理员可以使用该名称将套餐作为 Azure 资源管理器资源进行处理。Only the cloud operator can see the Resource name, which is the name that admins use to work with the offer as an Azure Resource Manager resource.

    Azure Stack Hub 管理门户中的显示名称

  3. 选择“基本计划”选项卡,然后选择“创建新计划”以创建新的计划。 Select the Base plans tab, then select Create new plan to create a new plan. 计划也会作为基本计划添加到套餐。The plan will also be added to the offer as a base plan.

    在 Azure Stack Hub 管理门户中添加计划

  4. 在“新建计划”中的“基本信息”选项卡下,输入显示名称资源名称In New plan under the Basics tab, enter a Display name and Resource name. 显示名称是用户可以看到的计划友好名称。The Display name is the plan's friendly name that users see. 只有云操作员可以看到资源名称,云操作员可以使用该名称将计划作为 Azure 资源管理器资源处理。Only the cloud operator can see the Resource name, which is the name that cloud operators use to work with the plan as an Azure Resource Manager resource. “资源组”将设置为针对套餐指定的资源组。 Resource group will be set to the one specified for the Offer.

    Azure Stack Hub 管理门户中的计划显示名称

  5. 选择“服务”选项卡,此时会看到安装资源提供程序后提供的服务列表。 Select the Services tab, and you see a list of services available from the installed resource providers. 选择“Microsoft.Compute”、“Microsoft.Network”和“Microsoft.Storage”。 Select Microsoft.Compute, Microsoft.Network, and Microsoft.Storage.

    在 Azure Stack Hub 管理门户中计划服务

  6. 选择“配额”选项卡,此时会看到为此计划启用的服务列表。 Select the Quotas tab, and you see the list of services you enabled for this plan. 选择“新建”并指定 Microsoft.Compute 的自定义配额。 Select Create New to specify a custom quota for Microsoft.Compute. 配额的“名称”是必填字段;可以接受或更改每个配额值。 Quota Name is required; you can accept or change each quota value. 完成后选择“确定”,然后对剩余的服务重复上述步骤。 Select OK when finished, then repeat these steps for the remaining services.

    在 Azure Stack Hub 管理门户中创建计算配额

  7. 选择“查看 + 创建”选项卡。 顶部应会显示绿色的“通过验证”横幅,指出现在可以开始创建新的基本计划。Select the Review + create tab. You should see a green "Validation passed" banner at the top, indicating the new base plan is ready to be created. 选择“创建” 。Select Create. 此时应该也会显示一条通知指出计划已创建。You should also see a notification indicating that the plan has been created.

    在 Azure Stack Hub 管理门户中创建新计划

  8. 返回到“创建新套餐”页的“基本计划”选项卡之后,将会发现计划已创建。 After returning to the Base plans tab of the Create a new offer page, you notice that the plan has been created. 确保已选择要作为基本计划包含在套餐中的新计划,然后选择“查看 + 创建”。 Be sure the new plan is selected for inclusion in the offer as the base plan, then select Review + create.

    在 Azure Stack Hub 管理门户中添加基本计划

  9. 在“查看 + 创建”选项卡的顶部,应会显示绿色的“通过验证”横幅。 On the Review + create tab, you should see a green "Validation passed" banner at the top. 检查“基本信息”和“基本计划”中的信息,并在准备就绪时选择“创建”。 Review the "Basic" and "Base Plans" info, and select Create when ready.

    在 Azure Stack Hub 管理门户中创建新套餐

  10. 一开始会显示“部署正在进行中”页,套餐部署完成后,随即显示“部署已完成”。The "Your deployment is underway" page shows initially, followed by "Your deployment is complete" once the offer is deployed. 在“资源”列下选择套餐名称。 Select on the name of the offer under the Resource column.

    在 Azure Stack Hub 管理门户中完成套餐部署

  11. 请注意横幅,其中显示套餐仍属于私人,因此用户无法订阅它。Notice the banner, showing your offer is still private, which prevents users from subscribing to it. 若要将套餐更改为公开,请依次选择“更改状态”、“公开”。 Change it to public by selecting Change State, and then chose Public.

    Azure Stack Hub 管理门户中的发布状态

创建套餐(1901 和更低版本)Create an offer (1901 and earlier)

在创建套餐的过程中,需同时创建套餐和计划。During the offer creation process, you create both an offer and a plan. 计划用作套餐的基本计划。The plan is used as the offer's base plan. 在创建计划期间,需指定计划中提供的服务,及其相应的配额。During plan creation, you specify the services made available in the plan and their respective quotas.

  1. 使用云管理员帐户登录到管理员门户。Sign in to the administrator portal with a cloud admin account.

    • 对于集成系统,URL 根据操作员所在区域和外部域名的不同而异,格式为 https://adminportal.<region>.<FQDN>For an integrated system, the URL varies based on your operator's region and external domain name, using the format https://adminportal.<region>.<FQDN>.
    • 如果使用的是 Azure Stack 开发工具包,则 URL 为 https://adminportal.local.azurestack.externalIf you're using the Azure Stack Development Kit, the URL is https://adminportal.local.azurestack.external.

    然后选择“+ 创建资源” > “套餐 + 计划” > “套餐” 。Then select + Create a resource > Offers + Plans > Offer.

    在 Azure Stack Hub 管理门户中新建套餐

  2. 在“新建套餐”中,输入“显示名称”和“资源名称”,然后选择新的或现有的资源组In New offer, enter a Display name and Resource name, and then select a new or existing Resource group. “显示名称”是套餐的友好名称。The Display name is the offer's friendly name. 只有云操作员可以看到资源名称,管理员可以使用该名称将套餐作为 Azure 资源管理器资源进行处理。Only the cloud operator can see the Resource name, which is the name that admins use to work with the offer as an Azure Resource Manager resource.

    Azure Stack Hub 管理门户中的显示名称

  3. 选择“基本计划”,在“计划”部分选择“添加”,将新计划添加到套餐。 Select Base plans, and in the Plan section, select Add to add a new plan to the offer.

    在 Azure Stack Hub 管理门户中添加计划

  4. 在“新建计划”部分中,填写“显示名称”和“资源名称”。 In the New plan section, fill in Display name and Resource name. 显示名称是用户可以看到的计划友好名称。The Display name is the plan's friendly name that users see. 只有云操作员可以看到资源名称,云操作员可以使用该名称将计划作为 Azure 资源管理器资源处理。Only the cloud operator can see the Resource name, which is the name that cloud operators use to work with the plan as an Azure Resource Manager resource.

    Azure Stack Hub 管理门户中的计划显示名称

  5. 选择“服务”。 Select Services. 在“服务”列表中,选择“Microsoft.Compute”、“Microsoft.Network”和“Microsoft.Storage”。 From the list of Services, pick Microsoft.Compute, Microsoft.Network, and Microsoft.Storage. 选择“选择”,将这些服务添加到计划。 Choose Select to add these services to the plan.

    在 Azure Stack Hub 管理门户中计划服务

  6. 选择“配额”,然后选择要为其创建配额的第一个服务。 Select Quotas, and then select the first service that you want to create a quota for. 对于 IaaS 配额,请使用以下示例作为指导,配置“计算”、“网络”和“存储服务”的配额。For an IaaS quota, use the following example as a guide for configuring quotas for the Compute, Network, and Storage services.

    • 首先为“计算”服务创建配额。First, create a quota for the Compute service. 在命名空间列表中,选择“Microsoft.Compute”,然后选择“创建新配额”。 In the namespace list, select Microsoft.Compute and then select Create new quota.

      创建新配额

    • 在“创建配额”中,输入配额的名称。 In Create quota, enter a name for the quota. 可以更改或接受显示的任何配额值。You can change or accept any of the quota values that are shown. 在此示例中,我们接受默认设置,并选择“确定”。 In this example, we accept the default settings and select OK.

      配额名称

    • 在命名空间列表中选择“Microsoft.Compute”,然后选择创建的配额。 Pick Microsoft.Compute in the namespace list, and then select the quota that you created. 此步骤会将该配额链接到“计算”服务。This step links the quota to the Compute service.

      选择配额

      针对“网络”和“存储”服务重复上述步骤。Repeat these steps for the Network and Storage services. 完成后,在“配额”中选择“确定”以保存所有配额。 When you're finished, select OK in Quotas to save all the quotas.

  7. 在“新建计划”中,选择“确定”。 In New plan, select OK.

  8. 在“计划”下面选择新计划,然后选择“选择”。 Under Plan, select the new plan and then Select.

  9. 在“新建套餐”中,选择“创建”。 In New offer, select Create. 创建套餐后,会看到通知。You'll see a notification when the offer is created.

  10. 在仪表板菜单中选择“套餐”,然后选择创建的套餐。 On the dashboard menu, select Offers and then pick the offer you created.

  11. 依次选择“更改状态”、“公共”。 Select Change State, and then chose Public.

    公共状态

后续步骤Next steps

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

  • 创建套餐。Create an offer.
  • 创建一个计划。Create a plan.
  • 将服务和配额分配到计划。Assign services and quotas to a plan.
  • 将计划分配到套餐。Assign a plan to an offer.

转到下一教程,了解如何执行以下操作:Advance to the next tutorial to learn how to: