Automation Suite
2022.4
False
横幅背景图像
Automation Suite 安装指南
上次更新日期 2024 年 4 月 11 日

配置计算机

配置内核和操作系统级别设置

以下页面可帮助 Linux 管理员在执行 Automation Suite 安装之前管理操作系统和内核级别设置。

通常,这些设置由专用的管理配置工具(例如 Puppet)管理。确保您所做的更改符合您环境的控制流程,以保持一致性并记录在案。

重要提示:

请确保在开始安装前完成以下步骤,因为操作系统和内核级别的错误配置可能会导致不直观的错误。检查这些特定设置通常可以避免此类错误。

配置 sysctl 设置

The following sysctl settings are required on the machine:
  • enable IP forwarding

  • disable reverse path filtering

You can do this by running the following command:

cat <<EOF >>"/etc/sysctl.d/99-sysctl.conf"
net.bridge.bridge-nf-call-iptables = 1
net.ipv4.ip_forward = 1
net.bridge.bridge-nf-call-ip6tables = 1
net.ipv4.conf.all.rp_filter=0
EOFcat <<EOF >>"/etc/sysctl.d/99-sysctl.conf"
net.bridge.bridge-nf-call-iptables = 1
net.ipv4.ip_forward = 1
net.bridge.bridge-nf-call-ip6tables = 1
net.ipv4.conf.all.rp_filter=0
EOF
注意:大多数 Kubernetes 部署都需要 nf-call-iptables。Kubernetes 在集群内部创建虚拟网络。在这种情况下,每个 Pod 都可以拥有自己的 IP 地址,通过结合使用该地址与内部名称服务,可促进服务间的通信。如果未启用 nf-call-iptables,集群将无法工作。有关详细信息,请参阅官方 Kubernetes 文档

配置 fapolicy 设置

如果使用 fapolicy,则需要特定于 RKE2 的策略。要生成此策略,请使用以下命令:

cat <<-EOF >>"/etc/fapolicyd/rules.d/69-rke2.rules"
allow perm=any all : dir=/var/lib/rancher/
allow perm=any all : dir=/opt/cni/
allow perm=any all : dir=/run/k3s/
allow perm=any all : dir=/var/lib/kubelet/
EOFcat <<-EOF >>"/etc/fapolicyd/rules.d/69-rke2.rules"
allow perm=any all : dir=/var/lib/rancher/
allow perm=any all : dir=/opt/cni/
allow perm=any all : dir=/run/k3s/
allow perm=any all : dir=/var/lib/kubelet/
EOF
备注:

确保将变更传达给您的 Linux 团队,并采取适当的配置管理流程。

配置 noexec 和 nosuid 设置

用于 /var/lib/rancher 装载的磁盘不得设置 noexecnosuid。磁盘工具将在没有这些属性的情况下自动创建这些安装。
重要提示:

如果 Linux 管理员手动设置这些属性,则实例将无法运行。

有关磁盘配置的更多详细信息,请参阅磁盘要求

配置磁盘

重要提示:为防止数据丢失,请确保您使用的基础架构不会在集群重新启动或关闭时自动删除集群磁盘。如果启用了此功能,请确保将其禁用。
您可以使用configureUiPathDisks.sh脚本配置磁盘并对其进行分区。 有关详细信息,请参阅以下部分。

磁盘要求

在安装之前,您必须使用 LVM 对磁盘进行分区和配置,以便可以轻松地更改其大小,而不会发生任何数据迁移或数据丢失。

磁盘分区

RHEL 计算机上的默认分区结构不适合安装 Kubernetes。这是因为 Kubernetes 基础架构通常安装在 /var 分区下。默认情况下,var 分区仅分配有 8 GiB 的空间。
备注:
  • 支持的磁盘格式为 ext4xfs
  • 必须使用 LVM 创建所有分区。这是为了确保集群数据可以驻留在不同的磁盘上,但仍然能够以一致的方式查看。这也有助于将来扩展分区大小,而无需担心数据迁移或数据丢失。
  • 所有 Pod 和应用程序日志都存储在 /var/log/pods 目录下。确保此目录的容量至少为 8 GiB。我们还建议配置 logrotate,使其按每天到每周的间隔轮换日志。

对于 RHEL 操作系统,您需要确保计算机上的装载点不小于以下数据。

在线

磁盘标签

分区

大小

用途

集群磁盘

/var/lib/rancher

190 GiB

Rancher 文件夹用于存储容器映像和图层

/var/lib/kubelet

56 GiB

Kubelet 文件夹存储运行时 Kubernetes 配置,例如密码、配置映射和 emptyDir

/opt/UiPathAutomationSuite

20 GiB

安装程序二进制文件

etcd 磁盘

/var/lib/rancher/rke2/server/db

16GB

Kubernetes 的分布式数据库

数据磁盘

/datadisk

512 GiB(基本安装)

块存储抽象

2 TiB(完整安装)

备注:
我们建议您不要将操作系统磁盘用于上述任何目的,以确保流程获得其应有的资源份额。
离线
备注:

离线要求与在线要求相同,不同之处在于运行安装的计算机,它需要满足以下要求。

解压离线捆绑包需要额外的空间。

磁盘标签

分区

大小

用途

集群磁盘

/var/lib/rancher

190 GiB

Rancher 文件夹用于存储容器映像和图层

/var/lib/kubelet

56 GiB

Kubelet 文件夹存储运行时 Kubernetes 配置,例如密码、配置映射和 emptyDir

/opt/UiPathAutomationSuite

20 GiB

安装程序二进制文件

etcd 磁盘

/var/lib/rancher/rke2/server/db

16GB

Kubernetes 的分布式数据库

数据磁盘

/datadisk

512 GiB(基本安装)

块存储抽象

2 TiB(完整安装)

UiPath 捆绑包磁盘

/uipath512 GiB

离线捆绑包

备注:
我们建议您不要将操作系统磁盘用于上述任何目的,以确保流程获得其应有的资源份额。
备注:

数据磁盘和 etcd 磁盘应为单独的物理磁盘。这将数据磁盘和 etcd 磁盘与其他集群工作负载和活动物理隔离,同时还增强了集群的性能和稳定性。

有关在安装前如何使用示例脚本对磁盘进行分区和配置的详细信息,请参阅以下部分。

使用脚本配置磁盘

下载脚本

注意:对于离线安装,您必须在可访问互联网的计算机上执行此步骤,且此计算机可访问已部署 Automation Suite 的离线计算机。将文件从联机计算机复制到第一台目标计算机。
您可以使用 configureUiPathDisks.sh 脚本对磁盘进行配置和分区。

有关下载说明,请参阅“ configureUiPathDisks.sh”。

运行脚本

您可以将 configureUiPathDisks.sh 脚本用于以下目的:
  • 为新的 Automation Suite 集群安装配置磁盘和装载点;
  • 安装后调整数据磁盘的大小。

要使脚本可执行,请运行:

chmod +x ./configureUiPathDisks.shchmod +x ./configureUiPathDisks.sh

有关脚本用法的更多详细信息,请运行:

sudo ./configureUiPathDisks.sh --helpsudo ./configureUiPathDisks.sh --help
***************************************************************************************

Utility to configure the disk for UiPath Automation Suite Installation.
Run this script to configure the disks on new machine or to extend the size of datadisk

Arguments
  -n|--node-type                  NodeType, Possible values: agent, server. Default to server
  -i|--install-type               Installation mode, Possible values: online, offline. Default to online
  -c|--cluster-disk-name          Device to host rancher and  kubelet. Ex: /dev/sdb
  -e|--etcd-disk-name             Device to host etcd, Not required for agent node. Ex: /dev/sdb
  -l|--data-disk-name             Device to host datadisk, Not required for agent node. Ex: /dev/sdc
  -b|--bundle-disk-name           Device to host the uipath bundle. 
                                    Only required for offline installation on 1st server node 
  -f|--complete-suite             Installing complete product suite or any of these products: 
                                    aicenter, apps, taskmining, documentunderstanding. 
                                    This will configure the datadisk volume to be 2TiB instead of 512Gi.
  -p|--primary-server             Is this machine is first server machine? Applicable only for airgap install.
                                    This is the machine on which UiPath AutomationSuite bundle will be installed.
                                    Default to false
  -x|--extend-data-disk           Extend the datadisk. Either attach new disk or resize the exiting datadisk
  -r|--resize                     Used in conjunction of with --extend-data-disk to resize the exiting volume,
                                    instead of adding new volume               
  -d|--debug                      Run in debug
  -h|--help                       Display help

ExampleUsage:
  configureUiPathDisks.sh --node-type server --install-type online \
    --cluster-disk-name /dev/sdb --etcd-disk-name /dev/sdc \
    --data-disk-name /dev/sdd

  configureUiPathDisks.sh --data-disk-name /dev/sdh --extend-data-disk
******************************************************************************************************************************************************************************

Utility to configure the disk for UiPath Automation Suite Installation.
Run this script to configure the disks on new machine or to extend the size of datadisk

Arguments
  -n|--node-type                  NodeType, Possible values: agent, server. Default to server
  -i|--install-type               Installation mode, Possible values: online, offline. Default to online
  -c|--cluster-disk-name          Device to host rancher and  kubelet. Ex: /dev/sdb
  -e|--etcd-disk-name             Device to host etcd, Not required for agent node. Ex: /dev/sdb
  -l|--data-disk-name             Device to host datadisk, Not required for agent node. Ex: /dev/sdc
  -b|--bundle-disk-name           Device to host the uipath bundle. 
                                    Only required for offline installation on 1st server node 
  -f|--complete-suite             Installing complete product suite or any of these products: 
                                    aicenter, apps, taskmining, documentunderstanding. 
                                    This will configure the datadisk volume to be 2TiB instead of 512Gi.
  -p|--primary-server             Is this machine is first server machine? Applicable only for airgap install.
                                    This is the machine on which UiPath AutomationSuite bundle will be installed.
                                    Default to false
  -x|--extend-data-disk           Extend the datadisk. Either attach new disk or resize the exiting datadisk
  -r|--resize                     Used in conjunction of with --extend-data-disk to resize the exiting volume,
                                    instead of adding new volume               
  -d|--debug                      Run in debug
  -h|--help                       Display help

ExampleUsage:
  configureUiPathDisks.sh --node-type server --install-type online \
    --cluster-disk-name /dev/sdb --etcd-disk-name /dev/sdc \
    --data-disk-name /dev/sdd

  configureUiPathDisks.sh --data-disk-name /dev/sdh --extend-data-disk
***************************************************************************************

为多节点 HA 就绪生产设置配置磁盘

在线

服务器节点

要在在线多节点 HA 就绪生产设置中配置磁盘,请在所有服务器计算机上运行以下命令:

./configureUiPathDisks.sh --cluster-disk-name name_of_cluster_disk \
  --etcd-disk-name name_of_etcd_disk \
  --data-disk-name name_of_data_disk./configureUiPathDisks.sh --cluster-disk-name name_of_cluster_disk \
  --etcd-disk-name name_of_etcd_disk \
  --data-disk-name name_of_data_disk
代理节点

要在在线多节点 HA 就绪生产设置中配置磁盘,请在所有代理计算机上运行以下命令:

./configureUiPathDisks.sh --cluster-disk-name name_of_cluster_disk \
  --node-type agent./configureUiPathDisks.sh --cluster-disk-name name_of_cluster_disk \
  --node-type agent

离线

第一个服务器节点

在离线安装中,您需要在 Docker 注册表中加载产品的映像。为此,需要以单独的磁盘形式提供额外的存储空间。此磁盘将用于解压缩产品捆绑包并将图像上传到 Docker 注册表。它只能出现在一台计算机上。

在其中一台服务器计算机或即将运行结构和服务安装程序的计算机上设置 --primary-server 标志。

要在离线多节点 HA 就绪生产设置中配置磁盘,请在其中一台服务器计算机上运行以下命令:

./configureUiPathDisks.sh --cluster-disk-name name_of_cluster_disk \
  --etcd-disk-name name_of_etcd_disk \
  --data-disk-name name_of_data_disk \
  --bundle-disk-name name_of_uipath_bundle_disk \
  --primary-server \
  --install-type offline./configureUiPathDisks.sh --cluster-disk-name name_of_cluster_disk \
  --etcd-disk-name name_of_etcd_disk \
  --data-disk-name name_of_data_disk \
  --bundle-disk-name name_of_uipath_bundle_disk \
  --primary-server \
  --install-type offline
其他服务器节点
在服务器节点上,您不需要捆绑磁盘。因此,您无需提供 --primary-server--bundle-disk-name

要在离线多节点 HA 就绪生产设置中配置磁盘,请在其他服务器计算机上运行以下命令:

./configureUiPathDisks.sh --cluster-disk-name name_of_cluster_disk \
  --etcd-disk-name name_of_etcd_disk \
  --data-disk-name name_of_data_disk \
  --install-type offline./configureUiPathDisks.sh --cluster-disk-name name_of_cluster_disk \
  --etcd-disk-name name_of_etcd_disk \
  --data-disk-name name_of_data_disk \
  --install-type offline
代理节点
在服务器节点上,您不需要捆绑磁盘。因此,您无需提供 --primary-server--bundle-disk-name

要在离线多节点 HA 就绪生产设置中配置磁盘,请在其他代理计算机上运行以下命令:

./configureUiPathDisks.sh --cluster-disk-name name_of_cluster_disk \
  --node-type agent \
  --install-type offline./configureUiPathDisks.sh --cluster-disk-name name_of_cluster_disk \
  --node-type agent \
  --install-type offline

配置对象存储磁盘

要为对象存储配置磁盘,请运行以下命令:

./configureUiPathDisks.sh --ceph-raw-disk-name name_ceph_raw_disk./configureUiPathDisks.sh --ceph-raw-disk-name name_ceph_raw_disk
备注:
  • Azure 中存在一个已知问题,即错误地将 Azure 磁盘标记为非 SSD。如果 Azure 是您的云提供商,并且您要配置对象存储磁盘,请按照故障排除中的说明进行操作。

  • 不支持对现有磁盘进行垂直扩展。要在安装后增大集群内存储的大小,请添加新的原始磁盘。

安装后扩展数据磁盘

要扩展数据磁盘,您可以附加新的物理磁盘或调整现有磁盘的大小。

添加新磁盘

要使用新附加的磁盘扩展数据磁盘,请在服务器计算机上运行以下命令:

./configureUiPathDisks.sh --data-disk-name name_of_data_disk \
  --extend-data-disk./configureUiPathDisks.sh --data-disk-name name_of_data_disk \
  --extend-data-disk

调整现有磁盘的大小

要通过调整现有磁盘大小来扩展数据磁盘,请在服务器计算机上运行以下命令:

./configureUiPathDisks.sh --extend-data-disk --resize./configureUiPathDisks.sh --extend-data-disk --resize

验证磁盘安装

  1. 采取以下步骤验证 /etc/fstab 是否已正确配置,以处理系统重新启动。
    备注:
    确保在 fstab 文件中添加了 etcd 磁盘和数据磁盘装载点。
    如果 /var/lib/rancher/var/lib/kubelet 有单独的磁盘分区,则 fstab 也应包含这两个文件夹。还要确保在这些 fstab 条目中包含 nofail 选项,以便在发生故障时不会影响虚拟机启动。
  2. 通过运行以下命令验证磁盘是否已正确装载:

    mount -afvmount -afv
  3. 您应该会收到以下响应:

    /datadisk                              : already mounted
    /var/lib/rancher/rke2/server/db        : already mounted
    /var/lib/rancher                       : already mounted
    /var/lib/kubelet                       : already mounted/datadisk                              : already mounted
    /var/lib/rancher/rke2/server/db        : already mounted
    /var/lib/rancher                       : already mounted
    /var/lib/kubelet                       : already mounted

启用端口

确保在防火墙上为每个来源启用了以下端口。

端口

协议

来源

用途

要求

22

TCP

跳转服务器/客户端计算机

对于 SSH(安装、集群管理调试)

不要打开此互联网端口。允许访问客户端计算机或跳转服务器。

80

TCP

 

仅离线安装:发送系统电子邮件通知所需。

 

443

TCP

集群中的所有节点 + 负载均衡器

对于 HTTPS(访问 Automation Suite)。

此端口应具有来自集群中所有节点和负载均衡器的入站和出站连接。

587

TCP

 

仅离线安装:发送系统电子邮件通知所需。

 

2379

TCP

集群中的所有节点

etcd 客户端端口

不得公开于互联网。节点之间通过私有 IP 地址进行访问就足够了。

2380

TCP

集群中的所有节点

etcd 对等端口

不得公开于互联网。节点之间通过私有 IP 地址进行访问就足够了。

6443

TCP

集群中的所有节点

用于使用 HTTPS 访问 Kube API;加入节点时需要。

此端口应具有来自集群中所有节点的入站和出站连接。

8472

UDP

集群中的所有节点

Flannel 需要 (VXLAN)

不得公开于互联网。节点之间通过私有 IP 地址进行访问就足够了。

9345

TCP

集群中的所有节点 + 负载均衡器

用于使用 HTTP 访问 Kube API;加入节点时需要

此端口应具有来自集群中所有节点和负载均衡器的入站和出站连接。

10250

TCP

集群中的所有节点

kubelet/指标服务器

不得公开于互联网。节点之间通过私有 IP 地址进行访问就足够了。

30071

TCP

集群中的所有节点

用于集群中节点之间内部通信的 NodePort 端口

不得公开于互联网。节点之间通过私有 IP 地址进行访问就足够了。

重要提示:
如果有到 Kerberos API 的直接连接,则必须在集群边界外公开端口 6443
端口 9345 由节点用于发现现有节点并加入多节点部署中的集群。为了保持高可用性发现机制运行,我们建议通过负载均衡器公开该端口与运行状况检查。

还要确保从所有节点连接到 SQL Server。

不要在其中一个 Istio 保留端口上公开 SQL Server,因为这可能会导致连接失败。

如果您在网络上设置了防火墙,请确保根据上述要求打开这些端口并允许流量。

可选:配置代理服务器

要配置代理,您需要在使用先决条件设置环境时以及在安装的高级配置阶段执行其他配置步骤。

设置环境时需要执行以下步骤。

注意:我们目前不支持具有自签名证书的 HTTPS 代理。如果要配置代理,请确保使用公共受信任证书。

步骤 1:启用虚拟网络上的端口

确保在给定虚拟网络的网络安全组上启用以下规则。

来源

目标

通过代理路由

端口

描述

虚拟网络

SQL

SQL 服务器端口

SQL Server 所需。

虚拟网络

Load balancer

9345

6443

将新节点添加到集群时所需。

虚拟网络

集群(子网)

所有端口

通过私有 IP 范围进行通信时所需。

虚拟网络

alm.<fqdn>

443

在部署期间登录和使用 ArgoCD 客户端时所需。

虚拟网络

代理服务器

所有端口

将流量路由到代理服务器时所需。

虚拟网络

名称服务器

所有端口

大多数云服务(例如 Azure 和 AWS)都使用它来获取虚拟机元数据,并将其视为私有 IP。

虚拟网络

元数据服务器

所有端口

大多数云服务(例如 Azure 和 AWS)使用 IP 地址 169.254.169.254 来获取计算机元数据。

步骤 2:向每个节点添加代理配置

配置节点时,您需要将代理配置添加到属于集群的每个节点。若要通过代理服务器从节点路由出站流量,则需要执行此步骤。

  1. /etc/environment 中添加以下配置:
    http_proxy=http://<PROXY-SERVER-IP>:<PROXY-PORT>
    https_proxy=http://<PROXY-SERVER-IP>:<PROXY-PORT>
    no_proxy=alm.<fqdn>,<fixed_rke2_address>,<named server address>,<metadata server address>,<private_subnet_ip>,localhost,<Comma separated list of ips that should not got though proxy server>http_proxy=http://<PROXY-SERVER-IP>:<PROXY-PORT>
    https_proxy=http://<PROXY-SERVER-IP>:<PROXY-PORT>
    no_proxy=alm.<fqdn>,<fixed_rke2_address>,<named server address>,<metadata server address>,<private_subnet_ip>,localhost,<Comma separated list of ips that should not got though proxy server>
  2. /etc/wgetrc 中添加以下配置:
    http_proxy=http://<PROXY-SERVER-IP>:<PROXY-PORT>
    https_proxy=http://<PROXY-SERVER-IP>:<PROXY-PORT>
    no_proxy=alm.<fqdn>,<fixed_rke2_address>,<named server address>,<metadata server address>,<private_subnet_ip>,localhost,<Comma separated list of ips that should not got though proxy server>http_proxy=http://<PROXY-SERVER-IP>:<PROXY-PORT>
    https_proxy=http://<PROXY-SERVER-IP>:<PROXY-PORT>
    no_proxy=alm.<fqdn>,<fixed_rke2_address>,<named server address>,<metadata server address>,<private_subnet_ip>,localhost,<Comma separated list of ips that should not got though proxy server>

    必填参数

    描述

    http_proxy

    用于路由来自节点的 HTTP 出站请求。这应该是代理服务器 FQDN 和端口。

    https_proxy

    用于路由来自节点的 HTTPS 出站请求。这应该是代理服务器 FQDN 和端口。

    no_proxy

    不希望通过代理服务器路由的主机和 IP 地址的逗号分隔列表。 这应该是私有子网、SQL Server 主机、命名服务器地址、元数据服务器地址: alm.<fqdn>,<fixed_rke2_address>,<named server address>,<metadata server address>
    • metadata server address – 大多数云服务(例如 Azure 和 AWS)使用 IP 地址 169.254.169.254 来获取计算机元数据。
    • named server address – 大多数云服务(例如 Azure 和 AWS)都使用它来解析 DNS 查询。
  3. 通过运行以下命令验证代理设置是否已正确配置:

    curl -v $HTTP_PROXY
    curl -v <fixed_rke_address>:9345curl -v $HTTP_PROXY
    curl -v <fixed_rke_address>:9345
    重要提示:满足代理服务器要求后,请确保在安装过程中继续进行代理配置。请按照可选:配置代理服务器中的步骤操作,以确保正确设置代理服务器。

此页面是否有帮助?

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