Chapter 2. Upgrading to Red Hat Ansible Automation Platform 2.2

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.

Automation hub

  • When upgrading to Ansible Automation Platform 2.2, you can either add an existing automation hub API token or generate a new one and invalidate any existing tokens.

Additional resources

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 determine which Red Hat Ansible Automation Platform installer meets your needs.

Note

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

  1. Navigate to https://access.redhat.com/downloads/content/480
  2. Click Download Now for the Ansible Automation Platform <latest-version> Setup.
  3. Extract the files:

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

RPM install

  1. Install the Ansible Automation Platform Installer Package

    v.2.2 for RHEL 8 for x86_64

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

    v.2.2 for RHEL 9 for x86-64

    $ sudo dnf install --enablerepo=ansible-automation-platform-2.2-for-rhel-9-x86_64-rpms ansible-automation-platform-installer
Note

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.

  1. Navigate to https://access.redhat.com/downloads/content/480
  2. Click Download Now for the Ansible Automation Platform <latest-version> Setup Bundle.
  3. 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

  1. Navigate to the installation program directory.

    Bundled installer
    $ cd ansible-automation-platform-setup-bundle-<latest-version>
    Online installer
    $ cd ansible-automation-platform-setup-<latest-version>
  2. Open the inventory file for editing.
  3. 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.

    Note

    Automation hub requirements are not automatically updated by default. If you want automation hub requirements to be updated during the upgrade, set automationhub_upgrade=true in your inventory file.

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 the inventory file.

Importing and generating API tokens

  • 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=

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

  1. Run the setup.sh script

    $ ./setup.sh

The installation will begin.