Automation Suite
2023.10
False
横幅背景图像
EKS/AKS 上的 Automation Suite 安装指南
上次更新日期 2024年4月19日

从 Linux 上的 Automation Suite 迁移到 EKS/AKS 上的 Automation Suite

您可以从部署在 Linux 计算机上的 Automation Suite 迁移到 EKS/AKS 上的 Automation Suite。为此,您必须使用 uipathctl 将数据从一个 Automation Suite 版本换至另一个版本。

此迁移过程的优点之一是,您可以多次尝试执行,而不会影响现有集群。

重要提示:

您只能迁移到 EKS/AKS 上新安装的 Automation。当前不支持迁移到 EKS/AKS 上的现有 Automation 安装。

要求

要从 Linux 上的 Automation Suite 迁移到 EKS/AKS 上的 Automation Suite,您必须满足以下要求:

  • 您必须在两个环境之间建立连接。

  • 您必须在源集群中配置外部对象存储。如果您使用集群内存储,请参阅将集群内对象存储迁移到外部对象存储

  • Linux 上的 Automation Suite 版本必须为 2022.10 或更高版本。

  • “仅限离线”要求:您必须结合使用源集群。

流程概述

#

迁移步骤

1.

强制。下载 uipathctl

有关下载说明,请参阅 uipathctl

2.

强制。下载 versions.json

有关下载说明,请参阅 versions.json

3.

为源集群和目标集群准备 Docker 映像。

可选。如果您的部署处于离线状态或者您使用私有 OCI 注册表,请确保提供所需的映像。

4.

准备目标集群:

  1. 创建 input.json 文件。
  2. 运行先决条件检查。

5.

运行迁移并移动数据。

迁移将同时在源集群和目标集群上执行 Pod。为源集群配置的外部对象存储(特别是平台存储桶)用作中间迁移存储位置。

源集群:

  • general-migration-* Pod 负责将 Kubernetes 对象从源集群导出到目标集群。
  • volume-migration-* Pod 负责将 PVC 数据复制到中间外部存储中。

目标集群:

  • inbound-pvc-migration-* Pod 负责在目标集群中创建 PVC 并将源数据复制到其中。

6.

  • 在 AKS 或 EKS 上运行 Automation Suite 安装。

数据迁移和职责

数据

迁移机制

状态职责

SQL

保留

您有两个选择:

  1. 在新安装中重用相同的数据库。将集群配置的 SQL 连接字符串指向现有数据库服务器。

  2. 克隆您的数据库并改用克隆。

客户

Docker 注册表

未迁移

如果使用私有注册表,则必须结合使用目标注册表。如果对目标集群使用 registry.uipath.com,则无需其他步骤。

客户

FQDN

可选

您必须为新集群选择新的 FQDN。或者,您可以根据需要还原为以前的 FQDN。

客户
证书

未迁移

您必须将证书作为新集群安装的一部分。

客户
集群配置

未迁移

您必须生成适用于目标集群类型(AKS 或 EKS)的新 input.json
客户
用户创建的自定义警示和仪表板

未迁移

您必须在迁移后重新配置自定义警示和仪表板。

客户
用户创建的应用程序日志/Prometheus 流配置

未迁移

您必须重新配置应用程序日志和 Prometheus 流。

客户
动态工作负载

取决于应用程序

AI Center 训练作业会丢失;技能会保留。

技能(升级后需要执行的脚本):UiPath™

训练作业:客户机

对象存储

外部对象存储:保留

对于外部对象存储,您有两个选项:

  1. 重用现有的外部对象存储,并将其连接到新环境。

  2. 创建当前对象存储的副本,并将其用于新设置。

重要提示:如果您使用的是集群内对象存储,则必须在升级前执行 ceph 到外部的迁移。

从集群内迁移到外部对象存储:Customer

外部对象存储:UiPath™

Insights

保留

UiPath™

MongoDB 数据

保留

MongoDB 数据将移至目标 SQL。

UiPath™

RabbitMQ

不需要

UiPath™

监控(数据)

不需要

监控数据不适用于新集群。

不适用

准备

准备 cluster_config.json 文件

备注:

开始迁移流程后,请勿修改源集群。

要准备 cluster_config.json 文件,请执行以下步骤:
  1. 在源集群上下载 uipathctl 的目标版本,并通过运行 uipathctl manifest get-revision 生成 input.json 文件。有关详细信息,请参见下图:
    docs image
  2. 根据先前生成的 input.json 文件,修改目标集群的 input.json 文件。有关说明,请参阅配置 input.json

    您必须转移特定于 Orchestrator 的配置,其中包括每个租户的加密密钥Azure/Amazon S3 存储桶设置。

  3. 通过运行以下命令验证目标集群中的先决条件:
    uipathctl prereq run input-target.json --kubeconfig kubeconfig.target --versions versions.jsonuipathctl prereq run input-target.json --kubeconfig kubeconfig.target --versions versions.json
  4. 将 SQL 数据库从源部署克隆到目标部署。

没有互联网访问要求的私有注册表

迁移过程需要最新的 uipathcore Docker 映像标签,以便源集群和目标集群都可用使用该标签。如果源集群处于离线状态,请通过执行以下步骤使映像可用:
  1. 请按照选项 B:将离线捆绑包与注册表结合使用中的步骤将目标集群使用的注册表与离线捆绑包结合使用。
  2. 在有权访问源集群的虚拟机上复制 uipathctl 二进制文件和 versions.json 文件。
  3. 运行以下命令:
    jq -r '.[][] | select(.name=="uipath/uipathcore") | .ref + ":" + .version' "/path/to/versions.json" > images.txtjq -r '.[][] | select(.name=="uipath/uipathcore") | .ref + ":" + .version' "/path/to/versions.json" > images.txt
  4. 使用 uipathctl 二进制文件将 uipathcore 映像添加到您的私有注册表:
    ./uipathctl registry seed --tag-file ./images.txt \
                --source-registry "target.registry.fqdn.com" \
                --source-password "target-registry-username" \
                --source-username "target-registry-password" \
                --dest-registry "<source.registry.fqdn.com>" \
                --dest-username "<source-registry-username>" \
                --dest-password "<source-registry-password>"./uipathctl registry seed --tag-file ./images.txt \
                --source-registry "target.registry.fqdn.com" \
                --source-password "target-registry-username" \
                --source-username "target-registry-password" \
                --dest-registry "<source.registry.fqdn.com>" \
                --dest-username "<source-registry-username>" \
                --dest-password "<source-registry-password>"
    注意:确保将 registry.fqdnregistry-usernameregistry-password 替换为源离线安装所使用的私有注册表的正确值。

具有互联网访问要求的私有注册表

如果使用私有注册表,则必须为它设置种子。有关说明,请参阅配置符合 OCI 的注册表

离线且具有集群内注册表要求

如果您在离线环境中使用集群内注册表,请执行以下步骤:

  1. 在源集群上下载 as.tar.gz
  2. 通过运行 configureUiPathAS.sh 脚本来结合使用您的注册表:
    cd /opt/UiPathAutomationSuite/{version}/installer
    
    ./configureUiPathAS.sh registry upload --offline-bundle /uipath/{version}/as.tar.gz --offline-tmp-folder /uipath/tmpcd /opt/UiPathAutomationSuite/{version}/installer
    
    ./configureUiPathAS.sh registry upload --offline-bundle /uipath/{version}/as.tar.gz --offline-tmp-folder /uipath/tmp

执行

要迁移到 EKS/AKS 上的 Automation Suite,请执行以下步骤:

  1. 通过运行以下命令执行迁移:
    uipathctl cluster migration run input-target.json --kubeconfig kubeconfig.source --target-kubeconfig kubeconfig.target --versions versions-target.jsonuipathctl cluster migration run input-target.json --kubeconfig kubeconfig.source --target-kubeconfig kubeconfig.target --versions versions-target.json
  2. 通过运行以下命令,在目标集群上的 AKS/EKS 上完成 Automation Suite 的安装:
    uipathctl manifest apply input-target.json --kubeconfig kubeconfig.target --versions versions-target.jsonuipathctl manifest apply input-target.json --kubeconfig kubeconfig.target --versions versions-target.json

AI Center 技能迁移

仅当您在源集群和目标集群上都启用了 AI Center 时,本部分中的步骤才适用。请注意,这些说明假定目标集群上的 AI Center 指向包含用于运行技能的技能数据的数据库。

完成迁移后,您必须同步 AI Center 技能,以便再次使用。

检查技能迁移状态

要检索 EKS/AKS 集群上目标 Automation Suite 的技能状态,请执行以下步骤:
  1. 设置用于执行后续命令的变量。
    aicJobsImage=$(kubectl -n uipath get configmap aic-jobs-config -o "jsonpath={.data['AIC_JOBS_IMAGE']}")
    podName="skillstatuspod"aicJobsImage=$(kubectl -n uipath get configmap aic-jobs-config -o "jsonpath={.data['AIC_JOBS_IMAGE']}")
    podName="skillstatuspod"
  2. 再次检索技能状态之前,清理任何可能正在运行的 skillstatuspod。以下命令将从上一次迭代中删除 Pod,因此请谨慎使用。
    kubectl -n uipath delete pod "$podName" --force.kubectl -n uipath delete pod "$podName" --force. 
  3. 创建 skillstatuspod 以获取技能状态。Pod 可能需要一些时间来拉取映像并运行,通常不到 30 秒。
    kubectl -n uipath run "$podName" --image="$aicJobsImage" --restart=Never --labels="app.kubernetes.io/component=aicenter" --overrides='{ "metadata": { "annotations": {"sidecar.istio.io/inject": "false"}}}' -- /bin/bash -c "curl -sSL -XPOST -H 'Content-Type: application/json' 'ai-deployer-svc.uipath.svc.cluster.local/ai-deployer/v1/system/mlskills:restore-status' | jq -r '([\"SKILL_ID\",\"SKILL_NAME\", \"STATUS\"] | (., map(length*\"-\"))), (.data[] | [.skillId, .skillName, .syncStatus]) | @tsv' | column -ts $'\t'; exit"kubectl -n uipath run "$podName" --image="$aicJobsImage" --restart=Never --labels="app.kubernetes.io/component=aicenter" --overrides='{ "metadata": { "annotations": {"sidecar.istio.io/inject": "false"}}}' -- /bin/bash -c "curl -sSL -XPOST -H 'Content-Type: application/json' 'ai-deployer-svc.uipath.svc.cluster.local/ai-deployer/v1/system/mlskills:restore-status' | jq -r '([\"SKILL_ID\",\"SKILL_NAME\", \"STATUS\"] | (., map(length*\"-\"))), (.data[] | [.skillId, .skillName, .syncStatus]) | @tsv' | column -ts $'\t'; exit"
  4. 检查技能状态的输出。
    kubectl -n uipath logs -f "$podName" -c "$podName"kubectl -n uipath logs -f "$podName" -c "$podName"

运行技能迁移

要运行技能迁移,请执行以下步骤:

  1. 设置用于执行后续命令的变量。
    aicJobsImage=$(kubectl -n uipath get configmap aic-jobs-config -o "jsonpath={.data['AIC_JOBS_IMAGE']}")
    podName="skillsyncpod"aicJobsImage=$(kubectl -n uipath get configmap aic-jobs-config -o "jsonpath={.data['AIC_JOBS_IMAGE']}")
    podName="skillsyncpod"
  2. 再次检索技能状态之前,清理任何可能正在运行的 skillsyncpod。以下命令将从上一次迭代中删除 Pod,因此请谨慎使用。
    kubectl -n uipath delete pod "$podName" --forcekubectl -n uipath delete pod "$podName" --force
  3. 启动技能同步。Pod 可能需要一些时间来拉取映像并运行,通常不到 30 秒。
    kubectl -n uipath run "$podName" --image="$aicJobsImage" --restart=Never --labels="app.kubernetes.io/component=aicenter" --overrides='{ "metadata": { "annotations": {"sidecar.istio.io/inject": "false"}}}' -- /bin/bash -c "curl -sSL -XPOST -H 'Content-Type: application/json' 'ai-deployer-svc.uipath.svc.cluster.local/ai-deployer/v1/system/mlskills:restore-all' -d "[skill_id1, skill_id2, .... ]; exit"kubectl -n uipath run "$podName" --image="$aicJobsImage" --restart=Never --labels="app.kubernetes.io/component=aicenter" --overrides='{ "metadata": { "annotations": {"sidecar.istio.io/inject": "false"}}}' -- /bin/bash -c "curl -sSL -XPOST -H 'Content-Type: application/json' 'ai-deployer-svc.uipath.svc.cluster.local/ai-deployer/v1/system/mlskills:restore-all' -d "[skill_id1, skill_id2, .... ]; exit"
  4. 检查技能同步状态的输出。
    kubectl -n uipath logs -f "$podName" -c "$podName"kubectl -n uipath logs -f "$podName" -c "$podName"
  5. 该操作可能需要很长时间,具体取决于要同步的技能数量,因此您可以依靠技能迁移状态定期检查技能,直到没有处于 IN_PROGRESS 状态的技能为止。
备注:
在检查技能迁移状态或运行技能迁移时,您可以同时使用所有技能。或者,您可以仅对选定的技能执行这些操作,方法是在步骤 3 中将 -d "[skill_id1, skill_id2, .... ]" 作为额外参数传递给 curl

此页面是否有帮助?

获取您需要的帮助
了解 RPA - 自动化课程
UiPath Community 论坛
Uipath 白色徽标
信任与安全
© 2005-2024 UiPath. All rights reserved.