Chapter 2. Upgrading to Red Hat Ansible Automation Platform 2.4
To upgrade your Red Hat Ansible Automation Platform, start by reviewing planning information to ensure a successful upgrade. You can then download the desired version of the Ansible Automation Platform installer, configure the inventory file in the installation bundle to reflect your environment, and then run the installer.
2.1. Ansible Automation Platform upgrade planning
Before you begin the upgrade process, review the following considerations to plan and prepare your Ansible Automation Platform deployment:
Automation controller
- Even if you have a valid license from a previous version, you must provide your credentials or a subscriptions manifest upon upgrading to the latest version of automation controller.
- If you need to upgrade Red Hat Enterprise Linux and automation controller, you must first backup and restore your automation controller data.
- Clustered upgrades require special attention to instance and instance groups before upgrading.
Additional resources
Automation hub
- When upgrading to Ansible Automation Platform 2.4, you can either add an existing automation hub API token or generate a new one and invalidate any existing tokens.
-
Existing container images are removed when upgrading Ansible Automation Platform. This is because, when upgrading Ansible Automation Platform with
setup.sh
script, podmansystem reset -f
is executed. This removes all container images on your Ansible Automation Platform nodes then pushes the new execution environment image that is bundled with installer. See Running the Red Hat Ansible Automation Platform installer setup script.
Additional resources
Event-Driven Ansible controller
- If you are currently running Event-Driven Ansible controller and plan to deploy it when you upgrade to Ansible Automation Platform 2.4, it is recommended that you disable all Event-Driven Ansible activations before upgrading to ensure that only new activations run after the upgrade process has completed. This prevents possibilities of orphaned containers running activations from the previous version.
2.2. Choosing and obtaining a Red Hat Ansible Automation Platform installer
Choose the Red Hat Ansible Automation Platform installer you need based on your Red Hat Enterprise Linux environment internet connectivity. Review the following scenarios and decide on which Red Hat Ansible Automation Platform installer meets your needs.
A valid Red Hat customer account is required to access Red Hat Ansible Automation Platform installer downloads on the Red Hat Customer Portal.
Installing with internet access
Choose the Red Hat Ansible Automation Platform installer if your Red Hat Enterprise Linux environment is connected to the internet. Installing with internet access retrieves the latest required repositories, packages, and dependencies. Choose one of the following ways to set up your Ansible Automation Platform installer.
Tarball install
- Navigate to the Red Hat Ansible Automation Platform download page.
- Click Ansible Automation Platform <latest-version> Setup. for the
Extract the files:
$ tar xvzf ansible-automation-platform-setup-<latest-version>.tar.gz
RPM install
Install Ansible Automation Platform Installer Package
v.2.4 for RHEL 8 for x86_64
$ sudo dnf install --enablerepo=ansible-automation-platform-2.4-for-rhel-8-x86_64-rpms ansible-automation-platform-installer
v.2.4 for RHEL 9 for x86-64
$ sudo dnf install --enablerepo=ansible-automation-platform-2.4-for-rhel-9-x86_64-rpms ansible-automation-platform-installer
dnf install
enables the repo as the repo is disabled by default.
When you use the RPM installer, the files are placed under the /opt/ansible-automation-platform/installer
directory.
Installing without internet access
Use the Red Hat Ansible Automation Platform Bundle installer if you are unable to access the internet, or would prefer not to install separate components and dependencies from online repositories. Access to Red Hat Enterprise Linux repositories is still needed. All other dependencies are included in the tar archive.
- Navigate to the Red Hat Ansible Automation Platform download page.
- Click Ansible Automation Platform <latest-version> Setup Bundle. for the
Extract the files:
$ tar xvzf ansible-automation-platform-setup-bundle-<latest-version>.tar.gz
2.3. Setting up the inventory file
Before upgrading your Red Hat Ansible Automation Platform installation, edit the inventory
file so that it matches your desired configuration. You can keep the same parameters from your existing Ansible Automation Platform deployment or you can modify the parameters to match any changes to your environment.
Procedure
Navigate to the installation program directory.
- Bundled installer
$ cd ansible-automation-platform-setup-bundle-2.4-1-x86_64
- Online installer
$ cd ansible-automation-platform-setup-2.4-1
-
Open the
inventory
file for editing. Modify the
inventory
file to provision new nodes, deprovision nodes or groups, and import or generate automation hub API tokens.You can use the same
inventory
file from an existing Ansible Automation Platform 2.1 installation if there are no changes to the environment.NoteProvide a reachable IP address or fully qualified domain name (FQDN) for the
[automationhub]
and[automationcontroller]
hosts to ensure that users can synchronize and install content from Ansible automation hub from a different node. Do not uselocalhost
. Iflocalhost
is used, the upgrade will be stopped as part of preflight checks.
Provisioning new nodes in a cluster
Add new nodes alongside existing nodes in the
inventory
file as follows:[controller] clusternode1.example.com clusternode2.example.com clusternode3.example.com [all:vars] admin_password='password' pg_host='' pg_port='' pg_database='<database_name>' pg_username='<your_username>' pg_password='<your_password>'
Deprovisioning nodes or groups in a cluster
-
Append
node_state-deprovision
to the node or group within theinventory
file.
Importing and generating API tokens
When upgrading from Red Hat Ansible Automation Platform 2.0 or earlier to Red Hat Ansible Automation Platform 2.1 or later, you can use your existing automation hub API token or generate a new token. In the inventory file, edit one of the following fields before running the Red Hat Ansible Automation Platform installer setup script setup.sh
:
Import an existing API token with the
automationhub_api_token
flag as follows:automationhub_api_token=<api_token>
Generate a new API token, and invalidate any existing tokens, with the
generate_automationhub_token
flag as follows:generate_automationhub_token=True
2.4. Running the Red Hat Ansible Automation Platform installer setup script
You can run the setup script once you have finished updating the inventory
file.
Procedure
Run the
setup.sh
script$ ./setup.sh
The installation will begin.