UiPath Documentation
automation-suite
2023.4
false
Linux 版 Automation Suite 安装指南
重要 :
请注意,此内容已使用机器翻译进行了部分本地化。 新发布内容的本地化可能需要 1-2 周的时间才能完成。

自动化:离线升级

Ansible 用于通过在集群中的一台计算机上执行某些操作来自动升级整个 Automation Suite 集群。

在下图中,服务器 1节点(或 Ansible 主机节点)使用 Ansible 协调整个 Automation Suite 集群的升级。

准备​

重要提示:

Before upgrading, make sure you have prepared your environment for using the uipathctl.sh script. For details, see Using uipathctl.sh.

确保所有节点上的/opt/UiPathAutomationSuite文件夹都有 10GB 的可用空间。 如果空间不足,您可以增加此文件夹的容量,也可以删除除cluster_config.json之外的所有以前的安装程序文件。 您随时可以再次下载以前的安装程序。

要验证可用空间,请运行以下命令: df -h /opt/UiPathAutomationSuite 。

要准备升级,请执行以下步骤:

  1. Log into the server node that you previously identified as the Ansible host node via SSH. Make sure you have selected the primary server node with the UiPath bundle additional disk attached at /uipath as your Ansible host node.

  2. 成为根用户:

    sudo su -
    sudo su -
    
  3. 在/opt/UiPathAutomationSuite目录下创建安装文件夹:

    # Please replace {version} with installer version
    mkdir -p /opt/UiPathAutomationSuite/{version}/installer
    # Please replace {version} with installer version
    mkdir -p /opt/UiPathAutomationSuite/{version}/installer
    
  4. Download as-installer.zip and copy it to /opt/UiPathAutomationSuite/{version}/installer. For download instructions, see as-installer.zip.

    cp /path/to/as-installer.zip /opt/UiPathAutomationSuite/{version}/installer
    cp /path/to/as-installer.zip /opt/UiPathAutomationSuite/{version}/installer
    
  5. 解压缩as-installer.zip :

    cd /opt/UiPathAutomationSuite/{version}/installer
    unzip as-installer.zip -d .
    cd /opt/UiPathAutomationSuite/{version}/installer
    unzip as-installer.zip -d .
    
  6. Download as-infra.tar.gz and copy it to /uipath/{version}. For download instructions, see as-infra.tar.gz.

    cp /path/to/as-infra.tar.gz /uipath/{version}
    cp /path/to/as-infra.tar.gz /uipath/{version}
    
  7. Download as.tar.gz and copy it to /uipath/{version}. For download instructions, see as.tar.gz.

    cp /path/to/as.tar.gz /uipath/{version}
    cp /path/to/as.tar.gz /uipath/{version}
    
  8. 为安装程序提供必要的权限:

    chmod 755 -R /opt/UiPathAutomationSuite/{version}/installer
    chmod 755 -R /opt/UiPathAutomationSuite/{version}/installer
    
  9. 在 Ansible 主机节点上生成最新的cluster_config.json文件。

    备注:

    For details on how to configure the cluster_config.json parameters, see Advanced installation experience.

    • 如果您有旧的cluster_config.json ,请从集群生成配置文件:

      cd /opt/UiPathAutomationSuite/{version}/installer
      
      ./configureUiPathAS.sh config get -i /path/to/old/cluster_config.json -o ./cluster_config.json
      cd /opt/UiPathAutomationSuite/{version}/installer
      
      ./configureUiPathAS.sh config get -i /path/to/old/cluster_config.json -o ./cluster_config.json
      
    • 如果您没有旧的cluster_config.json文件,请生成任何默认值的覆盖,您可能在以前的版本安装时已完成此操作:

      cd /opt/UiPathAutomationSuite/{version}/installer
      
      ./configureUiPathAS.sh config get -o ./cluster_config.json
      cd /opt/UiPathAutomationSuite/{version}/installer
      
      ./configureUiPathAS.sh config get -o ./cluster_config.json
      
    • If you upgrade from Automation Suite 2022.10 to Automation Suite 2023.4 or later, and Orchestrator is enabled on both the old and new versions, you must set the orchestrator.block_classic_executions flag to true in the cluster_config.json file. Using the flag shows that you agree with blocking classic folders executions. Not using the flag causes the upgrade operation to fail. For a configuration example, see Orchestrator-specific configuration.

    • If you upgrade Automation Suite from a previous version and now enable Process Mining as well, you must update the sql_connection_string_template_sqlalchemy_pyodbc. Below is an example.

      "sql_connection_string_template_sqlalchemy_pyodbc": "mssql+pyodbc://testadmin@sfmfup20211043125452-8926d153-sql.database.windows.net:sgTQrg%40R%40dvoYddYBoKn045ncoC9WhWU@sfmfup20211043125452-8926d153-sql.database.windows.net:1433/DB_NAME_PLACEHOLDER?driver=ODBC+Driver+17+for+SQL+Server"
      "sql_connection_string_template_sqlalchemy_pyodbc": "mssql+pyodbc://testadmin@sfmfup20211043125452-8926d153-sql.database.windows.net:sgTQrg%40R%40dvoYddYBoKn045ncoC9WhWU@sfmfup20211043125452-8926d153-sql.database.windows.net:1433/DB_NAME_PLACEHOLDER?driver=ODBC+Driver+17+for+SQL+Server"
      
    • If you upgrade Automation Suite from a version previous to 2023.4 and you have Apps enabled, you must create the SQL database for Apps, and then update the cluster_config.json file with the following configuration:

      "apps": {
      "enabled": "true" // This will already be true in existing cluster_config.json if apps is enabled
      "sql_connection_str": "" // Provide ODBC database connection string if apps is enabled
      }
      "apps": {
      "enabled": "true" // This will already be true in existing cluster_config.json if apps is enabled
      "sql_connection_str": "" // Provide ODBC database connection string if apps is enabled
      }
      
      备注:

      在后续升级步骤中使用更新的 cluster_config.json 文件。

执行​

重要提示:

如果在升级期间或升级后发生任何错误或问题,您可以回滚到以前的版本,前提是您之前配置了备份。

For instructions, see Rollback on error.

水合 Docker 注册表​

为了最大程度地缩短所需的停机时间,请在升级之前将 docker-registry 与容器映像结合使用以用于新版本产品。

重要提示:
  • 确保在升级前 10 个小时内不要结合使用容器和/或其他基础架构映像。
  • If you upgrade Document Understanding and Computer Vision, you must download the base images that match your upgraded Automation Suite version (use the base image that corresponds with your ML Package version) and hydrate them to your docker registry prior to upgrade to avoid disruption to your running DU skills. To download the Document Understanding and Computer Vision installation packages, see Downloading the installation packages.

要水合docker-registry ,请在第一个服务器节点上运行以下命令:

cd /opt/UiPathAutomationSuite/{version}/installer

./configureUiPathAS.sh registry upload --offline-bundle /uipath/{version}/as.tar.gz --offline-tmp-folder /uipath/tmp
cd /opt/UiPathAutomationSuite/{version}/installer

./configureUiPathAS.sh registry upload --offline-bundle /uipath/{version}/as.tar.gz --offline-tmp-folder /uipath/tmp

配置备份​

要配置备份,请执行以下步骤:

  1. Make sure you have enabled the backup on the cluster. You must create the backup using the same version of the installer as the one you used for the current deployment. For instructions, see the backup and restore documentation corresponding to the Automation Suite version from which you plan to upgrade. For instance, if you plan to upgrade from Automation Suite 2021.10, follow the instructions in the 2021.10 guide.

  2. Log into the server node that you previously identified as the Ansible host node via SSH.

  3. 验证集群中是否所有所需的卷都有备份:

    /path/to/old-installer/configureUiPathAS.sh verify-volumes-backup
    /path/to/old-installer/configureUiPathAS.sh verify-volumes-backup
    
    备注:

    备份可能需要一些时间,因此请等待大约 15 至 20 分钟,然后再次验证卷备份。

创建备份后,请继续执行以下步骤。

将集群置于维护模式​

将集群置于维护模式将关闭入口控制器和所有 UiPath 服务,并阻止进入 Automation Suite 集群的所有传入流量。

重要提示:

此操作将导致停机,并且您的业务自动化将在整个升级过程中暂停。

  1. 要将集群置于维护模式,请运行:

    cd /opt/UiPathAutomationSuite/{version}/installer
    ./configureUiPathAS.sh enable-maintenance-mode
    cd /opt/UiPathAutomationSuite/{version}/installer
    ./configureUiPathAS.sh enable-maintenance-mode
    
  2. 要验证集群是否处于维护模式,请运行:

    ./configureUiPathAS.sh is-maintenance-enabled
    ./configureUiPathAS.sh is-maintenance-enabled
    
    重要提示:

    启用维护模式后,创建 SQL Server 的备份,以便 SQL 数据库中不再记录任何事务。

升级集群​

要升级 Automation Suite 集群,请执行以下步骤:

  1. 通过 SSH 连接到 Ansible 主机节点并成为根用户。

  2. 要在所有节点上执行升级步骤,请使用基本参数运行以下命令。 如需更精细的控制,请参阅参数部分。

    备注:

    确保已按照准备步骤中的说明更新生成的cluster_config.json 。

    # Please replace {version} with installer version, in all the below commands
    cd /opt/UiPathAutomationSuite/{version}/installer
    
    ./uipathctl.sh upgrade --cluster-config ./cluster_config.json --install-type offline --steps all --offline-infra-bundle /uipath/{version}/as-infra.tar.gz --accept-license-agreement
    # Please replace {version} with installer version, in all the below commands
    cd /opt/UiPathAutomationSuite/{version}/installer
    
    ./uipathctl.sh upgrade --cluster-config ./cluster_config.json --install-type offline --steps all --offline-infra-bundle /uipath/{version}/as-infra.tar.gz --accept-license-agreement
    
    重要提示:

    升级过程需要从 Canal CNI 迁移到 Cilium CNI。 自动升级会自动执行此步骤,然后重新启动集群中的所有节点以完成迁移。

    重新启动节点后,请等待几分钟,以确保所有服务再次联机。 您可以登录 ArgoCD 以监控所有应用程序的状态。

    重要提示:

    If you get the following error, follow the instructions in Downgrading Ceph from 16.2.6 to 15.2.9.

    Ceph cluster is running on version: 16.2.6 with known bug(https://docs.ceph.com/en/quincy/releases/pacific/#v16-2-6-pacific). Please provide temporary backup directory (via environment variable 'TMP_CEPH_BACKUP_PATH') to downgrade ceph

基本参数

参数 值

--install-type

可能的值: online和offline 。

由于此页面提供了有关离线环境的说明,因此请选择offline值。

--steps

可能的值包括: all 、 infra 、 fabric和services 。

表示安装和升级流程的每个阶段。

  • all – Recommended: A superset of all the other steps, which upgrades the entire Automation Suite.
  • infra – 升级所有节点上 Automation Suite 上的 Kubernetes 和其他基础架构组件。
  • bundles – 上传 Automation Suite 集群中托管的 Docker 注册表,并使用结构和服务容器映像对其进行水合。
You must upload and hydrate the Docker registry at the same time as upgrading Kubernetes and the infrastructure components. To execute the two steps simultaneously, run --steps bundles infra.

Do not run --steps bundles alone as it will damage the cluster.

  • fabric – 升级 Automation Suite 的所有结构和共享组件。
  • services – 升级 Automation Suite 上安装的所有 UiPath 产品服务。

如果升级期间发生错误,您可以使用这些检查点恢复升级操作,而不是从头开始重试。

--offline-bundle

as.tar.gz 离线捆绑包的路径,包含结构和服务容器映像。 建议将其存储在 /uipath/{version}/as.tar.gz

--offline-infra-bundle

as-infra.tar.gz离线捆绑包的路径,其中包含 Kubernetes 和基础架构捆绑包。

--cluster-config

cluster_config.json文件,该文件定义应用于通过 Automation Suite 部署的 UiPath 服务的参数、设置和首选项。

高级参数

参数值
--ansible-username指定用于与所有节点的 SSH 连接的用户名。 默认为当前用户。 如果您对所有节点使用不同的用户名,则不要使用此参数,而是在inventory.ini中设置所有节点的用户名,并将其传递给脚本。

示例:

运行脚本时,您将以myadminuser用户名登录。 但是,如果要使用testadmin用户名通过 SSH 连接,则必须为此参数提供testadmin 。
--inventory指定现有的 Ansible 清单文件。 如果未指定,系统将使用基本配置从现有集群自动生成一个。

在某些情况下,您希望进行更精细的控制,您可能需要提供自己的清单文件。 例如,如果您想对集群中的所有节点使用不同的 SSH 用户名或 SSH 密钥。

For details, see Generating the Ansible inventory.ini file.
备注:

如果升级由于任何原因失败,但已成功上传到 Docker 注册表,则无需重新上传。 您可以通过直接运行架构或服务安装来恢复升级: ./uipathctl.sh upgrade --install-type offline --steps {fabric | services} 。

升级完成后,维护模式将自动禁用。

执行升级后,您可以执行以下附加步骤:

  • 要验证 Automation Suite 是否运行正常,请运行:

    kubectl get applications -n argocd
    kubectl get applications -n argocd
    
  • 从低于 2023.4.0 的 Automation Suite 版本升级时,请验证 Apps 是否正在运行,然后删除 MongoDB:

    ./configureUiPathAS.sh mongodb uninstall --force
    ./configureUiPathAS.sh mongodb uninstall --force
    
  • 如果您在使用 ./configureUiPathAS.sh mongodb uninstall --force 命令删除 MongoDB 时遇到错误,请运行以下命令:

    kubectl patch application "fabric-installer" -n argocd --type=merge -p '{"spec" : {"syncPolicy" : {"automated" : {"selfHeal": false }}}}'
    
    ./configureUiPathAS.sh mongodb uninstall --force
    
    kubectl patch application "fabric-installer" -n argocd --type=merge -p '{"spec" : {"syncPolicy" : {"automated" : {"selfHeal": true }}}}'
    kubectl patch application "fabric-installer" -n argocd --type=merge -p '{"spec" : {"syncPolicy" : {"automated" : {"selfHeal": false }}}}'
    
    ./configureUiPathAS.sh mongodb uninstall --force
    
    kubectl patch application "fabric-installer" -n argocd --type=merge -p '{"spec" : {"syncPolicy" : {"automated" : {"selfHeal": true }}}}'
    
  • If you experience issues with image vulnerabilities or storage consumption after performing an upgrade, delete the images from the old installer. For details, see the Troubleshooting section.

  • After upgrading to Automation Suite 2023.4.8 or newer, you can clean up the previous version images after the upgrade from the in-cluster Docker registry. For instructions, see How to delete images from the old installer after upgrade.

启用升级后备份​

备注:

请确保 Automation Suite 已启动并正在运行,并且您的自动化按预期继续运行,然后再继续执行后续步骤。

在开始升级集群之前,升级脚本会自动创建集群的备份,然后临时将其禁用。 完成集群升级后,请确保重新配置和升级 Velero,然后手动启用备份。

To enable the backup, follow the instructions in described in the Backing up and restoring the cluster documentation.

  • 准备​
  • 执行​
  • 水合 Docker 注册表​
  • 配置备份​
  • 将集群置于维护模式​
  • 升级集群​
  • 启用升级后备份​

此页面有帮助吗?

连接

需要帮助? 支持

想要了解详细内容? UiPath Academy

有问题? UiPath 论坛

保持更新