automation-suite
2024.10
true
UiPath logo, featuring letters U and I in white

OpenShift 上的 Automation Suite 安装指南

上次更新日期 2024年12月18日

通过运算符 Hub 部署 Redis

Automation Suite 上的 UiPath™ 产品需要使用 Redis 以确保缓存功能。 您可以通过以下选项来满足 Redis 缓存要求:
  • 在 OpenShift 集群或 OpenShift 集群外部的其他服务器上安装和配置 Redis。

  • 在 OpenShift 集群上安装 Redis 企业版运算符。

    注意: Automation Suite 不附带 Redis 企业运算符许可证。 您必须直接从 Redis 获取许可证。

要通过 Orchestrator Hub 安装 Redis 企业版运算符,请按照本部分中的说明进行操作。

注意:如果使用 Redis Enterprise Orchestrator 版本 6.2.18-41 或更早版本,则必须在安装运算符之前安装安全上下文约束。 有关更多信息,请参阅Redis 文档

安装 Redis 企业运算符

采取以下步骤,通过 Orchestrator Hub 安装 Redis 企业版运算符:
  1. 在 OpenShift 界面中,导航到“ Operators” >“OperatorHub ”。
  2. 在搜索字段中,搜索 “ Redis Enterprise ”。
  3. 在结果列表中选择“ Redis 提供的 Redis 企业版运算符”。 该条目被标记为 “ 已认证”。 默认情况下,映像从 Red Hat 注册表中拉取。
  4. 在 “安装运算符”页面上,为运算符指定命名空间。 仅支持每个运算符一个命名空间。
  5. 使用要安装的版本更新频道。 有关特定版本的更多信息,请参阅运算符发行说明
  6. 选择批准策略。 对于生产系统,请使用“手动”以确保运算符更新需要您的批准。
  7. 选择“安装”并批准安装计划。
您可以在 Orchestrators > 已安装的运算符中监控 Redis 企业版运算符订阅的状态。

创建 Redis 企业版集群

请按照以下步骤创建 Redis 企业版集群:
  1. 创建包含以下内容的redis-enterprise-cluster.yaml文件:
    ---
    apiVersion: app.redislabs.com/v1
    kind: RedisEnterpriseCluster
    metadata:
      name: rec
    spec:
      bootstrapperImageSpec:
        repository: registry.connect.redhat.com/redislabs/redis-enterprise-operator
      persistentSpec:
        enabled: true
      redisEnterpriseServicesRiggerImageSpec:
        repository: registry.connect.redhat.com/redislabs/services-manager
      redisEnterpriseImageSpec:
        imagePullPolicy: IfNotPresent
        repository: registry.connect.redhat.com/redislabs/redis-enterprise
      nodes: 1
      uiServiceType: ClusterIP---
    apiVersion: app.redislabs.com/v1
    kind: RedisEnterpriseCluster
    metadata:
      name: rec
    spec:
      bootstrapperImageSpec:
        repository: registry.connect.redhat.com/redislabs/redis-enterprise-operator
      persistentSpec:
        enabled: true
      redisEnterpriseServicesRiggerImageSpec:
        repository: registry.connect.redhat.com/redislabs/services-manager
      redisEnterpriseImageSpec:
        imagePullPolicy: IfNotPresent
        repository: registry.connect.redhat.com/redislabs/redis-enterprise
      nodes: 1
      uiServiceType: ClusterIP
    设置 YAML 文件中nodes参数的值,以确定在 Redis 企业版集群中运行的 Pod 数量。
  2. 通过运行以下命令,将 YAML 文件中的配置应用到 OpenShift 集群:
    注意:将命令中的<redis-namespace>占位符替换为您在上一步中使用的命名空间。
    oc apply -f redis-enterprise-cluster.yaml -n "<redis-namespace>"oc apply -f redis-enterprise-cluster.yaml -n "<redis-namespace>"
  3. Verify that the cluster is in a Running state by using the following command. The command requires the jq utility to be installed on your machine.
    oc get RedisEnterpriseCluster -n redis-system -o json | jq -r '.items[0].status.state'oc get RedisEnterpriseCluster -n redis-system -o json | jq -r '.items[0].status.state'
    To install jq, use one of the following options:
    • Option 1: Run the following command:
      yum install -y epel-release yum install -y jqyum install -y epel-release yum install -y jq
    • Option 2: Run the following commands:
      shell
      curl https://download-ib01.fedoraproject.org/pub/epel/7/x86_64/Packages/j/jq-1.6-2.el7.x86_64.rpm --output /tmp/jq-1.6-2.el7.x86_64.rpm
      yum localinstall /tmp/jq-1.6-2.el7.x86_64.rpmshell
      curl https://download-ib01.fedoraproject.org/pub/epel/7/x86_64/Packages/j/jq-1.6-2.el7.x86_64.rpm --output /tmp/jq-1.6-2.el7.x86_64.rpm
      yum localinstall /tmp/jq-1.6-2.el7.x86_64.rpm

创建 Redis 数据库

请采取以下步骤创建 Redis 数据库:
  1. 创建包含以下内容的redis-database.yaml文件:
    ---
    apiVersion: app.redislabs.com/v1alpha1
    kind: RedisEnterpriseDatabase
    metadata:
      name: redb
    spec:
      tlsMode: disabled
      databasePort: 6380---
    apiVersion: app.redislabs.com/v1alpha1
    kind: RedisEnterpriseDatabase
    metadata:
      name: redb
    spec:
      tlsMode: disabled
      databasePort: 6380
  2. 通过运行以下命令,将 YAML 文件中的配置应用到 OpenShift 集群:
    备注:
    将命令中的<redis-namespace>占位符替换为您在上一步中使用的命名空间。
    oc apply -f redis-database.yaml -n "<redis-namespace>"oc apply -f redis-database.yaml -n "<redis-namespace>"
  3. 通过运行以下命令验证数据库是否处于active状态:
    oc get redisenterprisedatabase -n "<redis_namespace>" -o json | jq -r '.items[0].status.status')"oc get redisenterprisedatabase -n "<redis_namespace>" -o json | jq -r '.items[0].status.status')"

更新集群配置文件

要通过 OrchestratorHub 部署 Redis,要求您将以下部分添加到input.json配置文件中。 将<redis-namespace><password>占位符替换为适当的值:
"fabric": {
    "redis": {
      "hostname": "redb.<redis-namespace>.svc.cluster.local",
      "port": 6380,
      "password": "<password>",
      "tls": false
    }
  },  "fabric": {
    "redis": {
      "hostname": "redb.<redis-namespace>.svc.cluster.local",
      "port": 6380,
      "password": "<password>",
      "tls": false
    }
  },
要检索密码,请运行以下命令:
oc get secret -n <redis-namespace> redb-redb -o json | jq -r '.data.password' | base64 -doc get secret -n <redis-namespace> redb-redb -o json | jq -r '.data.password' | base64 -d

此页面有帮助吗?

获取您需要的帮助
了解 RPA - 自动化课程
UiPath Community 论坛
Uipath Logo White
信任与安全
© 2005-2024 UiPath。保留所有权利。