容器化安装


Red Hat Ansible Automation Platform 2.5

安装 Ansible Automation Platform 的容器化版本

Red Hat Customer Content Services

摘要

本指南帮助您了解我们的 Ansible Automation Platform 容器化版本后的安装要求和流程。

对红帽文档提供反馈

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

免责声明 :这些信息中包含的指向外部网站的链接仅用于方便用户。红帽没有审阅链接的内容,并不对其内容负责。包含任何指向外部网站的链接并不表示红帽认可该网站或其实体、产品或服务。您同意红帽对因您使用(或依赖)外部网站或内容而导致的任何损失或费用不承担任何责任。

第 1 章 容器化 Ansible Automation Platform 安装

容器化 Ansible Automation Platform 使用 Podman 在 Red Hat Enterprise Linux 主机机器上的容器中运行平台。使用这个安装方法,您可以在利用容器化架构的同时管理产品和基础架构生命周期。

默认情况下,容器化 Ansible Automation Platform 作为无根容器运行,以提高安全性。您可以使用非 root 用户帐户安装和操作 Ansible Automation Platform。

第 2 章 选择安装类型

容器化 Ansible Automation Platform 支持两种安装类型:在线和断开连接。查看每种环境的要求。

2.1. 在线安装

在线安装在安装过程中直接从红帽 registry 中拉取容器镜像。

要求:

  • 所有 Ansible Automation Platform 节点上的活跃互联网连接
  • 具有凭证的 Red Hat registry 服务帐户(registry_usernameregistry_password)
  • 网络访问红帽 registry (registry.redhat.io)

有关在线安装说明,请参阅准备容器化 Ansible Automation Platform 安装

2.2. disconnected (bundled)安装

断开连接的安装使用预打包的捆绑包,其中包含所有容器镜像和依赖项。这个安装类型是为 air-gapped 或受限网络环境设计的。

要求:

  • 配置有所需依赖项的本地 RPM 存储库
  • 安装过程中不需要互联网连接
  • 不需要 Red Hat registry 凭证

有关断开连接的安装说明,请参阅 断开连接的安装

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 Ansible Automation Platform 订阅

在安装 Red Hat Ansible Automation Platform 前,您必须 在所有节点上具有有效的订阅。

注意

简单内容访问(SCA)现在是所有红帽帐户的默认订阅方法。使用 SCA 时,您必须将您的系统注册到 Red Hat Subscription Management (RHSM)或 Satellite 才能访问内容。不再需要传统的基于池的订阅附加命令(如 subscription-manager attach --poolsubscription-manager attach --auto)。如需更多信息,请参阅 简单内容访问

流程

  1. 使用红帽订阅管理注册您的系统:

    $ sudo subscription-manager register --username <$INSERT_USERNAME_HERE> --password <$INSERT_PASSWORD_HERE>
    Copy to Clipboard Toggle word wrap

    使用简单内容访问(SCA),注册是访问 Ansible Automation Platform 内容的唯一步骤。

    注意

    对于仍使用旧的订阅池,您可能需要使用故障排除部分中显示的命令手动附加订阅。

验证

  1. 刷新系统中的订阅信息:

    $ sudo subscription-manager refresh
    Copy to Clipboard Toggle word wrap
  2. 验证您的注册:

    $ sudo subscription-manager identity
    Copy to Clipboard Toggle word wrap

    此命令显示您的系统身份、名称、机构名称和机构 ID,确认注册成功。

故障排除

  • 对于不使用 SCA 的旧帐户,您可能需要手动附加订阅:

    $ sudo subscription-manager list --available --all | grep "Ansible Automation Platform" -B 3 -A 6
    $ sudo subscription-manager attach --pool=<pool_id>
    Copy to Clipboard Toggle word wrap
    注意

    不要使用 MCT4022 作为 pool_id,因为它可能会导致订阅附加失败。

3.5. 获取清单文件

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

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

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

3.5.1. 创建订阅分配

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

流程

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

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

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

流程

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

3.5.3. 下载清单文件

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

流程

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

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

3.6. 激活 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.6.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.6.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,请参阅使用凭证激活

要使用清单文件激活 Ansible Automation Platform,请参阅 激活清单文件

通过了解部署拓扑、验证系统要求、配置 Red Hat Enterprise Linux 主机并设置清单文件,为容器化 Ansible Automation Platform 准备环境。

4.1. 测试的部署模型

红帽使用一组定义的拓扑测试 Ansible Automation Platform 2.5,为您提供建议的部署选项。支持的拓扑结构包括基础架构拓扑图、经过测试的系统配置、示例清单文件和网络端口信息。

对于容器化 Ansible Automation Platform,有两个基础架构拓扑组成:

  1. 增长 - (全部一)适合开始使用 Ansible Automation Platform 的机构。此拓扑允许较小的占用空间部署。
  2. Enterprise - 对于需要 Ansible Automation Platform 部署的组织,具有用于大量自动化的冗余或更高的计算。这是更未来的扩展架构。

有关容器化 Ansible Automation Platform 的经过测试的部署拓扑的更多信息,请参阅 测试部署模型 中的容器 拓扑

4.2. 系统要求

在规划安装容器化 Ansible Automation Platform 时,请使用此信息。

4.2.1. 先决条件

  • 在 Red Hat Enterprise Linux 主机上配置专用的非 root 用户。

    • 此用户需要 sudo 或其他 Ansible 支持的特权升级(建议sudo )在安装过程中执行管理任务。
    • 此用户负责安装容器化 Ansible Automation Platform。
    • 此用户也是运行 Ansible Automation Platform 的容器的服务帐户。
  • 对于受管节点,在每个节点上配置一个专用用户。Ansible Automation Platform 以这个用户身份连接,以便在节点上运行任务。有关在每个节点上配置专用用户的更多信息,请参阅为容器化安装准备受管节点
  • 对于远程主机安装,请为非 root 用户配置 SSH 公钥身份验证。有关为非 root 用户设置 SSH 公钥身份验证的指南,请参阅 如何为免密码登录配置 SSH 公钥身份验证
  • 如果您使用默认的在线安装方法,请确保 Red Hat Enterprise Linux 主机可以访问互联网。
  • 如果您有防火墙,请打开适当的网络端口。有关要打开的端口的更多信息,请参阅 测试 部署模型中的容器 拓扑
重要

Podman 不支持将容器镜像存储在 NFS 共享中。要将 NFS 共享用于用户主目录,请在 NFS 共享之外设置 Podman 存储后端路径。如需更多信息,请参阅 Rootless Podman 和 NFS

4.2.2. Ansible Automation Platform 系统要求

您的系统必须满足以下最低系统要求才能安装和运行 Red Hat Ansible Automation Platform。

Expand
表 4.1. 系统配置
类型描述

订阅

  • 有效的 Red Hat Ansible Automation Platform 订阅
  • 有效的 Red Hat Enterprise Linux 订阅(使用 BaseOS 和 AppStream 软件仓库)
 

操作系统

  • Red Hat Enterprise Linux 9.4 或更高版本的 Red Hat Enterprise Linux 9 次版本。
  • Red Hat Enterprise Linux 10 或更高版本的 Red Hat Enterprise Linux 10 次版本。
 

CPU 架构

x86_64, AArch64, s390x (IBM Z), ppc64le (IBM Power)

 

ansible-core

  • RHEL 9:安装程序使用 ansible-core 2.14,Ansible Automation Platform 操作使用 ansible-core 2.16。
  • RHEL 10: 安装程序使用 ansible-core 2.16,Ansible Automation Platform 操作使用 ansible-core 2.16。
  • 安装程序使用 RHEL AppStream 存储库中的 ansible-core 软件包。
  • Ansible Automation Platform 捆绑包 ansible-core 2.16 用于操作,因此您不需要手动安装它。

浏览器

当前支持的 Mozilla Firefox 或 Google Chrome 版本。

 

数据库

PostgreSQL 15

外部(客户支持)数据库需要 Unicode (ICU)支持国际组件。

每个虚拟机(VM)有以下系统要求:

Expand
表 4.2. 虚拟机要求
要求最低要求

RAM

16 GB

CPU

4

本地磁盘

  • 总可用磁盘空间:60 GB
  • 安装目录:15 GB (如果在专用分区中)
  • 用于在线安装的 /var/tmp: 1 GB
  • 用于离线或捆绑安装的 /var/tmp: 3 GB
  • 临时目录(默认为 /tmp)用于离线或捆绑安装:10GB

磁盘 IOPS

3000

注意

如果您使用 hub_seed_collections=true 执行增长拓扑的捆绑安装,则使用 32 GB RAM。使用这个配置,安装时间将增加,可能需要 45 分钟或更长时间来完成集合。

4.2.3. 数据库要求

Ansible Automation Platform 可以使用两个数据库的不同:

  1. 使用 Ansible Automation Platform 安装的数据库 - 此数据库由作为红帽提供的 PostgreSQL 软件包安装的 PostgreSQL 安装组成。
  2. 客户提供或配置的数据库 - 客户提供的外部数据库,无论是裸机、虚拟机、容器还是云托管服务上。

Ansible Automation Platform 要求客户提供(外部)数据库,才能实现 Unicode (ICU)支持。

容器化 Ansible Automation Platform 在 Red Hat Enterprise Linux 主机上作为基于 Podman 的容器运行组件服务。准备 Red Hat Enterprise Linux 主机以确保安装成功。

流程

  1. 以非 root 用户身份登录 Red Hat Enterprise Linux 主机。
  2. 确保主机的主机名使用完全限定域名(FQDN)。

    1. 要检查主机的主机名,请运行以下命令:

      hostname -f
      Copy to Clipboard Toggle word wrap

      输出示例:

      aap.example.org
      Copy to Clipboard Toggle word wrap
    2. 如果主机名不是 FQDN,您可以使用以下命令设置它:

      $ sudo hostnamectl set-hostname <your_hostname>
      Copy to Clipboard Toggle word wrap
  3. 使用 subscription-manager 注册 Red Hat Enterprise Linux 主机:

    $ sudo subscription-manager register
    Copy to Clipboard Toggle word wrap
  4. 验证主机上只启用了 BaseOS 和 AppStream 软件仓库:

    $ sudo dnf repolist
    Copy to Clipboard Toggle word wrap

    RHEL 9 的输出示例:

    Updating Subscription Management repositories.
    repo id                                                    repo name
    rhel-9-for-x86_64-appstream-rpms                           Red Hat Enterprise Linux 9 for x86_64 - AppStream (RPMs)
    rhel-9-for-x86_64-baseos-rpms                              Red Hat Enterprise Linux 9 for x86_64 - BaseOS (RPMs)
    Copy to Clipboard Toggle word wrap

    RHEL 10 的输出示例:

    Updating Subscription Management repositories.
    repo id                                                    repo name
    rhel-10-for-x86_64-appstream-rpms                          Red Hat Enterprise Linux 10 for x86_64 - AppStream (RPMs)
    rhel-10-for-x86_64-baseos-rpms                             Red Hat Enterprise Linux 10 for x86_64 - BaseOS (RPMs)
    Copy to Clipboard Toggle word wrap
  5. 确保主机可以使用 DNS 解析主机名和 IP 地址。这对于确保服务可以互相通信非常重要。
  6. 安装 ansible-core

    $ sudo dnf install -y ansible-core
    Copy to Clipboard Toggle word wrap
  7. 可选:安装用于故障排除的额外工具,如 wgetgit-corersyncvim

    $ sudo dnf install -y wget git-core rsync vim
    Copy to Clipboard Toggle word wrap
  8. 可选: 要让安装程序自动获取并应用 Ansible Automation Platform 订阅清单许可证,请按照 获取清单文件 中的步骤操作。

4.4. 为容器化安装准备受管节点

受管节点也称为主机,是 Ansible Automation Platform 管理的设备。为确保容器化 Ansible Automation Platform 的一致性和安全设置,在每个受管节点上创建专用用户。Ansible Automation Platform 以这个用户身份连接,以便在节点上运行任务。

流程

  1. 以 root 用户身份登录主机。
  2. 创建新用户。将 < username> 替换为您要的用户名,例如 aap

    $ sudo adduser <username>
    Copy to Clipboard Toggle word wrap
  3. 为新用户设置密码。将 <username > 替换为您创建的用户名。

    $ sudo passwd <username>
    Copy to Clipboard Toggle word wrap
  4. 配置用户以运行 sudo 命令。

    对于安全且可维护的安装,请在 /etc/sudoers.d/ 目录中的专用文件中为安装用户配置 sudo 权限。

    1. 为用户创建一个专用的 sudoers 文件:

      $ sudo visudo -f /etc/sudoers.d/<username>
      Copy to Clipboard Toggle word wrap
    2. 在文件中添加以下行,将 < username& gt; 替换为您创建的用户名:

      <username> ALL=(ALL) NOPASSWD: ALL
      Copy to Clipboard Toggle word wrap
    3. 保存并退出 文件。

4.5. 下载 Ansible Automation Platform

根据您的 Red Hat Enterprise Linux 环境互联网连接选择所需的安装程序,并将安装程序下载到您的 Red Hat Enterprise Linux 主机。

先决条件

  • 您已以非 root 用户身份登录 Red Hat Enterprise Linux 主机。

流程

  1. 从 Ansible Automation Platform 下载页面 下载容器化 Ansible Automation Platform 的最新版本。

    1. 对于在线安装: Ansible Automation Platform 2.5 容器化设置
    2. 对于离线或捆绑安装: Ansible Automation Platform 2.5 Containerized Setup Bundle
  2. 将安装程序 .tar.gz 文件和可选的 manifest .zip 文件复制到 Red Hat Enterprise Linux 主机上。

    使用 scp 命令安全地复制文件。scp 的基本语法是:

    scp [options] <path_to_source_file> <path_to_destination>
    Copy to Clipboard Toggle word wrap

    例如,使用以下 scp 命令将安装程序 .tar.gz 文件复制到带有私钥的 AWS EC2 实例中(将占位符 <> 值替换为您的实际信息):

    scp -i <path_to_private_key> ansible-automation-platform-containerized-setup-<version_number>.tar.gz ec2-user@<remote_host_ip_or_hostname>:<path_to_destination>
    Copy to Clipboard Toggle word wrap
  3. 决定您希望安装程序驻留在文件系统中的位置。这是您的安装目录。

    1. 安装在此位置创建与安装相关的文件,且初始安装需要至少 15 GB。
  4. 将安装程序 .tar.gz 文件解包到您的安装目录中,并进入解包的目录。

    1. 解包在线安装程序:

      $ tar xfvz ansible-automation-platform-containerized-setup-<version_number>.tar.gz
      Copy to Clipboard Toggle word wrap
    2. 解包离线或捆绑的安装程序:

      $ tar xfvz ansible-automation-platform-containerized-setup-bundle-<version_number>-<arch_name>.tar.gz
      Copy to Clipboard Toggle word wrap

4.6. 配置清单文件

您可以使用清单文件控制 Ansible Automation Platform 的安装。清单文件定义自定义安装所需的主机详情、证书详情和组件特定设置。

本文档中提供了示例清单文件,您可以复制并更改以开始。

重要

清单文件要求根据您的安装类型有所不同:

  • 在线安装 :需要 registry_usernameregistry_password 变量,以便在安装过程中从红帽 registry 中验证和拉取容器镜像。
  • disconnected (bundled)安装 :不需要 registry_usernameregistry_password,因为所有容器镜像都预先打包在捆绑包中。相反,需要 bundle_install=truebundle_dir 变量。

以下清单文件示例用于在线安装。有关断开连接的安装清单要求,请参阅 执行断开连接的安装

另外,在以下位置提供了增长拓扑和企业拓扑清单文件:

要使用示例清单文件,请将 &lt ; & gt; 占位符替换为您的特定变量,并更新主机名。

如需有关可选和所需变量的更多信息,请参阅安装目录或 清单文件变量中的 README.md 文件

使用示例清单文件为容器化增长拓扑执行在线安装(all-in-one):

# This is the Ansible Automation Platform installer inventory file intended for the container growth deployment topology.
# This inventory file expects to be run from the host where Ansible Automation Platform will be installed.
# Consult the Ansible Automation Platform product documentation about this topology's tested hardware configuration.
# https://docs.redhat.com/en/documentation/red_hat_ansible_automation_platform/2.5/html/tested_deployment_models/container-topologies
#
# Consult the docs if you are unsure what to add
# For all optional variables consult the included README.md
# or the Ansible Automation Platform documentation:
# https://docs.redhat.com/en/documentation/red_hat_ansible_automation_platform/2.5/html/containerized_installation

# This section is for your platform gateway hosts
# -----------------------------------------------------
[automationgateway]
aap.example.org

# This section is for your automation controller hosts
# -----------------------------------------------------
[automationcontroller]
aap.example.org

# This section is for your automation hub hosts
# -----------------------------------------------------
[automationhub]
aap.example.org

# This section is for your Event-Driven Ansible controller hosts
# -----------------------------------------------------
[automationeda]
aap.example.org

# This section is for the Ansible Automation Platform database
# -----------------------------------------------------
[database]
aap.example.org

[all:vars]
# Ansible
ansible_connection=local

# Common variables
# https://docs.redhat.com/en/documentation/red_hat_ansible_automation_platform/2.5/html/containerized_installation/appendix-inventory-files-vars#general-variables
# -----------------------------------------------------
postgresql_admin_username=postgres
postgresql_admin_password=<set your own>

registry_username=<your RHN username>
registry_password=<your RHN password>

redis_mode=standalone

# Platform gateway
# https://docs.redhat.com/en/documentation/red_hat_ansible_automation_platform/2.5/html/containerized_installation/appendix-inventory-files-vars#platform-gateway-variables
# -----------------------------------------------------
gateway_admin_password=<set your own>
gateway_pg_host=aap.example.org
gateway_pg_password=<set your own>

# Automation controller
# https://docs.redhat.com/en/documentation/red_hat_ansible_automation_platform/2.5/html/containerized_installation/appendix-inventory-files-vars#controller-variables
# -----------------------------------------------------
controller_admin_password=<set your own>
controller_pg_host=aap.example.org
controller_pg_password=<set your own>
controller_percent_memory_capacity=0.5

# Automation hub
# https://docs.redhat.com/en/documentation/red_hat_ansible_automation_platform/2.5/html/containerized_installation/appendix-inventory-files-vars#hub-variables
# -----------------------------------------------------
hub_admin_password=<set your own>
hub_pg_host=aap.example.org
hub_pg_password=<set your own>
hub_seed_collections=false

# Event-Driven Ansible controller
# https://docs.redhat.com/en/documentation/red_hat_ansible_automation_platform/2.5/html/containerized_installation/appendix-inventory-files-vars#event-driven-ansible-variables
# -----------------------------------------------------
eda_admin_password=<set your own>
eda_pg_host=aap.example.org
eda_pg_password=<set your own>
Copy to Clipboard Toggle word wrap
  • ansible_connection=local - 用于在托管 Ansible Automation Platform 的同一节点上运行安装程序的 all-in-one 安装。

    • 如果安装程序从单独的节点运行,请不要包含 ansible_connection=local。在这种情况下,使用 SSH 连接。
  • [database] - 清单文件中的这个组定义了 Ansible Automation Platform 管理的数据库。

使用示例清单文件为容器化企业拓扑执行在线安装:

# This is the Ansible Automation Platform enterprise installer inventory file
# Consult the docs if you are unsure what to add
# For all optional variables consult the included README.md
# or the Red Hat documentation:
# https://docs.redhat.com/en/documentation/red_hat_ansible_automation_platform/2.5/html/containerized_installation

# This section is for your platform gateway hosts
# -----------------------------------------------------
[automationgateway]
gateway1.example.org
gateway2.example.org

# This section is for your automation controller hosts
# -----------------------------------------------------
[automationcontroller]
controller1.example.org
controller2.example.org

# This section is for your Ansible Automation Platform execution hosts
# -----------------------------------------------------
[execution_nodes]
hop1.example.org receptor_type='hop'
exec1.example.org
exec2.example.org

# This section is for your automation hub hosts
# -----------------------------------------------------
[automationhub]
hub1.example.org
hub2.example.org

# This section is for your Event-Driven Ansible controller hosts
# -----------------------------------------------------
[automationeda]
eda1.example.org
eda2.example.org

[redis]
gateway1.example.org
gateway2.example.org
hub1.example.org
hub2.example.org
eda1.example.org
eda2.example.org

[all:vars]

# Common variables
# https://docs.redhat.com/en/documentation/red_hat_ansible_automation_platform/2.5/html/containerized_installation/appendix-inventory-files-vars#general-variables
# -----------------------------------------------------
postgresql_admin_username=<set your own>
postgresql_admin_password=<set your own>
registry_username=<your RHN username>
registry_password=<your RHN password>

# Platform gateway
# https://docs.redhat.com/en/documentation/red_hat_ansible_automation_platform/2.5/html/containerized_installation/appendix-inventory-files-vars#platform-gateway-variables
# -----------------------------------------------------
gateway_admin_password=<set your own>
gateway_pg_host=externaldb.example.org
gateway_pg_database=<set your own>
gateway_pg_username=<set your own>
gateway_pg_password=<set your own>

# Automation controller
# https://docs.redhat.com/en/documentation/red_hat_ansible_automation_platform/2.5/html/containerized_installation/appendix-inventory-files-vars#controller-variables
# -----------------------------------------------------
controller_admin_password=<set your own>
controller_pg_host=externaldb.example.org
controller_pg_database=<set your own>
controller_pg_username=<set your own>
controller_pg_password=<set your own>

# Automation hub
# https://docs.redhat.com/en/documentation/red_hat_ansible_automation_platform/2.5/html/containerized_installation/appendix-inventory-files-vars#hub-variables
# -----------------------------------------------------
hub_admin_password=<set your own>
hub_pg_host=externaldb.example.org
hub_pg_database=<set your own>
hub_pg_username=<set your own>
hub_pg_password=<set your own>

# Event-Driven Ansible controller
# https://docs.redhat.com/en/documentation/red_hat_ansible_automation_platform/2.5/html/containerized_installation/appendix-inventory-files-vars#event-driven-ansible-variables
# -----------------------------------------------------
eda_admin_password=<set your own>
eda_pg_host=externaldb.example.org
eda_pg_database=<set your own>
eda_pg_username=<set your own>
eda_pg_password=<set your own>
Copy to Clipboard Toggle word wrap

4.7. 设置 registry_username 和 registry_password

registry_usernameregistry_password 变量用于在线非捆绑包安装时,您需要创建新的 registry 服务帐户。

registry 服务帐户名为 token,您可以在共享凭证的环境中使用,如部署系统。

流程

  1. 进入 https://access.redhat.com/terms-based-registry/accounts
  2. Registry Service Accounts 页面中,单击 New Service Account
  3. 仅使用允许的字符为帐户输入一个名称。
  4. (可选)输入帐户的描述。
  5. Create
  6. 通过在搜索字段中搜索您的名称,在列表中找到创建的帐户。
  7. 点您创建的帐户的名称。
  8. 或者,如果您知道令牌的名称,可以通过输入 URL 来直接进入页面:

    https://access.redhat.com/terms-based-registry/token/<name-of-your-token>
    Copy to Clipboard Toggle word wrap
  9. 此时会打开 令牌 页面,显示生成的用户名(与帐户名称不同)和令牌。

    1. 如果没有令牌,点 Regenerate Token。您还可以单击它以生成新的用户名和令牌。
  10. 复制用户名(如"1234567|testuser")并使用它来设置变量 registry_username
  11. 复制令牌,并使用它来设置变量 registry_password

第 5 章 高级容器化部署

为复杂的容器化 Ansible Automation Platform 部署配置外部数据库、自定义 TLS 证书、执行节点、HAProxy 负载均衡器和 hub 存储。

如果不使用这些高级配置选项,请参阅 安装容器化 Ansible Automation Platform 以继续安装。

当使用 redhat.insights_eda 或类似的插件在 Event-Driven Ansible 控制器中运行规则激活时,您必须将安全插件变量添加到 Ansible Automation Platform 中的目录中。这样可确保 Event-Driven Ansible 控制器和源插件之间的连接,并正确显示端口映射。

流程

  1. 为安全插件变量创建目录:

    mkdir -p ./group_vars/automationeda
    Copy to Clipboard Toggle word wrap
  2. 在该目录中为您的新设置创建一个文件(例如,touch ./group_vars/automationeda/custom.yml
  3. 使用要启用的插件列表添加变量 eda_safe_plugins。例如:

    eda_safe_plugins: ['ansible.eda.webhook', 'ansible.eda.alertmanager']
    Copy to Clipboard Toggle word wrap

5.2. 添加执行节点

容器化 Ansible Automation Platform 可以部署远程执行节点。

您可以在清单文件的 [execution_nodes] 组中定义远程执行节点:

[execution_nodes]
<fqdn_of_your_execution_host>
Copy to Clipboard Toggle word wrap

默认情况下,执行节点使用以下设置,您可以根据需要更新:

receptor_port=27199
receptor_protocol=tcp
receptor_type=execution
Copy to Clipboard Toggle word wrap
  • receptor_port - 接收器侦听来自其他 receptor 节点的传入连接的端口号。
  • receptor_type - 节点的角色。有效选项包括 executionhop
  • receptor_protocol - 用于通信的协议。有效选项包括 tcpudp

默认情况下,安装程序会将 [execution_nodes] 组中的所有节点添加为控制器节点的对等点。要更改对等配置,请使用 receptor_peers 变量。

注意

receptor_peers 的值必须是以逗号分隔的主机名列表。不要使用清单组名称。

配置示例:

[execution_nodes]
# Execution nodes
exec1.example.com
exec2.example.com
# Hop node that peers with the two execution nodes above
hop1.example.com receptor_type=hop receptor_peers='["exec1.example.com","exec2.example.com"]'
Copy to Clipboard Toggle word wrap

5.3. 为自动化中心配置存储

使用 Amazon S3、Azure Blob Storage 或 Network File System (NFS)为自动化中心配置存储后端以存储自动化内容。

5.3.1. 为自动化中心配置 Amazon S3 存储

Amazon S3 存储是容器化安装支持的对象存储类型。使用 AWS S3 存储后端时,将 hub_storage_backend 设置为 s3。在运行安装程序前,AWS S3 存储桶需要存在。

流程

  1. 在继续安装前,请确保您的 AWS S3 存储桶存在。
  2. [all:vars] 组下的 inventory 文件中添加以下变量来配置 S3 存储:

    • hub_s3_access_key
    • hub_s3_secret_key
    • hub_s3_bucket_name
    • hub_s3_extra_settings

      您可以通过 Ansible hub_s3_extra_settings 字典传递额外的参数。例如:

      hub_s3_extra_settings:
        AWS_S3_MAX_MEMORY_SIZE: 4096
        AWS_S3_REGION_NAME: eu-central-1
        AWS_S3_USE_SSL: True
      Copy to Clipboard Toggle word wrap

5.3.2. 为自动化中心配置 Azure Blob Storage

Azure Blob 存储是容器化安装支持的对象存储类型。使用 Azure blob 存储后端时,将 hub_storage_backend 设置为 azure。在运行安装程序前,Azure 容器需要存在。

流程

  1. 在继续安装前,请确保 Azure 容器存在。
  2. 将以下变量添加到 [all:vars] 组下的清单文件中以配置 Azure Blob 存储:

    • hub_azure_account_key
    • hub_azure_account_name
    • hub_azure_container
    • hub_azure_extra_settings

      您可以通过 Ansible hub_azure_extra_settings 字典传递额外的参数。例如:

      hub_azure_extra_settings:
        AZURE_LOCATION: foo
        AZURE_SSL: True
        AZURE_URL_EXPIRATION_SECS: 60
      Copy to Clipboard Toggle word wrap

5.3.3. 为自动化 hub 配置网络文件系统(NFS)存储

NFS 是容器化安装支持的共享存储类型。当使用 文件 存储后端安装多个自动化中心实例时,需要共享存储。安装单一自动化中心实例时,共享存储是可选的。

流程

  1. 要为自动化中心配置共享存储,请在清单文件中设置 hub_shared_data_path 变量:

    hub_shared_data_path=<path_to_nfs_share>
    Copy to Clipboard Toggle word wrap

    该值必须与格式 host:dir 匹配,如 nfs-server.example.com:/exports/hub

  2. (可选)要更改 NFS 共享的挂载选项,请使用 hub_shared_data_mount_opts 变量。默认值为 rw,sync,hard

5.4. 配置 HAProxy 负载均衡器

要在平台网关前面使用自定义 CA 证书配置 HAProxy 负载均衡器,请在 [all:vars] 组下设置以下清单文件变量:

custom_ca_cert=<path_to_cert_crt>
gateway_main_url=<https://load_balancer_url>
Copy to Clipboard Toggle word wrap
注意

平台网关不支持 HAProxy SSL passthrough 模式。

5.5. 启用自动化内容集合和容器签名

默认禁用自动化内容签名。要启用它,清单文件需要以下安装变量:

# Collection signing
hub_collection_signing=true
hub_collection_signing_key=<full_path_to_collection_gpg_key>

# Container signing
hub_container_signing=true
hub_container_signing_key=<full_path_to_container_gpg_key>
Copy to Clipboard Toggle word wrap

如果密钥受密码短语保护,则需要以下变量:

# Collection signing
hub_collection_signing_pass=<gpg_key_passphrase>

# Container signing
hub_container_signing_pass=<gpg_key_passphrase>
Copy to Clipboard Toggle word wrap

hub_collection_signing_keyhub_container_signing_key 变量需要在运行安装前设置密钥。

自动化内容签名目前只支持基于 GnuPG (GPG)的签名密钥。有关 GPG 的更多信息,请参阅 GnuPG 手册页

注意

使用的算法和密码由客户负责。

流程

  1. 在 RHEL9 服务器上运行以下命令为集合签名创建新密钥对:

    gpg --gen-key
    Copy to Clipboard Toggle word wrap
  2. 为 "Real name" 和 "Email address" 输入您的信息:

    输出示例:

    gpg --gen-key
    gpg (GnuPG) 2.3.3; Copyright (C) 2021 Free Software Foundation, Inc.
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law.
    
    Note: Use "gpg --full-generate-key" for a full featured key generation dialog.
    
    GnuPG needs to construct a user ID to identify your key.
    
    Real name: Joe Bloggs
    Email address: jbloggs@example.com
    You selected this USER-ID:
        "Joe Bloggs <jbloggs@example.com>"
    
    Change (N)ame, (E)mail, or (O)kay/(Q)uit? O
    Copy to Clipboard Toggle word wrap
    • 如果此操作失败,则您的环境没有为 GPG 安装必要的先决条件软件包。安装所需的软件包以继续。
    • 这时将出现一个对话框并要求您输入密码短语。这是可选的,但推荐使用。
    • 然后生成密钥,并生成类似如下的输出:

      We need to generate a lot of random bytes. It is a good idea to perform
      some other action (type on the keyboard, move the mouse, utilize the
      disks) during the prime generation; this gives the random number
      generator a better chance to gain enough entropy.
      gpg: key 022E4FBFB650F1C4 marked as ultimately trusted
      gpg: revocation certificate stored as '/home/aapuser/.gnupg/openpgp-revocs.d/F001B037976969DD3E17A829022E4FBFB650F1C4.rev'
      public and secret key created and signed.
      
      pub   rsa3072 2024-10-25 [SC] [expires: 2026-10-25]
            F001B037976969DD3E17A829022E4FBFB650F1C4
      uid                      Joe Bloggs <jbloggs@example.com>
      sub   rsa3072 2024-10-25 [E] [expires: 2026-10-25]
      Copy to Clipboard Toggle word wrap
    • 请注意,您可以根据公司标准和需求设置的到期日期。
  3. 您可以运行以下命令来查看所有 GPG 密钥:

    gpg --list-secret-keys --keyid-format=long
    Copy to Clipboard Toggle word wrap
  4. 要导出公钥,请运行以下命令:

    gpg --export -a --output collection-signing-key.pub <email_address_used_to_generate_key>
    Copy to Clipboard Toggle word wrap
  5. 要导出私钥,请运行以下命令:

    gpg -a --export-secret-keys <email_address_used_to_generate_key> > collection-signing-key.priv
    Copy to Clipboard Toggle word wrap
    • 如果出现提示,请输入密码短语。
  6. 要查看私钥文件内容,请运行以下命令:

    cat collection-signing-key.priv
    Copy to Clipboard Toggle word wrap

    输出示例:

    -----BEGIN PGP PRIVATE KEY BLOCK-----
    
    lQWFBGcbN14BDADTg5BsZGbSGMHypUJMuzmIffzzz4LULrZA8L/I616lzpBHJvEs
    sSN6KuKY1TcIwIDCCa/U5Obm46kurpP2Y+vNA1YSEtMJoSeHeamWMDd99f49ItBp
    
    <snippet>
    
    j920hRy/3wJGRDBMFa4mlQg=
    =uYEF
    -----END PGP PRIVATE KEY BLOCK-----
    Copy to Clipboard Toggle word wrap
  7. 重复步骤 1 到 7,以创建用于容器签名的密钥对。
  8. 在清单文件中添加以下变量并运行安装来创建签名服务:

    # Collection signing
    hub_collection_signing=true
    hub_collection_signing_key=/home/aapuser/aap/ansible-automation-platform-containerized-setup-<version_number>/collection-signing-key.priv
    # This variable is required if the key is protected by a passphrase
    hub_collection_signing_pass=<password>
    
    # Container signing
    hub_container_signing=true
    hub_container_signing_key=/home/aapuser/aap/ansible-automation-platform-containerized-setup-<version_number>/container-signing-key.priv
    # This variable is required if the key is protected by a passphrase
    hub_container_signing_pass=<password>
    Copy to Clipboard Toggle word wrap

5.6. 配置外部(客户提供)PostgreSQL 数据库

为容器化 Ansible Automation Platform 设置外部(客户提供)PostgreSQL 数据库,以使用您自己的数据库基础架构。

设置外部数据库时有两种场景:

  1. 具有 PostgreSQL 管理员凭证的外部数据库
  2. 没有 PostgreSQL 管理员凭证的外部数据库
重要
  • 将外部数据库与 Ansible Automation Platform 搭配使用时,您必须创建和支持该数据库。在卸载 Ansible Automation Platform 时,请确保清除外部数据库。
  • Red Hat Ansible Automation Platform 要求客户提供(外部)数据库才能获得 ICU 支持。
  • 在配置外部数据库期间,您必须检查外部数据库覆盖。如需更多信息,请参阅 Red Hat Ansible Automation Platform 数据库的支持覆盖范围

如果您有 PostgreSQL admin 凭证,您可以在清单文件中提供它们,安装程序会为您创建 PostgreSQL 用户和数据库。PostgreSQL admin 帐户必须具有 SUPERUSER 特权。

流程

  • 要配置 PostgreSQL admin 凭证,请在 [all:vars] 组下的清单文件中添加以下变量:

    postgresql_admin_username=<set your own>
    postgresql_admin_password=<set your own>
    Copy to Clipboard Toggle word wrap

如果您没有 PostgreSQL admin 凭证,则需要在运行安装程序前为每个组件(平台网关、自动化控制器、自动化中心和 Ansible)创建 PostgreSQL 用户和密码。

流程

  1. 使用具有 SUPERUSER 特权的用户连接到兼容 PostgreSQL 的数据库服务器。

    # psql -h <hostname> -U <username> -p <port_number>
    Copy to Clipboard Toggle word wrap

    例如:

    # psql -h db.example.com -U superuser -p 5432
    Copy to Clipboard Toggle word wrap
  2. 使用密码创建用户,并确保将 CREATEDB 角色分配给该用户。如需更多信息,请参阅 数据库角色

    CREATE USER <username> WITH PASSWORD <password> CREATEDB;
    Copy to Clipboard Toggle word wrap
  3. 创建数据库并添加您创建的用户作为所有者。

    CREATE DATABASE <database_name> OWNER <username>;
    Copy to Clipboard Toggle word wrap
  4. 为各个组件创建 PostgreSQL 用户和数据库后,您可以在 [all:vars] 组下的清单文件中提供它们。

    # Platform gateway
    gateway_pg_host=aap.example.org
    gateway_pg_database=<set your own>
    gateway_pg_username=<set your own>
    gateway_pg_password=<set your own>
    
    # Automation controller
    controller_pg_host=aap.example.org
    controller_pg_database=<set your own>
    controller_pg_username=<set your own>
    controller_pg_password=<set your own>
    
    # Automation hub
    hub_pg_host=aap.example.org
    hub_pg_database=<set your own>
    hub_pg_username=<set your own>
    hub_pg_password=<set your own>
    
    # Event-Driven Ansible
    eda_pg_host=aap.example.org
    eda_pg_database=<set your own>
    eda_pg_username=<set your own>
    eda_pg_password=<set your own>
    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

默认禁用 mTLS 身份验证。要使用 mTLS 身份验证配置每个组件的数据库,请将以下变量添加到 [all:vars] 组下,并确保每个组件都有不同的 TLS 证书和密钥:

流程

  • 将以下变量添加到清单文件中的 [all:vars] 组:

    # Platform gateway
    gateway_pg_cert_auth=true
    gateway_pg_tls_cert=/path/to/gateway.cert
    gateway_pg_tls_key=/path/to/gateway.key
    gateway_pg_sslmode=verify-full
    
    # Automation controller
    controller_pg_cert_auth=true
    controller_pg_tls_cert=/path/to/awx.cert
    controller_pg_tls_key=/path/to/awx.key
    controller_pg_sslmode=verify-full
    
    # Automation hub
    hub_pg_cert_auth=true
    hub_pg_tls_cert=/path/to/pulp.cert
    hub_pg_tls_key=/path/to/pulp.key
    hub_pg_sslmode=verify-full
    
    # Event-Driven Ansible
    eda_pg_cert_auth=true
    eda_pg_tls_cert=/path/to/eda.cert
    eda_pg_tls_key=/path/to/eda.key
    eda_pg_sslmode=verify-full
    Copy to Clipboard Toggle word wrap

5.7. 配置自定义 TLS 证书

Red Hat Ansible Automation Platform 使用 X.509 证书和密钥对来保护流量。这些证书保护 Ansible Automation Platform 组件和公共 UI 和 API 连接的外部流量之间的内部流量。

管理 Ansible Automation Platform 部署的 TLS 证书主要有两种方法:

  1. Ansible Automation Platform 生成的证书(这是默认设置)
  2. 用户提供的证书

5.7.1. Ansible Automation Platform 生成的证书

默认情况下,安装程序会创建一个自签名证书颁发机构(CA),并使用它来为所有 Ansible Automation Platform 服务生成自签名 TLS 证书。自签名 CA 证书和密钥在 ~/aap/tls/ 目录下的一个节点上生成,并复制到所有其他节点上的相同位置。此 CA 在初始创建日期后的 10 年内有效。

自签名证书不是任何公共信任链的一部分。安装程序会创建一个证书信任存储,其中包含 ~/aap/tls/extracted/ 下的自签名 CA 证书,并将该目录绑定到 /etc/pki/ca-trust/extracted/ 下的每个 Ansible Automation Platform 服务容器。这允许每个 Ansible Automation Platform 组件验证其他 Ansible Automation Platform 服务的自签名证书。CA 证书也可以根据需要添加到其他系统或浏览器的信任存储中。

5.7.2. 用户提供的证书

要使用您自己的 TLS 证书和密钥替换在安装过程中生成的部分或所有自签名证书,您可以在清单文件中设置特定的变量。公共或机构 CA 必须提前生成这些证书和密钥,以便在安装过程中可用。

5.7.2.1. 使用自定义 CA 生成所有 TLS 证书

当您希望 Ansible Automation Platform 生成所有证书时,使用此方法,但您希望由自定义 CA 签名,而不是默认的自签名证书。

流程

  • 要使用自定义证书颁发机构(CA)为所有 Ansible Automation Platform 服务生成 TLS 证书,请在清单文件中设置以下变量:

    ca_tls_cert=<path_to_ca_tls_certificate>
    ca_tls_key=<path_to_ca_tls_key>
    Copy to Clipboard Toggle word wrap
5.7.2.2. 为每个服务提供自定义 TLS 证书

如果您的机构在 Ansible Automation Platform 之外管理 TLS 证书,且需要手动置备,则使用此方法。

流程

  • 要手动为每个单个服务提供 TLS 证书(如自动化控制器、自动化中心和 Event-Driven Ansible),请在清单文件中设置以下变量:

    # Platform gateway
    gateway_tls_cert=<path_to_tls_certificate>
    gateway_tls_key=<path_to_tls_key>
    gateway_pg_tls_cert=<path_to_tls_certificate>
    gateway_pg_tls_key=<path_to_tls_key>
    gateway_redis_tls_cert=<path_to_tls_certificate>
    gateway_redis_tls_key=<path_to_tls_key>
    
    # Automation controller
    controller_tls_cert=<path_to_tls_certificate>
    controller_tls_key=<path_to_tls_key>
    controller_pg_tls_cert=<path_to_tls_certificate>
    controller_pg_tls_key=<path_to_tls_key>
    
    # Automation hub
    hub_tls_cert=<path_to_tls_certificate>
    hub_tls_key=<path_to_tls_key>
    hub_pg_tls_cert=<path_to_tls_certificate>
    hub_pg_tls_key=<path_to_tls_key>
    
    # Event-Driven Ansible
    eda_tls_cert=<path_to_tls_certificate>
    eda_tls_key=<path_to_tls_key>
    eda_pg_tls_cert=<path_to_tls_certificate>
    eda_pg_tls_key=<path_to_tls_key>
    eda_redis_tls_cert=<path_to_tls_certificate>
    eda_redis_tls_key=<path_to_tls_key>
    
    # PostgreSQL
    postgresql_tls_cert=<path_to_tls_certificate>
    postgresql_tls_key=<path_to_tls_key>
    
    # Receptor
    receptor_tls_cert=<path_to_tls_certificate>
    receptor_tls_key=<path_to_tls_key>
    
    # Redis
    redis_tls_cert=<path_to_tls_certificate>
    redis_tls_key=<path_to_tls_key>
    Copy to Clipboard Toggle word wrap
5.7.2.3. 每个服务提供的证书的注意事项

在为每个服务提供自定义 TLS 证书时,请考虑以下几点:

  • 每个主机可以提供唯一的证书。这需要在您的清单文件中定义特定的 _tls_cert_tls_key 变量,如前面的清单文件示例所示。
  • 对于在多个节点间部署的服务(例如,遵循企业拓扑时),该服务提供的证书必须在 Subject Alternative Name (SAN)字段中包括所有关联节点的 FQDN。
  • 如果在执行 SSL/TLS 卸载的负载均衡器后面部署了面向外部的服务(如自动化控制器或平台网关),则服务的证书必须在 SAN 字段中包含负载均衡器的 FQDN,除了单个服务节点的 FQDN 外。
5.7.2.4. 提供自定义 CA 证书

手动提供 TLS 证书时,这些证书可能由自定义 CA 签名。提供自定义 CA 证书,以确保环境中正确验证和安全通信。如果您有多个自定义 CA 证书,则必须将它们合并到一个文件中。

流程

  • 如果您手动提供的 TLS 证书由自定义 CA 签名,则必须使用清单文件中的以下变量指定 CA 证书:

    custom_ca_cert=<path_to_custom_ca_certificate>
    Copy to Clipboard Toggle word wrap

    如果您有多个 CA 证书,请将它们组合到一个文件中,并使用 custom_ca_cert 变量引用组合证书。

5.7.3. receptor 证书注意事项

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

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

5.7.4. Redis 证书注意事项

当为 Redis 相关的服务使用自定义 TLS 证书时,如果指定扩展密钥 Usage (EKU),请考虑以下用于 mutual TLS (mTLS)通信:

  • Redis 服务器证书(redis_tls_cert)应包含 serverAuth (Web 服务器身份验证)和 clientAuth (客户端身份验证) EKU。
  • Redis 客户端证书(gateway_redis_tls_cert,eda_redis_tls_cert)应包含 clientAuth (客户端身份验证) EKU。

5.7.5. 使用自定义 Receptor 签名密钥

receptor 签名会被默认启用,除非设置了 receptor_disable_signing=true,且安装程序生成 RSA 密钥对(public 和 private)。但是,您可以使用以下变量设置自定义 RSA 公钥和私钥:

receptor_signing_private_key=<full_path_to_private_key>
receptor_signing_public_key=<full_path_to_public_key>
Copy to Clipboard Toggle word wrap

第 6 章 安装容器化 Ansible Automation Platform

在准备 Red Hat Enterprise Linux 主机、下载安装程序并配置清单文件后,运行安装 playbook 来安装 容器化的 Ansible Automation Platform。

流程

  1. 进入 Red Hat Enterprise Linux 主机上的安装目录。
  2. 运行安装 playbook:

    ansible-playbook -i <inventory_file_name> ansible.containerized_installer.install
    Copy to Clipboard Toggle word wrap

    例如:

    ansible-playbook -i inventory ansible.containerized_installer.install
    Copy to Clipboard Toggle word wrap

    您可以根据需要在安装命令中添加额外的参数:

    ansible-playbook -i <inventory_file_name> -e @<vault_file_name> --ask-vault-pass -K -v ansible.containerized_installer.install
    Copy to Clipboard Toggle word wrap

    例如:

    ansible-playbook -i inventory -e @vault.yml --ask-vault-pass -K -v  ansible.containerized_installer.install
    Copy to Clipboard Toggle word wrap
    • -i <inventory_file_name >- 用于安装的清单文件。
    • -e @<vault_file_name> --ask-vault-pass -(可选)如果使用 vault 存储敏感变量,请将其添加到安装命令中。
    • - k-(可选)如果您的权限升级(带有 root 用户)需要您输入密码,请将此添加到安装命令中。然后会提示您输入 BECOME 密码。
    • -v -(可选)您可以使用增加详细程度,最多 4 (-vvvv)来查看安装过程详情。这可显著增加安装时间。仅在需要或由红帽支持请求时使用它。

验证

  • 安装完成后,验证您可以访问以下 URL 默认可用的 Ansible Automation Platform:

    https://<gateway_node>:443
    Copy to Clipboard Toggle word wrap
  • 以 admin 用户身份登录,具有为 gateway_admin_usernamegateway_admin_password 创建的凭证。
  • 用于 Ansible Automation Platform 的默认端口和协议为 80 (HTTP)和 443 (HTTPS)。您可以使用以下变量自定义端口:

    envoy_http_port=80
    envoy_https_port=443
    Copy to Clipboard Toggle word wrap
  • 如果要禁用 HTTPS,请将 envoy_disable_https 设置为 true

    envoy_disable_https: true
    Copy to Clipboard Toggle word wrap

第 7 章 维护容器化 Ansible Automation Platform

更新、备份、恢复、卸载或重新安装容器化的 Ansible Automation Platform 部署,以支持您的自动化基础架构。

7.1. 更新容器化 Ansible Automation Platform

对从 2.5 到 2.5.x 的 Ansible Automation Platform 的基于容器的安装执行补丁更新。

不支持从 2.4 Containerized Ansible Automation Platform 技术预览升级到 2.5 Containerized Ansible Automation Platform。

先决条件

流程

  1. 以您专用非 root 用户身份登录 Red Hat Enterprise Linux 主机。
  2. 按照 下载 Ansible Automation Platform 中的步骤下载容器化 Ansible Automation Platform 的最新版本。
  3. 将下载的安装程序复制到您的 Red Hat Enterprise Linux 主机。
  4. 编辑清单文件,使其与所需配置匹配。您可以从现有 Ansible Automation Platform 部署中保留相同的参数,或者更改参数以匹配环境的任何修改。
  5. 运行安装 playbook:

    $ ansible-playbook -i inventory ansible.containerized_installer.install
    Copy to Clipboard Toggle word wrap
    • 如果您的特权升级需要输入密码,请将 -K 附加到命令中。然后会提示您输入 BECOME 密码。
    • 您可以使用增加详细程度,最多 4 个 v (-vvvv)查看安装过程的详细信息。但请注意,这可能会显著提高安装时间,因此建议您只根据需要使用它,或需要红帽支持。
  6. 更新开始。

7.2. 备份容器化 Ansible Automation Platform

对基于 Ansible Automation Platform 的基于容器的安装进行备份。

注意
  • 在备份 Ansible Automation Platform 时,请使用与您当前安装的 Ansible Automation Platform 版本匹配的安装程序。
  • 备份功能只适用于当前 Ansible Automation Platform 版本支持的 PostgreSQL 版本。如需更多信息,请参阅 系统要求
  • 存储在 Azure Blob Storage 或 Amazon S3 中的内容的备份和恢复必须通过供应商门户处理,因为每个供应商提供自己的备份解决方案。

先决条件

  • 您已以专用非 root 用户身份登录 Red Hat Enterprise Linux 主机。

流程

  1. 进入 Red Hat Enterprise Linux 主机上的 Red Hat Ansible Automation Platform 安装目录。
  2. 要在将备份工件发送到运行备份操作的主机前控制备份工件的压缩,您可以使用清单文件中的以下变量:

    1. 控制与文件系统相关的备份文件的压缩:

      # Global control of compression for filesystem backup files
      use_archive_compression=true
      
      # Component-level control of compression for filesystem backup files
      #controller_use_archive_compression=true
      #eda_use_archive_compression=true
      #gateway_use_archive_compression=true
      #hub_use_archive_compression=true
      #pcp_use_archive_compression=true
      #postgresql_use_archive_compression=true
      #receptor_use_archive_compression=true
      #redis_use_archive_compression=true
      Copy to Clipboard Toggle word wrap
    2. 控制与数据库相关的备份文件的压缩:

      # Global control of compression for database backup files
      use_db_compression=true
      
      # Component-level control of compression for database backup files
      #controller_use_db_compression=true
      #eda_use_db_compression=true
      #hub_use_db_compression=true
      #gateway_use_db_compression=true
      Copy to Clipboard Toggle word wrap
  3. 运行 备份 playbook:

    $ ansible-playbook -i <path_to_inventory> ansible.containerized_installer.backup
    Copy to Clipboard Toggle word wrap

    备份过程会创建以下数据的存档:

    • PostgreSQL 数据库
    • 配置文件
    • 数据文件

后续步骤

要自定义备份过程,您可以在清单文件中使用以下变量:

  • 使用 backup_dir 变量,从默认的 ./backups 更改备份目标目录。
  • 使用 hub_data_path_exclude 变量排除包含重复数据的路径,如快照子目录。例如,要排除一个 .snapshots 子目录,请在清单文件中指定 hub_data_path_exclude=['/.snapshots/']

    • 另外,您可以使用命令行界面和 -e 标志在运行时传递此变量:

      $ ansible-playbook -i inventory ansible.containerized_installer.backup -e hub_data_path_exclude="['*/.snapshots/*']"
      Copy to Clipboard Toggle word wrap

7.3. 恢复容器化 Ansible Automation Platform

从备份或不同的环境恢复基于容器的安装 Ansible Automation Platform。

注意

恢复 Ansible Automation Platform 时,请使用恢复时可用的最新的安装程序。例如,如果您要恢复从 2.5-1 开始的备份,请使用恢复时提供的最新的 2.5-x 安装程序。

恢复功能只适用于当前 Ansible Automation Platform 版本支持的 PostgreSQL 版本。如需更多信息,请参阅 系统要求

先决条件

  • 您已以专用非 root 用户身份登录 Red Hat Enterprise Linux 主机。
  • 您有 Ansible Automation Platform 部署的备份。如需更多信息,请参阅 备份基于容器的 Ansible Automation Platform
  • 如果恢复到具有相同主机名的不同环境,您可以在目标环境中执行一个新的安装,其拓扑与原始(源)环境相同。
  • 您已确保目标环境中的管理员凭证与源环境中的管理员凭证匹配。

流程

  1. 进入 Red Hat Enterprise Linux 主机上的安装目录。
  2. 执行相关的恢复步骤:

    • 如果您要恢复到具有相同主机名的同一环境,请运行 恢复 playbook:

      $ ansible-playbook -i <path_to_inventory> ansible.containerized_installer.restore
      Copy to Clipboard Toggle word wrap

      这会恢复容器化安装程序部署的重要数据,例如:

      • PostgreSQL 数据库
      • 配置文件
      • 数据文件

        默认情况下,备份目录设置为 ./backups。您可以使用 清单文件中的 backup_dir 变量来更改它。

    • 如果您要恢复到使用不同主机名的不同环境,请在运行 恢复 playbook 前执行以下步骤:

      重要

      不建议使用不同主机名恢复到不同的环境,只是为了作为临时解决方案。

      1. 对于每个组件,从包含 PostgreSQL 转储文件的源环境中识别备份文件。

        例如:

        $ cd ansible-automation-platform-containerized-setup-<version_number>/backups
        Copy to Clipboard Toggle word wrap
        $ tar tvf gateway_env1-gateway-node1.tar.gz | grep db
        
        -rw-r--r-- ansible/ansible 4850774 2025-06-30 11:05 aap/backups/awx.db
        Copy to Clipboard Toggle word wrap
      2. 将备份文件从源环境复制到目标环境。
      3. 在目标环境中重命名备份文件以反映新的节点名称。

        例如:

        $ cd ansible-automation-platform-containerized-setup-<version_number>/backups
        Copy to Clipboard Toggle word wrap
        $ mv gateway_env1-gateway-node1.tar.gz gateway_env2-gateway-node1.tar.gz
        Copy to Clipboard Toggle word wrap
      4. 对于企业拓扑,请确保包含 component.db 文件的组件备份文件列在清单文件中的组中。

        例如:

        $ cd ansible-automation-platform-containerized-setup-<version_number>
        Copy to Clipboard Toggle word wrap
        $ ls backups/gateway*
        
        gateway_env2-gateway-node1.tar.gz
        gateway_env2-gateway-node2.tar.gz
        Copy to Clipboard Toggle word wrap
        $ tar tvf backups/gateway_env2-gateway-node1.tar.gz | grep db
        
        -rw-r--r-- ansible/ansible 416687 2025-06-30 11:05 aap/backups/gateway.db
        Copy to Clipboard Toggle word wrap
        $ tar tvf backups/gateway_env2-gateway-node2.tar.gz | grep db
        Copy to Clipboard Toggle word wrap
        $ vi inventory
        
        [automationgateway]
        env2-gateway-node1
        env2-gateway-node2
        Copy to Clipboard Toggle word wrap

7.4. 卸载容器化 Ansible Automation Platform

卸载 Ansible Automation Platform 的基于容器的安装。

先决条件

  • 您已以专用非 root 用户身份登录 Red Hat Enterprise Linux 主机。

流程

  1. 如果要重新安装 Ansible Automation Platform 并希望使用保留的数据库,您必须收集现有的 secret 密钥:

    1. 首先,列出可用的 secret:

      $ podman secret list
      Copy to Clipboard Toggle word wrap
    2. 接下来,运行以下命令来收集 secret 密钥:

      $ podman secret inspect --showsecret <secret_key_variable> | jq -r .[].SecretData
      Copy to Clipboard Toggle word wrap

      例如:

      $ podman secret inspect --showsecret controller_secret_key | jq -r .[].SecretData
      Copy to Clipboard Toggle word wrap
  2. 运行 卸载 playbook:

    $ ansible-playbook -i inventory ansible.containerized_installer.uninstall
    Copy to Clipboard Toggle word wrap
    • 这会停止所有 systemd 单元和容器,然后删除容器化安装程序使用的所有资源,例如:

      • 配置和数据目录和文件
      • systemd 单元文件
      • podman 容器和镜像
      • RPM 软件包
    • 要保留容器镜像,请将 container_keep_images 参数设置为 true

      $ ansible-playbook -i inventory ansible.containerized_installer.uninstall -e container_keep_images=true
      Copy to Clipboard Toggle word wrap
    • 要保留 PostgreSQL 数据库,请将 postgresql_keep_databases 参数设置为 true

      $ ansible-playbook -i inventory ansible.containerized_installer.uninstall -e postgresql_keep_databases=true
      Copy to Clipboard Toggle word wrap

7.5. 重新安装容器化 Ansible Automation Platform

要在卸载并保留数据库后重新安装容器化部署,请按照 安装容器化 Ansible Automation Platform 中的步骤,并在 playbook 命令中包含现有的 secret 键值:

$ ansible-playbook -i inventory ansible.containerized_installer.install -e controller_secret_key=<secret_key_value>
Copy to Clipboard Toggle word wrap

第 8 章 断开连接的安装

您可以在没有活跃互联网连接的环境中安装容器化 Ansible Automation Platform。要做到这一点,请在执行断开连接的安装前获取并配置 RPM 源依赖项。

8.1. 获取并配置 RPM 源依赖项

Ansible Automation Platform 容器化设置捆绑包安装程序不包括 BaseOS 和 AppStream 存储库中的 RPM 源依赖项。它依赖于主机系统的软件包管理器来解决这些依赖项。

要在断开连接的环境中访问这些依赖项,您可以使用以下方法之一:

  • 使用 Red Hat Satellite 在断开连接的环境中同步存储库。
  • 在具有活跃互联网连接的 Red Hat Enterprise Linux 主机上,使用带有 reposync 命令创建的本地存储库。
  • 使用您从挂载的 Red Hat Enterprise Linux Binary DVD ISO 镜像创建的本地存储库。

8.1.1. 使用 reposync 配置本地存储库

使用 reposync 命令,您可以将 BaseOS 和 AppStream 软件仓库与活跃互联网连接的 Red Hat Enterprise Linux 主机上的本地目录同步。然后,您可以将存储库传送到断开连接的环境中。

先决条件

  • 具有活跃互联网连接的 Red Hat Enterprise Linux 主机。

流程

  1. 使用 subscription-manager 附加 BaseOS 和 AppStream 存储库,将 &lt ;RHEL_VERSION& gt; 替换为您的 RHEL 版本号:

    $ sudo subscription-manager repos \
        --enable rhel-<RHEL_VERSION>-baseos-rhui-rpms \
        --enable rhel-<RHEL_VERSION>-appstream-rhui-rpms
    Copy to Clipboard Toggle word wrap
  2. 安装 yum-utils 软件包:

    $ sudo dnf install yum-utils
    Copy to Clipboard Toggle word wrap
  3. 将存储库与 reposync 命令同步。将 <path_to_download > 替换为适当的值。

    $ sudo reposync -m --download-metadata --gpgcheck \
        -p <path_to_download>
    Copy to Clipboard Toggle word wrap

    例如:

    $ sudo reposync -m --download-metadata --gpgcheck \
        -p rhel-repos
    Copy to Clipboard Toggle word wrap
    • 将 reposync 与 --download-metadata 选项一起使用,且没有 --newest-only 选项以获得最佳性能。
  4. reposync 操作完成后,压缩目录:

    $ tar czvf rhel-repos.tar.gz rhel-repos
    Copy to Clipboard Toggle word wrap
  5. 将压缩存档移到您的断开连接的环境中。
  6. 在断开连接的环境中,创建一个目录来存储存储库文件:

    $ sudo mkdir /opt/rhel-repos
    Copy to Clipboard Toggle word wrap
  7. 将存档提取到 /opt/rhel-repos 目录中。以下命令假设存档文件位于您的主目录中:

    $ sudo tar xzvf ~/rhel-repos.tar.gz -C /opt
    Copy to Clipboard Toggle word wrap
  8. 使用以下内容在 /etc/yum.repos.d/rhel.repo 中创建一个 Yum 存储库文件,将 < RHEL_VERSION& gt; 替换为您的 RHEL 版本号:

    [RHEL-BaseOS]
    name=Red Hat Enterprise Linux BaseOS
    baseurl=file:///opt/rhel-repos/rhel-<RHEL_VERSION>-baseos-rhui-rpms
    enabled=1
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
    
    [RHEL-AppStream]
    name=Red Hat Enterprise Linux AppStream
    baseurl=file:///opt/rhel-repos/rhel-<RHEL_VERSION>-appstream-rhui-rpms
    enabled=1
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
    Copy to Clipboard Toggle word wrap
  9. 导入 gpg 密钥以允许系统验证软件包,将 < RHEL_VERSION&gt; 替换为您的 RHEL 版本号:

    $ sudo rpm --import /opt/rhel-repos/rhel-<RHEL_VERSION>-baseos-rhui-rpms/RPM-GPG-KEY-redhat-release
    Copy to Clipboard Toggle word wrap
  10. 验证存储库配置:

    $ sudo yum repolist
    Copy to Clipboard Toggle word wrap

8.1.2. 从挂载的 ISO 配置本地存储库

您可以使用 Red Hat Enterprise Linux Binary DVD 镜像在断开连接的环境中访问必要的 RPM 源依赖项。

先决条件

流程

  1. 在断开连接的环境中,创建一个挂载点目录来充当 ISO 文件的位置:

    $ sudo mkdir /media/rhel
    Copy to Clipboard Toggle word wrap
  2. 将 ISO 镜像挂载到挂载点。将 & lt;version_number& gt; 和 <arch_name > 替换为适当的值:

    $ sudo mount -o loop rhel-<version_number>-<arch_name>-dvd.iso /media/rhel
    Copy to Clipboard Toggle word wrap
    • 注意:ISO 挂载在只读状态。
  3. /etc/yum.repos.d/rhel.repo 中创建一个 Yum 存储库文件,其内容如下:

    [RHEL-BaseOS]
    name=Red Hat Enterprise Linux BaseOS
    baseurl=file:///media/rhel/BaseOS
    enabled=1
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
    
    [RHEL-AppStream]
    name=Red Hat Enterprise Linux AppStream
    baseurl=file:///media/rhel/AppStream
    enabled=1
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
    Copy to Clipboard Toggle word wrap
  4. 导入 gpg 密钥以允许系统验证软件包:

    $ sudo rpm --import /media/rhel/RPM-GPG-KEY-redhat-release
    Copy to Clipboard Toggle word wrap
  5. 验证存储库配置:

    $ sudo yum repolist
    Copy to Clipboard Toggle word wrap

8.2. 执行断开连接的安装

断开连接的安装会安装容器化 Ansible Automation Platform,而无需网络访问外部 registry。

先决条件

流程

  1. 以非 root 用户身份登录 Red Hat Enterprise Linux 主机。
  2. 按照配置清单文件 中的步骤更新清单文件

    注意

    不要在清单文件中为断开连接的安装包含 registry_usernameregistry_password。这些变量只适用于在线安装。所有容器镜像都预先打包在安装捆绑包中。

  3. 确保在清单文件中在 [all:vars] 组下包含以下变量:

    bundle_install=true
    # The bundle directory must include /bundle in the path
    bundle_dir='{{ lookup("ansible.builtin.env", "PWD") }}/bundle'
    Copy to Clipboard Toggle word wrap
  4. 按照安装 容器化 Ansible Automation Platform 中的步骤来安装容器化的 Ansible Automation Platform,并验证您的安装。

您可以为 Ansible Automation Platform 间的组件设置多节点部署。无论您需要为 Automation Execution、Automation Decisions 或自动化网格进行横向扩展,您可以根据机构的需要扩展部署。

9.1. Event-Driven Ansible 控制器中的水平扩展

使用 Event-Driven Ansible 控制器,您可以为事件自动化设置水平扩展。这个多节点部署可让您在安装过程中定义您首选的节点。您还可以随时根据您的机构需求增加或减少节点数。

此部署中使用以下节点类型:

API 节点类型
响应 Event-Driven Ansible 控制器的 HTTP REST API。
Worker 节点类型
运行 Event-Driven Ansible worker,它是 Event-Driven Ansible 组件,它不仅管理项目和激活,还执行激活本身。
混合节点类型
是 API 节点和 worker 节点的组合。

以下示例演示了如何使用主机组名称 [automationeda] 和节点类型变量 eda_type 来设置清单文件,以便在 Red Hat Enterprise Linux 虚拟机上水平扩展 Event-Driven Ansible 控制器:

[automationeda]

3.88.116.111 routable_hostname=automationeda-api.example.com eda_type=api

# worker node
3.88.116.112 routable_hostname=automationeda-api.example.com eda_type=worker
Copy to Clipboard Toggle word wrap

9.1.1. 大小和扩展指南

API 节点处理用户请求(使用 UI 或 API,worker 节点处理激活和其他后台任务),使 Event-Driven Ansible 正常工作。您需要与应用程序用户数量关联的 API 节点数量,以及与您要运行的所需激活数量相关的 worker 节点数量。

由于激活是变量并由 worker 节点控制,支持的扩展方法是使用单独的 API 和 worker 节点,而不是混合节点,因为 worker 节点分配硬件资源的有效分配。通过分离节点,您可以根据特定的需求独立扩展每种类型,从而提高了资源利用率和成本效率。

例如,您可能会考虑扩展节点部署的一个示例是,您希望为将运行大量激活的小型用户部署 Event-Driven Ansible 部署。在这种情况下,一个 API 节点足够了,但如果您需要更多,您可以扩展到三个额外的 worker 节点。

9.1.2. 为 Event-Driven Ansible 控制器设置水平扩展

要扩展(添加更多节点)或缩减(删除节点),您必须更新清单文件的内容以添加或删除节点,并重新运行安装程序。

流程

  1. 更新清单,以添加两个以上的 worker 节点:

    [automationeda]
    
    3.88.116.111 routable_hostname=automationeda-api.example.com eda_type=api
    
    3.88.116.112 routable_hostname=automationeda-api.example.com eda_type=worker
    
    # two more worker nodes
    3.88.116.113 routable_hostname=automationeda-api.example.com eda_type=worker
    
    3.88.116.114 routable_hostname=automationeda-api.example.com eda_type=worker
    Copy to Clipboard Toggle word wrap
  2. 重新运行安装程序。

使用此信息对容器化 Ansible Automation Platform 安装进行故障排除。

A.1. 收集 Ansible Automation Platform 日志

使用 sos 工具,您可以收集配置、诊断和故障排除数据,并将这些文件提供给红帽技术支持。在分析 Ansible Automation Platform 的服务请求时,sos 报告通常是红帽技术支持工程师的起点。

您可以使用适当的参数运行 log_gathering playbook,为容器化 Ansible Automation Platform 部署中的每个主机收集 sos 报告。

流程

  1. 进入 Ansible Automation Platform 安装目录。
  2. 运行 log_gathering playbook。此 playbook 连接到清单文件中的每个主机,安装 sos 工具并生成 sos 报告。

    $ ansible-playbook -i <path_to_inventory_file> ansible.containerized_installer.log_gathering
    Copy to Clipboard Toggle word wrap
  3. 可选: 要定义其他参数,请使用 -e 选项指定它们。例如:

    $ ansible-playbook -i <path_to_inventory_file> ansible.containerized_installer.log_gathering -e 'target_sos_directory=<path_to_files>' -e 'case_number=0000000' -e 'clean=true' -e 'upload=true' -s
    Copy to Clipboard Toggle word wrap
    1. 您可以使用 a -s 选项逐步浏览 playbook 中的每个任务,并确认其执行。这是可选的,但有助于调试。
    2. 以下是您可以在 log_gathering playbook 中使用的参数列表:

      Expand
      表 A.1. 参数参考
      参数名称描述default

      target_sos_directory

      用于更改 sos 报告文件的默认位置。

      当前服务器的 /tmp 目录。

      case_number

      如果与日志收集相关,则指定支持问题单号。

       

      清理

      模糊处理 sos 报告中可能出现的敏感数据。

      false

      上传

      自动将 sos 报告数据上传到红帽。

      false

  4. 收集 playbook 输出中描述的 sos 报告文件,并将它们与支持工程师共享,或使用 upload=true 额外参数将 sos 报告直接上传到红帽。

A.2. 诊断问题

对于基于容器的常规故障排除,您可以检查任何正在运行的服务的容器日志,以帮助对底层问题进行故障排除。

识别正在运行的容器

要获取正在运行的容器名称列表,请运行以下命令:

$ podman ps --all --format "{{.Names}}"
Copy to Clipboard Toggle word wrap
Expand
表 A.2. 容器详情
组件组容器名称用途

自动化控制器

automation-controller-rsyslog

处理自动化控制器的集中式日志记录。

自动化控制器

automation-controller-task

管理并运行与自动化控制器相关的任务,如运行 playbook 并与清单交互。

自动化控制器

automation-controller-web

为自动化控制器提供 REST API 的 Web 服务器。这可以通过平台网关访问和路由,以进行用户交互。

Event-Driven Ansible

automation-eda-api

公开用于 Event-Driven Ansible 的 API,允许外部系统触发和管理事件驱动的自动化。

Event-Driven Ansible

automation-eda-daphne

用于 Event-Driven Ansible 的 Web 服务器,处理 WebSocket 连接并提供静态文件。

Event-Driven Ansible

automation-eda-web

为 Event-Driven Ansible 提供 REST API 的 Web 服务器。这可以通过平台网关访问和路由,以进行用户交互。

Event-Driven Ansible

automation-eda-worker-<number>

这些容器根据传入的事件运行自动化规则和 playbook。

Event-Driven Ansible

automation-eda-activation-worker-<number>

这些容器管理自动化规则的激活,确保它们在满足特定条件时运行。

Event-Driven Ansible

automation-eda-scheduler

负责调度和管理周期性任务和规则激活。

平台网关

automation-gateway-proxy

充当反向代理,将传入请求路由到适当的 Ansible Automation Platform 服务。

平台网关

automation-gateway

负责对平台的身份验证、授权和整体请求处理,所有这些都通过 REST API 公开并由 Web 服务器提供。

Automation hub

automation-hub-api

为自动化中心提供 API,启用与集合内容、用户管理和其他自动化中心功能的交互。

Automation hub

automation-hub-content

管理并提供存储在自动化中心中的 Ansible 内容集合、角色和模块。

Automation hub

automation-hub-web

为自动化中心提供 REST API 的 Web 服务器。这可以通过平台网关访问和路由,以进行用户交互。

Automation hub

automation-hub-worker-<number>

这些容器处理自动化中心的后台任务,如内容同步、索引和验证。

Performance Co-Pilot

pcp

如果启用了 Performance Co-Pilot Monitoring,则此容器用于系统性能监控和数据收集。

PostgreSQL

postgresql

托管 Ansible Automation Platform 的 PostgreSQL 数据库。

Receptor

receptor

促进 Ansible Automation Platform 中安全可靠的通信。

Redis

redis-<suffix>

负责缓存、实时分析和快速数据检索。

检查日志

容器化 Ansible Automation Platform 使用 journald 进行 Podman 日志记录。要检查任何正在运行的容器日志,请运行 journalctl 命令:

$ journalctl CONTAINER_NAME=<container_name>
Copy to Clipboard Toggle word wrap

带有输出的命令示例:

$ journalctl CONTAINER_NAME=automation-gateway-proxy

Oct 08 01:40:12 aap.example.org automation-gateway-proxy[1919]: [2024-10-08 00:40:12.885][2][info][upstream] [external/envoy/source/common/upstream/cds_ap>
Oct 08 01:40:12 aap.example.org automation-gateway-proxy[1919]: [2024-10-08 00:40:12.885][2][info][upstream] [external/envoy/source/common/upstream/cds_ap>
Oct 08 01:40:19 aap.example.org automation-gateway-proxy[1919]: [2024-10-08T00:40:16.753Z] "GET /up HTTP/1.1" 200 - 0 1138 10 0 "192.0.2.1" "python->
Copy to Clipboard Toggle word wrap

要实时查看正在运行的容器的日志,请运行 podman logs -f 命令:

$ podman logs -f <container_name>
Copy to Clipboard Toggle word wrap

控制容器操作

您可以通过运行 systemctl 命令来控制容器的操作:

$ systemctl --user status <container_name>
Copy to Clipboard Toggle word wrap

带有输出的命令示例:

$ systemctl --user status automation-gateway-proxy
● automation-gateway-proxy.service - Podman automation-gateway-proxy.service
    Loaded: loaded (/home/user/.config/systemd/user/automation-gateway-proxy.service; enabled; preset: disabled)
    Active: active (running) since Mon 2024-10-07 12:39:23 BST; 23h ago
       Docs: man:podman-generate-systemd(1)
    Process: 780 ExecStart=/usr/bin/podman start automation-gateway-proxy (code=exited, status=0/SUCCESS)
   Main PID: 1919 (conmon)
      Tasks: 1 (limit: 48430)
     Memory: 852.0K
        CPU: 2.996s
     CGroup: /user.slice/user-1000.slice/user@1000.service/app.slice/automation-gateway-proxy.service
             └─1919 /usr/bin/conmon --api-version 1 -c 2dc3c7b2cecd73010bad1e0aaa806015065f92556ed3591c9d2084d7ee209c7a -u 2dc3c7b2cecd73010bad1e0aaa80>
Oct 08 11:44:10 aap.example.org automation-gateway-proxy[1919]: [2024-10-08T10:44:02.926Z] "GET /api/galaxy/_ui/v1/settings/ HTTP/1.1" 200 - 0 654 58 47 ">
Oct 08 11:44:10 aap.example.org automation-gateway-proxy[1919]: [2024-10-08T10:44:03.387Z] "GET /api/controller/v2/config/ HTTP/1.1" 200 - 0 4018 58 44 "1>
Oct 08 11:44:10 aap.example.org automation-gateway-proxy[1919]: [2024-10-08T10:44:03.370Z] "GET /api/galaxy/v3/plugin/ansible/search/collection-versions/?>
Oct 08 11:44:10 aap.example.org automation-gateway-proxy[1919]: [2024-10-08T10:44:03.405Z] "GET /api/controller/v2/organizations/?role_level=notification_>
Oct 08 11:44:10 aap.example.org automation-gateway-proxy[1919]: [2024-10-08T10:44:04.366Z] "GET /api/galaxy/_ui/v1/me/ HTTP/1.1" 200 - 0 1368 79 40 "192.1>
Oct 08 11:44:10 aap.example.org automation-gateway-proxy[1919]: [2024-10-08T10:44:04.360Z] "GET /api/controller/v2/workflow_approvals/?page_size=200&statu>
Oct 08 11:44:10 aap.example.org automation-gateway-proxy[1919]: [2024-10-08T10:44:04.379Z] "GET /api/controller/v2/job_templates/7/ HTTP/1.1" 200 - 0 1356>
Oct 08 11:44:10 aap.example.org automation-gateway-proxy[1919]: [2024-10-08T10:44:04.378Z] "GET /api/galaxy/_ui/v1/feature-flags/ HTTP/1.1" 200 - 0 207 81>
Oct 08 11:44:13 aap.example.org automation-gateway-proxy[1919]: [2024-10-08 10:44:13.856][2][info][upstream] [external/envoy/source/common/upstream/cds_ap>
Oct 08 11:44:13 aap.example.org automation-gateway-proxy[1919]: [2024-10-08 10:44:13.856][2][info][upstream] [external/envoy/source/common/upstream/cds_ap
Copy to Clipboard Toggle word wrap

获取有关执行平面的容器信息

要获取有关自动化控制器、Event-Driven Ansible 和 execution_nodes 节点的容器信息,请给任何 Podman 命令添加前缀:

CONTAINER_HOST=unix://run/user/<user_id>/podman/podman.sock
Copy to Clipboard Toggle word wrap

or

CONTAINERS_STORAGE_CONF=<user_home_directory>/aap/containers/storage.conf
Copy to Clipboard Toggle word wrap

输出示例:

$ CONTAINER_HOST=unix://run/user/1000/podman/podman.sock podman images

REPOSITORY                                                            TAG         IMAGE ID      CREATED     SIZE
registry.redhat.io/ansible-automation-platform-25/ee-supported-rhel8  latest      59d1bc680a7c  6 days ago  2.24 GB
registry.redhat.io/ansible-automation-platform-25/ee-minimal-rhel8    latest      a64b9fc48094  6 days ago  338 MB
Copy to Clipboard Toggle word wrap

使用这些信息对 Ansible Automation Platform 的容器化安装进行故障排除。

安装需要很长时间,或者出现错误,我应检查什么内容?

  1. 请确定您的系统满足最低要求,如 系统要求 中所述。在很多主机间分布不当的存储选择和高延迟等因素会对安装时间造成影响。
  2. 查看默认情况下位于 ./aap_install.log 的安装日志文件。您可以更改安装目录中的 ansible.cfg 文件中的日志文件位置。
  3. 临时启用任务分析回调,以概述安装程序花费最多时间的概览。要做到这一点,请使用本地 ansible.cfg 文件。在 [defaults] 部分添加回调行,例如:
$ cat ansible.cfg
[defaults]
callbacks_enabled = ansible.posix.profile_tasks
Copy to Clipboard Toggle word wrap

自动化控制器会返回 413 错误

manifest.zip 许可证文件大于 controller_nginx_client_max_body_size 设置时,会发生此错误。如果发生此错误,请更新清单文件使其包含以下变量:

controller_nginx_client_max_body_size=5m
Copy to Clipboard Toggle word wrap

默认设置 5m 应阻止此问题,但您可以根据需要增加值。

在 Amazon Web Services 中安装容器化 Ansible Automation Platform 时,您会收到没有剩余空间的输出

TASK [ansible.containerized_installer.automationcontroller : Create the receptor container] ***************************************************
fatal: [ec2-13-48-25-168.eu-north-1.compute.amazonaws.com]: FAILED! => {"changed": false, "msg": "Can't create container receptor", "stderr": "Error: creating container storage: creating an ID-mapped copy of layer \"98955f43cc908bd50ff43585fec2c7dd9445eaf05eecd1e3144f93ffc00ed4ba\": error during chown: storage-chown-by-maps: lchown usr/local/lib/python3.9/site-packages/azure/mgmt/network/v2019_11_01/operations/__pycache__/_available_service_aliases_operations.cpython-39.pyc: no space left on device: exit status 1\n", "stderr_lines": ["Error: creating container storage: creating an ID-mapped copy of layer \"98955f43cc908bd50ff43585fec2c7dd9445eaf05eecd1e3144f93ffc00ed4ba\": error during chown: storage-chown-by-maps: lchown usr/local/lib/python3.9/site-packages/azure/mgmt/network/v2019_11_01/operations/__pycache__/_available_service_aliases_operations.cpython-39.pyc: no space left on device: exit status 1"], "stdout": "", "stdout_lines": []}
Copy to Clipboard Toggle word wrap

如果要将 /home 文件系统安装到默认的 Amazon Web Services marketplace RHEL 实例中,则可能太小,因为 /home 是 root / 文件系统的一部分。要解决这个问题,您必须留出更多可用空间。有关系统要求的更多信息,请参阅 系统要求

因为不可用的软件包,安装容器工具"任务会失败

这个错误可在安装过程输出中看到,如下所示:

TASK [ansible.containerized_installer.common : Install container tools] **********************************************************************************************************
fatal: [192.0.2.1]: FAILED! => {"changed": false, "failures": ["No package crun available.", "No package podman available.", "No package slirp4netns available.", "No package fuse-overlayfs available."], "msg": "Failed to install some of the specified packages", "rc": 1, "results": []}
fatal: [192.0.2.2]: FAILED! => {"changed": false, "failures": ["No package crun available.", "No package podman available.", "No package slirp4netns available.", "No package fuse-overlayfs available."], "msg": "Failed to install some of the specified packages", "rc": 1, "results": []}
fatal: [192.0.2.3]: FAILED! => {"changed": false, "failures": ["No package crun available.", "No package podman available.", "No package slirp4netns available.", "No package fuse-overlayfs available."], "msg": "Failed to install some of the specified packages", "rc": 1, "results": []}
fatal: [192.0.2.4]: FAILED! => {"changed": false, "failures": ["No package crun available.", "No package podman available.", "No package slirp4netns available.", "No package fuse-overlayfs available."], "msg": "Failed to install some of the specified packages", "rc": 1, "results": []}
fatal: [192.0.2.5]: FAILED! => {"changed": false, "failures": ["No package crun available.", "No package podman available.", "No package slirp4netns available.", "No package fuse-overlayfs available."], "msg": "Failed to install some of the specified packages", "rc": 1, "results": []}
Copy to Clipboard Toggle word wrap

要修复这个错误,请在目标主机上运行以下命令:

sudo subscription-manager register
Copy to Clipboard Toggle word wrap

使用此信息对容器化 Ansible Automation Platform 配置进行故障排除。

有时,安装用于 seeding my Ansible Automation Platform 内容错误

这可以将自身视为类似如下的输出:

TASK [infra.controller_configuration.projects : Configure Controller Projects | Wait for finish the projects creation] ***************************************
Friday 29 September 2023  11:02:32 +0100 (0:00:00.443)       0:00:53.521 ******
FAILED - RETRYING: [daap1.lan]: Configure Controller Projects | Wait for finish the projects creation (1 retries left).
failed: [daap1.lan] (item={'failed': 0, 'started': 1, 'finished': 0, 'ansible_job_id': '536962174348.33944', 'results_file': '/home/aap/.ansible_async/536962174348.33944', 'changed': False, '__controller_project_item': {'name': 'AAP Config-As-Code Examples', 'organization': 'Default', 'scm_branch': 'main', 'scm_clean': 'no', 'scm_delete_on_update': 'no', 'scm_type': 'git', 'scm_update_on_launch': 'no', 'scm_url': 'https://github.com/user/repo.git'}, 'ansible_loop_var': '__controller_project_item'}) => {"__projects_job_async_results_item": {"__controller_project_item": {"name": "AAP Config-As-Code Examples", "organization": "Default", "scm_branch": "main", "scm_clean": "no", "scm_delete_on_update": "no", "scm_type": "git", "scm_update_on_launch": "no", "scm_url": "https://github.com/user/repo.git"}, "ansible_job_id": "536962174348.33944", "ansible_loop_var": "__controller_project_item", "changed": false, "failed": 0, "finished": 0, "results_file": "/home/aap/.ansible_async/536962174348.33944", "started": 1}, "ansible_job_id": "536962174348.33944", "ansible_loop_var": "__projects_job_async_results_item", "attempts": 30, "changed": false, "finished": 0, "results_file": "/home/aap/.ansible_async/536962174348.33944", "started": 1, "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []}
Copy to Clipboard Toggle word wrap

infra.controller_configuration.dispatch 角色使用一个异步循环,30 次重试来应用每个配置类型,重试之间的默认延迟为 1 秒。如果配置较大,这可能没有足够的时间来在最后一次重试发生前应用所有内容。

通过将 controller_configuration_async_delay 变量设置为 2 秒来增加重试延迟。您可以在安装程序清单文件的 [all:vars] 部分中设置此变量。

重新运行安装程序以确保一切都按预期工作。

A.5. 容器化 Ansible Automation Platform 参考

使用此信息了解容器化 Ansible Automation Platform 部署的架构。

您可以提供 Ansible Automation Platform 容器化设计的架构详情吗?

我们尽可能使用许多底层的 Red Hat Enterprise Linux 技术。Podman 用于容器运行时和管理服务。

使用 podman ps 列出系统中正在运行的容器:

$ podman ps

CONTAINER ID  IMAGE                                                                        COMMAND               CREATED         STATUS         PORTS       NAMES
88ed40495117  registry.redhat.io/rhel8/postgresql-13:latest                                run-postgresql        48 minutes ago  Up 47 minutes              postgresql
8f55ba612f04  registry.redhat.io/rhel8/redis-6:latest                                      run-redis             47 minutes ago  Up 47 minutes              redis
56c40445c590  registry.redhat.io/ansible-automation-platform-24/ee-supported-rhel8:latest  /usr/bin/receptor...  47 minutes ago  Up 47 minutes              receptor
f346f05d56ee  registry.redhat.io/ansible-automation-platform-24/controller-rhel8:latest    /usr/bin/launch_a...  47 minutes ago  Up 45 minutes              automation-controller-rsyslog
26e3221963e3  registry.redhat.io/ansible-automation-platform-24/controller-rhel8:latest    /usr/bin/launch_a...  46 minutes ago  Up 45 minutes              automation-controller-task
c7ac92a1e8a1  registry.redhat.io/ansible-automation-platform-24/controller-rhel8:latest    /usr/bin/launch_a...  46 minutes ago  Up 28 minutes              automation-controller-web
Copy to Clipboard Toggle word wrap

使用 podman images 显示有关本地存储的镜像的信息:

$ podman images

REPOSITORY                                                            TAG         IMAGE ID      CREATED      SIZE
registry.redhat.io/ansible-automation-platform-24/ee-supported-rhel8  latest      b497bdbee59e  10 days ago  3.16 GB
registry.redhat.io/ansible-automation-platform-24/controller-rhel8    latest      ed8ebb1c1baa  10 days ago  1.48 GB
registry.redhat.io/rhel8/redis-6                                      latest      78905519bb05  2 weeks ago  357 MB
registry.redhat.io/rhel8/postgresql-13                                latest      9b65bc3d0413  2 weeks ago  765 MB
Copy to Clipboard Toggle word wrap

默认情况下,容器化 Ansible Automation Platform 作为无根容器运行,以提高安全性。这意味着您可以使用任何本地非特权用户帐户安装容器化的 Ansible Automation Platform。只有某些根级别任务需要特权升级,默认情况下不需要直接使用 root 用户。

安装程序将以下文件添加到在底层 Red Hat Enterprise Linux 主机上运行安装程序的文件系统中:

$ tree -L 1
    .
    ├── aap_install.log
    ├── ansible.cfg
    ├── collections
    ├── galaxy.yml
    ├── inventory
    ├── LICENSE
    ├── meta
    ├── playbooks
    ├── plugins
    ├── README.md
    ├── requirements.yml
    ├── roles
Copy to Clipboard Toggle word wrap

安装根目录包括使用 Podman 卷的其他容器化服务。

以下是进一步参考的一些示例:

containers 目录包括一些为 execution plane 使用并安装的 Podman 细节:

    containers/
    ├── podman
    ├── storage
    │   ├── defaultNetworkBackend
    │   ├── libpod
    │   ├── networks
    │   ├── overlay
    │   ├── overlay-containers
    │   ├── overlay-images
    │   ├── overlay-layers
    │   ├── storage.lock
    │   └── userns.lock
    └── storage.conf
Copy to Clipboard Toggle word wrap

控制器 目录具有一些已安装的配置和运行时数据点:

    controller/
    ├── data
    │   ├── job_execution
    │   ├── projects
    │   └── rsyslog
    ├── etc
    │   ├── conf.d
    │   ├── launch_awx_task.sh
    │   ├── settings.py
    │   ├── tower.cert
    │   └── tower.key
    ├── nginx
    │   └── etc
    ├── rsyslog
    │   └── run
    └── supervisor
        └── run
Copy to Clipboard Toggle word wrap

receptor 目录有自动化网格配置:

    receptor/
    ├── etc
    │   └── receptor.conf
    └── run
        ├── receptor.sock
        └── receptor.sock.lock
Copy to Clipboard Toggle word wrap

安装后,您还将在本地用户的 /home 目录中找到其他文件,如 .cache 目录:

    .cache/
    ├── containers
    │   └── short-name-aliases.conf.lock
    └── rhsm
        └── rhsm.log
Copy to Clipboard Toggle word wrap

由于服务默认使用无根 Podman 运行,您可以使用其他服务,如以非特权用户身份运行 systemd。在 systemd 下,您可以看到一些可用的组件服务控制:

.config 目录:

    .config/
    ├── cni
    │   └── net.d
    │       └── cni.lock
    ├── containers
    │   ├── auth.json
    │   └── containers.conf
    └── systemd
        └── user
            ├── automation-controller-rsyslog.service
            ├── automation-controller-task.service
            ├── automation-controller-web.service
            ├── default.target.wants
            ├── podman.service.d
            ├── postgresql.service
            ├── receptor.service
            ├── redis.service
            └── sockets.target.wants
Copy to Clipboard Toggle word wrap

这特定于 Podman,符合开放容器项目(OCI)规格。当您以 root 用户身份运行 Podman 时,默认使用 /var/lib/containers。对于标准用户,使用 $HOME/.local 下的层次结构。

.local 目录:

    .local/
    └── share
        └── containers
            ├── cache
            ├── podman
            └── storage
Copy to Clipboard Toggle word wrap

例如 .local/storage/volumes 包含 podman volume ls 提供的输出信息:

$ podman volume ls

DRIVER      VOLUME NAME
local       d73d3fe63a957bee04b4853fd38c39bf37c321d14fdab9ee3c9df03645135788
local       postgresql
local       redis_data
local       redis_etc
local       redis_run
Copy to Clipboard Toggle word wrap

执行平面与 control plane 主服务隔离,以确保它不会影响主服务。

control plane 服务使用标准 Podman 配置运行,并可在以下位置找到: ~/.local/share/containers/storage

执行平面服务(自动化控制器、EventDriven Ansible 和执行节点)使用 ~/aap/containers/storage.conf 中的专用配置。这种分离可防止执行 plane 容器影响 control plane 服务。

您可以使用以下命令之一查看 execution plane 配置:

CONTAINERS_STORAGE_CONF=~/aap/containers/storage.conf podman <subcommand>
Copy to Clipboard Toggle word wrap
CONTAINER_HOST=unix://run/user/<user uid>/podman/podman.sock podman <subcommand>
Copy to Clipboard Toggle word wrap

如何查看主机资源利用率统计信息?

运行以下命令以显示主机资源使用率统计信息:

$ podman container stats -a
Copy to Clipboard Toggle word wrap

基于 Dell 销售并提供容器化 Ansible Automation Platform 解决方案(DAAP)安装的输出示例,该安装采用 ~1.8 GB RAM:

ID            NAME                           CPU %       MEM USAGE / LIMIT  MEM %       NET IO      BLOCK IO    PIDS        CPU TIME    AVG CPU %
0d5d8eb93c18  automation-controller-web      0.23%       959.1MB / 3.761GB  25.50%      0B / 0B     0B / 0B     16          20.885142s  1.19%
3429d559836d  automation-controller-rsyslog  0.07%       144.5MB / 3.761GB  3.84%       0B / 0B     0B / 0B     6           4.099565s   0.23%
448d0bae0942  automation-controller-task     1.51%       633.1MB / 3.761GB  16.83%      0B / 0B     0B / 0B     33          34.285272s  1.93%
7f140e65b57e  receptor                       0.01%       5.923MB / 3.761GB  0.16%       0B / 0B     0B / 0B     7           1.010613s   0.06%
c1458367ca9c  redis                          0.48%       10.52MB / 3.761GB  0.28%       0B / 0B     0B / 0B     5           9.074042s   0.47%
ef712cc2dc89  postgresql                     0.09%       21.88MB / 3.761GB  0.58%       0B / 0B     0B / 0B     21          15.571059s  0.80%
Copy to Clipboard Toggle word wrap

使用多少存储以及在哪里?

容器卷存储位于 $HOME/.local/share/containers/storage/volumes 下。

  1. 要查看每个卷的详情,请运行以下命令:

    $ podman volume ls
    Copy to Clipboard Toggle word wrap
  2. 运行以下命令显示有关特定卷的详细信息:

    $ podman volume inspect <volume_name>
    Copy to Clipboard Toggle word wrap

例如:

$ podman volume inspect postgresql
Copy to Clipboard Toggle word wrap

输出示例:

[
    {
        "Name": "postgresql",
        "Driver": "local",
        "Mountpoint": "/home/aap/.local/share/containers/storage/volumes/postgresql/_data",
        "CreatedAt": "2024-01-08T23:39:24.983964686Z",
        "Labels": {},
        "Scope": "local",
        "Options": {},
        "MountCount": 0,
        "NeedsCopyUp": true
    }
]
Copy to Clipboard Toggle word wrap

安装程序创建的几个文件位于 $HOME/aap/ 中,绑定挂载到不同的正在运行的容器中。

  1. 要查看与容器关联的挂载,请运行以下命令:

    $ podman ps --format "{{.ID}}\t{{.Command}}\t{{.Names}}"
    Copy to Clipboard Toggle word wrap

    输出示例:

    89e779b81b83	run-postgresql	postgresql
    4c33cc77ef7d	run-redis	redis
    3d8a028d892d	/usr/bin/receptor...	receptor
    09821701645c	/usr/bin/launch_a...	automation-controller-rsyslog
    a2ddb5cac71b	/usr/bin/launch_a...	automation-controller-task
    fa0029a3b003	/usr/bin/launch_a...	automation-controller-web
    20f192534691	gunicorn --bind 1...	automation-eda-api
    f49804c7e6cb	daphne -b 127.0.0...	automation-eda-daphne
    d340b9c1cb74	/bin/sh -c nginx ...	automation-eda-web
    111f47de5205	aap-eda-manage rq...	automation-eda-worker-1
    171fcb1785af	aap-eda-manage rq...	automation-eda-worker-2
    049d10555b51	aap-eda-manage rq...	automation-eda-activation-worker-1
    7a78a41a8425	aap-eda-manage rq...	automation-eda-activation-worker-2
    da9afa8ef5e2	aap-eda-manage sc...	automation-eda-scheduler
    8a2958be9baf	gunicorn --name p...	automation-hub-api
    0a8b57581749	gunicorn --name p...	automation-hub-content
    68005b987498	nginx -g daemon o...	automation-hub-web
    cb07af77f89f	pulpcore-worker	automation-hub-worker-1
    a3ba05136446	pulpcore-worker	automation-hub-worker-2
    Copy to Clipboard Toggle word wrap
  2. 运行以下命令:

    $ podman inspect <container_name> | jq -r .[].Mounts[].Source
    Copy to Clipboard Toggle word wrap

    输出示例:

    /home/aap/.local/share/containers/storage/volumes/receptor_run/_data
    /home/aap/.local/share/containers/storage/volumes/redis_run/_data
    /home/aap/aap/controller/data/rsyslog
    /home/aap/aap/controller/etc/tower.key
    /home/aap/aap/controller/etc/conf.d/callback_receiver_workers.py
    /home/aap/aap/controller/data/job_execution
    /home/aap/aap/controller/nginx/etc/controller.conf
    /home/aap/aap/controller/etc/conf.d/subscription_usage_model.py
    /home/aap/aap/controller/etc/conf.d/cluster_host_id.py
    /home/aap/aap/controller/etc/conf.d/insights.py
    /home/aap/aap/controller/rsyslog/run
    /home/aap/aap/controller/data/projects
    /home/aap/aap/controller/etc/settings.py
    /home/aap/aap/receptor/etc/receptor.conf
    /home/aap/aap/controller/etc/conf.d/execution_environments.py
    /home/aap/aap/tls/extracted
    /home/aap/aap/controller/supervisor/run
    /home/aap/aap/controller/etc/uwsgi.ini
    /home/aap/aap/controller/etc/conf.d/container_groups.py
    /home/aap/aap/controller/etc/launch_awx_task.sh
    /home/aap/aap/controller/etc/tower.cert
    Copy to Clipboard Toggle word wrap
  3. 如果没有安装 jq RPM,请运行以下命令安装它:

    $ sudo dnf -y install jq
    Copy to Clipboard Toggle word wrap

附录 B. 清单文件变量

下表包含 Ansible Automation Platform 安装 清单文件 中使用的变量的信息。表包括可用于基于 RPM 的安装和基于容器的安装的变量。

B.1. Ansible 变量

以下变量控制 Ansible Automation Platform 与远程主机交互的方式。

Expand
表 B.1. Ansible 变量
变量描述

ansible_connection

用于目标主机上任务的连接插件。这可以是任何 Ansible 连接插件的名称。

SSH 协议类型是 smartsshparamiko。您还可以使用 local 在控制节点本身上运行任务。

默认为 smart

ansible_host

要使用的目标主机的 IP 地址或名称,而不是 inventory_hostname

ansible_password

与主机进行身份验证的密码。

不要以纯文本形式存储此变量。始终使用密码库。如需更多信息,请参阅 安全可见的库变量

ansible_port

连接端口号。

SSH 的默认值为 22

ansible_scp_extra_args

此设置始终附加到默认的 scp 命令行。

ansible_sftp_extra_args

此设置始终附加到默认的 sftp 命令行。

ansible_shell_executable

这会设置 Ansible 控制器在目标机器上使用的 shell,并覆盖 ansible.cfg 中的可执行文件,默认为 /bin/sh

ansible_shell_type

目标系统的 shell 类型。

除非将 ansible_shell_executable 设置为一个非兼容 shell,否则请不要使用此设置。默认情况下,使用 sh 样式的语法对命令进行了格式化。把它设置为 cshfish 会导致在目标系统上执行命令来遵循这些 shell 的语法。

ansible_ssh_common_args

此设置始终附加到 sftpscpssh 的默认命令行中。对于为特定主机或组配置 ProxyCommand 非常有用。

ansible_ssh_executable

此设置覆盖使用系统 ssh 的默认行为。这可以覆盖 ansible.cfg 中的 ssh_executable 设置。

ansible_ssh_extra_args

此设置始终附加到默认的 ssh 命令行。

ansible_ssh_pipelining

确定是否使用 SSH pipelining

这可以覆盖 ansible.cfg 中的 pipelining 设置。如果使用基于 SSH 密钥的身份验证,密钥必须由 SSH 代理管理。

ansible_ssh_private_key_file

SSH 使用的私钥文件。

在使用多个密钥且您不想使用 SSH 代理时很有用。

ansible_user

连接到主机时使用的用户名。

不要更改此变量,除非目标机器上没有安装 /bin/sh,或者无法从 sudo 运行。

inventory_hostname

此变量从清单脚本或 Ansible 配置文件获取机器的主机名。您不能设置此变量的值。由于从配置文件中获取了该值,实际运行时主机名值可能与此变量返回的不同。

B.2. Automation hub 变量

Automation Hub 的清单文件变量。

Expand
RPM 变量名称容器变量名称描述必需或可选default

automationhub_admin_password

hub_admin_password

Automation hub 管理员密码。对此变量使用特殊字符有限。密码可以包含任何可打印的 ASCII 字符,但 /"@ 除外。

必填

 

automationhub_api_token

 

为安装程序设置现有令牌。例如,自动化中心 UI 中的重新生成令牌会导致现有令牌无效。在下次运行安装程序时,使用此变量在安装程序中设置该令牌。

选填

 

automationhub_auto_sign_collections

hub_collection_auto_sign

如果启用了集合签名服务,则集合默认不会自动签名。将此变量设置为 true 以默认签名集合。

选填

false

automationhub_backup_collections

 

Ansible Automation hub 在 /var/lib/pulp 中提供工件。这些工件默认会自动备份。将此变量设置为 false 以防止备份或恢复 /var/lib/pulp

选填

true

automationhub_client_max_body_size

hub_nginx_client_max_body_size

通过 NGINX 发送到自动化中心的数据允许的最大大小。

选填

20m

automationhub_collection_download_count

 

表示集合下载计数是否应该显示在 UI 中。

选填

false

automationhub_collection_seed_repository

 

hub_seed_collections 设置为 true 时,控制要上传的内容类型。有效选项包括: 认证验证

选填

认证和验证都默认启用。

automationhub_collection_signing_service_key

hub_collection_signing_key

集合签名密钥文件的路径。

如果启用了集合签名服务,则需要此项。

 

automationhub_container_repair_media_type

 

表示是否运行命令 pulpcore-manager container-repair-media-type。有效选项包括: true,false,auto

选填

auto

automationhub_container_signing_service_key

hub_container_signing_key

容器签名密钥文件的路径。

如果启用了容器签名服务,则需要此项。

 

automationhub_create_default_collection_signing_service

hub_collection_signing

将此变量设置为 true 以启用集合签名服务。

选填

false

automationhub_create_default_container_signing_service

hub_container_signing

将此变量设置为 true 以启用容器签名服务。

选填

false

 

hub_data_path_exclude

要排除的自动化中心备份路径。

选填

[]

automationhub_disable_hsts

hub_nginx_disable_hsts

控制是否为自动化中心启用或禁用 HTTP Strict Transport Security (HSTS)。将此变量设置为 true 以禁用 HSTS。

选填

false

automationhub_disable_https

hub_nginx_disable_https

控制自动化中心是否启用或禁用 HTTPS。将此变量设置为 true 以禁用 HTTPS。

选填

false

automationhub_enable_api_access_log

 

控制是否在 /var/log/galaxy_api_access.log 处启用或禁用日志记录。该文件记录对平台所做的所有用户操作,包括用户名和 IP 地址。将此变量设置为 true 以启用此日志记录。

选填

false

automationhub_enable_unauthenticated_collection_access

 

控制是否为未授权用户查看自动化中心集合或命名空间启用或禁用只读访问。将此变量设置为 true 以启用只读访问。

选填

false

automationhub_enable_unauthenticated_collection_download

 

控制未授权用户是否可以从自动化中心下载只读集合。将此变量设置为 true 以启用对只读集合的下载。

选填

false

automationhub_firewalld_zone

hub_firewall_zone

应用自动化中心相关防火墙规则的防火墙区。这会根据区的信任级别控制哪些网络可以访问自动化中心。

选填

rpm = 无默认设置.容器 = public

automationhub_force_change_admin_password

 

表示在安装过程中是否需要更改自动化中心的默认管理员密码。设置为 true,以要求用户在安装过程中更改默认的管理员密码。

选填

false

automationhub_importer_settings

hub_galaxy_importer

传递给 galaxy-importer.cfg 配置文件的设置字典。这些设置控制 galaxy-importer 服务如何处理并验证 Ansible 内容。示例值包括: ansible-docansible-lintflake8

选填

 

automationhub_nginx_tls_files_remote

 

表示 Web 证书源是否为安装程序本地的(false),还是在远程组件服务器(true)上。

选填

automationhub_tls_files_remote 中定义的值。

automationhub_pg_cert_auth

hub_pg_cert_auth

控制自动化中心 PostgreSQL 数据库中是否启用或禁用客户端证书身份验证。将此变量设置为 true 以启用客户端证书身份验证。

选填

false

automationhub_pg_database

hub_pg_database

Automation Hub 使用的 PostgreSQL 数据库的名称。

选填

rpm = automationhub.container = pulp

automationhub_pg_host

hub_pg_host

Automation Hub 使用的 PostgreSQL 数据库的主机名。

必填

RPM = 127.0.0.1.container = 无默认值。

automationhub_pg_password

hub_pg_password

自动化 hub PostgreSQL 数据库用户的密码。对此变量使用特殊字符有限。支持 !, #, 0@ 字符。使用其他特殊字符可能会导致设置失败。

选填

 

automationhub_pg_port

hub_pg_port

Automation Hub 使用的 PostgreSQL 数据库的端口号。

选填

5432

automationhub_pg_sslmode

hub_pg_sslmode

控制自动化中心连接到 PostgreSQL 数据库时要使用的 SSL/TLS 模式。有效选项包括 verify-full,verify-ca, requires, prefer,allow,disable

选填

prefer

automationhub_pg_username

hub_pg_username

Automation hub PostgreSQL 数据库用户的用户名。

选填

rpm = automationhub.容器 = pulp.

automationhub_pgclient_sslcert

hub_pg_tls_cert

到自动化中心的 PostgreSQL SSL/TLS 证书文件的路径。

使用客户端证书身份验证时需要。

 

automationhub_pgclient_sslkey

hub_pg_tls_key

到自动化中心的 PostgreSQL SSL/TLS 密钥文件的路径。

使用客户端证书身份验证时需要。

 

automationhub_pgclient_tls_files_remote

 

表示 PostgreSQL 客户端证书源是否为安装程序本地的(false)还是远程组件服务器(true)。

选填

automationhub_tls_files_remote 中定义的值。

automationhub_require_content_approval

 

控制自动化中心是否启用或禁用内容签名。默认情况下,当您将集合上传到自动化中心时,管理员必须批准它,然后才能供用户使用。要禁用内容批准流,请将变量设置为 false

选填

true

automationhub_restore_signing_keys

 

控制是否应从备份中恢复现有签名密钥。设置为 false 以禁用对现有签名密钥的恢复。

选填

true

automationhub_seed_collections

hub_seed_collections

控制是否启用集合预加载。运行捆绑包安装程序时,验证的内容将上传到 经过验证的 存储库,并且认证的内容将上传到 rh-certified 存储库。默认情况下,经过认证的内容和验证的内容都会被上传。如果您不想预加载内容,请将此变量设置为 false。对于基于 RPM 的安装程序,如果您只想一种类型的内容,请将此变量设置为 true,并将 automationhub_collection_seed_repository 变量设置为您要包含的内容类型。

选填

true

automationhub_ssl_cert

hub_tls_cert

到自动化中心的 SSL/TLS 证书文件的路径。

选填

 

automationhub_ssl_key

hub_tls_key

到自动化中心的 SSL/TLS 密钥文件的路径。

选填

 

automationhub_tls_files_remote

hub_tls_remote

表示自动化中心提供的证书文件是否为安装程序本地的(false)还是远程组件服务器(true)。

选填

false

automationhub_use_archive_compression

hub_use_archive_compression

控制是否为自动化中心启用或禁用存档压缩。您可以使用 use_archive_compression 在全局范围内控制此功能。

选填

true

automationhub_use_db_compression

hub_use_db_compression

控制自动化中心是否启用或禁用数据库压缩。您可以使用 use_db_compression 在全局范围内控制此功能。

选填

true

automationhub_user_headers

hub_nginx_user_headers

要添加到自动化中心 NGINX 配置中的其他 NGINX 标头列表。

选填

[]

ee_from_hub_only

 

控制自动化中心是否为执行环境镜像的唯一 registry。如果设置为 true,则自动化中心是专用 registry。如果设置为 false,则镜像也会直接从红帽拉取。

选填

使用捆绑包安装程序时为 true,否则为 false

generate_automationhub_token

 

控制在安装过程中为自动化中心生成令牌。默认情况下,令牌会在全新安装过程中自动生成。如果设置为 true,则在安装过程中重新生成令牌。

选填

false

 

hub_extra_settings

定义在安装过程中自动化中心使用的其他设置。

例如:

hub_extra_settings:
  - setting: REDIRECT_IS_HTTPS
    value: True
Copy to Clipboard Toggle word wrap

选填

[]

nginx_hsts_max_age

hub_nginx_hsts_max_age

为自动化中心强制执行 HTTP Strict Transport Security (HSTS)的最大持续时间(以秒为单位)。

选填

63072000

pulp_secret

hub_secret_key

Automation Hub 用来签名和加密数据的 secret 密钥值。

选填

 
 

hub_azure_account_key

Azure blob 存储帐户密钥。

使用 Azure blob 存储后端时需要。

 
 

hub_azure_account_name

与 Azure blob 存储关联的帐户名称。

使用 Azure blob 存储后端时需要。

 
 

hub_azure_container

Azure blob 存储容器的名称。

选填

pulp

 

hub_azure_extra_settings

为 Azure blob 存储后端定义额外参数。有关参数列表的更多信息,请参阅 django-storages 文档 - Azure Storage

选填

{}

 

hub_collection_signing_pass

自动化内容集合签名服务的密码。

如果集合签名服务受密码短语保护,则需要此项。

 
 

hub_collection_signing_service

用于签名集合的服务。

选填

ansible-default

 

hub_container_signing_pass

自动化内容容器签名服务的密码。

如果容器签名服务受密码短语保护,则需要此项。

 
 

hub_container_signing_service

用于签名容器的服务。

选填

container-default

 

hub_nginx_http_port

Automation hub 侦听 HTTP 请求的端口号。

选填

8081

 

hub_nginx_https_port

Automation hub 侦听 HTTPS 请求的端口号。

选填

8444

nginx_tls_protocols

hub_nginx_https_protocols

在处理 HTTPS 流量时,自动化中心支持协议。

选填

[TLSv1.2, TLSv1.3]

 

hub_pg_socket

Automation Hub 用来连接到 PostgreSQL 数据库的 UNIX 套接字。

选填

 
 

hub_s3_access_key

AWS S3 访问密钥。

使用 AWS S3 存储后端时需要。

 
 

hub_s3_bucket_name

AWS S3 存储桶的名称。

选填

pulp

 

hub_s3_extra_settings

用于定义 AWS S3 存储后端的额外参数。有关参数列表的更多信息,请参阅 django-storages 文档 - Amazon S3

选填

{}

 

hub_s3_secret_key

AWS S3 secret 密钥。

使用 AWS S3 存储后端时需要。

 
 

hub_shared_data_mount_opts

网络文件系统(NFS)共享的挂载选项。

选填

rw,sync,hard

 

hub_shared_data_path

到具有读、写和执行(RWX)访问权限的网络文件系统(NFS)共享的路径。该值必须与格式 host:dir 匹配,如 nfs-server.example.com:/exports/hub

如果使用 文件 存储后端安装多个自动化中心实例,则需要此项。安装单个自动化中心实例时,它是可选的。

 
 

hub_storage_backend

Automation hub 存储后端类型。可能的值包括: azurefiles3

选填

file

 

hub_workers

自动化中心 worker 的数量。

选填

2

B.3. 自动化控制器变量

自动化控制器的清单文件变量。

Expand
RPM 变量名称容器变量名称描述必需或可选default

admin_email

controller_admin_email

Django 用于自动化控制器的 admin 用户的电子邮件地址。

选填

admin@example.com

admin_password

controller_admin_password

自动化控制器管理员密码。对此变量使用特殊字符有限。密码可以包含任何可打印的 ASCII 字符,但 /"@ 除外。

必填

 

admin_username

controller_admin_user

用于在自动化控制器中创建管理员用户的用户名。

选填

admin

automationcontroller_client_max_body_size

controller_nginx_client_max_body_size

通过 NGINX 发送到自动化控制器的数据允许的最大大小。

选填

5m

automationcontroller_use_archive_compression

controller_use_archive_compression

控制是否为自动化控制器启用或禁用存档压缩。您可以使用 use_archive_compression 在全局范围内控制此功能。

选填

true

automationcontroller_use_db_compression

controller_use_db_compression

控制是否为自动化控制器启用或禁用数据库压缩。您可以使用 use_db_compression 在全局范围内控制此功能。

选填

true

awx_pg_cert_auth

controller_pg_cert_auth

控制自动化控制器 PostgreSQL 数据库中是否启用或禁用客户端证书身份验证。将此变量设置为 true 以启用客户端证书身份验证。

选填

false

controller_firewalld_zone

controller_firewall_zone

应用自动化控制器相关防火墙规则的防火墙区。这会根据区的信任级别控制哪些网络可以访问自动化控制器。

选填

public

controller_nginx_tls_files_remote

 

表示 Web 证书源是否为安装程序本地的(false),还是在远程组件服务器(true)上。

选填

controller_tls_files_remote 中定义的值。

controller_pgclient_tls_files_remote

 

表示 PostgreSQL 客户端证书源是否为安装程序本地的(false)还是远程组件服务器(true)。

选填

controller_tls_files_remote 中定义的值。

controller_tls_files_remote

controller_tls_remote

表示自动化控制器提供的证书文件是否为安装程序本地的(false)还是远程组件服务器(true)。

选填

false

nginx_disable_hsts

controller_nginx_disable_hsts

控制是否为自动化控制器启用或禁用 HTTP Strict Transport Security (HSTS)。将此变量设置为 true 以禁用 HSTS。

选填

false

nginx_disable_https

controller_nginx_disable_https

控制自动化控制器是否启用或禁用 HTTPS。将此变量设置为 true 以禁用 HTTPS。

选填

false

nginx_hsts_max_age

controller_nginx_hsts_max_age

为自动化控制器强制执行 HTTP Strict Transport Security (HSTS)的最大持续时间(以秒为单位)。

选填

63072000

nginx_http_port

controller_nginx_http_port

自动化控制器侦听 HTTP 请求的端口号。

选填

RPM = 80.container = 8080

nginx_https_port

controller_nginx_https_port

自动化控制器侦听 HTTPS 请求的端口号。

选填

RPM = 443.container = 8443

nginx_tls_protocols

controller_nginx_https_protocols

自动化控制器在处理 HTTPS 流量时支持的协议。

选填

[TLSv1.2, TLSv1.3]

nginx_user_headers

controller_nginx_user_headers

要添加到自动化控制器 NGINX 配置中的额外 NGINX 标头列表。

选填

[]

 

controller_create_preload_data

控制是否在安装过程中创建预加载内容。

选填

true

node_state

 

节点或一组节点的状态。有效选项包括 active,deprovision 以从集群中删除节点,或 iso_migrate 将旧的隔离节点迁移到执行节点。

选填

active

node_type

有关容器等同的变量,请参阅 receptor_type

对于 [automationcontroller] 组,这两个选项有:

  • node_type=control - 节点只运行项目和清单更新,但不运行常规作业。
  • node_type=hybrid - 节点运行所有内容。

对于 [execution_nodes] 组,这两个选项有:

  • node_type=hop - 节点将作业转发到执行节点。
  • node_type=execution - 节点可以运行作业。

选填

对于 [automationcontroller] = hybrid,对于 [execution_nodes] = execution

peers

有关容器等同的变量,请参阅 receptor_peers

用于指示特定主机或组连接到哪些节点。每当定义此变量时,都会建立到特定主机或组的出站连接。此变量可以是清单中的主机和组的逗号分隔列表。这被解析为用来构造 receptor.conf 文件的一组主机。

选填

 

pg_database

controller_pg_database

自动化控制器使用的 PostgreSQL 数据库的名称。

选填

awx

pg_host

controller_pg_host

自动化控制器使用的 PostgreSQL 数据库的主机名。

必填

 

pg_password

controller_pg_password

自动化控制器 PostgreSQL 数据库用户的密码。对此变量使用特殊字符有限。支持 !, #, 0@ 字符。使用其他特殊字符可能会导致设置失败。

如果不使用客户端证书身份验证,则需要此项。

 

pg_port

controller_pg_port

自动化控制器使用的 PostgreSQL 数据库的端口号。

选填

5432

pg_sslmode

controller_pg_sslmode

控制自动化控制器连接到 PostgreSQL 数据库时要使用的 SSL/TLS 模式。有效选项包括 verify-full,verify-ca, requires, prefer,allow,disable

选填

prefer

pg_username

controller_pg_username

自动化控制器 PostgreSQL 数据库用户的用户名。

选填

awx

pgclient_sslcert

controller_pg_tls_cert

自动化控制器的 PostgreSQL SSL/TLS 证书文件的路径。

使用客户端证书身份验证时需要。

 

pgclient_sslkey

controller_pg_tls_key

自动化控制器的 PostgreSQL SSL/TLS 密钥文件的路径。

使用客户端证书身份验证时需要。

 

precreate_partition_hours

 

启动备份前要预先创建的事件表分区数,以避免 pg_dump 锁定。

选填

3

uwsgi_listen_queue_size

controller_uwsgi_listen_queue_size

uwsgi 在自动化控制器的队列中允许请求数,直到 uwsgi_processes 可以服务它们。

选填

2048

web_server_ssl_cert

controller_tls_cert

自动化控制器的 SSL/TLS 证书文件的路径。

选填

 

web_server_ssl_key

controller_tls_key

自动化控制器的 SSL/TLS 密钥文件的路径。

选填

 
 

controller_event_workers

在自动化控制器中处理作业相关事件的事件 worker 数量。

选填

4

 

controller_extra_settings

定义在安装过程中自动化控制器使用的额外设置。

例如:

controller_extra_settings:
  - setting: USE_X_FORWARDED_HOST
    value: true
Copy to Clipboard Toggle word wrap

选填

[]

 

controller_license_file

自动化控制器许可证文件的路径。

  
 

controller_percent_memory_capacity

自动化控制器的内存分配。

选填

1.0 (将系统内存总内存的 100% 分配给自动化控制器)

 

controller_pg_socket

自动化控制器用来连接到 PostgreSQL 数据库的 UNIX 套接字。

选填

 
 

controller_secret_key

自动化控制器用来签名和加密数据的 secret 密钥值。

选填

 

B.4. 数据库变量

用于 Ansible Automation Platform 的数据库的清单文件变量。

Expand
RPM 变量名称容器变量名称描述必需或可选default

install_pg_port

postgresql_port

PostgreSQL 数据库的端口号。

选填

5432

postgres_extra_settings

postgresql_extra_settings

定义 PostgreSQL 使用的其他设置。

RPM 用法示例:

postgresql_extra_settings:
   ssl_ciphers: 'HIGH:!aNULL:!MD5'
Copy to Clipboard Toggle word wrap

容器化用法示例:

postgresql_extra_settings:
  - setting: ssl_ciphers
    value: 'HIGH:!aNULL:!MD5'
Copy to Clipboard Toggle word wrap

选填

 

postgres_firewalld_zone

postgresql_firewall_zone

应用 PostgreSQL 相关防火墙规则的防火墙区域。这会根据区域的信任级别控制哪些网络可以访问 PostgreSQL。

选填

rpm = 无默认设置.容器 = public

postgres_max_connections

postgresql_max_connections

如果您使用安装程序管理的数据库,则最大并发连接数。如需更多信息,请参阅自动化控制器的 PostgreSQL 数据库配置和维护

选填

1024

postgres_ssl_cert

postgresql_tls_cert

PostgreSQL SSL/TLS 证书文件的路径。

选填

 

postgres_ssl_key

postgresql_tls_key

PostgreSQL SSL/TLS 密钥文件的路径。

选填

 

postgres_use_ssl

postgresql_disable_tls

控制是否为 PostgreSQL 数据库启用或禁用 SSL/TLS。

选填

false

 

postgresql_admin_database

用于连接到 PostgreSQL 数据库服务器的数据库名称。

选填

postgres

 

postgresql_admin_password

PostgreSQL admin 用户的密码。使用时,安装程序会创建每个组件的数据库和凭证。

使用 postgresql_admin_username 时需要此项。

 
 

postgresql_admin_username

PostgreSQL admin 用户的用户名。使用时,安装程序会创建每个组件的数据库和凭证。

选填

postgres

 

postgresql_effective_cache_size

可用内存分配(以 MB 为单位)用于缓存数据。

选填

 
 

postgresql_keep_databases

控制卸载过程中是否保留数据库。此变量只适用于安装程序管理的数据库,不适用于外部(客户管理的)数据库。设置为 true,以在卸载过程中保留数据库。

选填

false

 

postgresql_log_destination

服务器日志输出的目的地。

选填

/dev/stderr

 

postgresql_password_encryption

加密密码的算法。

选填

scram-sha-256

 

postgresql_shared_buffers

共享内存缓冲区的内存分配(以 MB 为单位)。

选填

 
 

postgresql_tls_remote

表示 PostgreSQL 提供的证书文件是否为安装程序本地的(false)还是远程组件服务器(true)。

选填

false

 

postgresql_use_archive_compression

控制是否为 PostgreSQL 启用或禁用存档压缩。您可以使用 use_archive_compression 在全局范围内控制此功能。

选填

true

B.5. Event-Driven Ansible 控制器变量

Event-Driven Ansible 控制器的清单文件变量。

Expand
RPM 变量名称容器变量名称描述必需或可选default

automationedacontroller_activation_workers

eda_activation_workers

在 Event-Driven Ansible 中用于 ansible-rulebook 激活 pod 的 worker 数量。

选填

rpm = ( cores 或 threads)* 2 + 1。container = 2

automationedacontroller_admin_email

eda_admin_email

Django 用于 Event-Driven Ansible 的 admin 用户使用的电子邮件地址。

选填

admin@example.com

automationedacontroller_admin_password

eda_admin_password

event-Driven Ansible 管理员密码。对此变量使用特殊字符有限。密码可以包含任何可打印的 ASCII 字符,但 /"@ 除外。

必填

 

automationedacontroller_admin_username

eda_admin_user

用于在 Event-Driven Ansible 中识别和创建管理员用户的用户名。

选填

admin

automationedacontroller_backend_gunicorn_workers

 

通过 worker 节点上的 Gunicorn 处理 API 的 worker 数量。

选填

2

automationedacontroller_cache_tls_files_remote

 

表示缓存证书源是否为安装程序本地的(false),还是在远程组件服务器(true)上。

选填

false

automationedacontroller_client_regen_cert

 

控制是否为平台缓存重新生成 Event-Driven Ansible 客户端证书。设置为 true 以重新生成 Event-Driven Ansible 客户端证书。

选填

false

automationedacontroller_default_workers

eda_workers

用于应用程序工作的 Event-Driven Ansible 中的 worker 数量。

选填

内核或线程数

automationedacontroller_disable_hsts

eda_nginx_disable_hsts

控制是否为 Event-Driven Ansible 启用或禁用 HTTP Strict Transport Security (HSTS)。将此变量设置为 true 以禁用 HSTS。

选填

false

automationedacontroller_disable_https

eda_nginx_disable_https

控制是否为 Event-Driven Ansible 启用或禁用 HTTPS。将此变量设置为 true 以禁用 HTTPS。

选填

false

automationedacontroller_event_stream_path

eda_event_stream_prefix_path

通过平台网关,用于 Event-Driven Ansible event-stream 的 API 前缀路径。

选填

/eda-event-streams

automationedacontroller_firewalld_zone

eda_firewall_zone

应用 Event-Driven Ansible 相关防火墙规则的 firewall 区域。这会根据区域的信任级别控制哪些网络可以访问 Event-Driven Ansible。

选填

rpm = 无默认设置.容器 = public

automationedacontroller_gunicorn_event_stream_workers

 

用于处理 Event-Driven Ansible 的事件流的 worker 数量。

选填

2

automationedacontroller_gunicorn_workers

eda_gunicorn_workers

处理通过 Gunicorn 提供的 API 的 worker 数量。

选填

(内核数或线程数)* 2 + 1

automationedacontroller_http_port

eda_nginx_http_port

Event-Driven Ansible 侦听 HTTP 请求的端口号。

选填

RPM = 80.容器 = 8082.

automationedacontroller_https_port

eda_nginx_https_port

Event-Driven Ansible 侦听 HTTPS 请求的端口号。

选填

RPM = 443.容器 = 8445.

automationedacontroller_max_running_activations

eda_max_running_activations

每个节点同时运行的最大激活数。这是一个必须大于 0 的整数。

选填

12

automationedacontroller_nginx_tls_files_remote

 

表示 Web 证书源是否为安装程序本地的(false),还是在远程组件服务器(true)上。

选填

false

automationedacontroller_pg_cert_auth

eda_pg_cert_auth

控制在 Event-Driven Ansible PostgreSQL 数据库中是否启用或禁用客户端证书身份验证。将此变量设置为 true 以启用客户端证书身份验证。

选填

false

automationedacontroller_pg_database

eda_pg_database

Event-Driven Ansible 使用的 PostgreSQL 数据库的名称。

选填

rpm = automationedacontroller.容器 = eda.

automationedacontroller_pg_host

eda_pg_host

Event-Driven Ansible 使用的 PostgreSQL 数据库的主机名。

必填

 

automationedacontroller_pg_password

eda_pg_password

Event-Driven Ansible PostgreSQL 数据库用户的密码。对此变量使用特殊字符有限。支持 !, #, 0@ 字符。使用其他特殊字符可能会导致设置失败。

如果不使用客户端证书身份验证,则需要此项。

 

automationedacontroller_pg_port

eda_pg_port

Event-Driven Ansible 使用的 PostgreSQL 数据库的端口号。

选填

5432

automationedacontroller_pg_sslmode

eda_pg_sslmode

决定客户端和服务器连接的加密级别和身份验证级别。有效选项包括 verify-full,verify-ca, requires, prefer,allow,disable

选填

prefer

automationedacontroller_pg_username

eda_pg_username

Event-Driven Ansible PostgreSQL 数据库用户的用户名。

选填

rpm = automationedacontroller.容器 = eda.

automationedacontroller_pgclient_sslcert

eda_pg_tls_cert

Event-Driven Ansible 的 PostgreSQL SSL/TLS 证书文件的路径。

使用客户端证书身份验证时需要。

 

automationedacontroller_pgclient_sslkey

eda_pg_tls_key

Event-Driven Ansible 的 PostgreSQL SSL/TLS 密钥文件的路径。

使用客户端证书身份验证时需要。

 

automationedacontroller_pgclient_tls_files_remote

 

表示 PostgreSQL 客户端证书源是否为安装程序本地的(false)还是远程组件服务器(true)。

选填

false

automationedacontroller_public_event_stream_url

eda_event_stream_url

用于连接到事件流的 URL。URL 必须以 http://https:// 前缀开头

选填

 

automationedacontroller_redis_host

eda_redis_host

Event-Driven Ansible 使用的 Redis 主机的主机名。

选填

[automationgateway] 清单组中的第一个节点

automationedacontroller_redis_password

eda_redis_password

Event-Driven Ansible Redis 的密码。

选填

随机生成的字符串

automationedacontroller_redis_port

eda_redis_port

用于 Event-Driven Ansible 的 Redis 主机的端口号。

选填

rpm = 平台网关实施中定义的值(automationgateway_redis_port)。container = 6379

automationedacontroller_redis_username

eda_redis_username

Event-Driven Ansible Redis 的用户名。

选填

eda

automationedacontroller_secret_key

eda_secret_key

Event-Driven Ansible 用来签名和加密数据的 secret 键值。

选填

 

automationedacontroller_ssl_cert

eda_tls_cert

Event-Driven Ansible 的 SSL/TLS 证书文件的路径。

选填

 

automationedacontroller_ssl_key

eda_tls_key

Event-Driven Ansible 的 SSL/TLS 密钥文件的路径。

选填

 

automationedacontroller_tls_files_remote

eda_tls_remote

表示 Event-Driven Ansible 提供的证书文件是否为安装程序的本地(false)还是远程组件服务器(true)。

选填

false

automationedacontroller_trusted_origins

 

以下列形式的主机地址列表:< scheme>//:<address>:<port > 用于受信任的跨站点请求 Forgery (CSRF)来源。

选填

[]

automationedacontroller_use_archive_compression

eda_use_archive_compression

控制是否为 Event-Driven Ansible 启用或禁用存档压缩。您可以使用 use_archive_compression 在全局范围内控制此功能。

选填

true

automationedacontroller_use_db_compression

eda_use_db_compression

控制是否为 Event-Driven Ansible 启用或禁用数据库压缩。您可以使用 use_db_compression 在全局范围内控制此功能。

选填

true

automationedacontroller_user_headers

eda_nginx_user_headers

要添加到 Event-Driven Ansible 的 NGINX 配置中的额外 NGINX 标头列表。

选填

[]

automationedacontroller_websocket_ssl_verify

 

控制 Podman 使用的 Daphne WebSocket 是否对从 pod 与主机通信的 Daphne WebSocket 执行 SSL 验证。设置为 false 以禁用 SSL 验证。

选填

true

eda_node_type

eda_type

event-Driven Ansible 节点类型。有效选项包括 apievent-streamhybridworker

选填

hybrid

 

eda_debug

控制是否为 Event-Driven Ansible 启用或禁用调试模式。设置为 true,为 Event-Driven Ansible 启用调试模式。

选填

false

 

eda_extra_settings

定义在安装过程中 Event-Driven Ansible 使用的其他设置。

例如:

eda_extra_settings:
  - setting: RULEBOOK_READINESS_TIMEOUT_SECONDS
    value: 120
Copy to Clipboard Toggle word wrap

选填

[]

 

eda_nginx_client_max_body_size

通过 NGINX 发送到 Event-Driven Ansible 的数据允许的最大大小。

选填

1m

 

eda_nginx_hsts_max_age

为 Event-Driven Ansible 强制 HTTP Strict Transport Security (HSTS)的最大持续时间(以秒为单位)。

选填

63072000

nginx_tls_protocols

eda_nginx_https_protocols

处理 HTTPS 流量时,事件驱动 Ansible 支持的协议。

选填

[TLSv1.2, TLSv1.3]

 

eda_pg_socket

Event-Driven Ansible 用来连接到 PostgreSQL 数据库的 UNIX 套接字。

选填

 

redis_disable_tls

eda_redis_disable_tls

控制是否为 Event-Driven Ansible Redis 启用或禁用 TLS。将此变量设置为 true 以禁用 TLS。

选填

false

 

eda_redis_tls_cert

Event-Driven Ansible Redis 证书文件的路径。

选填

 
 

eda_redis_tls_key

Event-Driven Ansible Redis 密钥文件的路径。

选填

 
 

eda_safe_plugins

允许在 Event-Driven Ansible 内运行的插件列表。

如需更多信息,请参阅 向 Event-Driven Ansible 控制器添加安全插件变量

选填

[]

B.6. 常规变量

Ansible Automation Platform 的常规清单文件变量。

Expand
RPM 变量名称容器变量名称描述必需或可选default

aap_ca_cert_file

ca_tls_cert

用户提供的 CA 证书文件的路径,用于为所有 Ansible Automation Platform 服务生成 SSL/TLS 证书。如需更多信息,请参阅使用自定义 TLS 证书

选填

 

aap_ca_cert_files_remote

ca_tls_remote

表示 CA 证书文件是否为安装程序的本地(false)还是远程组件服务器(true)。

选填

false

aap_ca_cert_size

 

内部管理的 CA 证书私钥的位大小。

选填

4096

aap_ca_key_file

ca_tls_key

aap_ca_cert_file (RPM)和 ca_tls_cert (Container)中提供的 CA 证书的密钥文件的路径。如需更多信息,请参阅使用自定义 TLS 证书

选填

 

aap_ca_passphrase_cipher

 

用于签名内部管理的 CA 证书私钥的密码。

选填

aes256

aap_ca_regenerate

 

表示是否重新生成内部管理的 CA 证书密钥对。

选填

false

aap_service_cert_size

 

由内部 CA 管理的组件密钥对的位大小。

选填

4096

aap_service_regen_cert

 

表示是否重新生成由内部 CA 管理的组件密钥对。

选填

false

aap_service_san_records

 

用于签名服务的其他 SAN 记录列表。在清单文件中将这些组件分配为主机变量,而不是组或所有变量。所有字符串还必须包含对应的 SAN 选项前缀,如 DNS:IP:

选填

[]

backup_dest

 

为最终备份文件 设置.sh 的目录。

选填

setup_dir 中定义的值。

backup_dir

backup_dir

用于存储备份文件的目录。

选填

rpm = /var/backups/automation-platform/.container = ~/backups

backup_file_prefix

 

用于最终备份文件的文件备份名称的前缀。

选填

automation-platform-backup

bundle_install

bundle_install

控制是否执行离线安装或捆绑安装。将此变量设置为 true 以启用离线或捆绑的安装。

选填

如果使用设置安装程序,则为 false。如果使用安装捆绑包安装程序,则为 true

bundle_install_folder

bundle_dir

执行捆绑包安装时使用的捆绑包目录的路径。

如果 bundle_install=true是必需的

rpm = /var/lib/ansible-automation-platform-bundle.container = & lt;current_dir>/bundle.

custom_ca_cert

custom_ca_cert

自定义 CA 证书文件的路径。如果您手动提供的任何 TLS 证书都由自定义 CA 签名,则需要此项。如需更多信息,请参阅使用自定义 TLS 证书

选填

 

enable_insights_collection

 

如果节点使用 Subscription Manager 注册,则默认安装会将节点注册到 Red Hat Ansible Automation Platform for Red Hat Ansible Automation Platform 中。设置为 false 以禁用此功能。

选填

true

registry_password

registry_password

用于访问 registry_url 中定义的 registry 源的密码凭证。如需更多信息,请参阅设置 registry_username 和 registry_password

对于 bundle_install=true 安装,不需要断开连接的(bundled)安装。

rpm = 需要密码才能访问 registry_url。container = 如果 registry_auth=true,则在线安装需要它。断开连接的安装不需要。

 

registry_url

registry_url

从中拉取执行环境镜像的 registry 源的 URL。

选填

registry.redhat.io

registry_username

registry_username

用于访问 registry_url 中定义的 registry 源的用户名凭证。如需更多信息,请参阅设置 registry_username 和 registry_password

对于 bundle_install=true 安装,不需要断开连接的(bundled)安装。

rpm = 需要密码才能访问 registry_url。container = 如果 registry_auth=true,则在线安装需要它。断开连接的安装不需要。

 

registry_verify_ssl

registry_tls_verify

控制在发出 HTTPS 请求时是否启用或禁用 SSL/TLS 证书验证。

选填

true

restore_backup_file

 

用于平台恢复的 tar 文件的路径。

选填

{{ setup_dir }}/automation-platform-backup-latest.tar.gz

restore_file_prefix

 

暂存恢复组件的路径前缀。

选填

automation-platform-restore

routable_hostname

routable_hostname

如果运行安装程序的机器只能通过特定 URL 路由到目标主机时使用。例如,如果您在清单中使用短名称,但运行安装程序的节点只能使用 FQDN 解析该主机。如果没有设置 routable_hostname,则默认为 ansible_host。如果没有设置 ansible_host,则inventory_hostname 将用作最后的手段。此变量用作特定主机的主机变量,而不是在 [all:vars] 部分下。如需更多信息,请参阅 将变量分配给一台机器:主机变量

选填

 

use_archive_compression

use_archive_compression

在全局级别上控制文件系统相关的备份文件是否被压缩,然后再发送到主机以运行备份操作。如果设置为 true,则在每个 Ansible Automation Platform 主机上都会生成一个 tar.gz 文件,然后使用 gzip 压缩。如果设置为 false,则生成一个简单的 tar 文件。

您可以使用 < component_name>_use_archive_compression 变量在组件级别上控制此功能。

选填

true

use_db_compression

use_db_compression

在全局级别上控制与数据库相关的备份文件是否被压缩,然后再发送到主机来运行备份操作。

您可以使用 < component_name>_use_db_compression 变量在组件级别上控制此功能。

选填

true

 

ca_tls_key_passphrase

用于解密 ca_tls_key 中提供的密钥的密码短语。

选填

 
 

client_request_timeout

为最终用户请求设置 HTTP 超时。最小值为 10 秒。

选填

30

 

container_compress

用于压缩容器镜像的压缩软件。

选填

gzip

 

container_keep_images

控制在卸载 Ansible Automation Platform 时是否保留容器镜像。设置为 true,以在卸载 Ansible Automation Platform 时保留容器镜像。

选填

false

 

container_pull_images

控制是否在安装过程中拉取较新的容器镜像。设置为 false,以防止在安装过程中拉取较新的容器镜像。

选填

true

 

images_tmp_dir

安装程序在安装过程中临时存储容器镜像的目录。

选填

系统的临时目录。

 

pcp_firewall_zone

应用 Performance Co-Pilot 相关防火墙规则的防火墙区域。这会根据区的信任级别控制哪些网络可以访问 Performance Co-Pilot。

选填

public

 

pcp_use_archive_compression

控制 Performance Co-Pilot 是否启用或禁用存档压缩。您可以使用 use_archive_compression 在全局范围内控制此功能。

选填

true

 

registry_auth

控制是否使用 registry 身份验证。当设置为 true 时,需要registry_usernameregistry_password。不适用于断开连接的(捆绑包)安装。

选填

true

 

registry_ns_aap

Ansible Automation Platform registry 命名空间。

选填

ansible-automation-platform-26

 

registry_ns_rhel

RHEL registry 命名空间。

选填

rhel8

B.7. 镜像变量

镜像的清单文件变量。

Expand
RPM 变量名称容器变量名称描述必需或可选default

extra_images

 

在部署过程中从配置的容器 registry 中拉取的额外容器镜像。

选填

ansible-builder-rhel8

 

controller_image

自动化控制器的容器镜像。

选填

controller-rhel8:latest

 

de_extra_images

在部署过程中,额外的决策环境容器镜像可从配置的容器 registry 中拉取。

选填

[]

 

de_supported_image

支持的决策环境容器镜像。

选填

de-supported-rhel8:latest

 

eda_image

用于 Event-Driven Ansible 的后端容器镜像。

选填

eda-controller-rhel8:latest

 

eda_web_image

用于 Event-Driven Ansible 的前端容器镜像。

选填

eda-controller-ui-rhel8:latest

 

ee_extra_images

在部署过程中,额外的执行环境容器镜像从配置的容器 registry 中拉取。

选填

[]

 

ee_minimal_image

最小执行环境容器镜像。

选填

ee-minimal-rhel8:latest

 

ee_supported_image

支持的执行环境容器镜像。

选填

ee-supported-rhel8:latest

 

gateway_image

平台网关的容器镜像。

选填

gateway-rhel8:latest

 

gateway_proxy_image

平台网关代理的容器镜像。

选填

gateway-proxy-rhel8:latest

 

hub_image

Automation Hub 的后端容器镜像。

选填

hub-rhel8:latest

 

hub_web_image

用于自动化中心的前端容器镜像。

选填

hub-web-rhel8:latest

 

pcp_image

Performance Co-Pilot 的容器镜像。

选填

pcp:latest

 

postgresql_image

PostgreSQL 的容器镜像。

选填

postgresql-15:latest

 

receptor_image

receptor 的容器镜像。

选填

receptor-rhel8:latest

 

redis_image

Redis 的容器镜像。

选填

redis-6:latest

B.8. 平台网关变量

平台网关的清单文件变量。

Expand
RPM 变量名称容器变量名称描述必需或可选default

automationgateway_admin_email

gateway_admin_email

Django 用于平台网关的 admin 用户的电子邮件地址。

选填

admin@example.com

automationgateway_admin_password

gateway_admin_password

平台网关管理员密码。对此变量使用特殊字符有限。密码可以包含任何可打印的 ASCII 字符,但 /"@ 除外。

必填

 

automationgateway_admin_username

gateway_admin_user

用于在平台网关中识别和创建管理员用户的用户名。

选填

admin

automationgateway_cache_cert

gateway_redis_tls_cert

平台网关 Redis 证书文件的路径。

选填

 

automationgateway_cache_key

gateway_redis_tls_key

平台网关 Redis 密钥文件的路径。

选填

 

automationgateway_cache_tls_files_remote

 

表示缓存客户端证书文件是否为安装程序的本地(false),还是在远程组件服务器(true)上。

选填

automationgateway_tls_files_remote 中定义的值,默认值为 false

automationgateway_client_regen_cert

 

控制是否为平台缓存重新生成平台网关客户端证书。设置为 true 以重新生成平台网关客户端证书。

选填

false

automationgateway_control_plane_port

gateway_control_plane_port

平台网关 control plane 的端口号。

选填

50051

automationgateway_disable_hsts

gateway_nginx_disable_hsts

控制是否为平台网关启用或禁用 HTTP Strict Transport Security (HSTS)。将此变量设置为 true 以禁用 HSTS。

选填

false

automationgateway_disable_https

gateway_nginx_disable_https

控制是否为平台网关启用或禁用 HTTPS。将此变量设置为 true 以禁用 HTTPS。

选填

rpm = disable_https 中定义的值,默认值为 false。container = false

automationgateway_firewalld_zone

gateway_proxy_firewall_zone

应用平台网关相关防火墙规则的防火墙区域。这会根据区域的信任级别控制哪些网络可以访问平台网关。

选填

rpm = 无默认设置.容器 = 'public'。

automationgateway_grpc_auth_service_timeout

gateway_grpc_auth_service_timeout

在平台网关上向 gRPC 服务发出的请求超时持续时间(以秒为单位)。

选填

30s

automationgateway_grpc_server_max_threads_per_process

gateway_grpc_server_max_threads_per_process

每个 gRPC 服务器进程可以创建的最大线程数来处理平台网关上的请求。

选填

10

automationgateway_grpc_server_processes

gateway_grpc_server_processes

在平台网关上处理 gRPC 请求的进程数。

选填

5

automationgateway_http_port

gateway_nginx_http_port

平台网关侦听 HTTP 请求的端口号。

选填

RPM = 8080.容器 = 8083.

automationgateway_https_port

gateway_nginx_https_port

平台网关侦听 HTTPS 请求的端口号。

选填

RPM = 8443.容器 = 8446

automationgateway_main_url

gateway_main_url

客户端连接到的平台网关的主要实例的 URL。如果您执行集群部署,并且您需要使用负载均衡器的 URL 而不是组件的服务器,则使用。URL 必须以 http://https:// 前缀开头。

选填

 

automationgateway_nginx_tls_files_remote

 

表示 Web 证书源是否为安装程序本地的(false),还是在远程组件服务器(true)上。

选填

automationgateway_tls_files_remote 中定义的值,默认值为 false

automationgateway_pg_cert_auth

gateway_pg_cert_auth

控制是否在平台网关 PostgreSQL 数据库中启用或禁用客户端证书身份验证。将此变量设置为 true 以启用客户端证书身份验证。

选填

false

automationgateway_pg_database

gateway_pg_database

平台网关使用的 PostgreSQL 数据库的名称。

选填

rpm = 自动化gateway.容器 = 网关.

automationgateway_pg_host

gateway_pg_host

平台网关使用的 PostgreSQL 数据库的主机名。

必填

 

automationgateway_pg_password

gateway_pg_password

平台网关 PostgreSQL 数据库用户的密码。对此变量使用特殊字符有限。支持 !, #, 0@ 字符。使用其他特殊字符可能会导致设置失败。

选填

 

automationgateway_pg_port

gateway_pg_port

平台网关使用的 PostgreSQL 数据库的端口号。

选填

5432

automationgateway_pg_sslmode

gateway_pg_sslmode

控制平台网关连接到 PostgreSQL 数据库时要使用的 SSL 模式。有效选项包括 verify-full,verify-ca, requires, prefer,allow,disable

选填

prefer

automationgateway_pg_username

gateway_pg_username

平台网关 PostgreSQL 数据库用户的用户名。

选填

rpm = 自动化gateway.container = gateway

automationgateway_pgclient_sslcert

gateway_pg_tls_cert

平台网关的 PostgreSQL SSL/TLS 证书文件的路径。

使用客户端证书身份验证时需要。

 

automationgateway_pgclient_sslkey

gateway_pg_tls_key

平台网关的 PostgreSQL SSL/TLS 密钥文件的路径。

使用客户端证书身份验证时需要。

 

automationgateway_pgclient_tls_files_remote

 

表示 PostgreSQL 客户端证书源是否为安装程序本地的(false)还是远程组件服务器(true)。

选填

automationgateway_tls_files_remote 中定义的值,默认值为 false

automationgateway_redis_host

gateway_redis_host

平台网关使用的 Redis 主机的主机名。

选填

[automationgateway] 清单组中的第一个节点。

automationgateway_redis_password

gateway_redis_password

平台网关 Redis 的密码。

选填

随机生成的字符串。

automationgateway_redis_username

gateway_redis_username

平台网关 Redis 的用户名。

选填

gateway

automationgateway_secret_key

gateway_secret_key

平台网关用来签名和加密数据的 secret 密钥值。

选填

 

automationgateway_ssl_cert

gateway_tls_cert

平台网关的 SSL/TLS 证书文件的路径。

选填

 

automationgateway_ssl_key

gateway_tls_key

平台网关的 SSL/TLS 密钥文件的路径。

选填

 

automationgateway_tls_files_remote

gateway_tls_remote

表示平台网关提供的证书文件是否为安装程序本地的(false)还是远程组件服务器(true)。

选填

false

automationgateway_uwsgi_processes

gateway_uwsgi_processes

平台网关容器的 uwsgi 进程数量。该值根据可用 vCPU (虚拟 CPU)的数量计算。

选填

vCPU 数量乘以 2,再加上 1。

automationgateway_use_archive_compression

gateway_use_archive_compression

控制是否为平台网关启用或禁用存档压缩。您可以使用 use_archive_compression 在全局范围内控制此功能。

选填

true

automationgateway_use_db_compression

gateway_use_db_compression

控制是否为平台网关启用或禁用数据库压缩。您可以使用 use_db_compression 在全局范围内控制此功能。

选填

true

automationgateway_user_headers

gateway_nginx_user_headers

要添加到平台网关 NGINX 配置中的额外 NGINX 标头列表。

选填

[]

automationgateway_verify_ssl

 

表示在安装过程中从平台网关调用到其自身时是否验证平台网关的 Web 证书。设置为 false 以禁用 Web 证书验证。

选填

true

automationgatewayproxy_disable_https

envoy_disable_https

控制在访问平台 UI 时是否禁用 HTTPS。设置为 true 以禁用 HTTPS (使用 HTTP)。

选填

rpm = disable_https 中定义的值,默认值为 false。container = false

automationgatewayproxy_http_port

envoy_http_port

Envoy 代理在其上侦听传入 HTTP 连接的端口号。

选填

80

automationgatewayproxy_https_port

envoy_https_port

Envoy 代理在其上侦听传入 HTTPS 连接的端口号。

选填

443

nginx_tls_protocols

gateway_nginx_https_protocols

在处理 HTTPS 流量时,平台网关将支持协议。

选填

[TLSv1.2, TLSv1.3]

redis_disable_tls

gateway_redis_disable_tls

控制是否为平台网关 Redis 启用或禁用 TLS。将此变量设置为 true 以禁用 TLS。

选填

false

redis_port

gateway_redis_port

平台网关的 Redis 主机的端口号。

选填

6379

 

gateway_extra_settings

定义在安装过程中平台网关使用的其他设置。

例如:

gateway_extra_settings:
  - setting: OAUTH2_PROVIDER['ACCESS_TOKEN_EXPIRE_SECONDS']
    value: 600
Copy to Clipboard Toggle word wrap

选填

[]

 

gateway_nginx_client_max_body_size

通过 NGINX 发送到平台网关的数据允许的最大大小。

选填

5m

 

gateway_nginx_hsts_max_age

为平台网关强制执行 HTTP Strict Transport Security (HSTS)的最大持续时间(以秒为单位)。

选填

63072000

 

gateway_uwsgi_listen_queue_size

平台网关的队列中允许的请求数量,直到 uwsgi _processes 可以服务它们。

选填

4096

B.9. receptor 变量

Receptor 的清单文件变量。

Expand
RPM 变量名称容器变量名称描述必需或可选default

receptor_datadir

 

receptor 存储运行时数据和本地工件的目录。target 目录必须可以被 awx 用户访问。如果目标目录是临时文件系统 tmpfs,请确保它在重启后正确重新挂载。如果不这样做,则会导致 receptor 不再有一个工作目录。

选填

/tmp/receptor

receptor_listener_port

receptor_port

receptor 侦听来自其他 receptor 节点的传入连接的端口号。

选填

27199

receptor_listener_protocol

receptor_protocol

在处理流量时,receptor 将支持的协议。

选填

tcp

receptor_log_level

receptor_log_level

控制 receptor 日志记录的详细程度。有效选项包括: errorwarninginfodebug

选填

info

receptor_tls

 

控制是否为 receptor 启用或禁用 TLS。将此变量设置为 false 以禁用 TLS。

选填

true

请参阅 RPM 对等变量的 node_type

receptor_type

对于 [automationcontroller] 组,这两个选项有:

  • receptor_type=control - 仅运行项目和清单更新,但不运行常规作业。
  • receptor_type=hybrid - 节点运行所有内容。

对于 [execution_nodes] 组,这两个选项有:

  • receptor_type=hop - 节点将作业转发到执行节点。
  • receptor_type=execution - 节点可以运行作业。

选填

对于 [automationcontroller] 组: 混合。对于 [execution_nodes] 组: execution

请参阅 RPM 对等变量 的对等点

receptor_peers

用于指示特定主机连接到的节点。每当定义此变量时,都会建立到特定主机的出站连接。该值必须是以逗号分隔的主机名列表。不要使用清单组名称。

这被解析为用来构造 receptor.conf 文件的一组主机。

如需更多信息,请参阅 添加执行节点

选填

[]

 

receptor_disable_signing

控制 receptor 节点之间的通信签名是启用或禁用的。将此变量设置为 true 以禁用通信签名。

选填

false

 

receptor_disable_tls

控制是否为 receptor 启用或禁用 TLS。将此变量设置为 true 以禁用 TLS。

选填

false

 

receptor_firewall_zone

应用 receptor 相关防火墙规则的防火墙区。这会根据区的信任级别控制哪些网络可以访问 receptor。

选填

public

 

receptor_mintls13

控制 receptor 是否只接受使用 TLS 1.3 或更高版本的连接。设置为 true 以只接受使用 TLS 1.3 或更高版本的连接。

选填

false

 

receptor_signing_private_key

receptor 用来与网络中的其他 receptor 节点签名的私钥路径。

选填

 
 

receptor_signing_public_key

receptor 用来与网络中的其他 receptor 节点签名的公钥的路径。

选填

 
 

receptor_signing_remote

表示 receptor 签名文件是否在安装程序(false)或远程组件服务器(true)中是本地的。

选填

false

 

receptor_tls_cert

到 receptor 的 TLS 证书文件的路径。

选填

 
 

receptor_tls_key

到 receptor 的 TLS 密钥文件的路径。

选填

 
 

receptor_tls_remote

表示 receptor 提供的证书文件是否为安装程序的本地(false)还是远程组件服务器(true)。

选填

false

 

receptor_use_archive_compression

控制 receptor 是否启用或禁用存档压缩。您可以使用 use_archive_compression 在全局范围内控制此功能。

选填

true

B.10. Redis 变量

Redis 的清单文件变量。

Expand
RPM 变量名称容器变量名称描述必需或可选default

redis_cluster_ip

redis_cluster_ip

Redis 集群用来识别集群中的每个主机的 IPv4 地址。在 [redis] 组中定义主机时,如果默认不是您想要的,请使用此变量来识别 IPv4 地址。特定于容器:Red Hat Redis 集群无法使用主机名或 IPv6 地址。

选填

rpm = 从 Ansible 事实发现的 IPv4 地址.如果 IPv4 地址不可用,则使用 IPv6 地址。container = 从 Ansible 事实发现的 IPv4 地址。

redis_disable_mtls

 

控制 Redis 是否启用或禁用 mTLS。将此变量设置为 true 以禁用 mTLS。

选填

false

redis_firewalld_zone

redis_firewall_zone

应用 Redis 相关防火墙规则的防火墙区域。这会根据区的信任级别控制哪些网络可以访问 Redis。

选填

rpm = 无默认设置.容器 = public

redis_hostname

 

Redis 集群在识别和路由主机时使用的主机名。默认情况下使用 routable_hostname

选填

routable_hostname中定义的值

redis_mode

redis_mode

用于 Ansible Automation Platform 安装的 Redis 模式。有效选项包括: standalonecluster。有关 Redis 的更多信息,请参阅 规划安装 中的 缓存和队列系统

选填

cluster

redis_server_regen_cert

 

表示是否为 Redis 重新生成 Ansible Automation Platform 管理的 TLS 密钥对。

选填

false

redis_tls_cert

redis_tls_cert

Redis 服务器 TLS 证书的路径。

选填

 

redis_tls_files_remote

redis_tls_remote

表示 Redis 提供的证书文件是否为安装程序本地的(false)还是远程组件服务器(true)。

选填

false

redis_tls_key

redis_tls_key

Redis 服务器 TLS 证书密钥的路径。

选填

 
 

redis_use_archive_compression

控制 Redis 是否启用或禁用存档压缩。您可以使用 use_archive_compression 在全局范围内控制此功能。

选填

true

法律通告

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
返回顶部