在 OpenShift Container Platform 上安装


Red Hat Ansible Automation Platform 2.5

在 OpenShift Container Platform 上安装和配置 Ansible Automation Platform Operator

Red Hat Customer Content Services

摘要

本指南为 OpenShift Container Platform 上的 Red Hat Ansible Automation Platform Operator 支持的安装场景提供步骤和参考信息。

前言

感谢您对 Red Hat Ansible Automation Platform 的关注。Ansible Automation Platform 是一个商业产品,它可以帮助团队通过增加控制、知识、协调基于 Ansible 的环境来更好地管理多阶的复杂部署环境。

本指南帮助您了解在 OpenShift Container Platform 上部署 Ansible Automation Platform Operator 的安装、迁移和升级要求。

对红帽文档提供反馈

如果您对本文档有任何改进建议,或发现错误,请通过 https://access.redhat.com 联系技术支持来创建一个请求。

作为系统管理员,您可以使用 Ansible Automation Platform Operator 在 OpenShift 环境中部署新的 Ansible Automation Platform 实例。

Red Hat Ansible Automation Platform 在 Red Hat Enterprise Linux 和 Red Hat Openshift 中都被支持。

OpenShift Operator 可帮助在 Red Hat OpenShift Container Platform 上安装和自动化复杂分布式软件的第 2 天操作。Ansible Automation Platform Operator 可让您在 Red Hat OpenShift Container Platform 上部署和管理 Ansible Automation Platform 组件。

您可以使用本节来帮助规划 Red Hat OpenShift Container Platform 环境中的 Red Hat Ansible Automation Platform 安装。安装前,请查看受支持的安装场景以确定哪些满足您的要求。

1.1.1. 关于 Ansible Automation Platform Operator

Ansible Automation Platform Operator 在 OpenShift 环境中提供新的 Ansible Automation Platform 实例的云原生、按钮式部署。

Ansible Automation Platform Operator 包含用于部署和管理自动化控制器和私有自动化中心实例的资源类型。

它还包括自动化控制器作业资源,用于在自动化控制器部署中定义和启动作业。

与从 Red Hat OpenShift Container Platform 上部署的 playbook 启动实例相比,使用 Kubernetes 原生 Operator 部署 Ansible Automation Platform 实例具有诸多优势,包括对 Red Hat Ansible Automation Platform 部署的升级和完整生命周期支持。

您可以从 OperatorHub 中的 Red Hat Operator 目录安装 Ansible Automation Platform Operator。

如需有关 Ansible Automation Platform Operator 系统要求和基础架构拓扑的信息,请参阅 测试部署模型中的 Operator 拓扑

1.1.2. OpenShift Container Platform 版本兼容性

OpenShift Container Platform 4.12 到 4.17 及更新版本提供了用于安装 Ansible Automation Platform 2.5 的 Ansible Automation Platform Operator。

您可以使用 Red Hat OpenShift Container Platform Web 控制台中的 OperatorHub 来安装 Ansible Automation Platform Operator。

另外,您还可以从 OpenShift Container Platform 命令行界面(CLI) oc 安装 Ansible Automation Platform Operator。详情请参阅通过 OpenShift Container Platform CLI 安装 Red Hat Ansible Automation Platform Operator

安装 Ansible Automation Platform Operator 后,您必须创建一个 Ansible Automation Platform 自定义资源(CR)。这可让您从称为平台网关的单一统一接口管理 Ansible Automation Platform 组件。自版本 2.5 起,您必须创建一个 Ansible Automation Platform CR,即使您有现有的自动化控制器、自动化中心或 Event-Driven Ansible、组件。

如果已经部署了现有组件,则必须在 Ansible Automation Platform CR 中指定这些组件。您必须在与现有组件相同的命名空间中创建自定义资源。

Expand
支持的场景现有组件支持的场景
  • Ansible Automation Platform CR 用于较晚地安装带有自动化控制器、自动化中心和启用了 Event-Driven Ansible 的 Ansible
  • 仅启用自动化控制器的 Ansible Automation Platform CR
  • 仅启用自动化控制器的 Ansible Automation Platform CR,启用自动化中心
  • 仅启用自动化控制器的 Ansible Automation Platform CR,启用 Event-Driven Ansible
  • 在与现有自动化控制器 CR 相同的命名空间中创建的 Ansible Automation Platform CR,使用在 Ansible Automation Platform CR spec 中指定的自动化控制器名称
  • 与自动化控制器和自动化中心相同
  • 与自动化控制器、自动化中心和 Event-Driven Ansible 相同
  • 与自动化控制器和 Event-Driven Ansible 相同

1.1.4. 自定义资源

您可以为每个主要安装工作流定义自定义资源。

  • 如果您计划在 OpenShift Container Platform 上安装 Event-Driven Ansible 并修改同时规则手册激活,请将所需的 EDA_MAX_RUNNING_ACTIVATIONS 参数添加到自定义资源中。默认情况下,Event-Driven Ansible 控制器允许每个节点同时运行 12 个激活。例如,请参阅附录部分中的 eda-max-running-activations.yml
注意

OpenShift Container Platform 的 EDA_MAX_RUNNING_ACTIVATIONS 是一个全局值,因为在 OpenShift Container Platform 上安装 Event-Driven Ansible 时没有 worker 节点的概念。

1.1.5. Ansible Automation Platform Operator CSRF 管理

在 OpenShift Container Platform 上的 Ansible Automation Platform 版本 2.5 中,OpenShift Container Platform 上的 Ansible Automation Platform Operator 会自动创建 OpenShift 路由,并配置您的跨站点请求伪造(CSRF)设置。

使用外部入口时,您必须在入口上配置 CSRF,这有助于为 平台网关 operator ingress 配置 CSRF 设置

重要

在以前的版本中,CSRF 通过自动化控制器用户界面进行配置,在 2.5 自动化控制器设置中仍然存在,但对平台网关的 CSRF 设置没有影响。

下表有助于说明哪些设置适用于哪些组件。

Expand
UI 设置适用于

订阅

自动化控制器

平台网关

平台网关

用户首选项

用户界面

System

自动化控制器

作业

自动化控制器

日志记录

自动化控制器

故障排除

自动化控制器

1.1.6. 其他资源

要了解更多有关 OpenShift Container Platform OperatorHub 的信息,您可以查看 OpenShift Container Platform 文档:

使用这个流程,指导您通过 Red Hat OpenShift Container Platform 上的 Operator 部分部署 Red Hat Ansible Automation Platform Operator,选择适当的更新频道和安装模式,然后验证部署是否成功。

安装 Ansible Automation Platform Operator 时,您可以选择命名空间范围的 Operator 或集群范围的 Operator。这取决于您选择的更新频道,stable-2.x 或 cluster-scoped-2.x。

命名空间范围的 Operator 仅限于一个命名空间,提供更严格的安全性。集群范围的运算符跨越多个命名空间,这授予更广泛的权限。

如果您要管理具有相同 Ansible Automation Platform Operator 版本的多个 Ansible Automation Platform 实例,请使用集群范围的 Operator,它使用单个 Operator 来管理集群中的所有 Ansible Automation Platform 自定义资源。

如果同一集群中需要多个 Operator 版本,则必须使用命名空间范围的 Operator。operator 和部署共享同一命名空间。这在调试时也很有用,因为 operator 日志仅与该命名空间中的自定义资源相关。

注意

如需有关 Ansible Automation Platform Operator 系统要求和基础架构拓扑的信息,请参阅 测试部署模型 中的 Operator 拓扑

有关安装命名空间或集群范围的 Operator 的帮助,请参阅以下步骤。

重要

您无法在 OpenShift Cluster 上的 default 命名空间中部署 Ansible Automation Platform。建议使用 aap 命名空间。您可以使用自定义命名空间,但它应该只运行 Ansible Automation Platform。

先决条件

  • 您已在 OperatorHub 中安装了 Red Hat Ansible Automation Platform 目录。
  • 您已为平台创建一个 StorageClass 对象,以及一个带有 ReadWriteMany 访问模式的持久性卷声明(PVC)。详情请参阅 动态置备
  • 要使用 ReadWriteMany 访问模式的 Amazon Web Services (AWS) 上运行 Red Hat OpenShift Container Platform 集群,您必须添加 NFS 或其他存储。

流程

  1. 登录到 Red Hat OpenShift Container Platform。
  2. 进入到 OperatorsOperatorHub
  3. 搜索 Ansible Automation Platform 并点 Install
  4. 选择一个 Update Channel:

    • stable-2.x: 安装命名空间范围的 operator,将自动化中心和自动化控制器实例部署到安装 Operator 的命名空间,这适用于大多数情况。stable-2.x 频道不需要管理员特权并使用较少的资源,因为它仅监控一个命名空间。
    • stable-2.x-cluster-scoped :在管理所有命名空间中的 Ansible Automation Platform 自定义资源和部署的单一命名空间中安装 Ansible Automation Platform Operator。Ansible Automation Platform Operator 需要集群中所有命名空间的管理员特权。
  5. 选择 Installation Mode, Installed Namespace, 和 Approval Strategy.
  6. Install

验证

安装过程开始。安装完成后,会出现一个模态通知您在指定命名空间中安装 Ansible Automation Platform Operator。

  • View Operator 查看新安装的 Ansible Automation Platform Operator,并验证是否存在以下 Operator 自定义资源:
Expand
自动化控制器Automation hubEvent-Driven Ansible (EDA)Red Hat Ansible Lightspeed
  • 自动化控制器
  • 自动化控制器备份
  • 自动化控制器恢复
  • Automation Controller Mesh Ingress
  • Automation Hub
  • Automation Hub 备份
  • Automation Hub 恢复
  • EDA
  • EDA 备份
  • EDA 恢复
  • Ansible Lightspeed
  • 验证 Ansible Automation Platform Operator 是否显示 Succeeded 状态。

根据这些说明,使用 oc 命令从 OpenShift Container Platform 命令行界面(CLI)在 Red Hat OpenShift Container Platform 上安装 Ansible Automation Platform Operator。

使用这个流程为 Operator 订阅命名空间。

重要

您无法在 OpenShift Cluster 上的 default 命名空间中部署 Ansible Automation Platform。建议使用 aap 命名空间。您可以使用自定义命名空间,但它应该只运行 Ansible Automation Platform。

先决条件

  • 使用具有 operator 安装权限的账户访问 Red Hat OpenShift Container Platform。
  • OpenShift Container Platform CLI oc 命令安装在本地系统中。如需更多信息,请参阅 Red Hat OpenShift Container Platform 产品文档中的安装 OpenShift CLI

流程

  1. 为 operator 创建项目。

    oc new-project ansible-automation-platform
    Copy to Clipboard Toggle word wrap
  2. 创建名为 sub.yaml 的文件。
  3. 将以下 YAML 代码添加到 sub.yaml 文件中。

    ---
    apiVersion: v1
    kind: Namespace
    metadata:
      labels:
        openshift.io/cluster-monitoring: "true"
      name: ansible-automation-platform
    ---
    apiVersion: operators.coreos.com/v1
    kind: OperatorGroup
    metadata:
      name: ansible-automation-platform-operator
      namespace: ansible-automation-platform
    spec:
      targetNamespaces:
        - ansible-automation-platform
    ---
    apiVersion: operators.coreos.com/v1alpha1
    kind: Subscription
    metadata:
      name: ansible-automation-platform
      namespace: ansible-automation-platform
    spec:
      channel: 'stable-2.5'
      installPlanApproval: Automatic
      name: ansible-automation-platform-operator
      source: redhat-operators
      sourceNamespace: openshift-marketplace
    ---
    Copy to Clipboard Toggle word wrap

    此文件创建一个名为 ansible-automation-platform 的 Subscription 对象,它将 ansible-automation-platform 命名空间订阅到 ansible-automation-platform-operator operator。

  4. 运行 oc apply 命令来创建 sub.yaml 文件中指定的对象:

    oc apply -f sub.yaml
    Copy to Clipboard Toggle word wrap
  5. 在继续使用 oc get csv -n ansible-automation-platform 命令前,验证 CSV PHASE 报告 "Succeeded":

    oc get csv -n ansible-automation-platform
    
    NAME                               DISPLAY                       VERSION              REPLACES                           PHASE
    aap-operator.v2.5.0-0.1728520175   Ansible Automation Platform   2.5.0+0.1728520175   aap-operator.v2.5.0-0.1727875185   Succeeded
    Copy to Clipboard Toggle word wrap
  6. ansible-automation-platform 命名空间中创建一个名为 exampleAnsibleAutomationPlatform 对象。

    要从示例更改 Ansible Automation Platform 及其组件,请编辑 metadata: 部分中的 name 字段,并将 example 替换为您要使用的名称:

    oc apply -f - <<EOF
    apiVersion: aap.ansible.com/v1alpha1
    kind: AnsibleAutomationPlatform
    metadata:
      name: example
      namespace: ansible-automation-platform
    spec:
      # Platform
      image_pull_policy: IfNotPresent
      # Components
      controller:
        disabled: false
      eda:
        disabled: false
      hub:
        disabled: false
        ## Modify to contain your RWM storage class name
        storage_type: file
        file_storage_storage_class: <your-read-write-many-storage-class>
        file_storage_size: 10Gi
    
        ## uncomment if using S3 storage for Content pod
        # storage_type: S3
        # object_storage_s3_secret: example-galaxy-object-storage
    
        ## uncomment if using Azure storage for Content pod
        # storage_type: azure
        # object_storage_azure_secret: azure-secret-name
      lightspeed:
        disabled: true
    EOF
    Copy to Clipboard Toggle word wrap

作为命名空间管理员,您可以使用 Ansible Automation Platform 网关来管理 OpenShift 环境中的新的 Ansible Automation Platform 组件。

Ansible Automation Platform 网关使用 Ansible Automation Platform 自定义资源来管理并将以下 Ansible Automation Platform 组件集成到统一用户界面中:

  • 自动化控制器
  • Automation hub
  • Event-Driven Ansible
  • Red Hat Ansible Lightspeed (这个功能默认是禁用的,您必须选择使用它。)

在部署平台网关前,您必须在命名空间中安装 Ansible Automation Platform Operator。如果您还没有安装 Ansible Automation Platform Operator,请参阅在 Red Hat OpenShift Container Platform 上安装 Red Hat Ansible Automation Platform Operator

注意

平台网关仅在 Ansible Automation Platform Operator 版本 2.5 下可用。Ansible Automation Platform Operator 2.5 下部署的每个组件都默认为版本 2.5。

如果您有 Ansible Automation Platform Operator 和安装的一些或全部 Ansible Automation Platform 组件 ,请参阅 使用现有 Ansible Automation Platform 组件部署平台网关 以了解如何继续。

您可以将已安装的 Ansible Automation Platform 的任何组件链接到新的 Ansible Automation Platform 实例。

以下流程模拟一个场景,其中将自动化控制器作为现有组件,并希望添加自动化中心和 Event-Driven Ansible。

流程

  1. 登录到 Red Hat OpenShift Container Platform。
  2. 进入到 OperatorsInstalled Operators
  3. 选择 Ansible Automation Platform Operator 部署。
  4. Subscriptions 并编辑您的 更新频道stable-2.5
  5. Details,在 Ansible Automation Platform 标题中点 Create instance
  6. Create Ansible Automation Platform 页面中,在 Name 字段中输入您的实例的名称。

    • 在部署 Ansible Automation Platform 实例时,请确保将 auto_update 设置为现有自动化控制器实例上的默认值 false,以便集成正常工作。
  7. YAML 视图 并复制以下内容:

    apiVersion: aap.ansible.com/v1alpha1
    kind: AnsibleAutomationPlatform
    metadata:
      name: example-aap
      namespace: aap
    spec:
      database:
        resource_requirements:
          requests:
            cpu: 200m
            memory: 512Mi
        storage_requirements:
          requests:
            storage: 100Gi
    
      # Platform
      image_pull_policy: IfNotPresent
    
      # Components
      controller:
        disabled: false
        name: existing-controller-name
      eda:
        disabled: false
      hub:
        disabled: false
        ## uncomment if using file storage for Content pod
        storage_type: file
        file_storage_storage_class: <your-read-write-many-storage-class>
        file_storage_size: 10Gi
    
        ## uncomment if using S3 storage for Content pod
        # storage_type: S3
        # object_storage_s3_secret: example-galaxy-object-storage
    
        ## uncomment if using Azure storage
    Copy to Clipboard Toggle word wrap
    1. 对于新组件,如果没有指定名称,则会生成默认名称。
  8. Create
  9. 要访问您的新实例,请参阅访问平台网关

    注意

    如果您有一个带有受管 Postgres pod 的现有控制器,则在创建自动化控制器实例的 Ansible Automation Platform 资源后,将继续使用该原始 Postgres pod。如果您要进行全新安装,则所有实例都会有一个 Postgres 受管 pod。

使用 Ansible Automation Platform 实例作为默认实例。此实例将自动化控制器、自动化中心和 Event-Driven Ansible 部署链接到单个接口。

流程

  1. 登录到 Red Hat OpenShift Container Platform。
  2. 进入 NetworkingRoutes
  3. Ansible Automation PlatformLocation 下的链接。
  4. 这会将您重定向到 Ansible Automation Platform 登录页面。在 Username 字段中输入 "admin" 作为您的用户名。
  5. 对于密码,您必须:

    1. 进入 WorkloadsSecrets
    2. <your instance name>-admin-password 并复制密码。
    3. 将密码粘贴到 Password 字段中。
  6. 单击 登录
  7. 应用您的订阅:

    1. 单击 Subscription manifestUsername/password
    2. 上传清单或输入您的用户名和密码。
    3. Subscription 列表中选择您的订阅。
    4. 点击 Next。这会将您重定向到 Analytics 页面。
  8. 点击 Next
  9. 选择 I agree to the terms of the license agreement 复选框。
  10. 点击 Next

验证

现在,您可以访问平台网关用户界面。

故障排除

如果您无法访问 Ansible Automation Platform,请参阅 平台网关的常见问题,以帮助进行故障排除和调试。

您可以使用 OpenShift Container Platform CLI 获取您创建的自动化控制器的 Web 地址和密码。要登录到平台网关,您需要 web 地址和密码。

2.4.1. 获取平台网关 Web 地址

Red Hat OpenShift Container Platform 路由以主机名的形式公开服务,以便外部客户端可根据名称访问该服务。创建平台网关实例时,为其创建一个路由。路由会继承您分配给 YAML 文件中的平台网关对象的名称。

流程

  • 使用以下命令获取路由:

    oc get routes -n <platform_namespace>
    Copy to Clipboard Toggle word wrap

    验证

    您可以在以下示例中看到,示例平台网关在 ansible-automation-platform 命名空间中运行。

$ oc get routes -n ansible-automation-platform

NAME      HOST/PORT                                              PATH   SERVICES          PORT   TERMINATION     WILDCARD
example   example-ansible-automation-platform.apps-crc.testing          example-service   http   edge/Redirect   None
Copy to Clipboard Toggle word wrap

平台网关实例的地址为 example-ansible-automation-platform.apps-crc.testing

2.4.2. 获取平台网关密码

AnsibleAutomationPlatform 对象中平台网关实例的 YAML 块为 nameadmin_user 键分配值。

流程

  1. 在以下命令中使用这些值来获取平台网关实例的密码。

    oc get secret/<your instance name>-<admin_user>-password -o yaml
    Copy to Clipboard Toggle word wrap
  2. admin_user 的默认值为 admin。如果您在 AnsibleAutomationPlatform 对象中更改了 admin 用户名,请修改该命令。

    以下示例为名为 example 的平台网关对象检索密码:

    oc get secret/example-admin-password -o yaml
    Copy to Clipboard Toggle word wrap

    平台网关实例的 base64 编码密码列在输出的 metadata 字段中:

    $ oc get secret/example-admin-password -o yaml
    
    apiVersion: v1
    data:
      password: ODzLODzLODzLODzLODzLODzLODzLODzLODzLODzLODzL
    kind: Secret
    metadata:
      labels:
        app.kubernetes.io/component: aap
        app.kubernetes.io/name: example
        app.kubernetes.io/operator-version: ""
        app.kubernetes.io/part-of: example
      name: example-admin-password
      namespace: ansible-automation-platform
    Copy to Clipboard Toggle word wrap

2.4.3. 解码平台网关密码

获取网关密码后,您必须将其从 base64 解码。

流程

  • 运行以下命令以解码 base64 中的密码:
oc get secret/example-admin-password -o jsonpath={.data.password} | base64 --decode
Copy to Clipboard Toggle word wrap

Ansible 是一个开源软件项目,它使用 GNU General Public License version 3 的许可,如 Ansible 源代码 中所述。

在安装 Ansible Automation Platform 前,您必须附加有效的订阅。

3.1. 试用和评估

您需要订阅来运行 Ansible Automation Platform。首先,您可以注册免费试用订阅。

3.2. 订阅中的节点数

Ansible Automation Platform 订阅定义了可作为订阅一部分管理的受管节点的数量。

有关订阅的受管节点要求的更多信息,请参阅如何定义为 Red Hat Ansible Automation Platform 产品的一部分

注意

Ansible 不会回收节点数或重置自动化主机。

3.3. 订阅类型

Red Hat Ansible Automation Platform 以年度订阅的形式提供不同级别的支持,以及机器数量。

所有订阅级别包括常规的自动化控制器更新和发布,Ansible 以及 Ansible Automation Platform 的任何其他组件。

如需更多信息,请通过红帽客户门户网站或 Ansible 网站联系 Ansiblehttps://access.redhat.com/

3.4. 获取清单文件

您可以在 Red Hat Subscription Management 的 Subscription Allocations 部分中获取订阅清单。

获取订阅分配后,您可以下载其清单文件并上传该文件以激活 Ansible Automation Platform。

首先,使用您的管理员用户帐户 登录到红帽客户门户网站,并按照列出的步骤操作。

3.4.1. 创建订阅分配

使用新的订阅分配,您可以为当前离线或 air-gapped 的系统设置侧订阅和权利。这是在下载清单并将其上传到 Ansible Automation Platform 之前所必需的。

流程

  1. Subscription Allocations 页面中,点 New Subscription Allocation
  2. 输入分配的名称,以便稍后找到它。
  3. 选择 Type: Satellite 6.16 作为管理应用。
  4. Create

3.4.2. 在订阅分配中添加订阅

创建分配后,您可以添加 Ansible Automation Platform 正确运行所需的订阅。在下载清单并将其添加到 Ansible Automation Platform 之前,此步骤是必需的。

流程

  1. Subscription Allocations 页面中,点您要添加订阅 的订阅分配 名称。
  2. Subscriptions 选项卡。
  3. Add Subscriptions
  4. 输入您要添加的 Ansible Automation Platform 权利数量。
  5. Submit

3.4.3. 下载清单文件

使用适当的订阅创建分配后,您可以从 Red Hat Subscription Management 下载清单文件。

流程

  1. Subscription Allocations 页面中,点您要生成清单 的订阅分配 名称。
  2. Subscriptions 选项卡。
  3. Export Manifest 以下载清单文件。

    这会将文件 manifest_<allocation name>_<date>.zip 下载到您的默认下载文件夹。

3.5. 激活 Red Hat Ansible Automation Platform

Red Hat Ansible Automation Platform 使用可用的订阅或订阅清单来允许使用 Ansible Automation Platform。

要获取订阅,您可以执行以下操作之一:

  1. 启动 Ansible Automation Platform 时,请使用您的红帽用户名和密码、服务帐户凭证或 Satellite 凭证。
  2. 使用 Red Hat Ansible Automation Platform 界面或手动在 Ansible Playbook 中上传订阅清单文件。

3.5.1. 使用凭证激活

当 Ansible Automation Platform 首次启动时,Ansible Automation Platform 订阅向导会自动显示。如果您是机构管理员,您可以创建一个红帽服务帐户,并使用客户端 ID 和客户端 secret 直接检索您的订阅并将其导入 Ansible Automation Platform。

如果您没有管理访问权限,您可以在 Username 和 password 选项卡中输入您的红帽用户名和密码,以找到您的订阅并将其添加到 Ansible Automation Platform 实例中。

注意

默认情况下,当您在第一次登录时激活平台时,您会被选择用于 Automation Analytics。这有助于红帽通过提供更好的用户体验来改进产品。您可以执行以下步骤在激活 Ansible Automation Platform 后选择不使用:

  1. 在导航面板中,选择 SettingsAutomation ExecutionSystem
  2. 清除 Automation Analytics 选项的 Gather 数据
  3. 点击 Save

流程

  1. 登录到 Red Hat Ansible Automation Platform。
  2. 在订阅向导中选择 Service Account 选项卡。
  3. 输入您的 客户端 ID 和客户端 secret
  4. Subscription 列表中选择您的订阅。

    注意

    如果集群节点通过 Subscription Manager 注册到 Satellite,您也可以在 Satellite 选项卡中输入您的 Satellite 用户名和密码。

  5. 查看最终用户许可证协议并选择 我同意最终用户许可证协议
  6. 单击 Finish

验证

接受订阅后,会显示订阅详情。Compliant 状态表示您的订阅符合您在订阅数中自动的主机数量。否则,您的状态显示为 Out of Compliance,这表示您已超过订阅中的主机数量。显示的其他重要信息包括:

主机自动化
由作业自动进行主机计数,这将消耗许可证计数
导入的主机
考虑所有清单源的主机计数(不会影响剩余的主机)
主机剩余
主机总数减主机自动

3.5.2. 使用清单文件激活

如果您有订阅清单,您可以使用 Red Hat Ansible Automation Platform 界面上传清单文件。

注意

默认情况下,当您在第一次登录时激活平台时,您会被选择用于 Automation Analytics。这有助于红帽通过提供更好的用户体验来改进产品。您可以执行以下步骤在激活 Ansible Automation Platform 后选择不使用:

  1. 在导航面板中,选择 SettingsAutomation ExecutionSystem
  2. 清除 Automation Analytics 选项的 Gather 数据
  3. 点击 Save

先决条件

您必须有一个从红帽客户门户网站导出的红帽订阅清单文件。如需更多信息,请参阅 获取清单文件

流程

  1. 登录到 Red Hat Ansible Automation Platform。

    1. 如果您没有立即进入订阅向导,请转至 SettingsSubscription
  2. 选择 Subscription manifest 选项卡。
  3. Browse 并选择您的清单文件。
  4. 查看最终用户许可证协议并选择 我同意最终用户许可证协议
  5. 单击 Finish

    注意

    如果在订阅向导页面中禁用了 BROWSE 按钮,请清除 USERNAMEPASSWORD 字段。

验证

接受订阅后,会显示订阅详情。Compliant 状态表示您的订阅符合您在订阅数中自动的主机数量。否则,您的状态显示为 Out of Compliance,这表示您已超过订阅中的主机数量。显示的其他重要信息包括:

主机自动化
由作业自动进行主机计数,这将消耗订阅数
导入的主机
考虑所有清单源的主机计数(不会影响剩余的主机)
主机剩余
主机总数减主机自动

安装 Ansible Automation Platform Operator 后,您可以通过为其嵌套组件设置配置选项来自定义部署。您必须在父 Automation Ansible Platform 自定义资源(CR)中定义这些参数。Operator 会自动将配置与平台的每个组件分离。

您可以通过查看其自定义资源(CR)来发现 Ansible Automation Platform Operator 的配置参数。这些参数列在 YAML 模式中。

流程

  1. 登录到 Red Hat OpenShift Container Platform。
  2. 进入到 OperatorsInstalled Operators
  3. 选择 Ansible Automation Platform Operator 部署。
  4. 进入 Ansible Automation Platform 选项卡,然后点 CR 的名称。
  5. 切换到 YAML 视图 选项卡以查看和编辑配置。可用的参数列在 YAML 模式中。

    注意

    如果看不到 Schema 面板,您可能已经关闭或最小化边栏。点 查看侧边栏 重新打开它。

4.2. 发现自定义资源定义配置参数

Ansible Automation Platform Operator 管理多个自定义资源(CR),每个资源都有自己的配置参数。使用 oc explain 命令发现 AnsibleAutomationPlatform CR 及其嵌套组件的所有可用配置选项。

流程

  1. 要查看顶层 CR 的所有可用配置参数,请运行:

    oc explain ansibleautomationplatform.spec
    Copy to Clipboard Toggle word wrap
  2. 要查看特定的嵌套部分,请直接查询它们:

    oc explain automationcontroller.spec.postgres_configuration_secret
    oc explain automationcontroller.spec.route_tls_termination_mechanism
    Copy to Clipboard Toggle word wrap
  3. 要一次性浏览所有嵌套字段,请使用-- recursive 标志:

    oc explain automationcontroller.spec --recursive
    Copy to Clipboard Toggle word wrap

4.3. 在嵌套组件上定义参数

要定义一个参数,如自动化控制器的 resource_requirements,您需要将配置添加到父 Ansible Automation Platform CR YAML 中。这样可确保 Ansible Automation Platform CR 是部署的单一来源。

注意

imageimage_version,以及 {component}_image{component}_image_version 参数仅用于开发或热修复目的。

不要在生产环境中使用它们。这些设置绕过标准版本管理,可能会导致配置偏移、部署不一致和排查问题。

流程

  1. 登录 OpenShift Container Platform。
  2. 进入到 OperatorsInstalled Operators
  3. 选择 Ansible Automation Platform Operator 部署。
  4. 进入 Ansible Automation Platform 选项卡,然后点 CR 的名称。
  5. YAML view 选项卡中,找到 spec 部分。
  6. 使用嵌套的 resource_requirements 参数及其值添加 automationcontroller 参数:

    spec:
      database:
        resource_requirements:
          requests:
            cpu: 200m
            memory: 512Mi
        storage_requirements:
          requests:
            storage: 100Gi
    Copy to Clipboard Toggle word wrap
  7. Save 应用更改。Operator 会自动将此配置应用到自动化控制器组件。

4.4. 自定义资源要求

自定义 Ansible Automation Platform 组件的资源要求,以优化特定环境中的性能和资源分配。

以下部分提供了一个完整的代码块,其中包含每个组件的默认资源要求。自定义资源要求的主要原因包括:

  • 性能调优:提高执行繁重工作负载的组件的资源限值。
  • 遵守集群管理员强制执行的 ResourceQuota
  • 资源 Constrained 环境:减少资源请求以在开发或测试环境中节省集群资源。
  • 环境特定:使用 OpenShift 或 Kubernetes 集群节点的容量来连接资源分配。

您可以使用此引用作为起点。复制 Ansible Automation Platform 实例的完整代码块,并修改您要更改的组件值。此方法有助于确保正确应用所有默认设置,从而减少部署错误的风险。

注意

在添加 参数时,您只能将其添加到 Ansible Automation Platform 自定义资源(CR)中,这些参数将处理它们到嵌套 CR 的方法。

在删除 参数时,您必须从 Ansible Automation Platform CR 嵌套 CR 中删除它们,如 Automation Controller CR。

# Example of defining custom resource requirements for all components
# This can be useful for clusters with a ResourceQuote in the AAP namespaceapiVersion: aap.ansible.com/v1alpha1
kind: AnsibleAutomationPlatform
metadata:
  name: aap
spec:

  # Platform
  api:
    replicas: 1
    resource_requirements:
      requests:
        cpu: 100m
        memory: 256Mi
      limits:
        cpu: 500m
        memory: 1000Mi
  redis:
    replicas: 1
    resource_requirements:
      requests:
        cpu: 100m
        memory: 256Mi
      limits:
        cpu: 500m
        memory: 500Mi
  database:
    resource_requirements:
      requests:
        cpu: 100m
        memory: 256Mi
      limits:
        cpu: 500m
        memory: 800Mi

  # Components
  controller:
    disabled: false
    uwsgi_processes: 2
    task_resource_requirements:
      requests:
        cpu: 100m
        memory: 150Mi
      limits:
        cpu: 1000m
        memory: 1200Mi
    web_resource_requirements:
      requests:
        cpu: 100m
        memory: 200Mi
      limits:
        cpu: 200m
        memory: 1600Mi
    ee_resource_requirements:
      requests:
        cpu: 100m
        memory: 64Mi
      limits:
        cpu: 1000m
        memory: 500Mi
    redis_resource_requirements:
      requests:
        cpu: 50m
        memory: 64Mi
      limits:
        cpu: 100m
        memory: 200Mi
    rsyslog_resource_requirements:
      requests:
        cpu: 100m
        memory: 128Mi
      limits:
        cpu: 500m
        memory: 250Mi
    init_container_resource_requirements:
      requests:
        cpu: 100m
        memory: 128Mi
      limits:
        cpu: 500m
        memory: 200Mi
  eda:
    disabled: false
    api:
      replicas: 1
      resource_requirements:
        requests:
          cpu: 50m
          memory: 350Mi
        limits:
          cpu: 500m
          memory: 400Mi
    ui:
      replicas: 1
      resource_requirements:
        requests:
          cpu: 25m
          memory: 64Mi
        limits:
          cpu: 500m
          memory: 150Mi
    scheduler:
      replicas: 1
      resource_requirements:
        requests:
          cpu: 50m
          memory: 200Mi
        limits:
          cpu: 500m
          memory: 250Mi
    worker:
      replicas: 2
      resource_requirements:
        requests:
          cpu: 25m
          memory: 200Mi
        limits:
          cpu: 250m
          memory: 250Mi
    default_worker:
      replicas: 1
      resource_requirements:
        requests:
          cpu: 25m
          memory: 200Mi
        limits:
          cpu: 500m
          memory: 400Mi
    activation_worker:
      replicas: 1
      resource_requirements:
        requests:
          cpu: 25m
          memory: 150Mi
        limits:
          cpu: 500m
          memory: 400Mi
    event_stream:
      replicas: 1
      resource_requirements:
        requests:
          cpu: 25m
          memory: 150Mi
        limits:
          cpu: 100m
          memory: 300Mi
  hub:
    disabled: false
    ## uncomment if using file storage for Content pod
    storage_type: file
    file_storage_storage_class: nfs-local-rwx  # replace with the rwx storage class for your cluster
    file_storage_size: 50Gi

    ## uncomment if using S3 storage for Content pod
    # storage_type: S3
    # object_storage_s3_secret: example-galaxy-object-storage

    ## uncomment if using Azure storage for Content pod
    # storage_type: azure
    # object_storage_azure_secret: azure-secret-name

    api:
      replicas: 1
      resource_requirements:
        requests:
          cpu: 150m
          memory: 256Mi
        limits:
          cpu: 800m
          memory: 500Mi
    content:
      replicas: 1
      resource_requirements:
        requests:
          cpu: 150m
          memory: 256Mi
        limits:
          cpu: 800m
          memory: 1200Mi
    worker:
      replicas: 1
      resource_requirements:
        requests:
          cpu: 150m
          memory: 256Mi
        limits:
          cpu: 800m
          memory: 400Mi
    web:
      replicas: 1
      resource_requirements:
        requests:
          cpu: 100m
          memory: 256Mi
        limits:
          cpu: 500m
          memory: 300Mi
    redis:
      replicas: 1
      resource_requirements:
        requests:
          cpu: 100m
          memory: 250Mi
        limits:
          cpu: 300m
          memory: 400Mi


  # lightspeed:
  #   disabled: true

# End state:
# * Controller deployed and named: myaap-controller
# * EDA deployed and named: myaap-eda
# * Hub deployed and named: myaap-hub
Copy to Clipboard Toggle word wrap

安装 Ansible Automation Platform Operator 并设置 Ansible Automation Platform 组件后,您可以为所需的输出配置它们。

您可以使用以下说明在 Red Hat OpenShift Container Platform 上进一步配置平台网关 Operator,指定自定义资源,并使用外部数据库部署 Ansible Automation Platform。

使用外部数据库部署 Ansible Automation Platform 有两种场景:

Expand

场景

所需的操作

全新安装

您必须为以下平台指定一个外部数据库实例:

  • 平台网关
  • 自动化控制器
  • Automation hub
  • Event-Driven Ansible
  • Red Hat Ansible Lightspeed (如果已启用)

请参阅 14.1 中的 aap-configuring-external-db-all-default-components.yml 示例。自定义资源 部分,用于帮助实现此目的。

如果使用 Red Hat Ansible Lightspeed,请使用 aap-configuring-external-db-with-lightspeed-enabled.yml 示例。

2.4 中现有的外部数据库

升级后,您的现有外部数据库保持不变,但您必须在 Ansible Automation Platform 自定义资源中指定 external-postgres-configuration-gateway (spec.database.database_secret)。

要使用外部数据库部署 Ansible Automation Platform,您必须首先创建一个 Kubernetes secret,其中包含用于连接数据库的凭证的 Kubernetes secret。

默认情况下,Ansible Automation Platform Operator 会在与 Ansible Automation Platform 部署相同的命名空间中创建并配置受管 PostgreSQL pod。您可以使用外部数据库部署 Ansible Automation Platform,而不是 Ansible Automation Platform Operator 自动创建的受管 PostgreSQL pod。

使用外部数据库可让您共享和重复使用资源,并手动管理备份、升级和性能优化。

注意

只要数据库名称不同,同一外部数据库(PostgreSQL 实例)可用于自动化中心、自动化控制器和平台网关。换句话说,您可以在一个 PostgreSQL 实例中,带有使用不同名称的多个数据库。

以下部分概述了在 Ansible Automation Platform Operator 上为您的平台网关配置外部数据库的步骤。

前提条件

外部数据库必须是 PostgreSQL 数据库,这是 Ansible Automation Platform 当前发行版本支持的版本。外部 postgres 实例凭证和连接信息必须存储在 secret 中,然后在平台网关 spec 中设置。

注意

Ansible Automation Platform 2.5 支持 PostgreSQL 15。

流程

  1. 按照以下模板创建一个 postgres_configuration_secret YAML 文件:

    apiVersion: v1
    kind: Secret
    metadata:
      name: external-postgres-configuration
      namespace: <target_namespace> 
    1
    
    stringData:
      host: "<external_ip_or_url_resolvable_by_the_cluster>" 
    2
    
      port: "<external_port>" 
    3
    
      database: "<desired_database_name>"
      username: "<username_to_connect_as>"
      password: "<password_to_connect_with>" 
    4
    
      type: "unmanaged"
    type: Opaque
    Copy to Clipboard Toggle word wrap
    1. 要创建 secret 的命名空间。这应该是您要部署到的同一命名空间。
    2. 数据库节点的可解析的主机名。
    3. 外部端口默认为 5432
    4. 变量 password 的值不应包含单引号或双引号('、')或反斜杠(\),以避免在部署、备份或恢复过程中出现任何问题。
  2. 使用 oc create 命令将 external-postgres-configuration-secret.yml 应用到您的集群。

    $ oc create -f external-postgres-configuration-secret.yml
    Copy to Clipboard Toggle word wrap
    注意

    以下示例是平台网关部署。要为所有组件配置外部数据库,在 14.1 中使用 aap-configuring-external-db-all-default-components.yml 示例。自定义资源 部分。

  3. 在创建 AnsibleAutomationPlatform 自定义资源对象时,在 spec 中指定 secret,如下例所示:

    apiVersion: aap.ansible.com/v1alpha1
    kind: AnsibleAutomationPlatform
    metadata:
      name: example-aap
      Namespace: aap
    spec:
      database:
         database_secret: automation-platform-postgres-configuration
    Copy to Clipboard Toggle word wrap

在升级 Ansible Automation Platform Operator 时,您可能会遇到类似如下的错误:

NotImplementedError: can't parse timestamptz with DateStyle 'Redwood, SHOW_TIME': '18-MAY-23 20:33:55.765755 +00:00'
Copy to Clipboard Toggle word wrap

当您有一个带有意外 DateStyle 设置的外部数据库时,会发生这种情况。您可以参考以下步骤来解决这个问题。

流程

  1. 编辑数据库服务器上的 /var/lib/pgsql/data/postgres.conf 文件:

    # vi /var/lib/pgsql/data/postgres.conf
    Copy to Clipboard Toggle word wrap
  2. 查找并注释掉该行:

    #datestyle = 'Redwood, SHOW_TIME'
    Copy to Clipboard Toggle word wrap
  3. 在新注释行下立即添加以下设置:

    datestyle = 'iso, mdy'
    Copy to Clipboard Toggle word wrap
  4. 保存并关闭 postgres.conf 文件。
  5. 重新载入数据库配置:

    # systemctl reload postgresql
    Copy to Clipboard Toggle word wrap
    注意

    运行此命令不会影响数据库操作。

SAML 的 HTTPS 重定向允许您登录一次并访问所有平台网关,而无需重新验证。

先决条件

流程

  1. 登录到 Red Hat OpenShift Container Platform。
  2. 进入 OperatorsInstalled Operators
  3. 选择 Ansible Automation Platform Operator 部署。
  4. 选择 All Instances,再进入您的 AnsibleAutomationPlatform 实例。
  5. 点 ProductShortName 图标,然后选择 Edit AnsibleAutomationPlatform
  6. YAML 视图中,将以下 YAML 代码粘贴到 spec: 部分:

    spec:
      extra_settings:
        - setting: REDIRECT_IS_HTTPS
          value: '"True"'
    Copy to Clipboard Toggle word wrap
  7. 点击 Save

验证

添加 REDIRECT_IS_HTTPS 设置后,等待 pod 自动重新部署。您可以运行以下命令来验证此设置使其进入 pod:

oc exec -it <gateway-pod-name> -- grep REDIRECT /etc/ansible-automation-platform/gateway/settings.py
Copy to Clipboard Toggle word wrap

5.1.4. 为平台网关 Operator ingress 配置 CSRF 设置

Red Hat Ansible Automation Platform Operator 创建 Openshift 路由,并自动配置您的跨站点请求伪造(CSRF)设置。使用外部入口时,您必须在入口上配置 CSRF 以允许跨站点请求。您可以在 高级配置 下配置平台网关 operator ingress。

流程

  1. 登录到 Red Hat OpenShift Container Platform。
  2. 进入到 OperatorsInstalled Operators
  3. 选择 Ansible Automation Platform Operator 部署。
  4. 选择 Ansible Automation Platform 选项卡。
  5. 对于新实例,请单击 Create AnsibleAutomationPlatform

    1. 对于现有实例,您可以通过点 WWN 图标 来编辑 YAML 视图,然后编辑 AnsibleAutomationPlatform
  6. Advanced Configuration
  7. Ingres annotations 下,输入要添加到 ingress 的任何注解。
  8. Ingress TLS secret 下,点下拉列表并从列表中选择一个 secret。
  9. 在以下代码中粘贴 YAML 视图

    spec:
      extra_settings:
        - setting: CSRF_TRUSTED_ORIGINS
          value:
            - https://my-aap-domain.com
    Copy to Clipboard Toggle word wrap
  10. 配置平台网关后,点表单视图底部的 Create (如果编辑现有实例,则为 Save )。

验证

Red Hat OpenShift Container Platform 创建 pod。这可能需要几分钟时间。您可以通过进入到 WorkloadsPods 并查找新创建的实例来查看进度。验证 Red Hat Ansible Automation Platform Operator 安装提供的以下 Operator pod 是否正在运行:

Expand
Operator Manager 控制器 pod自动化控制器 podAutomation hub podevent-Driven Ansible (EDA) pod平台网关 pod

每个四个 operator 的 operator 管理器控制器,包括:

  • automation-controller-operator-controller-manager
  • automation-hub-operator-controller-manager
  • resource-operator-controller-manager
  • aap-gateway-operator-controller-manager
  • ansible-lightspeed-operator-controller-manager
  • eda-server-operator-controller-manager

部署自动化控制器后,您可以看到添加以下 pod:

  • 自动化控制器 web
  • 自动化控制器任务
  • Mesh ingress
  • 自动化控制器 postgres

部署自动化中心后,您可以看到添加以下 pod:

  • Automation hub web
  • Automation hub 任务
  • Automation hub API
  • Automation hub worker

部署 EDA 后,您可以看到添加以下 pod:

  • EDA API
  • EDA 激活
  • EDA worker
  • EDA 流
  • EDA 调度程序

部署平台网关后,您可以看到添加以下 pod:

  • 平台网关
  • 平台网关 redis
注意

缺少 pod 可以代表需要 pull secret。受保护的或私有镜像 registry 需要 pull secret。如需更多信息,请参阅使用镜像 pull secret。您可以通过运行 oc describe pod <pod-name> 来查看 该 pod 上是否有 ImagePullBackOff 错误来进一步诊断此问题。

5.1.5. 平台网关的常见问题

管理 Ansible Automation Platform 部署,并对常见问题进行故障排除。了解组件的资源管理、日志记录和错误恢复。

如果我删除 Ansible Automation Platform 部署,我仍然有权访问自动化控制器?
自动化控制器、自动化中心和 Event-Driven Ansible 嵌套在部署中,也会被删除。
在 Ansible Automation Platform 自定义资源(CR)层次结构中添加或删除参数时,如何管理参数?
在添加 参数时,您只能将其添加到 Ansible Automation Platform 自定义资源(CR)中,这些参数将处理它们到嵌套 CR 的方法。

在删除 参数时,您必须从 Ansible Automation Platform CR 嵌套 CR 中删除它们,如 Automation Controller CR。

部署出错,但不知道如何找出什么?
在 Operator 协调时,可以在命令行中跟进,这对调试非常有用。或者,您也可以单击部署实例,以查看部署要更新的状态条件。
仍然有可能查看各个组件日志?
在进行故障排除时,您应该检查主日志的 Ansible Automation Platform 实例,然后检查每个单独组件(EDAAutomationHubAutomationController)以获取更具体的信息。
我在哪里可以查看实例的条件?
要显示状态条件,请单击实例,并在 DetailsEvents 选项卡中查看。另外,要显示您可以运行 get 命令的状态条件: oc get automationcontroller <instance-name> -o jsonpath=Pipe "| jq"
我是否可以实时跟踪我的迁移?
为了帮助跟踪迁移的状态,或了解迁移失败的原因,您可以在迁移运行时查看迁移日志。使用 logs 命令: oc logs fresh-install-controller-migration-4.6.0-jwfm6 -f
我已配置了 SAML,但身份验证失败并显示此错误:"Unable to complete social auth login"我可以做什么?
您必须更新 Ansible Automation Platform 实例,使其包含 REDIRECT_IS_HTTPS 额外设置。如需了解更多信息,请参阅在 OpenShift Container Platform 上为平台网关启用单点登录(SSO)

您可以使用以下说明在 Red Hat OpenShift Container Platform 上配置自动化控制器 Operator,指定自定义资源,并使用外部数据库部署 Ansible Automation Platform。

自动化控制器配置可以通过自动化控制器 extra_settings 或部署后直接在用户界面中进行。但请注意,在 extra_settings 中进行的配置优先于用户界面中进行的设置。

注意

删除自动化控制器实例时,关联的 PVC 不会被自动删除。如果新部署的名称与前一名称相同,这可能会导致迁移期间出现问题。因此,建议您在在同一命名空间中部署新自动化控制器实例前手动删除旧的 PVC。如需更多信息,请参阅 查找和删除 PVC

5.2.1. 先决条件

  • 您已在 Operator Hub 中安装了 Red Hat Ansible Automation Platform 目录。
  • 对于自动化控制器,必须在集群上配置默认 StorageClass,以便 Operator 动态创建所需的 PVC。如果配置了外部 PostgreSQL 数据库,则不需要此项。
  • 对于 Hub,支持 ReadWriteMany 的 StorageClass 必须在集群中可用,才能动态创建内容、redis 和 api pod 所需的 PVC。如果不是集群中的默认 StorageClass,您可以在创建 AutomationHub 对象时指定它。
5.2.1.1. 配置控制器镜像拉取策略

使用这个流程在自动化控制器上配置镜像拉取策略。

流程

  1. 登录到 Red Hat OpenShift Container Platform。
  2. 进入 OperatorsInstalled Operators
  3. 选择 Ansible Automation Platform Operator 部署。
  4. 选择 Automation Controller 选项卡。
  5. 对于新实例,点 Create AutomationController

    1. 对于现有实例,您可以通过点 WWN 图标,然后编辑 AutomationController 来编辑 YAML 视图。
  6. 单击 advanced Configuration。在 Image Pull Policy 下,点单选按钮选择

    • Always
    • Never
    • IfNotPresent
  7. 要显示 Image Pull Secrets 下的选项,点箭头。

    1. Add Image Pull Secret 旁边的 + 输入值。
  8. 要在 Web 容器资源要求下拉列表中显示字段,点箭头。

    1. Limits、和 Requests 下,输入 CPU cores, Memory, 和 Storage
  9. 要在 Task container resource requirements 下拉列表中显示字段,点箭头。

    1. Limits、和 Requests 下,输入 CPU cores, Memory, 和 Storage
  10. 要显示 EE Control Plane 容器资源要求 下拉列表下的字段,点箭头。

    1. Limits、和 Requests 下,输入 CPU cores, Memory, 和 Storage
  11. 要在 PostgreSQL init 容器资源要求下显示字段(使用受管服务) 下拉列表,点箭头。

    1. Limits、和 Requests 下,输入 CPU cores, Memory, 和 Storage
  12. 要显示 Redis 容器资源要求下拉列表下的字段,点箭头。

    1. Limits、和 Requests 下,输入 CPU cores, Memory, 和 Storage
  13. 要显示 PostgreSQL 容器资源要求下的字段(使用受管实例)* 下拉列表,点箭头。

    1. Limits、和 Requests 下,输入 CPU cores, Memory, 和 Storage
  14. 要显示 PostgreSQL 容器存储要求(使用受管实例时) 下拉列表,点箭头。

    1. Limits、和 Requests 下,输入 CPU cores, Memory, 和 Storage
  15. 在 Replicas 下,输入实例副本数量。
  16. Remove used secrets on instance removal 下,选择 truefalse。默认值为 false。
  17. Preload instance with data upon creation 下,选择 truefalse。默认值为 true。
5.2.1.2. 配置控制器 LDAP 安全性

您可以通过以下选项之一为自动化控制器配置 LDAP SSL 配置:

  • 自动化控制器用户界面。
  • 平台网关用户界面。如需了解更多步骤,请参阅 访问管理和身份验证指南中的 配置 LDAP 身份验证 部分。
  • 以下流程步骤。

流程

  1. 在 Ansible Automation Platform 命名空间中创建 secret,为 bundle-ca.crt 文件(文件名必须是 bundle-ca.crt):

    $ oc create secret -n aap generic bundle-ca-secret --from-file=bundle-ca.crt
    Copy to Clipboard Toggle word wrap
    注意

    此操作的目标文件名必须是 bundle-ca.crt,secret 名称应为 bundle-ca-secret

  2. bundle_cacert_secret 添加到 Ansible Automation Platform 客户资源中:

    ...
    spec:
      bundle_cacert_secret: bundle-ca-secret
    ...
    Copy to Clipboard Toggle word wrap

    验证

    您可以运行以下命令来验证预期的证书:

    oc get deployments -l 'app.kubernetes.io/component=aap-gateway'
    Copy to Clipboard Toggle word wrap
    oc exec -it deployment.apps/<gateway-deployment-name-from-above> -- openssl x509 -in /etc/pki/tls/certs/ca-bundle.crt -noout -text
    Copy to Clipboard Toggle word wrap
5.2.1.3. 配置自动化控制器 Operator 路由选项

Red Hat Ansible Automation Platform Operator 安装表单允许您在高级配置下进一步配置自动化控制器 operator 路由选项。

流程

  1. 登录到 Red Hat OpenShift Container Platform。
  2. 进入到 OperatorsInstalled Operators
  3. 选择 Ansible Automation Platform Operator 部署。
  4. 选择 Automation Controller 选项卡。
  5. 对于新实例,点 Create AutomationController

    1. 对于现有实例,您可以通过点 WWN 图标,然后编辑 AutomationController 来编辑 YAML 视图。
  6. Advanced configuration
  7. Ingress type 下,点下拉菜单并选择 Route
  8. Route DNS host 下,输入路由要回答的通用主机名。
  9. Route TLS termination mechanism 下,点下拉菜单并选择 EdgePassthrough。对于大多数实例,应该选择 Edge
  10. Route TLS credential secret 下,点下拉菜单并从列表中选择一个 secret。
  11. Enable persistence for /var/lib/projects directory,选择 true 或 false(移动滑动条)。

    注意

    配置路由后,您可以通过将 route_host: 添加到该自动化控制器实例的 YAML 中来自定义主机名。

5.2.1.4. 为自动化控制器 Operator 配置入口类型

Ansible Automation Platform Operator 安装表单允许您在 高级配置下进一步配置自动化控制器 operator ingress。

流程

  1. 登录到 Red Hat OpenShift Container Platform。
  2. 进入到 OperatorsInstalled Operators
  3. 选择 Ansible Automation Platform Operator 部署。
  4. 选择 Automation Controller 选项卡。
  5. 对于新实例,点 Create AutomationController

    1. 对于现有实例,您可以通过点 WWN 图标,然后编辑 AutomationController 来编辑 YAML 视图。
  6. Advanced configuration
  7. Ingress type 下,点下拉菜单并选择 Ingress
  8. Ingress annotations 下,输入要添加到 ingress 的任何注解。
  9. Ingress TLS secret 下,点下拉菜单并从列表中选择一个 secret。

验证

配置自动化控制器 Operator 后,点表单视图底部的 Create。Red Hat OpenShift Container Platform 创建 pod。这可能需要几分钟时间。

您可以通过进入到 WorkloadsPods 并查找新创建的实例来查看进度。

验证来自自动化控制器的 Ansible Automation Platform Operator 安装提供的以下 Operator pod 是否正在运行:

Expand
Operator Manager 控制器自动化控制器Automation hubEvent-Driven Ansible (EDA)

三个 Operator 的 operator 管理器控制器,包括:

  • automation-controller-operator-controller-manager
  • automation-hub-operator-controller-manager
  • resource-operator-controller-manager
  • aap-gateway-operator-controller-manager
  • ansible-lightspeed-operator-controller-manager
  • eda-server-operator-controller-manager

部署自动化控制器后,您可以看到添加以下 pod:

  • controller
  • controller-postgres
  • controller-web
  • controller-task

部署自动化中心后,您可以看到添加以下 pod:

  • hub-api
  • hub-content
  • hub-postgres
  • hub-redis
  • hub-worker

部署 EDA 后,您可以看到添加以下 pod:

  • eda-activation-worker
  • da-api
  • eda-default-worker
  • eda-event-stream
  • ed-scheduler
注意

缺少 pod 可以代表需要 pull secret。受保护的或私有镜像 registry 需要 pull secret。如需更多信息,请参阅使用镜像 pull secret。您可以通过运行 oc describe pod <pod-name> 来查看 该 pod 上是否有 ImagePullBackOff 错误来进一步诊断此问题。

对于希望使用外部数据库部署 Ansible Automation Platform 的用户,可以通过使用实例凭证和连接信息配置 secret,然后使用 oc create 命令将其应用到其集群中。

默认情况下,Ansible Automation Platform Operator 会在与 Ansible Automation Platform 部署相同的命名空间中创建并配置受管 PostgreSQL pod。您可以使用外部数据库部署 Ansible Automation Platform,而不是 Ansible Automation Platform Operator 自动创建的受管 PostgreSQL pod。

使用外部数据库可让您共享和重复使用资源,并手动管理备份、升级和性能优化。

注意

只要数据库名称不同,同一外部数据库(PostgreSQL 实例)可用于自动化中心、自动化控制器和平台网关。换句话说,您可以在一个 PostgreSQL 实例中,带有使用不同名称的多个数据库。

以下部分概述了在 Ansible Automation Platform Operator 上为您的自动化控制器配置外部数据库的步骤。

前提条件

外部数据库必须是 PostgreSQL 数据库,这是 Ansible Automation Platform 当前发行版本支持的版本。外部 postgres 实例凭证和连接信息必须存储在 secret 中,然后在自动化控制器 spec 中设置。

注意

Ansible Automation Platform 2.5 支持 PostgreSQL 15。

流程

  1. 按照以下模板创建一个 postgres_configuration_secret YAML 文件:

    apiVersion: v1
    kind: Secret
    metadata:
      name: external-postgres-configuration
      namespace: <target_namespace> 
    1
    
    stringData:
      host: "<external_ip_or_url_resolvable_by_the_cluster>" 
    2
    
      port: "<external_port>" 
    3
    
      database: "<desired_database_name>"
      username: "<username_to_connect_as>"
      password: "<password_to_connect_with>" 
    4
    
      sslmode: "prefer" 
    5
    
      type: "unmanaged"
    type: Opaque
    Copy to Clipboard Toggle word wrap
    1. 要创建 secret 的命名空间。这应该是您要部署到的同一命名空间。
    2. 数据库节点的可解析的主机名。
    3. 外部端口默认为 5432
    4. 变量 password 的值不应包含单引号或双引号('、')或反斜杠(\),以避免在部署、备份或恢复过程中出现任何问题。
    5. 变量 sslmode 仅适用于外部数据库。允许的值是:prefer, disable, allow, require, verify-ca, 和 verify-full
  2. 使用 oc create 命令将 external-postgres-configuration-secret.yml 应用到您的集群。

    $ oc create -f external-postgres-configuration-secret.yml
    Copy to Clipboard Toggle word wrap
  3. 在创建 AutomationController 自定义资源对象时,在 spec 中指定 secret,参见以下示例:

    apiVersion: automationcontroller.ansible.com/v1beta1
    kind: AutomationController
    metadata:
      name: controller-dev
    spec:
      postgres_configuration_secret: external-postgres-configuration
    Copy to Clipboard Toggle word wrap

5.2.3. 查找和删除 PVC

持久性卷声明 (PVC) 是一个存储卷,用于存储自动化 hub 和自动化控制器应用程序使用的数据。这些 PVC 独立于应用程序,即使应用程序被删除也是如此。如果您确信不再需要 PVC,或者已在其他位置备份它,您可以手动删除它们。

流程

  1. 列出部署命名空间中的现有 PVC:

    oc get pvc -n <namespace>
    Copy to Clipboard Toggle word wrap
  2. 通过比较旧部署名称和 PVC 名称来识别与之前部署关联的 PVC。
  3. 删除旧的 PVC:

    oc delete pvc -n <namespace> <pvc-name>
    Copy to Clipboard Toggle word wrap

您可以使用以下说明在 Red Hat OpenShift Container Platform 上配置自动化中心 Operator,指定自定义资源,并使用外部数据库部署 Ansible Automation Platform。

自动化中心配置可以通过自动化中心 pulp_settings 或部署后直接在用户界面中进行。但请注意,在 pulp_settings 中进行的配置优先于用户界面中进行的设置。Hub 自定义资源规格应始终将 hub 设置设置为小写。

注意

当删除自动化 hub 实例时,PVC 不会被自动删除。如果新部署的名称与前一名称相同,这可能会导致迁移期间出现问题。因此,建议您在在同一命名空间中部署新自动化 hub 实例前手动删除旧的 PVC。如需更多信息,请参阅 查找和删除 PVC

5.3.1. 先决条件

  • 您已在 Operator Hub 中安装了 Ansible Automation Platform Operator。

自动化中心需要 ReadWriteMany 文件存储、Azure Blob 存储或 Amazon S3 存储进行操作,以便多个 pod 可以访问共享内容,如集合。

AutomationHub CR 上配置对象存储的过程与 Amazon S3 和 Azure Blob Storage 类似。

如果您使用基于文件的存储,且安装场景包含自动化中心,请确保 Ansible Automation Platform Operator 的 storage 选项被设置为 ReadWriteManyReadWriteMany 是默认的存储选项。

另外,OpenShift Data Foundation 提供了一个 ReadWriteMany 或 S3 实现。另外,您可以设置 NFS 存储配置来支持 ReadWriteMany。但是,这会将 NFS 服务器作为潜在的单点故障引入。

要确保成功安装 Ansible Automation Platform Operator,您必须为自动化 hub 置备存储类型,最初为 ReadWriteMany 访问模式。

流程

  1. 进入 StoragePersistentVolume
  2. Create PersistentVolume
  3. 在第一步中,将 accessModes 从默认的 ReadWriteOnce 更新为 ReadWriteMany

    1. 如需了解详细的概述,请参阅 Provisioning 以更新访问模式。
  4. 完成本节中的额外步骤,以创建持久性卷声明 (PVC)。
5.3.1.1.2. 在 Amazon S3 中配置对象存储

红帽支持用于自动化中心的 Amazon Simple Storage Service (S3)。您可以在部署 AutomationHub 自定义资源 (CR) 时配置它,也可以为现有实例配置它。

先决条件

  • 创建 Amazon S3 存储桶以存储对象。
  • 请注意 S3 存储桶的名称。

流程

  1. 创建包含 AWS 凭证和连接详情的 Kubernetes secret,以及 Amazon S3 存储桶的名称。以下示例创建一个名为 test-s3 的 secret:

    $ oc -n $HUB_NAMESPACE apply -f- <<EOF
    apiVersion: v1
    kind: Secret
    metadata:
      name: 'test-s3'
    stringData:
      s3-access-key-id: $S3_ACCESS_KEY_ID
      s3-secret-access-key: $S3_SECRET_ACCESS_KEY
      s3-bucket-name: $S3_BUCKET_NAME
      s3-region: $S3_REGION
    EOF
    Copy to Clipboard Toggle word wrap
  2. 将 secret 添加到自动化中心自定义资源 (CR) spec 中:

    spec:
      object_storage_s3_secret: test-s3
    Copy to Clipboard Toggle word wrap
  3. 如果要将此 secret 应用到现有实例,请重启 API pod 以使更改生效。<hub-name> 是 hub 实例的名称。

    $ oc -n $HUB_NAMESPACE delete pod -l app.kubernetes.io/name=<hub-name>-api
    Copy to Clipboard Toggle word wrap
5.3.1.1.3. 在 Azure Blob 中配置对象存储

红帽支持用于自动化中心的 Azure Blob Storage。您可以在部署 AutomationHub 自定义资源 (CR) 时配置它,也可以为现有实例配置它。

先决条件

  • 创建 Azure Storage blob 容器来存储对象。
  • 请注意 blob 容器的名称。

流程

  1. 创建一个包含 Azure 帐户凭证和连接详情的 Kubernetes secret,以及 Azure Storage blob 容器的名称。以下示例创建一个名为 test-azure 的 secret:

    $ oc -n $HUB_NAMESPACE apply -f- <<EOF
    apiVersion: v1
    kind: Secret
    metadata:
      name: 'test-azure'
    stringData:
      azure-account-name: $AZURE_ACCOUNT_NAME
      azure-account-key: $AZURE_ACCOUNT_KEY
      azure-container: $AZURE_CONTAINER
      azure-container-path: $AZURE_CONTAINER_PATH
      azure-connection-string: $AZURE_CONNECTION_STRING
    EOF
    Copy to Clipboard Toggle word wrap
  2. 将 secret 添加到自动化中心自定义资源 (CR) spec 中:

    spec:
      object_storage_azure_secret: test-azure
    Copy to Clipboard Toggle word wrap
  3. 如果要将此 secret 应用到现有实例,请重启 API pod 以使更改生效。<hub-name> 是 hub 实例的名称。

    $ oc -n $HUB_NAMESPACE delete pod -l app.kubernetes.io/name=<hub-name>-api
    Copy to Clipboard Toggle word wrap
5.3.1.2. 配置自动化 hub Operator 路由选项

Red Hat Ansible Automation Platform Operator 安装表单允许您在 高级配置下进一步配置 Automation hub operator 路由选项。

流程

  1. 登录到 Red Hat OpenShift Container Platform。
  2. 进入到 OperatorsInstalled Operators
  3. 选择 Ansible Automation Platform Operator 部署。
  4. 选择 Automation Hub 选项卡。
  5. 对于新实例,点 Create AutomationHub

    1. 对于现有实例,您可以通过点 WWN 图标,然后编辑 AutomationHub 来编辑 YAML 视图。
  6. Advanced configuration
  7. Ingress type 下,点下拉菜单并选择 Route
  8. Route DNS host 下,输入路由要回答的通用主机名。
  9. Route TLS termination mechanism 下,点下拉菜单并选择 EdgePassthrough
  10. Route TLS credential secret 下,点下拉菜单并从列表中选择一个 secret。

    注意

    配置路由后,您可以通过将 route_host: 添加到该自动化中心实例的 YAML 中来自定义主机名。

5.3.1.3. 为自动化 hub Operator 配置 ingress 类型

Ansible Automation Platform Operator 安装表单允许您在 高级配置下进一步配置 Automation hub operator ingress。

流程

  1. 登录到 Red Hat OpenShift Container Platform。
  2. 进入到 OperatorsInstalled Operators
  3. 选择 Ansible Automation Platform Operator 部署。
  4. 选择 Automation Hub 选项卡。
  5. 对于新实例,点 Create AutomationHub

    1. 对于现有实例,您可以通过点 WWN 图标,然后编辑 AutomationHub 来编辑 YAML 视图。
  6. Advanced Configuration
  7. Ingress type 下,点下拉菜单并选择 Ingress
  8. Ingress annotations 下,输入要添加到 ingress 的任何注解。
  9. Ingress TLS secret 下,点下拉菜单并从列表中选择一个 secret。

验证

配置 Automation hub Operator 后,点表单视图底部的 Create。Red Hat OpenShift Container Platform 创建 pod。这可能需要几分钟时间。

您可以通过进入到 WorkloadsPods 并查找新创建的实例来查看进度。

验证来自自动化中心的 Ansible Automation Platform Operator 安装提供的以下 Operator pod 是否正在运行:

Expand
Operator Manager 控制器自动化控制器Automation hub

每 3 个 operator 的 operator 管理器控制器,包括:

  • automation-controller-operator-controller-manager
  • automation-hub-operator-controller-manager
  • resource-operator-controller-manager

部署自动化控制器后,您将看到添加的 pod:

  • controller
  • controller-postgres

部署自动化中心后,您将看到添加的 pod:

  • hub-api
  • hub-content
  • hub-postgres
  • hub-redis
  • hub-worker
注意

缺少 pod 可以代表需要 pull secret。受保护的或私有镜像 registry 需要 pull secret。如需更多信息,请参阅使用镜像 pull secret。您可以通过运行 oc describe pod <pod-name> 来查看 该 pod 上是否有 ImagePullBackOff 错误来进一步诊断此问题。

5.3.2. 查找自动化中心路由

您可以通过平台网关或以下流程访问自动化中心。

流程

  1. 登录到 Red Hat OpenShift Container Platform。
  2. 进入到 NetworkingRoutes
  3. Location 下,点您的自动化 hub 实例的 URL。

验证

Automation hub 用户界面会启动,您可以在其中使用 Operator 配置流程中指定的管理员凭证进行登录。

注意

如果您没有在配置期间指定管理员密码,则会为您自动创建密码。要找到此密码,访问您的项目,选择 WorkloadsSecrets,打开 controller-admin-password。您可以从那里复制密码并将其粘贴到 Automation hub 密码字段中。

对于希望使用外部数据库部署 Ansible Automation Platform 的用户,可以通过使用实例凭证和连接信息配置 secret,然后使用 oc create 命令将其应用到其集群中。

默认情况下,Ansible Automation Platform Operator 会在与 Ansible Automation Platform 部署相同的命名空间中创建并配置受管 PostgreSQL pod。

如果用户更喜欢使用专用节点来确保专用资源或手动管理备份、升级或性能调整,则用户可能会选择使用外部数据库。

注意

只要数据库名称不同,同一外部数据库(PostgreSQL 实例)可用于自动化中心、自动化控制器和平台网关。换句话说,您可以在一个 PostgreSQL 实例中,带有使用不同名称的多个数据库。

以下部分概述了在 Ansible Automation Platform Operator 上为您的自动化中心配置外部数据库的步骤。

前提条件

外部数据库必须是 PostgreSQL 数据库,这是 Ansible Automation Platform 当前发行版本支持的版本。外部 postgres 实例凭证和连接信息需要存储在 secret 中,然后在自动化中心 spec 中设置。

注意

Ansible Automation Platform 2.5 支持 PostgreSQL 15。

流程

  1. 按照以下模板创建一个 postgres_configuration_secret YAML 文件:

    apiVersion: v1
    kind: Secret
    metadata:
      name: external-postgres-configuration
      namespace: <target_namespace> 
    1
    
    stringData:
      host: "<external_ip_or_url_resolvable_by_the_cluster>" 
    2
    
      port: "<external_port>" 
    3
    
      database: "<desired_database_name>"
      username: "<username_to_connect_as>"
      password: "<password_to_connect_with>" 
    4
    
      sslmode: "prefer" 
    5
    
      type: "unmanaged"
    type: Opaque
    Copy to Clipboard Toggle word wrap
    1. 要创建 secret 的命名空间。这应该是您要部署到的同一命名空间。
    2. 数据库节点的可解析的主机名。
    3. 外部端口默认为 5432
    4. 变量 password 的值不应包含单引号或双引号('、')或反斜杠(\),以避免在部署、备份或恢复过程中出现任何问题。
    5. 变量 sslmode 仅适用于外部数据库。允许的值是:prefer, disable, allow, require, verify-ca, 和 verify-full
  2. 使用 oc create 命令将 external-postgres-configuration-secret.yml 应用到您的集群。

    $ oc create -f external-postgres-configuration-secret.yml
    Copy to Clipboard Toggle word wrap
  3. 在创建 AutomationHub 自定义资源对象时,在 spec 中指定 secret,如下例所示:

    apiVersion: automationhub.ansible.com/v1beta1
    kind: AutomationHub
    metadata:
      name: hub-dev
    spec:
      postgres_configuration_secret: external-postgres-configuration
    Copy to Clipboard Toggle word wrap

数据库迁移脚本使用 hstore 字段来存储信息,因此在自动化中心 PostgreSQL 数据库中必须启用 hstore 扩展。

使用 Ansible Automation Platform 安装程序和受管 PostgreSQL 服务器时,此过程是自动的。

如果 PostgreSQL 数据库是外部的,则必须在安装前在自动化中心 PostgreSQL 数据库中手动启用 hstore 扩展。

如果在安装过程中没有启用 hstore 扩展,在数据库迁移过程中会出现一个失败。

流程

  1. 检查 PostgreSQL 服务器上是否有扩展(自动化 hub 数据库)。

    $ psql -d <automation hub database> -c "SELECT * FROM pg_available_extensions WHERE name='hstore'"
    Copy to Clipboard Toggle word wrap
  2. 其中 <automation hub database> 的默认值为 automationhub

    带有 hstore 可用的输出示例

    name  | default_version | installed_version |comment
    ------+-----------------+-------------------+---------------------------------------------------
     hstore | 1.7           |                   | data type for storing sets of (key, value) pairs
    (1 row)
    Copy to Clipboard Toggle word wrap

    带有 hstore 不可用的输出示例

     name | default_version | installed_version | comment
    ------+-----------------+-------------------+---------
    (0 rows)
    Copy to Clipboard Toggle word wrap
  3. 在基于 RHEL 的服务器上,hstore 扩展包含在 postgresql-contrib RPM 软件包中,该软件包在安装 PostgreSQL 服务器 RPM 软件包时不会自动安装。

    要安装 RPM 软件包,请使用以下命令:

    dnf install postgresql-contrib
    Copy to Clipboard Toggle word wrap
  4. 使用以下命令将 hstore PostgreSQL 扩展加载到自动化中心数据库中:

    $ psql -d <automation hub database> -c "CREATE EXTENSION hstore;"
    Copy to Clipboard Toggle word wrap

    在以下输出中,installed_version 字段列出了使用的 hstore 扩展,表示启用了 hstore

    name | default_version | installed_version | comment
    -----+-----------------+-------------------+------------------------------------------------------
    hstore  |     1.7      |       1.7         | data type for storing sets of (key, value) pairs
    (1 row)
    Copy to Clipboard Toggle word wrap

5.3.4. 查找和删除 PVC

持久性卷声明 (PVC) 是一个存储卷,用于存储自动化 hub 和自动化控制器应用程序使用的数据。这些 PVC 独立于应用程序,即使应用程序被删除也是如此。如果您确信不再需要 PVC,或者已在其他位置备份它,您可以手动删除它们。

流程

  1. 列出部署命名空间中的现有 PVC:

    oc get pvc -n <namespace>
    Copy to Clipboard Toggle word wrap
  2. 通过比较旧部署名称和 PVC 名称来识别与之前部署关联的 PVC。
  3. 删除旧的 PVC:

    oc delete pvc -n <namespace> <pvc-name>
    Copy to Clipboard Toggle word wrap

5.3.5. 其他配置

集合下载计数可帮助您了解集合使用情况。要在自动化中心中添加集合下载计数,请设置以下配置:

spec:
  pulp_settings:
    ansible_collect_download_count: true
Copy to Clipboard Toggle word wrap

启用 ansible_collect_download_count 时,自动化中心将显示集合的下载计数。

在自动化 hub 中部署容器镜像前,您必须将 registry 添加到自动化控制器镜像配置中的 allowedRegistries 中。要做到这一点,您可以将以下代码复制并粘贴到自动化控制器镜像 YAML 中。

流程

  1. 登录到 Red Hat OpenShift Container Platform
  2. 导航到 HomeSearch
  3. 选择 Resources 下拉列表,并键入 "Image"。
  4. 选择 Image (config,openshift.io/v1)
  5. Name 标题下点 Cluster
  6. 选择 YAML 选项卡。
  7. 粘贴 spec 值下的以下内容:

    spec:
      registrySources:
        allowedRegistries:
        - quay.io
        - registry.redhat.io
        - image-registry.openshift-image-registry.svc:5000
        - <OCP route for your automation hub>
    Copy to Clipboard Toggle word wrap
  8. 点击 Save

作为机构的自动化管理员,您可以配置 Ansible Automation Platform Hub Operator,以根据机构中的不同组签名和发布 Ansible 内容集合。

为提高安全性,自动化创建者可以配置 Ansible-Galaxy CLI 以验证这些集合,确保在上传到自动化中心后不会更改它们。

要成功签名并发布 Ansible 认证的内容集合,您必须配置私有自动化中心进行签名。

先决条件

  • GPG 密钥对。如果没有,可以使用 gpg --full-generate-key 命令生成一个。
  • 您的公钥-私钥对有权在 Ansible Automation Platform Hub Operator 上配置内容签名。

流程

  1. 创建用于签名脚本的 ConfigMap。您创建的 ConfigMap 包含签名服务用于集合和容器镜像的脚本。

    注意

    此脚本用作签名服务的一部分,必须使用通过 PULP_SIGNING_KEY_FINGERPRINT 环境变量指定的密钥为该文件生成 ascii-armored 分离的 gpg 签名。

    该脚本打印一个 JSON 结构,其格式如下:

    {"file": "filename", "signature": "filename.asc"}
    Copy to Clipboard Toggle word wrap

    所有文件名都是当前工作目录中的相对路径。对于分离的签名,文件名必须保持相同。

    示例: 以下脚本为内容生成签名:

    apiVersion: v1
    kind: ConfigMap
    metadata:
      name: signing-scripts
    data:
      collection_sign.sh: |-
          #!/usr/bin/env bash
    
          FILE_PATH=$1
          SIGNATURE_PATH=$1.asc
    
          ADMIN_ID="$PULP_SIGNING_KEY_FINGERPRINT"
          PASSWORD="password"
    
          # Create a detached signature
          gpg --quiet --batch --pinentry-mode loopback --yes --passphrase \
            $PASSWORD --homedir /var/lib/pulp/.gnupg --detach-sign --default-key $ADMIN_ID \
            --armor --output $SIGNATURE_PATH $FILE_PATH
    
          # Check the exit status
          STATUS=$?
          if [ $STATUS -eq 0 ]; then
            echo {\"file\": \"$FILE_PATH\", \"signature\": \"$SIGNATURE_PATH\"}
          else
            exit $STATUS
          fi
      container_sign.sh: |-
        #!/usr/bin/env bash
    
        # galaxy_container SigningService will pass the next 4 variables to the script.
        MANIFEST_PATH=$1
        FINGERPRINT="$PULP_SIGNING_KEY_FINGERPRINT"
        IMAGE_REFERENCE="$REFERENCE"
        SIGNATURE_PATH="$SIG_PATH"
    
        # Create container signature using skopeo
        skopeo standalone-sign \
          $MANIFEST_PATH \
          $IMAGE_REFERENCE \
          $FINGERPRINT \
          --output $SIGNATURE_PATH
    
        # Optionally pass the passphrase to the key if password protected.
        # --passphrase-file /path/to/key_password.txt
    
        # Check the exit status
        STATUS=$?
        if [ $STATUS -eq 0 ]; then
          echo {\"signature_path\": \"$SIGNATURE_PATH\"}
        else
          exit $STATUS
        fi
    Copy to Clipboard Toggle word wrap
  2. 为您的 GnuPG 私钥创建 secret。此 secret 安全地存储您用于签名的 GnuPG 私钥。

    gpg --export --armor <your-gpg-key-id> > signing_service.gpg
    
    oc create secret generic signing-galaxy --from-file=signing_service.gpg
    Copy to Clipboard Toggle word wrap

    该机密必须具有名为 signing_service.gpg 的密钥。

  3. 配置 AnsibleAutomationPlatform CR。

    apiVersion: aap.ansible.com/v1alpha1
    kind: AnsibleAutomationPlatform
    metadata:
      name: aap-hub-signing-sample
    spec:
      hub:
        signing_secret: "signing-galaxy"
        signing_scripts_configmap: "signing-scripts"
    Copy to Clipboard Toggle word wrap

当您通过 Ansible Automation Platform Operator 创建 Ansible Automation Platform 实例时,会默认分配独立 Redis。如果您希望部署集群 Redis,您可以使用以下步骤。

有关 Redis 的更多信息,请参阅 规划安装 指南中的缓存和队列系统。

重要

不支持在现有实例上切换 Redis 模式,并可能导致意外后果,包括数据丢失。要更改 Redis 模式,您必须部署新实例。

先决条件

  • 已安装 Ansible Automation Platform Operator 部署。

流程

  1. 登录到 Red Hat OpenShift Container Platform。
  2. 进入到 OperatorsInstalled Operators
  3. 选择 Ansible Automation Platform Operator 部署。
  4. 选择 Details 选项卡。
  5. Ansible Automation Platform 标题中,点 Create instance

    1. 对于现有实例,您可以通过点 WWN 图标 来编辑 YAML 视图,然后编辑 AnsibleAutomationPlatform
    2. redis_mode 值更改为 "cluster"。
    3. 单击 Reload然后保存
  6. 单击以展开 Advanced configuration
  7. 对于 Redis Mode 列表,选择 Cluster
  8. 根据需要配置实例的其余部分,然后点 Create

验证

您的实例使用 6 个 Redis 副本作为默认部署的集群 Redis。

注意

您可以修改自动化中心默认 redis 缓存 PVC 卷大小,以获取有关此看到的帮助,修改默认的 redis 缓存 PVC 卷大小自动化中心

作为系统管理员,您可以在 OpenShift Container Platform 上的 Ansible Automation Platform 2.5 上部署 Ansible Lightspeed 智能助手。

6.1. 概述

Ansible Lightspeed 智能助手在 OpenShift Container Platform 上的 Ansible Automation Platform 2.5 中作为技术预览提供。这是一个直观的聊天界面,嵌入在 Ansible Automation Platform 中,使用常规智能(AI)来回答有关 Ansible Automation Platform 的问题。

Ansible Lightspeed 智能助手以英语的形式与用户进行交互,并使用大型语言模型(LLM)生成快速、准确和个性化的响应。这些响应使 Ansible 用户能够更有效地工作,从而提高工作效率和整体工作质量。

Ansible Lightspeed 智能助手需要以下配置:

  • 在 Red Hat OpenShift Container Platform 上安装 Ansible Automation Platform 2.5
  • 由 Red Hat AI 平台或第三方 AI 平台提供的 LLM 部署。要了解可以使用的 LLM 提供程序,请参阅 LLM provider
重要
  • 红帽不会从与 Ansible Lightspeed 智能助手的交互中收集任何遥测数据。
  • Ansible Lightspeed 智能助手仅作为技术预览功能提供。

    技术预览功能不受红帽产品服务等级协议(SLA)支持,且功能可能并不完整。红帽不推荐在生产环境中使用它们。这些技术预览功能可以使用户提早试用新的功能,并有机会在开发阶段提供反馈意见。

    有关红帽技术预览功能支持范围的更多信息,请参阅技术预览功能支持范围

6.2. Ansible Automation Platform 2.5 要求

  • 您已在 OpenShift Container Platform 环境中安装了 Ansible Automation Platform 2.5。
  • 具有 Ansible Automation Platform 的管理员特权。
  • 您已置备了安装了 Operator Lifecycle Management 的 OpenShift 集群。

6.3. 大型语言模型(LLM)供应商要求

您必须已经配置了部署 Ansible Lightspeed 智能助手前要使用的 LLM 供应商。

LLM 是可以解释和生成类类语言的机器学习模型。当 LLM 与 Ansible Lightspeed 智能助手一起使用时,LLM 可以准确解释问题,并以对话方式提供有用的答案。

作为技术预览版本的一部分,Ansible Lightspeed 智能助手可以依赖以下软件作为服务(SaaS) LLM 供应商:

Red Hat LLM provider

  • Red Hat Enterprise Linux AI

    Red Hat Enterprise Linux AI 与 OpenAI API 兼容,并以类似 OpenAI 供应商的方式进行配置。您可以将 Red Hat Enterprise Linux AI 配置为 LLM 供应商。如需更多信息,请参阅 Red Hat Enterprise Linux AI 产品页面。

  • Red Hat OpenShift AI

    Red Hat OpenShift AI 与 OpenAI API 兼容,并以类似 OpenAI 供应商的方式进行配置。您可以将 Red Hat OpenShift AI 配置为 LLM 供应商。如需更多信息,请参阅 Red Hat OpenShift AI 产品页面。

注意

对于使用 Red Hat Enterprise Linux AI 或 Red Hat OpenShift AI 的配置,您必须托管自己的 LLM 供应商,而不是使用 SaaS LLM 供应商。

第三方 LLM 供应商

  • IBM watsonx.ai

    要将 IBM watsonx 与 Ansible Lightspeed 智能助手一起使用,您需要使用 IBM watsonx.ai 账户。

  • OpenAI

    要将 OpenAI 与 Ansible Lightspeed 智能助手一起使用,您需要访问 OpenAI API 平台

  • Microsoft Azure OpenAI

    要将 Microsoft Azure 与 Ansible Lightspeed 智能助手一起使用,您需要访问 Microsoft Azure OpenAI

    注意

    许多自托管或自我管理模型服务器都声明与 OpenAI 的 API 兼容性。可以配置 Ansible Lightspeed 智能助手 OpenAI 提供程序以指向兼容 API 的模型服务器。如果模型服务器真正兼容 API,尤其是与身份验证相关的,那么它可能可以正常工作。这些配置尚未由红帽测试,与其使用相关的问题超出了技术预览支持范围。

执行以下任务,以在 OpenShift Container Platform 环境中的 Ansible Automation Platform 实例中设置和使用 Ansible Lightspeed 智能助手:

Expand
任务描述

在 OpenShift Container Platform 上部署 Ansible Lightspeed 智能助手

希望为机构中所有 Ansible 用户部署 Ansible Lightspeed 智能助手的 Ansible Automation Platform 管理员。

执行以下任务:

访问并使用 Ansible Lightspeed 智能助手

所有想要使用智能助手的 Ansible 用户获得他们有关 Ansible Automation Platform 问题的回答。如需了解更多详细信息,请参阅使用 Ansible Lightspeed 智能助手

6.5. 部署 Ansible Lightspeed 智能助手

本节提供有关在 OpenShift Container Platform 上部署 Ansible Lightspeed 智能助手的过程的信息。

6.5.1. 创建 chatbot 配置 secret

为 Ansible Lightspeed 智能助手创建配置 secret,以便您可以将智能助手连接到 Ansible Automation Platform operator。

流程

  1. 以管理员身份登录 Red Hat OpenShift Container Platform。
  2. 导航到 WorkloadsSecrets
  3. Projects 列表中,选择安装 Ansible Automation Platform Operator 时创建的命名空间。
  4. 单击 CreateKey/value secret
  5. Secret name 字段中输入 secret 的唯一名称。例如,chatbot-configuration-secret
  6. 单独添加以下键及其关联的值:

    Expand
    value

    所有 LLM 设置的设置

    chatbot_model

    输入在 LLM 设置中配置的 LLM 模型名称。

    chatbot_url

    输入 LLM 设置上的 inference API 基础 URL。例如: https://your_inference_api/v1

    chatbot_token

    输入 API 令牌或 API 密钥。当调用 inference API 时,此令牌会与授权标头一起发送。

    chatbot_llm_provider_type

    可选

    使用以下值之一输入 LLM 设置的供应商类型:

    • Red Hat Enterprise Linux AI: rhelai_vllm
    • Red Hat OpenShift AI: rhoai_vllm (默认值)
    • IBM watsonx.ai: watsonx
    • OpenAI: openai
    • Microsoft Azure OpenAI: azure_openai

    chatbot_context_window_size

    可选

    输入一个值来为您的 LLM 设置配置上下文窗口长度。

    Default= 128000

    chatbot_temperature_override

    可选

    较低温度会生成可预测的结果,而较高的温度允许更多元化或创造性响应。

    输入以下值之一:

    • 0 :响应中最少的 creativity 和 randomness。
    • 1: 响应中的最大城市和随机性。
    • null: Override 或禁用默认温度设置。

      注意

      一些 OpenAI o-series 模型(o1、o3-mini 和 o4-mini 模型)不支持温度设置。因此,您必须将值设为 null 以使用这些 OpenAI 模型。

    仅限 IBM watsonx.ai 的额外设置

    chatbot_llm_provider_project_id

    输入 IBM watsonx 设置的项目 ID。

    仅限 Microsoft Azure OpenAI 的其他设置

    chatbot_azure_deployment_name

    输入 Microsoft Azure OpenAI 设置的部署名称。

    chatbot_azure_api_version

    可选

    输入 Microsoft Azure OpenAI 设置的 API 版本。

  7. Create。chatbot 授权 secret 已成功创建。

创建 chatbot 授权 secret 后,您必须更新 Ansible Automation Platform Operator 的 YAML 文件以使用 secret。

流程

  1. 以管理员身份登录 Red Hat OpenShift Container Platform。
  2. 进入到 OperatorsInstalled Operators
  3. 从安装的 Operator 列表中,选择 Ansible Automation Platform operator。
  4. 找到并选择 Ansible Automation Platform 自定义资源,然后点所需的应用程序。
  5. 选择 YAML 选项卡。
  6. 滚动文本以查找 spec: 部分,并在 spec: 部分中添加以下详情:

    spec:
      lightspeed:
        disabled: false
        chatbot_config_secret_name: <name of your chatbot configuration secret>
    Copy to Clipboard Toggle word wrap
  7. Save。Ansible Lightspeed 智能助手服务需要几分钟的时间来设置。

验证

  1. 验证 chat 接口服务是否已成功运行:

    1. 导航到 WorkloadsPods
    2. 使用术语 api 过滤,并确保以下 API 显示为 Running 状态:

      • myaap-lightspeed-api-<version number>
      • myaap-lightspeed-chatbot-api-<version number>
  2. 验证 chat 接口是否在 Ansible Automation Platform 中显示:

    1. 访问 Ansible Automation Platform:

      1. 进入到 OperatorsInstalled Operators
      2. 从安装的 Operator 列表中,点 Ansible Automation Platform
      3. 找到并选择 Ansible Automation Platform 自定义资源,然后点您创建的应用程序。
      4. Details 选项卡中,记录以下字段中的信息:

        • URL: 这是 Ansible Automation Platform 实例的 URL。
        • Gateway Admin User: 这是登录 Ansible Automation Platform 实例的用户名。
        • 网关管理密码 :这是登录 Ansible Automation Platform 实例的密码。
      5. 使用您之前记录的 URL、用户名和密码登录到 Ansible Automation Platform。
    2. 访问 Ansible Lightspeed 智能助手:

      1. 点任务栏右上角的 Ansible Lightspeed 智能助手图标 Ansible Lightspeed intelligent assistant icon
      2. 验证 chat 接口是否已显示,如下图所示:

        Ansible Lightspeed intelligent assistant .

6.6. 使用 Ansible Lightspeed 智能助手

部署 Ansible Lightspeed 智能助手后,组织中的所有 Ansible 用户都可以访问并使用聊天界面来询问问题并接收有关 Ansible Automation Platform 的信息。

6.6.1. 访问 Ansible Lightspeed 智能助手

  1. 登录到 Ansible Automation Platform。
  2. 点任务栏右上角的 Ansible Lightspeed 智能助手图标 Ansible Lightspeed intelligent assistant icon

    Ansible Lightspeed 智能助手窗口会打开欢迎信息,如下图所示:

    Ansible Lightspeed intelligent assistant

6.6.2. 使用 Ansible Lightspeed 智能助手

您可以执行以下任务:

  • 在 prompt 字段中提出问题,并获取有关 Ansible Automation Platform 的答案
  • 查看聊天会话中所有对话的聊天历史记录
  • 使用用户提示符或回答搜索聊天历史记录

    当您关闭现有的 chat 会话或从 Ansible Automation Platform 注销时,chat 历史记录会被删除。

  • 点 chat 历史记录中的相关条目来恢复之前的聊天
  • Thumbs down 图标来提供有关聊天答案质量的反馈。
  • Copy 图标复制并记录答案
  • 点工具栏右上角的 Sun 图标 Sun icon 将虚拟助手器的模式更改为 dark 或 light 模式
  • 使用聊天历史记录中的 New chat 按钮清除现有聊天的上下文
  • 在处理 Ansible Automation Platform 时关闭 chat 接口

您可以使用 idle_aap 变量缩减所有 Ansible Automation Platform 部署和 StatefulSets。这对升级、迁移或灾难恢复等场景非常有用。

流程

  1. 登录到 Red Hat OpenShift Container Platform。
  2. 进入 OperatorsInstalled Operators
  3. 选择 Ansible Automation Platform Operator 部署。
  4. 选择 All Instances,再进入您的 AnsibleAutomationPlatform 实例。
  5. ProductShortName 图标,然后选择 Edit AnsibleAutomationPlatform
  6. YAML 视图中,将以下 YAML 代码粘贴到 spec: 部分:

    idle_aap: true
    Copy to Clipboard Toggle word wrap
  7. 点击 Save

后续步骤

idle_aap 值设置为 true 会缩减所有活跃的部署。将值设为 false 可扩展部署。

将 Red Hat Ansible Automation Platform 部署迁移到 Ansible Automation Platform Operator 允许您利用 Kubernetes 原生 Operator 所提供的优势,包括简化的升级和 Red Hat Ansible Automation Platform 部署的完整生命周期支持。

您可以使用 Ansible Automation Platform 迁移指南来帮助迁移。

注意

不支持将 Event-Driven Ansible 版本 2.4 升级到 2.5。Event-Driven Ansible 2.4 和 Event-Driven Ansible 2.5 之间的数据库迁移不兼容。

Ansible Automation Platform Operator 简化了 OpenShift Container Platform 环境中新 Red Hat Ansible Automation Platform 实例的安装、升级和部署。

9.1. 概述

您可以使用本文档来帮助在 Red Hat OpenShift Container Platform 上将 Ansible Automation Platform 版本 2.4 和 2.5 升级到 2.5。本文档适用于将 Ansible Automation Platform 2.5 升级到 2.5 的较新版本。

Ansible Automation Platform Operator 管理自动化控制器和自动化中心的部署、升级、备份和恢复。它还处理来自 Ansible Automation Platform Resource Operator 的 AnsibleJob 和 JobTemplate 资源的部署。

每个 Operator 版本都有默认的自动化控制器和自动化中心版本。当 Operator 升级时,它还升级它管理的自动化控制器和自动化中心部署,除非在 spec 中被覆盖。

Ansible Automation Platform 的 OpenShift 部署使用内置的 Operator Lifecycle Management (OLM)功能。如需更多信息,请参阅 Operator Lifecycle Manager 概念和资源。OpenShift 使用 Subscription、CSV、InstallPlan 和 OperatorGroup 对象来实现这一点。大多数用户都不必直接与这些资源交互。当从 OperatorHub 安装 Ansible Automation Platform Operator 时,它们会被创建,并通过 OpenShift 控制台 UI 中的 Subscriptions 选项卡进行管理。如需更多信息 ,请参阅访问 Web 控制台

Subscription tab

9.2. 升级注意事项

如果您要从版本 2.4 升级,请继续 升级 Ansible Automation Platform Operator

如果您升级到的 Red Hat Ansible Automation Platform 版本不支持 OpenShift Container Platform 版本,您必须首先将 OpenShift Container Platform 集群升级到受支持的版本。

请参阅 Red Hat Ansible Automation Platform 生命周期,以确定所需的 OpenShift Container Platform 版本。

有关升级集群的详情,请参考 更新集群

9.3. 先决条件

要升级到较新版本的 Ansible Automation Platform Operator,您必须:

  • 确保您的系统满足 Tested deployment model 指南中的 Operator 拓扑 部分中详述的系统要求。
  • 创建 AutomationControllerBackup 和 AutomationHubBackup 对象。有关此帮助,请参阅 Operator 环境的备份和恢复
  • 有关升级和任何中间版本的新 Ansible Automation Platform 版本,请参阅发行注记
  • 确定您要执行的升级类型。如需更多信息,请参阅 Channel Upgrades 部分。

9.4. 频道升级

从 Ansible Automation Platform 2.4 升级到 2.5 版本涉及从 "channel" 检索更新。频道指的是您可以访问您的更新的位置。它目前驻留在 OpenShift 控制台 UI 中。

Update channel

9.4.1. 通道中的升级

大多数升级在频道中进行,如下所示:

  1. 通过 redhat-operator CatalogSource 在 marketplace 中提供一个新的更新。
  2. 系统会自动为您的 Ansible Automation Platform 订阅创建新的 InstallPlan。

    • 如果设置为 Manual,InstallPlan 需要 OpenShift UI 中的手动批准。
    • 如果设置为 Automatic,它将在新版本可用时立即进行升级。

      注意

      在安装过程中,在 Ansible Automation Platform Operator 订阅上设置手动安装策略。在您选择的更新频道中可用时,系统会提示您批准升级。稳定频道(如 stable-2.5)可用于每个 X.Y 版本。

  3. 新的订阅、CSV 和 operator 容器与旧容器一起创建。成功安装后会清理旧资源。

9.4.2. 跨频道升级

X.Y 频道之间的升级始终是手动和有意的。主版本和次版本的稳定频道位于 Operator Catalog 中。目前,只有 2.x 版本可用,因此有一些频道。建议您继续使用最新补丁的最新次版本频道。

如果为手动升级设置了订阅,则必须通过 UI 批准升级。然后,系统会将 Operator 升级到该频道中的最新版本。

注意

建议您在安装过程中在 Ansible Automation Platform Operator 订阅上设置手动安装策略。当您选择的更新频道中可用时,系统会提示您批准升级。每个 X.Y 版本都提供了 stable-2.5 等稳定频道。

对于操作系统升级和关键修复,latest 频道中提供的容器会定期更新。这允许客户更快地收到关键补丁和 CVE 修复。对于次版本和主版本,会保存更大的变化和新功能。

对于每个主版本或次版本频道,提供了对应的"集群范围"频道。集群范围的频道会部署可管理所有命名空间的 Operator,非集群范围的频道只能管理其自己的命名空间中的资源。

重要

集群范围的捆绑包与命名空间范围的捆绑包不兼容。不要试图在 normal (例如,stable-2.4)频道和集群范围(stable-2.4-cluster-scoped)频道间切换,因为不支持。

9.5. 升级 Ansible Automation Platform Operator

要升级到 OpenShift Container Platform 上 Ansible Automation Platform Operator 的最新版本,您可以使用以下步骤:

注意

如果您是在 2.4 版本中,建议跳过 2.5 并直接升级到 2.5 版本。

如果从 2.4 升级到 2.5,则必须在升级到 2.6 之前迁移身份验证方法和用户,因为旧的验证器功能已被删除。

先决条件

重要

不支持从 Event-Driven Ansible 2.4 升级。如果您在生产环境中使用 Event-Driven Ansible 2.4,请在升级前联系红帽。

流程

  1. 登录 OpenShift Container Platform。
  2. 进入到 OperatorsInstalled Operators
  3. 选择项目命名空间中安装的 Ansible Automation Platform Operator。
  4. 选择 Subscriptions 选项卡。
  5. 将频道从 stable-2.4 更改为 stable-2.5。为用户创建一个 InstallPlan。
  6. Preview InstallPlan
  7. Approve
  8. 使用 Ansible Automation Platform UI 创建自定义资源(CR)。自动化控制器和自动化中心 UI 会保留,直到平台网关 UI 中支持所有 SSO 配置。

9.6. 创建 Ansible Automation Platform 自定义资源

升级到 OpenShift Container Platform 上 Ansible Automation Platform Operator 的最新版本后,您可以创建一个 Ansible Automation Platform 自定义资源(CR)来指定现有部署的名称。

以下示例概述了在升级到最新版本后部署新的 Event-Driven Ansible 设置的步骤,现有自动化控制器和自动化中心部署已经就位。

附录 包含不同部署的 Ansible Automation Platform CR 的更多示例。

流程

  1. 登录到 Red Hat OpenShift Container Platform。
  2. 进入到 OperatorsInstalled Operators
  3. 选择 Ansible Automation Platform Operator 部署。
  4. 选择 Details 选项卡。
  5. Ansible Automation Platform 标题中,点 Create instance
  6. Create Ansible Automation Platform 页面中,在 Name 字段中输入您的实例的名称。
  7. YAML 视图 并粘贴以下 YAML (ap-existing-controller-and-hub-new-eda.yml):

    ---
    apiVersion: aap.ansible.com/v1alpha1
    kind: AnsibleAutomationPlatform
    metadata:
      name: myaap
    spec:
      # Development purposes only
      no_log: false
    
      controller:
        name: existing-controller #obtain name from controller CR
        disabled: false
    
      eda:
        disabled: false
    
      hub:
        name: existing-hub
        disabled: false
    Copy to Clipboard Toggle word wrap
  8. Create

    注意

    您可以通过在 YAML spec 中指定首选镜像,为自动化控制器、自动化中心或 platform-resource 应用程序镜像覆盖 Operator 的默认镜像。这可在不更新 Operator 的情况下升级特定的部署,如控制器。

    但是,推荐的方法是升级 Operator,并使用默认镜像值。

    验证

    进入到 Ansible Automation Platform Operator 部署,然后点 All instances 来验证所有实例是否已正确部署。您应该在此处看到 Ansible Automation Platform 实例以及部署的 AutomationControllerEDAAutomationHub 实例。

或者,您可以通过在命令行中运行 oc get route 来验证所有实例是否已正确部署。

9.7. Ansible Automation Platform 升级后步骤

在成功升级到 Ansible Automation Platform 2.5 后,下一步是将您的用户迁移到最新版本的平台。

来自自动化控制器和私有自动化中心的用户数据和旧身份验证设置会在升级过程中进行,并允许升级后无缝地访问平台。客户无需额外操作即可登录。

但是,要完全转换身份验证以使用 2.5 平台网关的所有功能和功能,需要手动过程来利用新的身份验证框架。在升级到 Ansible Automation Platform 2.5 时,此手动过程被称为 迁移

每种用户迁移均有重要的备注和注意事项,包括:

  • 管理员用户
  • 普通用户
  • SSO 用户
  • LDAP 用户

确保仔细阅读为每个用户类型突出显示的重要备注,以帮助使迁移过程尽可能平稳。

9.7.1. 迁移管理员用户的主要注意事项

从 Ansible Automation Platform 2.4 升级到 2.5,可以为每个组件迁移管理员,并维护其现有组件级别的 admin 权限。但是,在升级过程中,将权限升级到平台网关管理员不会被自动升级。这样可确保一个安全特权升级过程,可以自定义以满足组织的特定需求。

组件级别的 admin 权限会被保留: 自动化控制器和自动化中心的管理员将在升级后为那些相应服务保留其现有的 admin 权限。例如,自动化控制器的管理员将继续具有自动化控制器资源的完整管理特权。

在升级后,必须手动配置平台网关 admin: 在升级过程中,单个服务的 admin 权限不会自动转换为平台管理员权限。升级和迁移后,平台管理员必须授予升级到平台网关 admin。每个服务管理员都会保留其访问权限的原始范围,直到访问被更改为止。

作为平台管理员,您可以通过选择 Ansible Automation Platform Administrator 复选框来升级用户的特权。只有平台管理员可以升级特权。

注意

以前,指定为自动化控制器或自动化中心管理员的用户在 Users 列表视图中的 User type 列中被标记为 Normal。这是误解。您可以通过编辑帐户来验证这些用户是否已保留其服务级别管理员权限:

9.7.2. 迁移管理员用户

按照以下步骤迁移 admin 用户。

先决条件

  • 查看当前部署中各个服务的当前 admin 角色。
  • 确认升级后需要平台网关管理权限的用户。

流程

  1. 在平台网关的导航面板中,选择 Access ManagementUsers
  2. 选中您要修改的用户的复选框。
  3. 单击 Pencil 图标,再选择 Edit user
  4. 此时会显示 Edit user 页面,您可以在其中查看由 User type 复选框分配的服务级别管理员权限。有关这些用户类型 的更多信息,请参阅编辑用户。

9.7.3. 迁移普通用户的主要注意事项

之前的服务帐户前缀: 在 2.4 中有多个服务的用户作为单独的用户迁移,并作为前缀在 2.5 中迁移,以标识从中迁移的服务。例如,自动化中心帐户前缀为 hub_<username&gt;。自动化控制器用户名不包括前缀。

自动化控制器用户帐户具有优先权: 当单个用户在 2.4 中有多个服务时,会在迁移过程中为自动化控制器帐户赋予优先级,因此不会重命名这些优先级。

在用户迁移完成前保留组件级别角色: 当用户使用现有服务帐户登录且不执行帐户链接过程时,只有该特定服务帐户的角色可用。用户执行帐户链接过程后,迁移过程已完成。此时,所有服务的所有角色都会迁移到新的平台网关用户帐户中。

9.7.4. 迁移普通用户

当您从 Ansible Automation Platform 2.4 升级到 2.5 时,您的现有用户帐户会自动迁移到单个平台帐户。但是,如果您有多个组件帐户(如自动化控制器、私有自动化中心和 Event-Driven Ansible),则您的帐户必须链接到使用平台的集中式功能。

9.7.4.2. 链接您的帐户

Ansible Automation Platform 2.5 为用户、团队和机构提供了一个集中的位置,供用户访问平台的服务和功能。

第一次登录 Ansible Automation Platform 2.5 时,平台会搜索现有服务以查找带有您输入的凭证的用户帐户。当与现有帐户匹配时,该帐户将被注册,并由平台集中管理。系统中的任何后续组件帐户都孤立,无法用于登录平台。

要解决这个问题,请使用帐户链接过程从任何现有组件帐户进行身份验证,并仍然被平台识别。链接帐户将现有组件帐户与同一用户配置文件相关联。

如果您已完成升级过程并有旧的 Ansible Automation Platform 订阅,请按照以下帐户链接流程将您的帐户迁移到 Ansible Automation Platform 2.5。

先决条件

  • 您已完成升级过程,并有一个旧的 Ansible Automation Platform 帐户和凭证。

流程

  1. 进入到 Ansible Automation Platform 的登录页面。
  2. 在登录模式中,选择 I have an automation controller accountI have an automation hub 帐户,具体取决于您拥有的凭证。
  3. 在下一屏幕中,输入您选择的组件帐户的传统凭证,然后单击 Log in

    注意

    如果您要使用 OIDC 凭证登录,请参阅 在升级到 AAP 2.5 后如何修复有问题的 OIDC 重定向

  4. 如果您成功链接您的帐户,下一个屏幕会显示您的用户名,并带有绿色勾号。如果您有其他要链接的旧帐户,请输入这些帐户凭证,然后单击 Link 将它们链接到集中式平台网关帐户。
  5. Submit 以完成旧帐户的链接。
  6. 在您的帐户链接后,根据您的身份验证方法,可能会提示您创建新的用户名和密码。这些凭证将替换每个组件帐户的传统凭证。

    • 您还可以通过执行以下步骤手动链接您的旧帐户:
  7. 选择屏幕右上角的用户图标,然后选择 用户详细信息
  8. 选择 More Actions 图标 HEKETI & gt; Link user accounts
  9. 输入您要链接的帐户的凭证。

故障排除

如果您遇到错误消息告诉您您的帐户无法进行身份验证,请联系您的平台管理员。

注意

如果您第一次登录 Ansible Automation Platform,并提示您更改用户名,这表明其他用户已使用相同的用户名登录到 Ansible Automation Platform。要进行帐户迁移,请按照提示更改您的用户名。Ansible Automation Platform 使用您的密码来验证属于哪个帐户或帐户。

帐户链接流图 Account linking flow

迁移用户帐户后,您可以从 Access Management 菜单中管理您的帐户。请参阅使用基于角色的访问控制管理访问权限

9.7.5. 迁移单点登录(SSO)用户

当从 Ansible Automation Platform 2.4 升级到 2.5 时,如果要在升级后继续使用 SSO 功能,则必须迁移您的单点登录(SSO)用户帐户。按照以下步骤确保平稳的 SSO 用户迁移。

9.7.5.1. 主要考虑

在升级到 2.5 时,SSO 配置不会自动迁移: 虽然在升级过程中执行旧的身份验证设置,并允许升级后的无缝的初始访问平台,但 SSO 配置必须手动迁移到新的 Ansible Automation Platform 2.5 身份验证配置。传统配置充当保留现有身份验证功能并促进迁移过程的参考。迁移完成后不会直接修改或使用旧的身份验证配置。

UI 中支持 SSO 迁移: 从 2.5 UI 中支持传统 SSO 帐户,并在配置新的身份验证方法时从 Auto migrate 用户 从列表中选择您的旧的验证器来完成。这是旧的验证器,用于从中自动将用户迁移到新的平台网关身份验证配置。

在用户登录并启动帐户链接前,必须进行 SSO 迁移: 您必须在在 2.5 和用户登录 之前 启用 Auto migrate 用户设置

注意

Ansible Automation Platform 2.4 SSO 配置在升级过程中被重命名,并在 Authentication Methods 列表视图中显示带有前缀前缀,以指示旧的配置:例如 legacy_sso-saml-<entity id>Authentication type 也列为 legacy sso。这些配置无法修改。

设置自动迁移功能后,您应能够在平台网关中使用 SSO 登录,它将自动链接传统 SSO 身份验证器中的任何匹配的帐户。

9.7.6. 迁移 LDAP 用户

作为平台管理员从 Ansible Automation Platform 2.4 升级到 2.5,如果要在升级后继续使用 LDAP 身份验证功能,则必须迁移您的 LDAP 用户帐户。按照以下步骤确保可以平稳地迁移 LDAP 用户。

将用户从旧身份验证系统迁移到基于 LDAP 的身份验证有两个主要场景:

  1. 传统用户登录和帐户链接
  2. 在没有帐户链接的情况下迁移到 LDAP
9.7.6.1. 主要考虑

LDAP 配置在升级到 2.5 的过程中不会自动迁移: 虽然在升级过程中执行旧的 LDAP 身份验证设置,并允许升级后的无缝的初始访问平台,但 LDAP 配置必须手动迁移到新的 Ansible Automation Platform 2.5 LDAP 配置。传统配置充当保留现有身份验证功能并促进迁移过程的参考。迁移完成后不会直接修改或使用旧的身份验证配置。

UID 冲突风险: LDAP 和旧的密码验证器都使用用户名作为 UID。这可能导致不同人所有的用户或用户之间发生 UID 冲突。由于 UID 冲突,任何不安全进行自动迁移的用户帐户都必须手动迁移以确保正确处理。您可以在设置自动迁移前通过 API /api/gateway/v1/authenticator_users/ 手动迁移这些用户。

在升级前没有用户帐户,请不要使用旧的 LDAP 身份验证登录: Instead,您必须在不 链接帐户的情况下自动迁移到 LDAP

9.7.6.2. 传统用户登录和帐户链接

用户可以通过选择 "I have a <component> account" 并输入其凭证(用户名和密码)来使用其旧帐户登录。如果登录成功,可能会提示其帐户与另一个组件帐户链接,如自动化中心和自动化控制器。如果自动化 hub 和自动化控制器的登录凭证相同,则会为该用户自动进行帐户链接。

成功帐户链接后,两个组件的用户帐户将合并到 网关中:传统的外部密码 验证器。如果用户帐户没有自动合并到 网关:传统的外部密码 验证器,您必须在不链接帐户的情况下自动迁移到 LDAP。

有关帐户链接的更多信息,请参阅链接您的帐户

如果用户无法链接其帐户,因为其自动化中心帐户没有链接选项,您必须立即在所有旧密码验证器上配置自动迁移功能以针对新的网关 LDAP 验证器。

然后,当用户登录时,如果找到匹配的 UID,平台网关将自动将用户迁移到 LDAP 验证器。

先决条件

  • 在继续自动迁移前,验证所有旧帐户是否已正确链接并合并。
  • 在继续自动迁移前,验证没有 UID 冲突或确保手动迁移。

流程

  1. 登录到 Ansible Automation Platform UI。
  2. 按照 配置 LDAP 身份验证 中的步骤在平台网关中设置新的 LDAP 验证方法。这将是您要将之前 LDAP 用户迁移到的配置。

    注意

    Ansible Automation Platform 2.4 LDAP 配置在升级过程中重命名,并在前缀的 Authentication Methods 列表视图中显示它,以指示它是一个传统配置,例如 < controller/hub/eda>: legacy_passwordAuthentication type 列为 Legacy password。这些配置无法修改。

  3. Auto migrate users from 列表中选择旧的 LDAP authenticator。这是您要将用户迁移到平台网关 LDAP 身份验证器的传统验证器。

设置自动迁移功能后,您应能够在平台网关中使用 LDAP 登录,旧的 2.4 LDAP 验证器中的任何匹配的帐户将自动链接。

您可以使用升级补丁来更新基于 Operator 的 Ansible Automation Platform。

当您为 OpenShift Container Platform 上安装 Ansible Automation Platform 执行补丁更新时,大多数更新都会在一个频道中进行:

  1. 市场中提供了一个新的更新(通过 redhat-operator CatalogSource)。
  2. 自动为您的 Ansible Automation Platform 订阅创建新的 InstallPlan。如果订阅被设置为 Manual,则必须在 OpenShift UI 中手动批准 InstallPlan。如果订阅被设置为 Automatic,它将在有新版本可用时立即进行升级。

    注意

    建议您在 Ansible Automation Platform Operator 订阅上设置手动安装策略(在安装或升级 Operator 时设置设置),并在所选更新频道中可用时提示您批准升级。每个 X.Y 发行版本的稳定频道(例如 stable-2.5))都可用。

  3. 新的订阅、CSV 和 Operator 容器将与旧的 Subscription、CSV 和容器一起创建。然后,如果新安装成功,则会清理旧资源。

您可以通过下载并安装安装捆绑包,使用执行节点启用 Ansible Automation Platform Operator。

注意

当将自定义证书用于 Receptor 节点时,证书需要在证书的 Subject Alternative Name (SAN)中指定的 otherName 字段,其值为 1.3.6.1.4.1.2312.19.1。如需更多信息,请参阅 获取网格 TLS

receptor 不支持使用通配符证书。另外,每个 Receptor 证书都必须在其 SAN 中指定主机 FQDN,才能正确执行 TLS 主机名验证。

您可以从 Ansible Automation Platform 用户界面添加执行节点。

先决条件

  • 一个自动化控制器实例。
  • 已安装 receptor 集合软件包。
  • Ansible Automation Platform 存储库 ansible-automation-platform-2.5-for-rhel-{RHEL-RELEASE-NUMBER}-x86_64-rpms 被启用。

流程

  1. 登录到 Red Hat Ansible Automation Platform。
  2. 在导航面板中,选择 Automation ExecutionInfrastructureInstances
  3. Add
  4. Host Name 字段中输入 Execution Node 域名或 IP。
  5. 可选:在 Listener Port 字段中输入端口号。
  6. 点击 Save
  7. Install Bundle 旁边的下载图标 。这会开始下载,记录您保存文件的位置
  8. 解压 gz 文件。

    注意

    要运行 install_receptor.yml playbook,您必须从 Ansible Galaxy: ansible-galaxy collection install -r requirements.yml安装 receptor 集合

  9. 使用您的用户名和 SSH 私钥文件更新 playbook。请注意,ansible_host 预填充您之前输入的主机名。

    all:
       hosts:
          remote-execution:
    	        ansible_host: example_host_name # Same with configured in AAP WebUI
    	        ansible_user: <username> #user provided
    	        Ansible_ssh_private_key_file: ~/.ssh/id_example
    Copy to Clipboard Toggle word wrap
  10. 打开终端,再前往保存 playbook 的目录。
  11. 要安装捆绑包运行:

    ansible-playbook install_receptor.yml -i inventory.yml
    Copy to Clipboard Toggle word wrap
  12. 现在,您可以通过为您创建的实例下载并重新运行 playbook 来升级执行节点。

验证

运行以下命令验证 receptor 服务状态:

sudo systemctl status receptor.service
Copy to Clipboard Toggle word wrap

确保服务处于 active (running) 状态

要验证您的 playbook 是否在您的新节点上运行,请运行以下命令:

watch podman ps
Copy to Clipboard Toggle word wrap

其他资源

第 12 章 Ansible Automation Platform Resource Operator

12.1. Resource Operator 概述

Resource Operator 是一个自定义资源(CR),您可以在创建平台网关部署后部署。

使用 Resource Operator,您可以在 YAML 文件中定义资源,如项目、作业模板和清单。

然后,自动化控制器使用 YAML 文件来创建这些资源。您可以通过 Form view 创建 YAML,它提示您输入 YAML 代码的键和值。或者,要直接使用 YAML,您可以选择 YAML 视图

Resource Operator 提供以下 CR:

  • AnsibleJob
  • JobTemplate
  • 自动化控制器项目
  • 自动化控制器调度
  • 自动化控制器工作流
  • 自动化控制器工作流模板:
  • 自动化控制器清单
  • 自动化控制器凭证

有关上述任何自定义资源的更多信息,请参阅使用自动化执行

12.2. 使用 Resource Operator

在用户创建对象之前,Resource Operator 本身不会执行任何操作。当用户创建 AutomationControllerProjectAnsibleJob 资源时,Resource Operator 就会开始处理该对象。

先决条件

  • 安装您选择的基于 Kubernetes 的集群。
  • 使用 automation-controller-operator 部署自动化控制器。

后续步骤

在集群中安装 automation-controller-resource-operator 后,您必须使用自动化控制器实例的连接信息创建一个 Kubernetes (k8s) secret。然后,您可以使用 Resource Operator 创建 k8s 资源来管理自动化控制器实例。

12.3. 将 Resource Operator 连接到平台网关

要将 Resource Operator 与平台网关连接,您必须使用自动化控制器实例的连接信息创建一个 Kubernetes secret。

使用以下步骤在平台网关 UI 中为用户创建 OAuth2 令牌。

注意

您只能通过 API 或 UI 为您自己的用户创建 OAuth 2 令牌,这意味着您只能从您自己的用户配置集配置或查看令牌。

流程

  1. 登录到 Red Hat OpenShift Container Platform。
  2. 在导航面板中,选择 Access ManagementUsers
  3. 选择您要为其创建令牌的用户名。
  4. 选择 TokensAutomation Execution
  5. 单击 Create Token
  6. 您可以将 Applications 留空。添加描述,并为 Scope 选择 ReadWrite

    注意

    确保您在创建令牌时提供有效的用户。否则,您会得到一个错误消息,提示您在不指定用户的情况下发出命令,或者提供的用户名不存在。

要使您的连接信息可供 Resource Operator 使用,创建一个带有 token 和 host 值的 k8s secret。

流程

  1. 以下是连接 secret 的 YAML 示例。将以下示例保存到文件中,如 automation-controller-connection-secret.yml

    apiVersion: v1
    kind: Secret
    metadata:
      name: controller-access
      type: Opaque
    stringData:
      token: <generated-token>
      host: https://my-controller-host.example.com/
    Copy to Clipboard Toggle word wrap
  2. 使用您的主机和令牌值编辑该文件。
  3. 运行 kubectl create 命令将其应用到集群:
kubectl create -f controller-connection-secret.yml
Copy to Clipboard Toggle word wrap

12.5. 为 Resource Operator 创建自定义资源

使用 Resource Operator 直接从 Kubernetes 集群管理自动化控制器资源。本节提供了创建自定义资源的步骤,如 AnsibleJobJobTemplateAnsibleProject 等等。

12.5.1. 创建 AnsibleJob 自定义资源

AnsibleJob 自定义资源在 Kubernetes secret (自动化控制器主机 URL、令牌)中指定的自动化控制器实例中启动作业。您可以通过创建 AnsibleJob 资源,在自动化控制器上启动自动化作业。

流程

  1. 指定您要启动的连接 secret 和作业模板。

    apiVersion: tower.ansible.com/v1alpha1
    kind: AnsibleJob
    metadata:
      generateName: demo-job-1 # generate a unique suffix per 'kubectl create'
    spec:
      connection_secret: controller-access
      job_template_name: Demo Job Template
    Copy to Clipboard Toggle word wrap
  2. 配置作业的实时功能,如清单、额外变量和时间。

    spec:
      connection_secret: controller-access
      job_template_name: Demo Job Template
      inventory: Demo Inventory                    # Inventory prompt on launch needs to be enabled
      runner_image: quay.io/ansible/controller-resource-runner
      runner_version: latest
      job_ttl: 100
      extra_vars:                                  # Extra variables prompt on launch needs to be enabled
         test_var: test
      job_tags: "provision,install,configuration"  # Specify tags to run
      skip_tags: "configuration,restart"           # Skip tasks with a given tag
    Copy to Clipboard Toggle word wrap
    注意

    如果您要配置清单和额外变量,则必须在启动时启用提示。要启用 启动时提示,在 自动化控制器 UI 中: 在 ResourcesTemplates 页面中,选择您的模板,然后选择 InventoryVariables 部分旁边的 Prompt on launch 复选框。

  3. 通过指定 workflow_template_name 而不是 job_template_name,使用 AnsibleJob 对象启动工作流作业模板:

    apiVersion: tower.ansible.com/v1alpha1
    kind: AnsibleJob
    metadata:
      generateName: demo-job-1 # generate a unique suffix per 'kubectl create'
    spec:
      connection_secret: controller-access
      workflow_template_name: Demo Workflow Template
    Copy to Clipboard Toggle word wrap

12.5.2. 创建 JobTemplate 自定义资源

作业模板是用于运行 Ansible 作业的定义和一组参数。如需更多信息,请参阅使用 自动化执行 指南中的 作业模板 部分。

流程

  • 通过创建 JobTemplate 自定义资源,在自动化控制器上创建作业模板:

    apiVersion: tower.ansible.com/v1alpha1
    kind: JobTemplate
    metadata:
      name: jobtemplate-4
    spec:
      connection_secret: controller-access
      job_template_name: ExampleJobTemplate4
      job_template_project: Demo Project
      job_template_playbook: hello_world.yml
      job_template_inventory: Demo Inventory
    Copy to Clipboard Toggle word wrap

12.5.3. 创建自动化控制器项目自定义资源

项目是在自动化控制器中表示的 Ansible playbook 的逻辑集合。如需更多信息,请参阅使用自动化执行指南中的 项目 部分

流程

  • 通过创建自动化控制器项目自定义资源,在自动化控制器上创建项目:

    apiVersion: tower.ansible.com/v1alpha1
    kind: AnsibleProject
    metadata:
      name: git
    spec:
      repo: https://github.com/ansible/ansible-tower-samples
      branch: main
      name: ProjectDemo-git
      scm_type: git
      organization: Default
      description: demoProject
      connection_secret: controller-access
      runner_pull_policy: IfNotPresent
    Copy to Clipboard Toggle word wrap

12.5.4. 创建自动化控制器调度自定义资源

定义 AnsibleSchedule 自定义资源,以便在自动化控制器上创建调度,确保指定必要的 apiVersionkind 和唯一的 metadata.name

流程

  • 通过创建自动化控制器调度自定义资源,在自动化控制器上创建调度:

    apiVersion: tower.ansible.com/v1alpha1
    kind: AnsibleSchedule
    metadata:
      name: schedule
    spec:
      connection_secret: controller-access
      runner_pull_policy: IfNotPresent
      name: "Demo Schedule"
      rrule: "DTSTART:20210101T000000Z RRULE:FREQ=DAILY;INTERVAL=1;COUNT=1"
      unified_job_template: "Demo Job Template"
    Copy to Clipboard Toggle word wrap

12.5.5. 创建自动化控制器工作流自定义资源

工作流允许您配置一系列不同的作业模板(或工作流模板),它们可能或不共享清单、playbook 或权限。如需更多信息,请参阅使用自动化执行 指南中的自动化控制器中的工作流 部分

流程

  • 通过创建工作流自定义资源,在自动化控制器上创建工作流:

    apiVersion: tower.ansible.com/v1alpha1
    kind: AnsibleWorkflow
    metadata:
      name: workflow
    spec:
      inventory: Demo Inventory
      workflow_template_name: Demo Job Template
      connection_secret: controller-access
      runner_pull_policy: IfNotPresent
    Copy to Clipboard Toggle word wrap

工作流作业模板将一系列不同的资源链接,以跟踪作为单个单元一部分的完整作业集合。

如需更多信息,请参阅使用 自动化执行 指南中的 工作流作业模板 部分。

流程

  • 通过创建工作流模板自定义资源,在自动化控制器上创建工作流模板:

    apiVersion: tower.ansible.com/v1alpha1
    kind: WorkflowTemplate
    metadata:
      name: workflowtemplate-sample
    spec:
      connection_secret: controller-access
      name: ExampleTowerWorkflow
      description: Example Workflow Template
      organization: Default
      inventory: Demo Inventory
      workflow_nodes:
      - identifier: node101
        unified_job_template:
          name: Demo Job Template
          inventory:
            organization:
              name: Default
          type: job_template
      - identifier: node102
        unified_job_template:
          name: Demo Job Template
          inventory:
            organization:
              name: Default
          type: job_template
    Copy to Clipboard Toggle word wrap

12.5.7. 创建自动化控制器清单自定义资源

通过使用清单文件,Ansible Automation Platform 可以通过单个命令管理大量主机。

清单还可以通过减少您指定的命令行选项数量来更有效地使用 Ansible Automation Platform。如需更多信息,请参阅使用 自动化执行 指南中的 清单 部分。

流程

  • 通过创建清单自定义资源,在自动化控制器上创建清单:

    metadata:
      name: inventory-new
    spec:
      connection_secret: controller-access
      description: my new inventory
      name: newinventory
      organization: Default
      state: present
      instance_groups:
        - default
      variables:
        string: "string_value"
        bool: true
        number: 1
        list:
          - item1: true
          - item2: "1"
        object:
          string: "string_value"
          number: 2
    Copy to Clipboard Toggle word wrap

12.5.8. 创建自动化控制器凭证自定义资源

在针对机器启动作业、与清单源同步以及从版本控制系统中导入项目内容时,凭证会验证自动化控制器用户。

SSH 和 AWS 是最常用的凭证。有关支持的凭证的完整列表,请参阅 使用自动化执行指南中的凭证类型部分https://docs.redhat.com/en/documentation/red_hat_ansible_automation_platform/2.5/html/using_automation_execution/controller-credentials#ref-controller-credential-types

有关定义值的帮助,您可以参考 Red Hat Ansible Automation Platform API KCS 文章的 OpenAPI (Swagger)文件

提示

您可以使用 https://<aap-instance>/api/controller/v2/credential_types/ 查看实例上的凭证类型列表。要获取完整列表,请使用以下 curl 命令:

export AAP_TOKEN="your-oauth2-token"
export AAP_URL="https://your-aap-controller.example.com"

curl -s -H "Authorization: Bearer $AAP_TOKEN" "$AAP_URL/api/controller/v2/credential_types/" | jq -r '.results[].name'
Copy to Clipboard Toggle word wrap

流程

  • 通过创建凭证自定义资源,在自动化控制器上创建 AWS 或 SSH 凭证:

    • SSH 凭证:

      apiVersion: tower.ansible.com/v1alpha1
      kind: AnsibleCredential
      metadata:
        name: ssh-cred
      spec:
        name: ssh-cred
        organization: Default
        connection_secret: controller-access
        description: "SSH credential"
        type: "Machine"
        ssh_username: "cat"
        ssh_secret: my-ssh-secret
        runner_pull_policy: IfNotPresent
      Copy to Clipboard Toggle word wrap
    • AWS 凭证:

      apiVersion: tower.ansible.com/v1alpha1
      kind: AnsibleCredential
      metadata:
        name: aws-cred
      spec:
        name: aws-access
        organization: Default
        connection_secret: controller-access
        description: "This is a test credential"
        type: "Amazon Web Services"
        username_secret: aws-secret
        password_secret: aws-secret
        runner_pull_policy: IfNotPresent
      Copy to Clipboard Toggle word wrap

本指南提供了一组命令和提示,可帮助您诊断和解决 OpenShift Container Platform 上 Ansible Automation Platform 部署的常见问题。您将了解如何查看日志、检查资源以及收集诊断数据以获取支持。

13.1. 了解自动化控制器 Operator 日志

当 Operator 部署 Automation Controller 实例时,它会在 Operator 容器内运行安装程序角色。如果自动化控制器的状态为 Failed,您必须检查 automation-controller-operator 容器日志。这些日志提供安装程序角色的输出,是调试部署问题的关键第一步。

13.2. 查看 OpenShift Container Platform 中的事件

您可以查看 OpenShift Container Platform Web 控制台中的事件,以监控错误并排除问题。这有助于您通过检查自定义资源及其相关事件的状态来快速诊断问题。

您可以首先查看 Ansible Automation Platform 自定义资源(CR)的状态条件,然后检查任何嵌套 CR 是否有错误来调试。

流程

  1. 登陆到 OpenShift Container Platform Web 控制台。
  2. 在导航菜单中,选择 HomeEvents
  3. 从项目列表中选择您的项目。
  4. 要查看特定资源的事件,请导航到该资源的页面。pod 和部署等许多资源页面都有自己的 Events 选项卡。
  5. 选择一个资源来带您进入 Pod Details 页面。

验证

检查 Pod 详情 页面中的 Conditions 部分,以确认 Message 列中没有列出任何错误。

13.3. 查看 Operator 日志

以下流程是如何查看 automation-controller-operator pod 的日志的示例。

流程

  1. 要查找 pod 名称,请运行:

    oc get pods | grep operator
    Copy to Clipboard Toggle word wrap
  2. 要查看 pod 的日志,请运行:

    oc logs <operator-pod-name> -f
    Copy to Clipboard Toggle word wrap
    1. 或者,要在不首先获取 pod 名称的情况下查看日志,请运行:

      oc logs deployments/automation-controller-operator-controller-manager -c automation-controller-manager -f
      Copy to Clipboard Toggle word wrap

13.4. 配置日志详细程度

您可以通过在 CR 的 spec 部分中将 no_log 设置为 false 来启用在任何自定义资源(CR)上调试的任务输出。

然后,日志会显示最初将 no_log 设置为 true 的任何失败任务的输出。以下流程使用自动化控制器作为示例,但 Core Ansible Automation Platform Resources 部分中列出的每个 CR 都支持 no_log

流程

  1. 编辑自动化控制器 CR,在 spec 中将 no_log 字段设置为 false

    apiVersion: automationcontroller.ansible.com/v1beta1
    kind: AutomationController
    metadata:
      name: controller-demo
    spec:
      no_log: false
    Copy to Clipboard Toggle word wrap
    注意

    这可能会在日志中公开敏感数据。在生产环境集群中,除非主动调试问题,否则这个值通常必须设置为 true

  2. 要增加 Operator 的 Ansible Playbook 详细程度,请使用注解设置详细程度:

    annotations:
        ansible.sdk.operatorframework.io/verbosity: "4"
    Copy to Clipboard Toggle word wrap

13.5. 检查 OpenShift Container Platform 资源

要检查 OpenShift Container Platform 资源,您必须使用 oc 命令获取资源的完整 YAML 定义或完整的 YAML 定义。

流程

  1. 要查看资源的人类可读摘要,请运行:

    oc describe -n <namespace> <resource> <resource-name>
    Copy to Clipboard Toggle word wrap
  2. 要查看资源的完整 YAML 定义,请使用 -o yaml 标志:

    oc get -n <namespace> <resource> <resource-name> -o yaml
    Copy to Clipboard Toggle word wrap
    • 例如,若要获取 automationcontroller 自定义资源的 YAML,请运行:

      oc get -n aap automationcontroller aap -o yaml
      Copy to Clipboard Toggle word wrap

13.6. 核心 Ansible Automation Platform 资源

下表列出了并描述了 Ansible Automation Platform Operator 管理的核心自定义资源(CR)。了解这些资源将帮助您进行高级故障排除和配置。

Expand
资源名称描述

ansibleautomationplatform

用于部署整个 Ansible Automation Platform 的 CR。

ansibleautomationplatformbackup

用于创建整个 Ansible Automation Platform 实例的备份的 CR。

ansibleautomationplatformrestore

用于从备份中恢复整个 Ansible Automation Platform 实例的 CR。

automationcontroller

定义自动化控制器实例的所需状态的 CR。

AutomationControllerBackup

用于创建自动化控制器数据和配置的 CR。

automationcontrollerrestore

从备份中恢复自动化控制器的 CR。

automationhub

用于部署自动化中心(Galaxy)实例的 CR。

automationhubbackup

用于创建自动化中心数据和配置的 CR。

automationhubrestore

从备份中恢复自动化中心的 CR。

eda

用于部署 Event-Driven Ansible (EDA)实例的 CR。

edabackup

用于创建 EDA 数据和配置备份的 CR。

edarestore

用于从备份中恢复 EDA 的 CR。

ansiblelightspeed

用于部署 Red Hat Ansible Lightspeed 实例的 CR。

13.7. 标准 Kubernetes 资源

标准 Kubernetes 资源是 OpenShift Container Platform 的一个核心部分。下表描述了您可以检查的标准资源,以对应用的状态和配置进行故障排除。

Expand
资源名称描述

pod

最小的可部署单元,其中包含运行应用程序工作负载的一个或多个容器。

部署

管理 pod 配置和扩展。

pvc

PersistentVolumeClaim (PVC)是用于持久性数据存储的存储资源请求。

service

使用集群中的稳定 IP 地址和 DNS 名称公开 pod 作为网络服务。

ingress

管理对集群中服务的外部 HTTP 和 HTTPS 访问。

route

用于向外部公开服务的 OpenShift 特定资源(与入口类似)。

secrets

存储敏感数据,如密码、令牌和证书。

serviceaccount

为 pod 中运行的进程提供身份,以访问其他 Kubernetes 资源的权限。

13.8. 发现自定义资源定义配置参数

Ansible Automation Platform Operator 管理多个自定义资源(CR),每个资源都有自己的配置参数。使用 oc explain 命令发现 AnsibleAutomationPlatform CR 及其嵌套组件的所有可用配置选项。

流程

  1. 要查看顶层 CR 的所有可用配置参数,请运行:

    oc explain ansibleautomationplatform.spec
    Copy to Clipboard Toggle word wrap
  2. 要查看特定的嵌套部分,请直接查询它们:

    oc explain automationcontroller.spec.postgres_configuration_secret
    oc explain automationcontroller.spec.route_tls_termination_mechanism
    Copy to Clipboard Toggle word wrap
  3. 要一次性浏览所有嵌套字段,请使用-- recursive 标志:

    oc explain automationcontroller.spec --recursive
    Copy to Clipboard Toggle word wrap

13.9. 收集诊断数据

使用 oc adm must-gather 命令收集有关集群和 Ansible Automation Platform 组件的综合诊断数据。在联系红帽支持时,这些数据至关重要。

流程

  1. 要启动 must-gather 工具,请运行:

    oc adm must-gather --image=registry.redhat.io/ansible-automation-platform-25/aap-must-gather-rhel8
    Copy to Clipboard Toggle word wrap
  2. 查看收集的数据,使用 omc 工具查询 must-gather tarball,就像是一个实时集群一样。

    omc use <path-to-must-gather>
    omc get pods
    Copy to Clipboard Toggle word wrap

13.10. 调试崩溃 pod

如果 pod 失败或崩溃,请使用 oc debug 命令。此命令创建一个带有与您指定的 pod 相同的配置和挂载,以便您访问它以进行调试。

流程

  • 要连接到 pod,请运行:

    oc debug <pod-name>
    Copy to Clipboard Toggle word wrap

13.11. Operator 服务帐户错误

在 Ansible Automation Platform 数据库或 UI 中手动修改 aap_operator_service_account 用户会删除所需的 is_superuser 标志。此操作会在平台网关 Operator 的协调循环中造成关键故障。

您会看到以下错误:

TASK [ansibleautomationplatform : Create operator service account user] … CommandError: Error: That username is already taken
Copy to Clipboard Toggle word wrap

在缺少帐户时,Ansible Automation Platform Operator 会自动重新创建服务帐户。要恢复所需的超级用户特权,您必须删除现有的、错误配置的用户。

删除用户后,平台网关操作器会自动运行其幂等逻辑,重新创建帐户,并确保它具有必要的 is_superuser=True 标志,恢复协调循环的功能。

本附录为各种部署场景提供了 Ansible Automation Platform 自定义资源的引用。

提示

您可以通过在 name 变量下指定组件名称来链接 现有组件。您还可以使用 name 为新组件创建自定义名称。

14.1. 自定义资源

14.1.1. aap-existing-controller-and-hub-new-eda.yml

---
apiVersion: aap.ansible.com/v1alpha1
kind: AnsibleAutomationPlatform
metadata:
  name: myaap
spec:
  # Development purposes only
  no_log: false

  controller:
    name: existing-controller
    disabled: false

  eda:
    disabled: false

  hub:
    name: existing-hub
    disabled: false
Copy to Clipboard Toggle word wrap

14.1.2. aap-all-defaults.yml

apiVersion: aap.ansible.com/v1alpha1
kind: AnsibleAutomationPlatform
metadata:
  name: myaap
spec:
  # Development purposes only
  no_log: false

  # Platform
  ## uncomment to test bundle certs
  # bundle_cacert_secret: gateway-custom-certs

  # Components

  hub:
    disabled: false
    ## uncomment if using file storage for Content pod
    storage_type: file
    file_storage_storage_class: nfs-local-rwx
    file_storage_size: 10Gi

    ## uncomment if using S3 storage for Content pod
    # storage_type: S3
    # object_storage_s3_secret: example-galaxy-object-storage

    ## uncomment if using Azure storage for Content pod
    # storage_type: azure
    # object_storage_azure_secret: azure-secret-name

  # lightspeed:
  #   disabled: true

# End state:
# * Automation controller deployed and named: myaap-controller
# * * Event-Driven Ansible deployed and named: myaap-eda
# * * Automation hub deployed and named: myaap-hub
Copy to Clipboard Toggle word wrap

14.1.3. aap-existing-controller-only.yml

---
apiVersion: aap.ansible.com/v1alpha1
kind: AnsibleAutomationPlatform
metadata:
  name: myaap
spec:
  # Development purposes only
  no_log: false

  controller:
    name: existing-controller

  eda:
    disabled: true

  hub:
    disabled: true
    ## uncomment if using file storage for Content pod
    # storage_type: file
    # file_storage_storage_class: nfs-local-rwx
    # file_storage_size: 10Gi

    ## uncomment if using S3 storage for Content pod
    # storage_type: S3
    # object_storage_s3_secret: example-galaxy-object-storage

    ## uncomment if using Azure storage for Content pod
    # storage_type: azure
    # object_storage_azure_secret: azure-secret-name


# End state:
# * Automation controller: existing-controller registered with Ansible Automation Platform UI
# * * Event-Driven Ansible deployed and named: myaap-eda
# * * Automation hub deployed and named: myaap-hub
Copy to Clipboard Toggle word wrap

14.1.4. aap-existing-hub-and-controller.yml

---
apiVersion: aap.ansible.com/v1alpha1
kind: AnsibleAutomationPlatform
metadata:
  name: myaap
spec:
  # Development purposes only
  no_log: false

  controller:
    name: existing-controller
    disabled: false

  eda:
    disabled: true

  hub:
    name: existing-hub
    disabled: false

# End state:
# * Automation controller: existing-controller registered with Ansible Automation Platform UI
# * * Event-Driven Ansible deployed and named: myaap-eda
# * * Automation hub: existing-hub registered with Ansible Automation Platform UI
Copy to Clipboard Toggle word wrap

14.1.5. aap-existing-hub-controller-eda.yml

---
apiVersion: aap.ansible.com/v1alpha1
kind: AnsibleAutomationPlatform
metadata:
  name: myaap
spec:
  # Development purposes only
  no_log: false

  controller:
    name: existing-controller # <-- this is the name of the existing AutomationController CR
    disabled: false

  eda:
    name: existing-eda
    disabled: false

  hub:
    name: existing-hub
    disabled: false

# End state:
# * Controller: existing-controller registered with Ansible Automation Platform UI
# * * Event-Driven Ansible: existing-eda registered with Ansible Automation Platform UI
# * * Automation hub: existing-hub registered with Ansible Automation Platform UI
#
# Note: The automation controller, Event-Driven Ansible, and automation hub names must match the names of the existing.
# Automation controller, Event-Driven Ansible, and automation hub CRs in the same namespace as the Ansible Automation Platform CR. If the names do not match, the Ansible Automation Platform CR will not be able to register the existing automation controller, Event-Driven Ansible, and automation hub with the Ansible Automation Platform UI,and will instead deploy new automation controller, Event-Driven Ansible, and automation hub instances.
Copy to Clipboard Toggle word wrap

14.1.6. aap-existing-hub-controller-eda.yml

---
apiVersion: aap.ansible.com/v1alpha1
kind: AnsibleAutomationPlatform
metadata:
  name: myaap
spec:
  # Development purposes only
  no_log: false

  controller:
    name: existing-controller # <-- this is the name of the existing AutomationController CR
    disabled: false

  eda:
    name: existing-eda
    disabled: false

  hub:
    name: existing-hub
    disabled: false

# End state:
# * Automation controller: existing-controller registered with Ansible Automation Platform UI
# * * Event-Driven Ansible: existing-eda registered with Ansible Automation Platform UI
# * * Automation hub: existing-hub registered with Ansible Automation Platform UI
#
# Note: The automation controller, Event-Driven Ansible, and automation hub names must match the names of the existing.
# Automation controller, Event-Driven Ansible, and automation hub CRs in the same namespace as the Ansible Automation Platform CR. If the names do not match, the Ansible Automation Platform CR will not be able to register the existing automation controller, Event-Driven Ansible, and automation hub with the Ansible Automation Platform UI,and will instead deploy new automation controller, Event-Driven Ansible, and automation hub instances.
Copy to Clipboard Toggle word wrap

14.1.7. aap-fresh-controller-eda.yml

---
apiVersion: aap.ansible.com/v1alpha1
kind: AnsibleAutomationPlatform
metadata:
  name: myaap
spec:
  # Development purposes only
  no_log: false

  controller:
    disabled: false

  eda:
    disabled: false

  hub:
    disabled: true
    ## uncomment if using file storage for Content pod
    storage_type: file
    file_storage_storage_class: nfs-local-rwx
    file_storage_size: 10Gi

    ## uncomment if using S3 storage for Content pod
    # storage_type: S3
    # object_storage_s3_secret: example-galaxy-object-storage

    ## uncomment if using Azure storage for Content pod
    # storage_type: azure
    # object_storage_azure_secret: azure-secret-name

# End state:
# * Automation controller deployed and named: myaap-controller
# * * Event-Driven Ansible deployed and named: myaap-eda
# * * Automation hub disabled
# * Red Hat Ansible Lightspeed disabled
Copy to Clipboard Toggle word wrap

14.1.8. aap-fresh-external-db.yml

---
apiVersion: aap.ansible.com/v1alpha1
kind: AnsibleAutomationPlatform
metadata:
  name: myaap
spec:
  # Development purposes only
  no_log: false

  controller:
    disabled: false

  eda:
    disabled: false

  hub:
    disabled: false
    ## uncomment if using file storage for Content pod
    storage_type: file
    file_storage_storage_class: nfs-local-rwx
    file_storage_size: 10Gi

    ## uncomment if using S3 storage for Content pod
    # storage_type: S3
    # object_storage_s3_secret: example-galaxy-object-storage

    ## uncomment if using Azure storage for Content pod
    # storage_type: azure
    # object_storage_azure_secret: azure-secret-name


# End state:
# * Automation controller deployed and named: myaap-controller
# * * Event-Driven Ansible deployed and named: myaap-eda
# * * Automation hub deployed and named: myaap-hub
Copy to Clipboard Toggle word wrap
---
apiVersion: aap.ansible.com/v1alpha1
kind: AnsibleAutomationPlatform
metadata:
  name: myaap
spec:
  database:
     database_secret: external-postgres-configuration-gateway
  controller:
     postgres_configuration_secret: external-postgres-configuration-controller
  hub:
     postgres_configuration_secret: external-postgres-configuration-hub
  eda:
     database:
       database_secret: external-postgres-configuration-eda
Copy to Clipboard Toggle word wrap
---
apiVersion: aap.ansible.com/v1alpha1
kind: AnsibleAutomationPlatform
metadata:
  name: myaap
spec:
  database:
     database_secret: external-postgres-configuration-gateway
Copy to Clipboard Toggle word wrap
注意

系统使用外部数据库作为平台网关,自动化控制器、自动化中心和 Event-Driven Ansible 继续使用 2.4 中使用的现有数据库。

---
apiVersion: aap.ansible.com/v1alpha1
kind: AnsibleAutomationPlatform
metadata:
  name: myaap
spec:
  database:
     database_secret: external-postgres-configuration-gateway
  controller:
     postgres_configuration_secret: external-postgres-configuration-controller
  hub:
     postgres_configuration_secret: external-postgres-configuration-hub
  eda:
     database:
       database_secret: external-postgres-configuration-eda
  lightspeed:
    disabled: false
    database:
      database_secret: <secret-name>-postgres-configuration
    auth_config_secret_name: 'auth-configuration-secret'
    model_config_secret_name: 'model-configuration-secret'
Copy to Clipboard Toggle word wrap
注意

您可以通过 IBM watsonx Code Assistant User Guide 中的 Red Hat Ansible Lightspeed 来帮助创建模型和 auth secret。

14.1.12. aap-fresh-install-with-settings.yml

---
apiVersion: aap.ansible.com/v1alpha1
kind: AnsibleAutomationPlatform
metadata:
  name: myaap
spec:
  # Development purposes only
  no_log: false
  image_pull_policy: Always

  # Platform
  ## uncomment to test bundle certs
  # bundle_cacert_secret: gateway-custom-certs

  # Components
  controller:
    disabled: false
    image_pull_policy: Always

    extra_settings:
      - setting: MAX_PAGE_SIZE
        value: '501'

  eda:
    disabled: false
    image_pull_policy: Always

    extra_settings:
      - setting: EDA_MAX_PAGE_SIZE
        value: '501'

  hub:
    disabled: false
    image_pull_policy: Always

    ## uncomment if using file storage for Content pod
    storage_type: file
    file_storage_storage_class: rook-cephfs
    file_storage_size: 10Gi

    ## uncomment if using S3 storage for Content pod
    # storage_type: S3
    # object_storage_s3_secret: example-galaxy-object-storage

    ## uncomment if using Azure storage for Content pod
    # storage_type: azure
    # object_storage_azure_secret: azure-secret-name

    pulp_settings:
      MAX_PAGE_SIZE: 501
      cache_enabled: false

  # lightspeed:
  #   disabled: true

# End state:
# * Automation controller deployed and named: myaap-controller
# * * Event-Driven Ansible deployed and named: myaap-eda
# * * Automation hub deployed and named: myaap-hub
Copy to Clipboard Toggle word wrap

14.1.13. aap-fresh-install.yml

---
apiVersion: aap.ansible.com/v1alpha1
kind: AnsibleAutomationPlatform
metadata:
  name: myaap
spec:
  # Development purposes only
  no_log: false

  # Redis Mode
  # redis_mode: cluster

  # Platform
  ## uncomment to test bundle certs
  # bundle_cacert_secret: gateway-custom-certs
  # extra_settings:
  #   - setting: MAX_PAGE_SIZE
  #     value: '501'

  # Components
  controller:
    disabled: false

  eda:
    disabled: false

  hub:
    disabled: false
    ## uncomment if using file storage for Content pod
    storage_type: file
    file_storage_storage_class: nfs-local-rwx
    file_storage_size: 10Gi

    ## uncomment if using S3 storage for Content pod
    # storage_type: S3
    # object_storage_s3_secret: example-galaxy-object-storage

    ## uncomment if using Azure storage for Content pod
    # storage_type: azure
    # object_storage_azure_secret: azure-secret-name

  # lightspeed:
  #   disabled: true

# End state:
# * Automation controller deployed and named: myaap-controller
# * * Event-Driven Ansible deployed and named: myaap-eda
# * * Automation hub deployed and named: myaap-hub
Copy to Clipboard Toggle word wrap

14.1.14. aap-fresh-only-controller.yml

---
apiVersion: aap.ansible.com/v1alpha1
kind: AnsibleAutomationPlatform
metadata:
  name: myaap
spec:
  # Development purposes only
  no_log: false

  controller:
    disabled: false

  eda:
    disabled: true

  hub:
    disabled: true
    ## uncomment if using file storage for Content pod
    # storage_type: file
    # file_storage_storage_class: nfs-local-rwx
    # file_storage_size: 10Gi

    ## uncomment if using S3 storage for Content pod
    # storage_type: S3
    # object_storage_s3_secret: example-galaxy-object-storage

    ## uncomment if using Azure storage for Content pod
    # storage_type: azure
    # object_storage_azure_secret: azure-secret-name


# End state:
# * Automation controller: existing-controller registered with Ansible Automation Platform UI
# * * Event-Driven Ansible deployed and named: myaap-eda
# * * Automation hub deployed and named: myaap-hub
Copy to Clipboard Toggle word wrap

14.1.15. aap-fresh-only-hub.yml

---
apiVersion: aap.ansible.com/v1alpha1
kind: AnsibleAutomationPlatform
metadata:
  name: myaap
spec:
  # Development purposes only
  no_log: false

  controller:
    disabled: true

  eda:
    disabled: true

  hub:
    disabled: false
    ## uncomment if using file storage for Content pod
    storage_type: file
    file_storage_storage_class: nfs-local-rwx
    file_storage_size: 10Gi

    # # AaaS Hub Settings
    # pulp_settings:
    #   cache_enabled: false

    ## uncomment if using S3 storage for Content pod
    # storage_type: S3
    # object_storage_s3_secret: example-galaxy-object-storage

    ## uncomment if using Azure storage for Content pod
    # storage_type: azure
    # object_storage_azure_secret: azure-secret-name

  lightspeed:
    disabled: false

# End state:
# * Automation controller disabled
# * * Event-Driven Ansible disabled
# * * Automation hub deployed and named: myaap-hub
# * Red Hat Ansible Lightspeed disabled
Copy to Clipboard Toggle word wrap

14.1.16. aap-lightspeed-enabled.yml

---
apiVersion: aap.ansible.com/v1alpha1
kind: AnsibleAutomationPlatform
metadata:
  name: myaap
spec:
  # Development purposes only
  no_log: false

  controller:
    disabled: false

  eda:
    disabled: false

  hub:
    disabled: false
    ## uncomment if using file storage for Content pod
    storage_type: file
    file_storage_storage_class: nfs-local-rwx
    file_storage_size: 10Gi

    ## uncomment if using S3 storage for Content pod
    # storage_type: S3
    # object_storage_s3_secret: example-galaxy-object-storage

    ## uncomment if using Azure storage for Content pod
    # storage_type: azure
    # object_storage_azure_secret: azure-secret-name

  lightspeed:
    disabled: false

# End state:
# * Automation controller deployed and named: myaap-controller
# * * Event-Driven Ansible deployed and named: myaap-eda
# * * Automation hub deployed and named: myaap-hub
# * Red Hat Ansible Lightspeed deployed and named: myaap-lightspeed
Copy to Clipboard Toggle word wrap

14.1.17. gateway-only.yml

---
apiVersion: aap.ansible.com/v1alpha1
kind: AnsibleAutomationPlatform
metadata:
  name: myaap
spec:
  # Development purposes only
  no_log: false

  controller:
    disabled: true

  eda:
    disabled: true

  hub:
    disabled: true

  lightspeed:
    disabled: true

# End state:
# * Platform gateway deployed and named: myaap-gateway
#   * UI is reachable at: https://myaap-gateway-gateway.apps.ocp4.example.com
# * Automation controller is not deployed
# * * Event-Driven Ansible is not deployed
# * * Automation hub is not deployed
# * Red Hat Ansible Lightspeed is not deployed
Copy to Clipboard Toggle word wrap

14.1.18. eda-max-running-activations.yml

---
apiVersion: aap.ansible.com/v1alpha1
kind: AnsibleAutomationPlatform
metadata:
  name: myaap
spec:
  eda:
    extra_settings:
      - setting: EDA_MAX_RUNNING_ACTIVATIONS
        value: "15" # Setting this value to "-1" means there will be no limit
Copy to Clipboard Toggle word wrap

法律通告

Copyright © 2025 Red Hat, Inc.
The text of and illustrations in this document are licensed by Red Hat under a Creative Commons Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). An explanation of CC-BY-SA is available at http://creativecommons.org/licenses/by-sa/3.0/. In accordance with CC-BY-SA, if you distribute this document or an adaptation of it, you must provide the URL for the original version.
Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent permitted by applicable law.
Red Hat, Red Hat Enterprise Linux, the Shadowman logo, the Red Hat logo, JBoss, OpenShift, Fedora, the Infinity logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries.
Linux® is the registered trademark of Linus Torvalds in the United States and other countries.
Java® is a registered trademark of Oracle and/or its affiliates.
XFS® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States and/or other countries.
MySQL® is a registered trademark of MySQL AB in the United States, the European Union and other countries.
Node.js® is an official trademark of Joyent. Red Hat is not formally related to or endorsed by the official Joyent Node.js open source or commercial project.
The OpenStack® Word Mark and OpenStack logo are either registered trademarks/service marks or trademarks/service marks of the OpenStack Foundation, in the United States and other countries and are used with the OpenStack Foundation's permission. We are not affiliated with, endorsed or sponsored by the OpenStack Foundation, or the OpenStack community.
All other trademarks are the property of their respective owners.
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2026 Red Hat
返回顶部