GETTING STARTED: UPGRADING ANSIBLE TOWER

March 12, 2018 by John Lieske

Thanks for checking out the Getting Started series! This quick tutorial lists the basic steps needed to perform an upgrade of Red Hat Ansible Tower in a standalone configuration. Specifically, we'll be upgrading Ansible Tower 3.1.0 to the latest (as of this writing) version 3.2.2 in a few simple steps. There are some things you’ll need to keep in mind while upgrading (e.g., editing the inventory file appropriately), and a description will be offered with each example.

Upgrading is Easy

The steps to upgrading are similar to installing Ansible Tower. The original inventory file from the install should already have the hostnames and variables you'll be using, so it's suggested that you work from your current install's inventory file to populate the upgrade file.

Your older inventory file may have some different lines than the newer upgrade version, due to updated configuration options or added features. In this example, the difference between the 3.1.0 and the 3.2.2 inventory files is the added ability to enable isolated key generation for clustered installs. See below for a side-by-side comparison: 

Ansible Tower 3.1.0 Ansible Tower 3.2.2

[tower]
localhost ansible_connection=local

[database]

[all:vars]
admin_password='mypassword'

pg_host=''
pg_port=''

pg_database='awx'
pg_username='awx'
pg_password='mypgpassword'

rabbitmq_port=5672
rabbitmq_vhost=tower
rabbitmq_username=tower
rabbitmq_password='myrmqpassword'
rabbitmq_cookie=cookiemonster

# Needs to be true for fqdns and ip addresses
rabbitmq_use_long_name=false

[tower]
localhost ansible_connection=local

[database]

[all:vars]
admin_password='mypassword'

pg_host=''
pg_port=''

pg_database='awx'
pg_username='awx'
pg_password='mypgpassword'

rabbitmq_port=5672
rabbitmq_vhost=tower
rabbitmq_username=tower
rabbitmq_password='myrmqpassword'
rabbitmq_cookie=cookiemonster

# Needs to be true for fqdns and ip addresses
rabbitmq_use_long_name=false

# Isolated Tower nodes automatically generate an RSA key for authentication;
# To disable this behavior, set this value to false
# isolated_key_generation=true

Older versions of Ansible Tower inventory files won’t have the RabbitMQ lines. For example, a file from the Ansible Tower 3.0.1 installer will lack rabbitmq_ entries and instead contain a field for a Redis password. See below:

Ansible Tower 3.0.1

[primary]

localhost ansible_connection=local

[secondary]

[database]

[all:vars]
admin_password='mypassword'
redis_password='myredispassword'

pg_host=''
pg_port='' 

pg_database='awx'
pg_username='awx'
pg_password='mypgpassword'

It is very important that any Ansible Tower 2.x installs be upgraded to 3.0+ prior to upgrading to the latest Ansible Tower. This is because the repos which are required to install and operate the software have changed their contents, just as Ansible Tower has upgraded and changed the resources it installs.

Run The Setup

Once you’ve filled out the new inventory file in the installer’s home directory (just like when installing), run the setup.sh file (as root) and Ansible Tower will run through its playbooks. The installer will detect Ansible Tower during its preflight processes and follow the upgrade steps.

Ansible Tower Cowsay Screen

In review, upgrading Ansible Tower is the same simple process as the initial install. We hope this post was helpful to you; if you want to know more about how to install, setup and configure Ansible Tower, please check out our other Getting Started posts.

Share:

Topics:
Getting Started, Ansible Tower


 

John Lieske

John is a Product Field Engineer, Ansible, Red Hat. John has been working in technology since 2003, starting with small business consulting and later managing technology for larger companies. Here at Red Hat Ansible, John helps with folks getting started on Red Hat Ansible Tower. John is an amateur musician in his spare time and likes to study history as a hobby. He can be found on Twitter and on Github at @johnlieske.


rss-icon  RSS Feed

Ansible Tower by Red Hat
Learn About Ansible Tower