管理 OpenFlow¶
本主题介绍管理 Openflow 组件的步骤。
删除部署¶
Deleting a deployment removes the management compute pool and all deployment-level configuration. You must delete all runtimes first. Any data or objects already integrated into Snowflake aren't affected.
警告
Deleting a deployment can't be undone. Before you delete, make sure all runtimes have been removed and you no longer need the deployment configuration.
在 AWS 控制台中:
Navigate to EC2 Instances.
使用您的部署密钥选择
openflow-agent-{deployment-key}实例。点击页面顶部的 Connect。
从 EC2 Instance Connect 切换到 Connect using EC2 Instance Connect Endpoint。保留默认的 EC2 实例连接端点。
Click Connect. A new browser tab or window will appear with a command-line interface.
从 shell 运行
./destroy.sh。这可能需要 20-30 分钟。如果连接中断,该过程将继续在后台运行。
您可以使用以下命令重新登录并查看其状态:
journalctl -u docker -f -n 250当您看到
delete successful的输出时,该destroy过程即告完成。
在您所在区域的 AWS 控制台中,导航到 CloudFormation (https://us-east-1.console.aws.amazon.com/cloudformation/home)。
删除对应于您的部署的 CloudFormation 堆栈。
从 Snowsight 中:
In the navigation menu, select Ingestion » Openflow.
Select Launch Openflow.
选择 Deployments 选项卡。
在要删除的部署行中,选择“More options”图标。
选择 Delete。
在确认对话框中,键入
delete以确认删除。点击 Delete deployment。
升级部署¶
A deployment includes several components: the agent, deployment service, deployment UI, runtime gateway, and runtime operator. You can upgrade via the UI or, for BYOC deployments, via the deployment agent script. For details on what's included in each release, see Openflow version history.
备注
Only the owner of a deployment can perform an upgrade.
Upgrade from the UI¶
Sign in to Snowsight.
In the navigation menu, select Ingestion » Openflow.
Select Launch Openflow.
选择 Deployments 选项卡。
Look for the upgrade arrow to the left of the deployment name. This indicates an upgrade is available.
Upgrade via the deployment agent (BYOC)¶
For BYOC deployments, use the deployment agent script to upgrade the agent, deployment service, deployment UI, runtime gateway, and runtime operator.
连接到部署代理¶
导航到 Openflow。
选择 Deployments 选项卡。
查看您的部署详细信息,并记下部署密钥。
在您的 AWS 账户中,查看 EC2 实例并使用部署密钥进行筛选。
找到名为
openflow-agent-{deployment-key}的部署代理 EC2 实例。使用 EC2 Instance Connect 端点进行连接,并接受所有默认设置。
Run the remaining commands from the new browser tab or window that appears with a command-line interface.
查看可用升级¶
cat ~/.upgrade
该脚本将显示各种部署组件的最新可用版本。
如果没有可用升级,您将看到类似于以下内容的输出:
AGENT_IMAGE_VERSION_UPGRADE=
OPERATOR_CHART_VERSION_UPGRADE=
GATEWAY_IMAGE_VERSION_UPGRADE=
DPS_CHART_VERSION_UPGRADE=
DPUI_CHART_VERSION_UPGRADE=
否则,您将看到升级后的组件将使用的版本,例如:
AGENT_IMAGE_VERSION_UPGRADE=0.17.0
OPERATOR_CHART_VERSION_UPGRADE=0.31.0
GATEWAY_IMAGE_VERSION_UPGRADE=
DPS_CHART_VERSION_UPGRADE=
DPUI_CHART_VERSION_UPGRADE=
升级 Openflow BYOC 部署的 AMI¶
当您升级 Openflow BYOC 部署时,Openflow 会查找并升级到 AWS Systems Manager (https://aws.amazon.com/systems-manager/) 推荐的适用于 Amazon Linux 2023 的最新 AMI。
如果发现新的 AMI,它将重启您部署中的所有 Openflow 服务,并且运行时会暂时停止。Openflow 运行时和连接器会在重启过程中自动保持数据完整性。
Snowflake 不会自动升级部署。升级的时间和频率由您决定。
启动升级¶
如果输出表明可以升级,请运行以下脚本以启动升级。较早的 Openflow 部署可能会改用 upgrade-data-plane.sh 脚本。
./upgrade.sh
您会看到类似这样的输出:
openflow-data-plane-agent-aws is set to version 0.16.0
Upgrade set to version 0.17.0
openflow-dataplane-service-chart is set to version 0.47.0
No upgrade is available
openflow-dataplane-ui-chart is set to version 0.5.0
No upgrade is available
openflow-runtime-gateway is set to version 2025.6.8.2
No upgrade is available
runtime-operator-chart is set to version 0.30.0
Upgrade set to version 0.31.0
然后,您有两个选择:
等待自动升级:系统将在大约 10 分钟内自动启动升级过程。
手动升级:若要立即开始升级,请运行以下命令:
./create.sh
监控升级过程¶
若要跟踪升级进度,请使用 journalctl 命令:
journalctl -u openflow-apply-infrastructure -f -n 250
确认升级成功¶
升级成功时,通常会显示类似于下面这样的输出:
All resources applied successfully and log uploaded to s3
openflow-apply-infrastructure.service: Deactivated successfully
升级运行时¶
Snowflake periodically releases runtime updates that introduce new Openflow processors, newer versions of existing processors, or new runtime functionality. When updates are available, an indicator appears next to the runtime name in the UI. For details on what's included in each release, see Openflow version history.
备注
Only the owner of a deployment can perform an upgrade.
Sign in to Snowsight.
In the navigation menu, select Ingestion » Openflow.
Select Launch Openflow.
选择 Runtimes 选项卡。
Look for the upgrade arrow to the left of the runtime name. This indicates an upgrade is available.
升级连接器¶
当添加新功能、改进处理逻辑或使用新的处理器版本时,例如为了支持新的源 API 版本,Snowflake 会提供连接器更新。
当连接器更新可用时,您将在画布上的流程组中看到一个 Upgrade 图标。
备注
只有在 升级连接器的运行时 后,才能升级连接器。
要升级连接器,请执行以下操作:
In the navigation menu, select Ingestion » Openflow.
Select Launch Openflow.
选择 Runtimes 选项卡。
选择运行时名称,或在 More Options 菜单中选择 View Canvas 以导航到画布。
找到名称旁带红色升级箭头的处理器组,对于这些组中的每一个,更改版本:
推荐:检查参数在参数上下文中是否使用自定义值。如果是,请记下该自定义值。升级后需要重新应用它。
右键点击流程组并选择 Parameters。
在参数上下文列表中选择 Parameters。
选择 Inheritance 标签页,检查是否使用自定义值。如果是,请记下这些自定义值。
右键点击该组并选择 Version » Change Version。
选择最新的可用版本并选择 Change。
确认连接器已升级到最新版本。升级后的版本应显示绿色对钩。
Confirm that all processors in the connector's process group are running. If not, start them.
您也可以通过将鼠标悬停在流程组右下角的对话气泡上来验证版本。
如果您在第 4 步中记录了自定义参数值,请重新应用该自定义值。有关更多信息,请参阅 Openflow 连接器。
配置 Snowflake Connector 流注册表¶
重要
Openflow 的早期预览版本没有为连接器升级配置运行时。如果右键点击流程组时看不到版本选项,则必须配置 Snowflake Connector 流注册表并手动为现有连接器启用版本控制。
要配置 Snowflake Connector 流注册表,请执行以下操作:
导航到画布。
点击右上角的菜单并选择 Controller Settings。
切换到 Registry Clients 选项卡。
点击 + 图标添加新的注册表客户端。
选择 ConnectorFlowRegistryClient 并选择 Add。
点击 ConnectorFlowRegistryClient 行的 More Options 并选择 Edit。
输入
/nifi/configuration_resources/connector_flow_registry作为 Storage Location 的值,并选择 Apply。
配置 Snowflake Connector 流注册表后,您现在可以为现有连接器启用版本控制。
要为现有连接器启用版本控制,请执行以下操作:
导航到画布并找到要添加版本控制的流程组。
右键点击该流程组并选择 Version » Set Version。
在 Set Version 对话框中,选择与您的流程组相匹配的流程。
例如,如果您使用 SQL Server 连接器,请选择 sqlserver。
请注意,流程名称与连接器名称不完全匹配。
选择最新版本,然后选择 Set version 启用版本控制。
在画布中,再次右键点击该流程组,然后选择 Version » Revert Local Changes,应用最新的连接器版本。
查看更改列表并选择 Revert。
确认您的连接器已升级到最新版本,该版本现在应显示绿色复选标记。您也可以通过将鼠标悬停在流程组右下角的对话气泡上来验证版本。