从 Ansible Automation Platform 2.5 更新至 2.5.x


Red Hat Ansible Automation Platform 2.5

执行从 Ansible Automation Platform 2.5 到 2.5.x 的补丁更新

Red Hat Customer Content Services

摘要

本指南介绍了如何为每个安装类型执行从 Ansible Automation Platform 2.5 到 2.5.x 的补丁更新。

对红帽文档提供反馈

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

您可以在发布更新时对 Ansible Automation Platform 安装执行补丁更新。这只适用于从 2.5 到 2.5.x 的更新。

注意

目前不支持从 2.4 升级到 2.5。如需更多信息,请参阅知识库文章

第 1 章 基于 RPM 的 Ansible Automation Platform

要更新基于 RPM 的 Ansible Automation Platform,请先查看更新注意事项。然后,您可以下载最新版本的 Ansible Automation Platform 安装程序,在安装捆绑包中 配置清单文件 以反映您的环境,然后运行安装程序。

1.1. 更新计划

在开始更新过程前,请查看以下注意事项来计划和准备 Ansible Automation Platform 部署:

  • 即使拥有之前版本的有效许可证,在升级到最新版本的 Ansible Automation Platform 时,必须提供您的凭证或订阅清单。如需更多信息,请参阅 访问管理和身份验证 中的附加 Red Hat Ansible Automation Platform 订阅
  • 在升级前,集群升级需要特别注意实例和实例组。在升级前捕获清单或实例组详情。如需更多信息, 请参阅配置 自动化执行中的集群
  • 如果您当前正在运行 Event-Driven Ansible 控制器,请在升级前禁用所有规则手册激活,以确保升级过程完成后只运行新的激活。这可以防止在早期版本中运行激活的孤立容器。如需更多信息,请参阅使用自动化决策 中的 启用和禁用规则手册激活

1.2. 选择并获取 Red Hat Ansible Automation Platform 安装程序

根据您的 Red Hat Enterprise Linux 环境互联网连接,选择您需要的 Red Hat Ansible Automation Platform 安装程序。查看以下场景以确定哪个 Red Hat Ansible Automation Platform 安装程序满足您的需要。

1.2.1. 使用互联网访问进行安装

如果您的 Red Hat Enterprise Linux 环境连接到互联网,请选择 Red Hat Ansible Automation Platform 安装程序。使用互联网访问进行安装会检索最新的软件仓库、软件包和依赖项。选择以下方法之一来设置 Ansible Automation Platform 安装程序。

Tarball 安装

  1. 进入到 Red Hat Ansible Automation Platform 下载页面
  2. Ansible Automation Platform <latest-version> SetupDownload Now
  3. 解压文件:

    $ tar xvzf ansible-automation-platform-setup-<latest-version>.tar.gz

RPM 安装

  1. 安装 Ansible Automation Platform 安装程序软件包

    v.2.5 for RHEL 8 for x86_64

    $ sudo dnf install --enablerepo=ansible-automation-platform-2.5-for-rhel-8-x86_64-rpms ansible-automation-platform-installer

    v.2.5 for RHEL 9 for x86_64

    $ sudo dnf install --enablerepo=ansible-automation-platform-2.5-for-rhel-9-x86_64-rpms ansible-automation-platform-installer
注意

dnf install 启用存储库,因为默认禁用存储库。

使用 RPM 安装程序时,文件位于 /opt/ansible-automation-platform/installer 目录下。

1.2.2. 在没有互联网访问的情况下安装

如果您无法访问互联网,或者不想从在线存储库安装独立的组件和依赖项,请使用 Red Hat Ansible Automation PlatformBundle 安装程序。仍然需要访问 Red Hat Enterprise Linux 软件仓库。所有其他依赖项都包含在 tar 归档中。

流程

  1. 进入 Red Hat Ansible Automation Platform 下载页面
  2. Ansible Automation Platform <latest-version> Setup BundleDownload Now
  3. 解压文件:

    $ tar xvzf ansible-automation-platform-setup-bundle-<latest-version>.tar.gz

1.3. 备份基于 RPM 的 Ansible Automation Platform

使用 backup_dir 标志运行 setup.sh 脚本来备份现有的 Ansible Automation Platform 实例,它会保存当前环境的内容和配置:

  1. 进入 Ansible Automation Platform 安装目录。
  2. 按照以下示例运行 setup.sh 脚本:

    $ ./setup.sh -e 'backup_dir=/ansible/mybackup' -e 'use_compression=True' @credentials.yml -b
    • backup_dir 指定将备份保存到的目录。
    • @credentials.yml 传递密码变量及其由 ansible-vault 加密的值。

通过成功备份,会在 /ansible/mybackup/<platform_installation_directory_name>.tar.gz 中创建一个 备份文件。

其他资源

  • 有关备份和恢复的更多信息,请参阅配置 自动化执行中的 备份和恢复

1.4. 设置清单文件

在升级 Red Hat Ansible Automation Platform 安装前,请编辑 inventory 文件,使其与您的所需配置匹配。您可以从现有 Ansible Automation Platform 部署中保留相同的参数,或者修改参数以匹配环境的任何更改。

流程

  1. 进入安装程序目录。

    捆绑的安装程序

    $ cd ansible-automation-platform-setup-bundle-<version_number>-<arch_version>

    在线安装程序

    $ cd ansible-automation-platform-setup-<version_number>
  2. 更新清单文件,使其与所需配置匹配。如果没有更改环境,您可以使用现有 Ansible Automation Platform 安装中的同一清单文件。
注意

为所有主机提供可访问 IP 地址或完全限定域名(FQDN),以确保用户可以从不同节点从 Ansible Automation Hub 同步和安装内容。不要使用 localhost。如果使用 localhost,则升级将作为 preflight 检查的一部分停止。

1.5. 运行 Red Hat Ansible Automation Platform 安装程序设置脚本

在更新了 inventory 文件后,您可以运行设置脚本。

流程

  • 运行 setup.sh 脚本:

    $ ./setup.sh

安装将开始。

第 2 章 基于容器的 Ansible Automation Platform

要更新基于容器的 Ansible Automation Platform,请先查看更新注意事项。然后,您可以下载最新版本的 Ansible Automation Platform 安装程序,在安装捆绑包中 配置清单文件 以反映您的环境,然后运行安装程序。

2.1. 更新基于容器的 Ansible Automation Platform

对基于 Ansible Automation Platform 的基于容器的安装执行补丁更新。

先决条件

您已完成以下内容:

流程

  1. Ansible Automation Platform 下载,下载 容器化安装程序的最新版本。

    1. 用于在线安装 Ansible Automation Platform 2.5 容器化设置
    2. 对于离线或捆绑安装: Ansible Automation Platform 2.5 Containerized Setup Bundle
  2. 将安装程序 .tar 文件复制到您的 Red Hat Enterprise Linux 主机上。
  3. 决定您希望安装程序驻留在文件系统中的位置。安装相关的文件将在此位置创建,且初始安装需要至少 10 GB。
  4. 将安装程序 .tar 文件解压缩到您的安装目录中,然后进入解压缩的目录。

    1. 解包在线安装程序:

      $ tar xfvz ansible-automation-platform-containerized-setup-<version>.tar.gz
    2. 解包离线或捆绑的安装程序:

      $ tar xfvz ansible-automation-platform-containerized-setup-bundle-<version>-<arch name>.tar.gz
  5. 编辑清单文件,使其与您所需的配置匹配。您可以从现有 Ansible Automation Platform 部署中保留相同的参数,或者修改参数以匹配环境的任何更改。
  6. 运行 install 命令:

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

安装将开始。

2.2. 备份基于容器的 Ansible Automation Platform

执行基于容器的 Ansible Automation Platform 安装程序备份。

流程

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

    $ ansible-playbook -i inventory ansible.containerized_installer.backup

    这将备份容器化安装程序部署的重要数据,例如:

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

默认情况下,备份目录设置为 ~/backups,但可以使用 清单文件中的 backup_dir 变量进行更改。

第 3 章 OpenShift Container Platform 上的 Ansible Automation Platform

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

3.1. 在 OpenShift Container Platform 上更新 Ansible Automation Platform

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

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

    注意

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

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

法律通告

Copyright © 2024 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 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

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

© 2024 Red Hat, Inc.