管理 OpenFlow

本主题介绍管理 Openflow 组件的步骤。

删除部署

在 AWS 控制台中:

  1. 导航到 EC2 实例

  2. 使用您的部署密钥选择 openflow-agent-{deployment-key} 实例。

  3. 点击页面顶部的 Connect

  4. EC2 Instance Connect 切换到 Connect using EC2 Instance Connect Endpoint。保留默认的 EC2 实例连接端点。

  5. 点击 Connect。此时将出现一个带有命令行界面的新浏览器选项卡或者窗口。

  6. 从 shell 运行 ./destroy.sh

    • 这可能需要 20-30 分钟。如果连接中断,该过程将继续在后台运行。

    • 您可以使用以下命令重新登录并查看其状态:journalctl -u docker -f -n 250

    • 当您看到 delete successful 的输出时,该 destroy 过程即告完成。

  7. 在您所在区域的 AWS 控制台中,导航到 CloudFormation (https://us-east-1.console.aws.amazon.com/cloudformation/home)。

  8. 删除对应于您的部署的 CloudFormation 堆栈。

从 Snowsight 中:

  1. 导航到 Openflow。

  2. 选择 Deployments 选项卡。

  3. 在要删除的部署行中,选择“More options”图标。

  4. 选择 Delete

  5. 在确认对话框中,键入 delete 以确认删除。

  6. 点击 Delete deployment

升级部署

在 Openflow 部署中,有一些组件可能需要更新。目前,这是通过 Openflow 部署代理脚本执行的。组件包括代理、部署服务、部署 UI、运行时网关和运行时运算符。所有组件均按照以下过程升级。

连接到部署代理

  1. 导航到 Openflow。

  2. 选择 Deployments 选项卡。

  3. 查看您的部署详细信息,并记下部署密钥。

  4. 在您的 AWS 账户中,查看 EC2 实例并使用部署密钥进行筛选。

  5. 找到名为 openflow-agent-{deployment-key} 的部署代理 EC2 实例。

  6. 使用 EC2 Instance Connect 端点进行连接,并接受所有默认设置。

  7. 在带有命令行界面的新浏览器选项卡或窗口中运行其余命令。

查看可用升级

cat ~/.upgrade
Copy

该脚本将显示各种部署组件的最新可用版本。

如果没有可用升级,您将看到类似于以下内容的输出:

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
Copy

您会看到类似这样的输出:

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
Copy

监控升级过程

若要跟踪升级进度,请使用 journalctl 命令:

journalctl -u openflow-apply-infrastructure -f -n 250
Copy

确认升级成功

升级成功时,通常会显示类似于下面这样的输出:

All resources applied successfully and log uploaded to s3
openflow-apply-infrastructure.service: Deactivated successfully

升级运行时

无论是在推出新的 Openflow 处理器或现有处理器的更新版本时,还是在引入新的 Openflow 运行时功能时,Snowflake 都会提供更新。在 Openflow 运行时有可用更新时,您将在 Openflow UI 上您的运行时旁边看到一个升级图标。

若要升级运行时,请执行以下操作:

  1. 导航到 Openflow。

  2. 选择 Runtimes 选项卡。

  3. 运行时名称旁边的指示器将显示升级是否可用。

  4. 在要升级的运行时所在行中,选择“More options”图标。

  5. 选择 Upgrade

升级连接器

Connector updates are made available by Snowflake when functionality is added, processing logic is improved, or new processor versions are used--for example, to add support for a new source API version.

当连接器更新可用时,您将在画布上的流程组中看到一个 Upgrade 图标。

备注

只有在 升级连接器的运行时 后,才能升级连接器。

要升级连接器,请执行以下操作:

  1. 导航到 Openflow。

  2. 选择 Runtimes 选项卡。

  3. Select the runtime name, or select View Canvas in the More Options menu to navigate to the canvas.

  4. Find the processor groups with a red upgrade arrow next to their names. For each of these groups, change the version:

    1. 推荐:检查参数在参数上下文中是否使用自定义值。如果是,请记下该自定义值。升级后需要重新应用它。

      1. Right-click the process group and select Parameters.

      2. 在参数上下文列表中选择 Parameters

      3. 选择 Inheritance 标签页,检查是否使用自定义值。如果是,请记下这些自定义值。

    2. Right-click the group and select Version » Change Version.

    3. 选择最新的可用版本并选择 Change

    4. 确认连接器已升级到最新版本。升级后的版本应显示绿色对钩。

      You can also validate the version by hovering over the speech bubble at the bottom right of the process group.

    5. If you noted a custom parameter value in step 4, reapply the custom value. For more information, see Openflow 连接器.

配置 Snowflake Connector 流注册表

重要

Openflow 的早期预览版本没有为连接器升级配置运行时。如果右键点击流程组时看不到版本选项,则必须配置 Snowflake Connector 流注册表并手动为现有连接器启用版本控制。

要配置 Snowflake Connector 流注册表,请执行以下操作:

  1. 导航到画布。

  2. Click on the menu in the top right corner and select Controller Settings.

  3. 切换到 Registry Clients 选项卡。

  4. 点击 + 图标添加新的注册表客户端。

  5. 选择 ConnectorFlowRegistryClient 并选择 Add

  6. 点击 ConnectorFlowRegistryClient 行的 More Options 并选择 Edit

  7. 输入 /nifi/configuration_resources/connector_flow_registry 作为 Storage Location 的值,并选择 Apply

配置 Snowflake Connector 流注册表后,您现在可以为现有连接器启用版本控制。

要为现有连接器启用版本控制,请执行以下操作:

  1. 导航到画布并找到要添加版本控制的流程组。

  2. Right click on the process group and select Version » Set Version.

  3. Set Version 对话框中,选择与您的流程组相匹配的流程。

    For example, choose sqlserver if you are using the SQL Server connector.

    请注意,流程名称与连接器名称不完全匹配。

  4. 选择最新版本,然后选择 Set version 启用版本控制。

  5. From the canvas, right click on the process group again and select Version » Revert Local Changes to apply the latest connector version.

  6. 查看更改列表并选择 Revert

  7. 确认您的连接器已升级到最新版本,该版本现在应显示绿色复选标记。您也可以通过将鼠标悬停在流程组右下角的对话气泡上来验证版本。

语言: 中文