快速入门:使用 Azure Stack Hub 门户创建事件中心群集Quickstart: Create an Event Hubs cluster using the Azure Stack Hub portal

重要

Azure Stack 中心上的事件中心目前处于预览阶段,在预览期间可免费使用。Event Hubs on Azure Stack Hub is currently in preview, and is provided free during the preview period.

本快速入门介绍如何使用 Azure Stack Hub 用户门户创建事件中心群集。In this quickstart, you learn how to create an Event Hubs cluster, using the Azure Stack Hub user portal.

事件中心群集提供单租户部署来满足苛刻的流式处理需求。Event Hubs clusters offer single-tenant deployments for the most demanding streaming needs. 事件中心群集每秒能够引入数百万个事件,且提供有保障的容量和亚秒级的延迟。An Event Hubs cluster can ingress millions of events per second with guaranteed capacity and subsecond latency. 事件中心群集包含所有常用功能,这些功能与 Azure 事件中心版本提供的功能非常接近。Event Hubs clusters includes all popular features, and close parity with features offered by the Azure Event Hubs edition.

先决条件Prerequisites

完成本快速入门之前,必须确保你的订阅中可以使用事件中心服务。Before you can complete this quickstart, you must ensure the Event Hubs service is available in your subscription. 如果不可用,请联系管理员在 Azure Stack Hub 资源提供程序上安装事件中心If not, work with your administrator to install the Event Hubs on Azure Stack Hub resource provider. 安装步骤还包括创建包含事件中心服务的产品/服务。The installation steps also cover the creation of an offer that includes the Event Hubs service.

产品/服务可用后,管理员可以创建或更新订阅以包含事件中心。Once an offer is available, your administrator can create or update your subscription to include Event Hubs. 或者,你可以订阅新产品/服务并创建自己的订阅Alternatively, you can subscribe to the new offer and create your own subscription.

概述Overview

事件中心群集是通过指定容量单位 (CU) 创建的。Event Hubs clusters are created by specifying Capacity Units (CUs). CU 是预先分配的 CPU、存储和内存资源量。A CU is a pre-allocated amount of CPU, storage, and memory resources. 事件中心群集按 CPU/小时计费。Event Hubs clusters are billed by CPU/hr. 在群集创建过程中选择 CU 数量(群集大小)时,会显示群集使用的核心 (CPU) 数。The number of cores (CPUs) used by a cluster is displayed when selecting the number of CUs (cluster size) during the cluster creation experience. 有关群集资源使用情况的更多详细信息,请参阅如何为 Azure Stack Hub 上的事件中心进行容量规划For more detailed information on cluster resource usage, see How to do capacity planning for Event Hubs on Azure Stack Hub.

本快速入门介绍如何使用 Azure Stack Hub 用户门户来执行以下操作:In this quickstart, you learn how to use the Azure Stack Hub user portal to:

  • 创建单 CU 事件中心群集。Create a 1 CU Event Hubs cluster.
  • 在群集中创建命名空间。Create a namespace in the cluster.
  • 在命名空间中创建事件中心。Create an event hub in the namespace.
  • 删除事件中心群集Delete an Event Hubs cluster

创建事件中心群集Create an Event Hubs cluster

事件中心群集提供唯一的范围容器,可以在该容器中创建一个或多个命名空间。An Event Hubs cluster provides a unique scoping container in which you can create one or more namespaces. 完成以下步骤以创建事件中心群集:Complete the following steps to create an Event Hubs cluster:

  1. 登录到 Azure Stack Hub 用户门户。Sign in to the Azure Stack Hub user portal.

  2. 在左侧导航窗格中选择 “所有服务” ,在搜索栏中输入“事件中心群集”,然后从结果列表中选择“事件中心群集”项。Select All services from the left navigation pane, enter "Event Hubs Clusters" in the search bar, and select the Event Hubs Clusters item from results list.

  3. 进入 “事件中心群集” 页后,从顶部菜单中选择 “+ 添加”Once on the Event Hubs Clusters page, select + Add from the top menu. “创建事件中心群集” 面板会在右侧打开。The Create Event Hubs Cluster panel opens on the right.

  4. “创建事件中心群集” 页的 “基本”  选项卡上:On the Basics tab of the Create Event Hubs Cluster page:

    • 群集名称:输入名称。Cluster name: Enter a name. 系统会立即检查该名称是否可用。The system immediately checks to see if the name is available. 如果可用,字段的右侧会显示一个勾号。If available, a checkmark will show at the right end of the field.
    • 订阅:选择要在其中创建群集的订阅。Subscription: Select the subscription in which you want to create the cluster.
    • 资源组:创建/选择要在其中创建群集的资源组。Resource group: Create/Select the resource group in which you want to create the cluster.
    • 选择页面底部的 “下一步: 标记 >”按钮以继续。Select the Next: Tags > button at the bottom of the page to continue. 可能需要等待系统完全预配资源。You may have to wait for the system to fully provision resources.

    创建事件中心群集 - 基本Create Event Hub cluster - basics

  5. 在 “标记” 选项卡上:On the Tags tab:

    • (可选)为资源标记输入名称/值对。Optionally, enter the name/value pairs for the resource tag(s).
    • 选择页面底部的 “下一步: 查看 + 创建 >”按钮以继续。Select the Next: Review + Create > button to continue.

    创建事件中心群集 - 标记Create Event Hub cluster - tags

  6. 在 “查看 + 创建” 选项卡上,还应在页面顶部看到“验证成功”横幅。On the Review + Create tab, you should also see a "Validation succeeded" banner at the top of the page. 查看详细信息后,在准备好创建群集时选择 “创建”After reviewing the details, select Create when ready to create the cluster.

    创建事件中心群集 - 查看 + 创建Create Event Hub cluster - review + create

    备注

    事件中心群集部署可能需要几分钟才能完成,通常至少需要 45 分钟。An Event Hubs cluster deployment can take several minutes to complete, normally at least 45 minutes.

  7. 在部署期间,会显示 “部署正在进行” 状态页。During deployment, you see a Your deployment is underway status page. 部署完成后,页面将更改为 “部署已完成”When deployment finishes, the page changes to Your deployment is complete. 在继续下一部分之前,请选择 “转到资源” 按钮来查看新群集。Before continuing to the next section, select the Go to resource button to view the new cluster.

    创建事件中心群集 - 部署完成Create Event Hub cluster - deployment complete

创建命名空间Create a namespace

现在,你可以在新群集中创建命名空间:Now you create a namespace within your new cluster:

  1. 在“事件中心群集”的“概述”页上,从顶部菜单中选择“+ 命名空间”  **** 。On the Overview page of Event Hubs Cluster, select + Namespace from the top menu.

    事件中心群集 - 选择群集Event Hubs Clusters - select cluster

  2. “在群集中创建命名空间” 面板上:On the Create namespace in Cluster panel:

    • 名称:输入命名空间的名称。Name: Enter a name for the namespace. 系统会立即检查该名称是否可用。The system immediately checks to see if the name is available. 如果可用,字段的右侧会显示一个勾号。If available, a checkmark will show at the right end of the field.

    • 属性/值列表:命名空间继承以下属性:Property/Value list: The namespace inherits the following properties:

      • 订阅 IDSubscription ID
      • 资源组Resource group
      • 位置Location
      • 群集名称Cluster name
    • 选择 “创建”  以创建命名空间:Select Create to create the namespace:

    事件中心群集 - 创建命名空间Event Hubs Clusters - create namespace

  3. 你会看到,新的命名空间显示在 “群集命名空间” 下方。Note your new namespace under Cluster Namespaces. 继续下一部分之前,请选择新命名空间的链接。Before continuing to the next section, select the link for your new namespace.

    事件中心群集 - 查看命名空间Event Hubs Clusters - view namespace

创建事件中心Create an event hub

  1. 在“事件中心”命名空间的“概述”页上,从顶部菜单中选择“+ 事件中心” 。On the Overview page of Event Hubs Namespace, select + Event Hub from the top menu.

    事件中心 - 命名空间概述Event Hubs - namespace overview

  2. “创建事件中心” 面板上:On the Create Event Hub panel:

    • 名称:输入事件中心的名称。Name: Enter a name for the event hub. 名称只能包含字母、数字、句点、连字符和下划线。The name can contain only letters, numbers, periods, hyphens, and underscores. 名称必须以字母或数字开头和结尾。The name must start and end with a letter or number. 系统会立即检查该名称是否可用。The system immediately checks to see if the name is available. 如果可用,字段的右侧会显示一个勾号。If available, a checkmark will show at the right end of the field.
    • 选择 “创建”  以创建事件中心。Select Create to create the event hub.

    事件中心 - 命名空间概述 - 创建事件中心Event Hubs - namespace overview create event hub

删除事件中心群集Delete an Event Hubs cluster

删除群集的方法如下:To delete the cluster:

  1. 再次从左侧导航窗格中选择 “所有服务”Select All services from the left navigation pane again. 在搜索栏中输入“事件中心群集”,然后从结果列表中选择 “事件中心群集” 项。Enter "Event Hubs Clusters" in the search bar, and select the Event Hubs Clusters item from results list.

  2. “事件中心群集” 页上,找到并选择先前创建的群集。On the Event Hub Clusters page, find and select the cluster you created previously.

    此屏幕截图显示了如何选择要删除的群集。Screenshot that shows how to select a cluster to delete.

  3. “事件中心群集”“概述”页上On the Overview page of Event Hubs Cluster:

    • 从顶部菜单中选择 “删除”Select Delete from the top menu.
    • “删除群集” 面板会在右侧打开,并显示删除确认消息。The Delete Cluster panel opens on the right, with a deletion confirmation message.
    • 输入群集的名称,然后选择 “删除”  以删除群集。Enter the name of the cluster and select Delete to delete the cluster.

    事件中心群集 - 删除群集Event Hubs Clusters - delete cluster

后续步骤Next steps

本快速入门介绍如何使用门户创建事件中心群集。In this quickstart, you learned how to create an Event Hubs cluster using the portal. 接下来,从下面列出的第一部分开始,继续学习“发送和接收事件”快速入门:Now continue with the "Send and receive events" quickstarts, starting with the first one: