Documentation

2. 升级到 Ansible Automation Platform

Automation Hub 作为 automation controller 的内容供应商,它需要 automation controller 部署和 Automation Hub 部署一起运行。Ansible Automation Platform 安装程序包含这两个组件。本节涵盖了升级过程的每个组件:

注解

All upgrades should be no more than two major versions behind what you are currently upgrading to. For example, in order to upgrade to automation controller 4.3, you must first be on version 4.1.x; i.e., there is no direct upgrade path from version 3.8.x or earlier. Refer to the recommended upgrade path article on the Red Hat customer portal.

In order to run automation controller 4.3, you must also have Ansible 2.12 at minimum.

To help you determine the right upgrade or migration path when moving from an old Ansible Automation Platform or Tower version to a new Ansible Automation Platform version, use the Upgrade Assistant at https://access.redhat.com/labs/aapua/. If prompted, use your Red Hat customer credentials to login.

2.1. 升级计划

本节论述了当您试图升级 automation controller 实例时应注意的更改。

  • 即使您已经拥有之前版本的一个有效许可证,在升级到自动化控制器的最新版本时,仍需要提供您的凭证或订阅清单。请参阅 Automation Controller User Guide 中的 导入订阅

  • 如果需要升级 Red Hat Enterprise Linux 和 automation controller,则需要备份和恢复控制器的数据(从自动化控制器)。如需更多详情,请参阅 Automation Controller Administration Guide 中的 备份和恢复

  • 在开始升级前,集群升级需要特别注意实例和实例组。请参阅 Editing the Red Hat Ansible Automation Platform installer inventory file集群

2.2. 获取安装程序

详情请查看 Red Hat Customer Portal 上的 Choosing and obtaining a Red Hat Ansible Automation Platform installer。请确保使用您的红帽客户登录以访问完整内容。

2.3. 设置清单(Inventory)文件

如需更多信息,请参阅 Editing the Red Hat Ansible Automation Platform installer inventory file

You can also automatically generate an inventory file based on your selections using a utility called the Inventory File Generator, which you can access at https://access.redhat.com/labs/aapifg/. If prompted, use your Red Hat customer credentials to login.

2.4. 运行 Setup Playbook

Tower 的设置(setup)playbook 脚本使用 inventory 文件,它通过 Tower 安装程序 tarball 被解包到的目录中的 ./setup.sh 运行。

root@localhost:~$ ./setup.sh

设置脚本使用以下参数:

  • -h -- 显示帮助信息并退出

  • -i INVENTORY_FILE -- 到 Ansible 清单文件的路径(默认: inventory

  • -e EXTRA_VARS -- 使用 key=value 或 YAML/JSON 设置额外的 Ansible 变量(例如, -e bundle_install=false 强制在线安装)

  • -b -- 在安装时执行数据库备份

  • -r -- 在安装时执行数据库恢复(除非通过 EXTRA_VARS 提供了一个非默认的路径,使用默认的恢复路径。如下所示)

./setup.sh -e 'restore_backup_file=/path/to/nondefault/location' -r