你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
在本快速入门中,你将使用 Azure 市场和 Azure CLI 在 Confluent Cloud 上的 Apache Kafka 和 Apache Flink(Azure 本机集成服务)中创建资源。
先决条件
- 一个 Azure 帐户。 如果没有活动 Azure 订阅,请创建一个免费帐户。
- Azure 订阅的“所有者”或“参与者”角色。 只有分配了其中一个角色的用户才能在 Azure 和 Confluent 之间设置集成。 在开始之前, 请验证你是否具有所需的访问权限。
查找产品/服务
使用 Azure 门户在 Confluent Cloud 应用程序上查找 Apache Kafka 和 Apache Flink:
转到 Azure 门户并登录。
搜索并选择 “市场”。
在 “市场 ”页上,从两个计费选项中进行选择:
- 即用即付每月计划:Confluent 云消耗费用显示在 Azure 每月帐单上。 此计划已公开发布。
- 承诺计划:注册最低支出金额,并获取 Confluent Cloud 承诺使用情况的折扣。 此计划适用于已获得专用产品/服务批准的客户。
对于 即用即付 客户,请搜索并选择 Confluent Cloud 产品/服务上的 Apache Kafka 和 Apache Flink 。
对于 承诺 客户,请选择 “查看专用计划 ”链接。 “承诺”要求注册最低使用量。 仅当知道需要长时间使用服务时,才使用此选项。
搜索并选择 Confluent Cloud 私有云上的 Apache Kafka 和 Apache Flink 。
创建资源
首先为 Azure CLI 准备环境:
在 Azure Cloud Shell 中使用 Bash 环境。 有关详细信息,请参阅 Azure Cloud Shell 入门。
如需在本地运行 CLI 参考命令,请安装 Azure CLI。 如果在 Windows 或 macOS 上运行,请考虑在 Docker 容器中运行 Azure CLI。 有关详细信息,请参阅如何在 Docker 容器中运行 Azure CLI。
如果使用的是本地安装,请使用 az login 命令登录 Azure CLI。 若要完成身份验证过程,请遵循终端中显示的步骤。 有关其他登录选项,请参阅 使用 Azure CLI 向 Azure 进行身份验证。
出现提示时,请在首次使用时安装 Azure CLI 扩展。 有关扩展的详细信息,请参阅 使用和管理 Azure CLI 中的扩展。
运行 az version 以查找安装的版本和依赖库。 若要升级到最新版本,请运行 az upgrade。
登录后,使用 az confluent organization create 命令创建新的组织资源:
az confluent organization create --name "myOrganization" --resource-group "myResourceGroup" \
--location "my location" \
--offer-detail id="string" plan-id="string" plan-name="string" publisher-id="string" term-unit="string" \
--user-detail email-address="contoso@microsoft.com" first-name="string" last-name="string" \
--tags Environment="Dev"
注意
如果希望命令在作完成之前 create 返回,请添加可选参数 --no-wait。 操作将继续运行,直到 Confluent 组织创建完成。
若要暂停 CLI 执行,直到组织的特定事件或条件发生,请使用 az confluent organization wait 该命令。
例如,若要等待组织创建,请运行:
az confluent organization wait --name "myOrganization" --resource-group "myResourceGroup" --created
若要查看现有组织的列表,请使用 az confluent organization list 该命令。
若要查看订阅中的所有组织,请运行:
az confluent organization list
若要查看资源组中的所有组织,请运行:
az confluent organization list --resource-group "myResourceGroup"
若要查看特定组织的属性,请使用 az confluent organization show 命令。
若要按名称查看组织,请运行:
az confluent organization show --name "myOrganization" --resource-group "myResourceGroup"
若要按资源 ID 查看组织,请运行:
az confluent organization show --ids "/subscriptions/{SubID}/resourceGroups/{myResourceGroup}/providers/Microsoft.Confluent/organizations/{myOrganization}"
如果出现错误消息,请参阅 Confluent 云解决方案上的 Apache Kafka 和 Apache Flink 疑难解答。