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

为集群启用 Redis High Availability Add-on

在多节点 HA 就绪生产设置中,我们会默认启用高可用性 (HA)。但是,集群服务使用的基于 Redis 的内存缓存在单个节点上运行,并且表示单点故障。为了减轻缓存节点故障或重新启动的影响,您可以购买 High Availability Add-on (HAA),它可以实现缓存的冗余多节点 HA 就绪生产部署。

备注:

所有安装都包括具有单节点许可证的 HAA 软件。此许可证是免费的,无需购买。

如果您希望跨多个节点启用 HAA,则需要购买 HAA 许可证。这将在多节点 HA 就绪生产设置中实现集群的完全高可用性。

HAA 基于 Redis 技术。

为此,请执行以下步骤:

  1. 购买 HAA 许可证。有关详细信息,请联系 UiPath。
  2. 更新 cluster.config.json 文件中的以下字段:
    • fabric.redis.license - 输入已转换为单个 Base64 字符串的 HAA 许可证。在 Bash 中,您可以使用 echo 'license_text_here' | base64 -w0 执行此操作。
    • fabric.redis.ha - 使用 true 启用 HAA,并确保配置 fabric.redis.license 参数。这将启用 HAA 数据库复制,并将 HAA Pod 的数量增加到 3。默认情况下,fabric.redis.ha 设置为 false
      注意:如果启用了 redis.ha,则需要将 redis.license 设置为支持两个以上分片的许可证。
      "fabric": {
          "redis": { 
              "ha": "true",
              "license": Base64String
          }
      }"fabric": {
          "redis": { 
              "ha": "true",
              "license": Base64String
          }
      }
  3. 重新运行结构安装程序:
  • 在线安装:
    ./install-uipath.sh -i cluster_config.json -f -o output.json --accept-license-agreement./install-uipath.sh -i cluster_config.json -f -o output.json --accept-license-agreement
  • 离线安装:
    ./install-uipath.sh -i cluster_config.json -f --install-type offline -o output.json --accept-license-agreement./install-uipath.sh -i cluster_config.json -f --install-type offline -o output.json --accept-license-agreement

更新 Redis 许可证

要更新 Redis 许可证,请执行以下步骤:

  1. 设置 kubectl 和 ArgoCD 访问权限
    1. 在主节点上启用 kubectl 访问权限。有关说明,请参阅启用 kubectl
    2. 启用对 ArgoCD 的访问权限。有关说明,请参阅访问 ArgoCD
  2. 检查当前许可证状态

    要检查当前许可证的状态,请运行以下 Shell 命令:

    kubectl get rec -n redis-system redis-cluster -o jsonpath='{.status.licenseStatus}' | jqkubectl get rec -n redis-system redis-cluster -o jsonpath='{.status.licenseStatus}' | jq
    • 在安装程序中包含的当前许可证过期后部署的集群将显示 4 个分片的试用许可证,该许可证将在 30 天后过期,如以下示例所示:



    • 已在运行的集群会在许可证过期时显示以下状态:



  3. 更新现有许可证
    1. 要更新现有许可证,请运行以下 Shell 命令:
      kubectl patch application fabric-installer -n argocd \
      --type=json -p '[{"op":"add","path":"/spec/source/helm/parameters/-","value":{"name": "global.redis.license", "value": "<LICENSE_KEY_IN_BASE64>"}}]'kubectl patch application fabric-installer -n argocd \
      --type=json -p '[{"op":"add","path":"/spec/source/helm/parameters/-","value":{"name": "global.redis.license", "value": "<LICENSE_KEY_IN_BASE64>"}}]'


    2. 要查看是否已应用更改,请访问 ArgoCD。有关说明,请参阅访问 ArgoCD
    3. 如果结构安装程序应用程序显示为不同步,并且同步过程未自动触发,请自行单击“同步”按钮。如果您使用的是较旧的 Automation Suite 版本,则可能会发生这种情况。






      注意:ArgoCD 用户界面显示已同步的应用程序与 Redis 运算符成功应用新许可证之间存在一小段延迟。
    4. 要在 Redis 运算符尝试应用许可证时查看其日志,请运行以下命令:
      kubectl logs -n redis-system --since=300s -l name=redis-enterprise-operator -c redis-enterprise-operator --tail=-1 | grep licensekubectl logs -n redis-system --since=300s -l name=redis-enterprise-operator -c redis-enterprise-operator --tail=-1 | grep license


    5. 如果您尝试应用过期的许可证,或者运行附带过期许可证的安装程序,您将获得以下输出:


    6. 要在运行旧版安装程序之前更新 Redis 许可证,请更新 <installer_folder>/defaults.json 中的 fabric.redis.license 密钥:


  4. 检查是否已应用新许可证

    要检查是否应用了新许可证,请运行以下 Shell 命令:

    kubectl get rec -n redis-system redis-cluster -o jsonpath='{.status.licenseStatus}' | jqkubectl get rec -n redis-system redis-cluster -o jsonpath='{.status.licenseStatus}' | jq

    在下图中,您可以看到 Redis 集群从 30 天试用许可证切换到单分片 10 年许可证。



  • 更新 Redis 许可证

此页面是否有帮助?

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