You can upgrade your existing Tower installation to the latest version easily.
As with installation, the upgrade process requires that the Tower server be able to access the Internet. The upgrade process takes roughly the same amount of time as a Tower installation, plus any time needed for data migration.
This upgrade procedure assumes that you have a working installation of Ansible and Tower.
Note
You can not convert an embedded-database Tower to a Active/Passive Redundancy mode installation as part of an upgrade. Users who want to deploy Tower in a Redundant configuration should back up their Tower database, install a new Redundant configuration on a different VM or physical host, and then restore the database. It is possible to add a primary or secondary instance later on to Tower if it is already operating on an external database. Refer to the Active/Passive Redundancy chapter of the Tower Administration Guide.
Before upgrading your Tower installation, refer to Requirements to ensure you have enough disk space and RAM as well as to review any software needs. For example, you should have the latest stable release of Ansible installed before performing an upgrade.
It is advised that you create a backup before upgrading the system. After the backup process has been accomplished, proceed with OS/Ansible/Tower upgrades.
Refer to Backing Up and Restoring Tower in the Ansible Tower Administration Guide.
Download the Ansible Tower install/upgrade tool: http://releases.ansible.com/ansible-tower/setup/
Extract it, then cd
into the setup directory. Replace the string VERSION
in the commands below with the version of Tower that you are installing e.g., “2.1.4”.
root@localhost:~$ tar xvzf ansible-tower-setup-latest.tar.gz
root@localhost:~$ cd ansible-tower-setup-VERSION
To configure your upgrade, you run the same Tower Installation Wizard as you would for an installation.
If you are upgrading a Tower instance on a local machine with an internal database, you can bypass many of the questions by invoking the configure script as ./configure --local
root@localhost:~$ ./configure --local
-------------------------------------------
Welcome to the Ansible Tower Install Wizard
-------------------------------------------
This wizard will guide you through the setup process.
LOCAL INSTALLATION
You are installing Ansible Tower on this machine, using an internal database.
REVIEW
You are UPGRADING an existing Tower installation on localhost.
Are these settings correct (y/n)?
Confirm that the settings are correct.
If you have the tower_setup_conf.yml
file from when you installed Tower, you can pass it to the configure
script:
root@localhost:~$ ./configure -o tower_setup_conf.yml
-------------------------------------------
Welcome to the Ansible Tower Install Wizard
-------------------------------------------
This wizard will guide you through the setup process.
The configuration provided in /home/tower/ansible-tower-setup-2.1.4/tower_setup_conf.yml appears complete.
FINISHED!
You have completed the setup wizard. You may execute the installation of
Ansible Tower by issuing the following command:
sudo ./setup.sh
Alternatively, you can walk through the upgrade process. Invoke the configure
script:
root@localhost:~$ ./configure
-------------------------------------------
-------------------------------------------
Welcome to the Ansible Tower Install Wizard
-------------------------------------------
This wizard will guide you through the setup process.
PRIMARY TOWER MACHINE
Tower can be installed (or upgraded) on this machine, or onto a remote machine
that is reachable by SSH.
Note: If using the High Availability features of Tower, you must use DNS
resolvable hostnames or IP addresses (do not use "localhost").
Enter the hostname or IP to configure Ansible Tower
(default: localhost):
Once you enter the host, the Tower Installation Wizard contacts it to determine if Tower is installed. If it is a functioning Tower installation, it determines the current Tower configuration, including the location of any secondary nodes that need upgrading.
The Installation Wizard then asks you for connection details for connecting to any remote machines. Enter any needed SSH user, SSH key location, and whether sudo
or su
is in use.
The Tower setup playbook script is invoked as ./setup.sh
from the path where you unpacked the Tower installer tarball. It uses the tower_setup_conf.yml
and inventory
files written by the Tower Installation Wizard. The setup script takes the following arguments:
-h
, --help
Displays a brief usage summary.-c FILE
Use the specified FILE as the Tower configuration file
rather than tower_setup_conf.yml
in the current directory.-i FILE
Use the specified FILE as the inventory for the setup
playbook rather than inventory
in the current directory.-p
Set ansible to prompt for a SSH password when connecting to
remote machines-s
Set ansible to prompt for a sudo password on remote machines
when upgrading Tower.-u
Set ansible to prompt for a su password on remote machines
when upgrading Tower.-e
Set additional ansible variables for the playbook to use
either in key=value or YAML/JSON form. This should not be needed in
normal operation.-b
Perform a database backup in lieu of installing.-r BACKUP_FILE
Perform a database restore in lieu of installing.Depending on the configuration you entered when running the Tower Installation Wizard, it may have prompted you to run the setup playbook with some combination of -p
, -s
, or -u
.
As the root user, call setup.sh
with the appropriate parameters and Tower is upgraded on the appropriate machines as configured.
root@localhost:~$ ./setup.sh
Note
As part of the upgrade process, database schema migration may be done. Depending on the size of your Tower installation, this may take some time.
If the upgrade of Tower fails or if you need assistance, please contact Ansible via the Red Hat Customer Portal at https://access.redhat.com/.