你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
在本快速入门中,你将使用 Azure 市场和 Azure CLI 创建 Apache Kafka® & Apache Flink® on Confluent Cloud™(一项 Azure 本机 ISV 服务)的实例。
先决条件
- 一个 Azure 帐户。 如果没有活动 Azure 订阅,请创建一个免费帐户。
- 必须具有 Azure 订阅的所有者或参与者角色 。 Azure 和 Confluent 之间的集成只能由具有所有者或参与者访问权限的用户设置 。 在开始前,请确认是否具有适当的访问权限。
查找产品/服务
使用 Azure 门户查找 Confluent Cloud 应用程序上的 Apache Kafka 和 Apache Flink。
在 Web 浏览器中转到 Azure 门户,然后登录。
如果你在最近的会话中访问过市场,请从可用选项中选择该图标。 否则,请搜索“市场”。
在“市场”页上,根据所需计划的类型,有两个选项可供选择。 你可以注册即用即付计划或承诺计划。 “即用即付”向用户公开提供。 承诺计划面向已获批使用专用产品/服务的客户。
对于即用即付客户,请搜索“Apache Kafka 和 Apache Kafka on Confluent Cloud”。 选择 Apache Kafka 和 Apache Kafka on Confluent Cloud 的产品/服务。
对于承诺客户,请选择“查看专用产品/服务”链接 。 “承诺”要求注册最低使用量。 请仅在需要长时间使用服务时才使用此选项。
查找 Confluent Cloud 上的 Apache Kafka 和 Apache Flink。
创建资源
选择 Apache Kafka 和 Apache Kafka on Confluent Cloud 的产品/服务后,即可设置应用程序。
首先为 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"
注意
如果要在创建操作完成前返回命令,请添加可选参数 --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}"
如果遇到错误,请参阅对 Apache Kafka & Apache Flink on Confluent Cloud 解决方案进行故障排除。