- 概述
- 要求
- 安装
- 安装后
- 迁移和升级
- 在 EKS/AKS 上升级 Automation Suite
- 从 Linux 上的 Automation Suite 迁移到 EKS/AKS 上的 Automation Suite
- 监控和警示
- 集群管理
- 特定于产品的配置
- 故障排除
从 Linux 上的 Automation Suite 迁移到 EKS/AKS 上的 Automation Suite
通过使用 uipathctl 移动数据,从 Linux 上的 Automation Suite 迁移到 EKS/AKS 上的 Automation Suite。
您可以从部署在 Linux 计算机上的 Automation Suite 迁移到 EKS/AKS 上的 Automation Suite。为此,您必须使用 uipathctl 将数据从一个 Automation Suite 版本换至另一个版本。
此迁移过程的优点之一是,您可以多次尝试执行,而不会影响现有集群。
此迁移选项允许您从 Linux 上的 Automation Suite 迁移到 EKS/AKS 上新安装的 Automation Suite。
不支持以下迁移场景:
- 当前不支持从 Linux 上的 Automation Suite 迁移到 EKS/AKS 上已安装的 Automation Suite。
- 当前不支持将 EKS/AKS 集群上的 Automation Suite 迁移到 EKS/AKS 集群上的另一个 Automation Suite。
要求
要从 Linux 上的 Automation Suite 迁移到 EKS/AKS 上的 Automation Suite,您必须满足以下要求:
- 您必须在两个环境之间建立连接。
- 您必须在源集群中配置外部对象存储。如果您使用集群内存储,请参阅将集群内对象存储迁移到外部对象存储。
- 您必须向源集群授予对目标对象存储的读取/写入权限。复制持久卷 (PV) 时,源集群将其数据写入目标对象存储,然后目标集群从对象存储中拉取数据并创建相应的 PV。
- Linux 上的 Automation Suite 版本必须为 2022.10 或更高版本。
- “仅限离线”要求:您必须结合使用目标集群。
流程概述
| # | 迁移步骤 |
|---|---|
| 1. | 必填项。 下载 uipathctl。 有关下载说明,请参阅 uipathctl。 |
| 2. | 必填项。 下载 versions.json。 有关下载说明,请参阅 versions.json。 |
| 3. | 为源集群和目标集群准备 Docker 映像。 可选。如果您的部署处于离线状态或者您使用私有 OCI 注册表,请确保提供所需的映像。 |
| 4. | 准备目标集群:
|
| 5. | 运行迁移并移动数据。 迁移将同时在源集群和目标集群上执行 Pod。为源集群配置的外部对象存储(特别是平台存储桶)用作中间迁移存储位置。 源集群:
目标集群:
|
| 6. |
|
数据迁移和职责
| 数据 | 迁移机制 | |
|---|---|---|
| 状态 | 职责 | |
| SQL | 保留 您有两个选择:
| 客户 |
| Docker 注册表 | 未迁移 registry.uipath.com,则无需其他步骤。 | 客户 |
| FQDN | 必填 您必须为新集群选择新的 FQDN。或者,您可以根据需要还原为以前的 FQDN。 | 客户 |
| 证书 | 未迁移 您必须将证书作为新集群安装的一部分。 | 客户 |
| 集群配置 | 未迁移 input.json。 | 客户 |
| 用户创建的自定义警示和仪表板 | 未迁移 迁移后,您必须在警示管理器和 Grafana 仪表板中重新配置任何自定义警示。 | 客户 |
| 用户创建的应用程序日志/Prometheus 流配置 | 未迁移 您必须重新配置应用程序日志和 Prometheus 流。 | 客户 |
| 动态工作负载 | 取决于应用程序 AI Center 训练作业会丢失;技能会保留。 | 技能(升级后需要执行的脚本):UiPath™ 训练作业:客户机 |
| 对象存储 | 外部对象存储:已保留 对于外部对象存储,您有两个选项:
重要提示:如果您使用的是集群内对象存储,则必须在升级前执行 ceph 到外部的迁移。 | 从集群内迁移到外部对象存储:Customer 外部对象存储:UiPath™ |
| Insights | 保留 | UiPath™ |
| MongoDB 数据 | 保留 MongoDB 数据将移至目标 SQL。 | UiPath™ |
| RabbitMQ | 不需要 | UiPath™ |
| 监控(数据) | 不需要 监控数据不适用于新集群。 | 不适用 |
准备
准备 cluster_config.json 文件
开始迁移流程后,请勿修改源集群。
要准备 cluster_config.json 文件,请执行以下步骤:
-
在源集群上下载
uipathctl的目标版本,并通过运行uipathctl manifest get-revision生成input.json文件。有关详细信息,请参见下图: -
根据先前生成的
input.json文件,修改目标集群的input.json文件。有关说明,请参阅配置 input.json 。您必须转移特定于 Orchestrator 的配置,其中包括每个租户的加密密钥和 Azure/Amazon S3 存储桶设置。
备注:对于 2023.10.9 或更高版本,建议您选择适用于 Process Mining Airflow 数据库的 Microsoft SQL Server 和 PostgreSQL。
如果从 2023.10.9 之前的版本进行迁移,则为目标集群生成的
input.json文件不包含 Airflow PostgreSQL 数据库的连接字符串。要使用需要 PostgreSQL 的最新版本 Airflow,您需要在迁移之前手动将 PostgreSQL 的sqlalchemy连接字符串模板添加到目标集群的input.json文件中。Postgresql_connection_string_template_sqlalchemy_pyodbcpostgresql+psycopg2://<user>:<password>@<postgresql host>:<postgresql port>/DB_NAME_PLACEHOLDERpostgresql+psycopg2://<user>:<password>@<postgresql host>:<postgresql port>/DB_NAME_PLACEHOLDER -
通过运行以下命令验证目标集群中的先决条件:
uipathctl prereq run input-target.json --kubeconfig kubeconfig.target --versions versions.jsonuipathctl prereq run input-target.json --kubeconfig kubeconfig.target --versions versions.json -
将 SQL 数据库从源部署克隆到目标部署。
没有互联网访问要求的私有注册表
迁移过程需要最新的 uipathcore Docker 映像标签,以便源集群和目标集群都可用使用该标签。如果源集群处于离线状态,请通过执行以下步骤使映像可用:
- 请按照选项 B:将离线捆绑包与注册表结合使用中的步骤将目标集群使用的注册表与离线捆绑包结合使用。
- 在有权访问源集群的虚拟机上复制
uipathctl二进制文件和versions.json文件。 - 运行以下命令:
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 - 使用
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.fqdn、registry-username和registry-password替换为源离线安装所使用的私有注册表的正确值。
具有互联网访问要求的私有注册表
如果使用私有注册表,则必须为它设置种子。有关说明,请参阅配置符合 OCI 的注册表。
执行
要迁移到 EKS/AKS 上的 Automation Suite,请执行以下步骤:
- 通过运行以下命令执行迁移:
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 - 通过运行以下命令,在目标集群上的 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 的技能状态,请执行以下步骤:
- 设置用于执行后续命令的变量。
aicJobsImage=$(kubectl -n uipath get configmap aic-jobs-config -o "jsonpath={.data['aicenter/aicenter-jobs:v23.10-10.15-rc02']}") podName="skillstatuspod"aicJobsImage=$(kubectl -n uipath get configmap aic-jobs-config -o "jsonpath={.data['aicenter/aicenter-jobs:v23.10-10.15-rc02']}") podName="skillstatuspod" - 再次检索技能状态之前,清理任何可能正在运行的
skillstatuspod。以下命令将从上一次迭代中删除 Pod,因此请谨慎使用。kubectl -n uipath delete pod "$podName" --force.kubectl -n uipath delete pod "$podName" --force. - 创建
skillstatuspod以获取技能状态。Pod 可能需要一些时间来拉取映像并运行,通常不到 30 秒。skill_arr="[]" kubectl -n uipath run "$podName" --image="$aicJobsImage" --restart=Never --labels="app.kubernetes.io/component=aicenter" --overrides='{ "metadata": { "annotations": {"sidecar.istio.io/inject": "false"}}}' --command -- /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' -d \"$skill_arr\" | jq -r '([\"SKILL_ID\",\"SKILL_NAME\", \"STATUS\"] | (., map(length*\"-\"))), (.data[] | [.skillId, .skillName, .syncStatus]) | @tsv' | column -ts $'\t'; exit"skill_arr="[]" kubectl -n uipath run "$podName" --image="$aicJobsImage" --restart=Never --labels="app.kubernetes.io/component=aicenter" --overrides='{ "metadata": { "annotations": {"sidecar.istio.io/inject": "false"}}}' --command -- /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' -d \"$skill_arr\" | jq -r '([\"SKILL_ID\",\"SKILL_NAME\", \"STATUS\"] | (., map(length*\"-\"))), (.data[] | [.skillId, .skillName, .syncStatus]) | @tsv' | column -ts $'\t'; exit"备注:- 将
$skill_arr替换为[]以运行所有技能,或将['abcd', 'efgh']替换为以仅运行提到的两项技能。 - 后续命令需要
skills id输出。
- 将
- 检查技能状态的输出。
kubectl -n uipath logs -f "$podName" -c "$podName"kubectl -n uipath logs -f "$podName" -c "$podName"
运行技能迁移
要运行技能迁移,请执行以下步骤:
-
设置用于执行后续命令的变量。
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" -
再次检索技能状态之前,清理任何可能正在运行的
skillsyncpod。以下命令将从上一次迭代中删除 Pod,因此请谨慎使用。kubectl -n uipath delete pod "$podName" --forcekubectl -n uipath delete pod "$podName" --force -
启动技能同步。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"}}}' --command -- /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"}}}' --command -- /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"备注:将
skill ids替换为“检查技能迁移状态”过程中复制的值。查看下方示例以声明
skill_arr变量:skill_arr='[\"fb14154a-ce63-43ab-yyyy-xxxxxxxxxxxxxx\", \"ad58942d-e038-4d38-yyyy-xxxxxxxxxxxx\"]' # Replace them with ML skill ids in your environment kubectl -n uipath run "$podName" --image="$aicJobsImage" --restart=Never --labels="app.kubernetes.io/component=aicenter" --overrides='{ "metadata": { "annotations": {"sidecar.istio.io/inject": "false"}}}' --command -- /bin/bash -c -x "curl -sSL -XPOST -H 'Content-Type: application/json' '/ai-deployer/v1/system/mlskills:restore-all' -d \"$skill_arr\"; exit"skill_arr='[\"fb14154a-ce63-43ab-yyyy-xxxxxxxxxxxxxx\", \"ad58942d-e038-4d38-yyyy-xxxxxxxxxxxx\"]' # Replace them with ML skill ids in your environment kubectl -n uipath run "$podName" --image="$aicJobsImage" --restart=Never --labels="app.kubernetes.io/component=aicenter" --overrides='{ "metadata": { "annotations": {"sidecar.istio.io/inject": "false"}}}' --command -- /bin/bash -c -x "curl -sSL -XPOST -H 'Content-Type: application/json' '/ai-deployer/v1/system/mlskills:restore-all' -d \"$skill_arr\"; exit" -
检查技能同步状态的输出。
kubectl -n uipath logs -f "$podName" -c "$podName"kubectl -n uipath logs -f "$podName" -c "$podName" -
该操作可能需要很长时间,具体取决于要同步的技能数量,因此您可以依靠技能迁移状态定期检查技能,直到没有处于
IN_PROGRESS状态的技能为止。备注:在检查技能迁移状态或运行技能迁移时,您可以同时使用所有技能。或者,您可以仅对选定的技能执行这些操作,方法是在步骤 3 中将
-d "[skill_id1, skill_id2, .... ]"作为额外参数传递给curl。