Anyone got a proper instruction set to upgrade Ansible Tower 3.4 to 3.6 ? (Ansible 2.5, Database - postgres 9.6)
Found Ansible Doc but not in details. Thanks
Anyone got a proper instruction set to upgrade Ansible Tower 3.4 to 3.6 ? (Ansible 2.5, Database - postgres 9.6)
Found Ansible Doc but not in details. Thanks
EDIT: The original question pertained to upgrading AWX. It's been edited and now pertains to upgrading Ansible Tower. My answer below only applies to upgrading AWX.
If you used the docker-compose installation method and pointed postgres_data_dir
to a persistent directory on the host, upgrading AWX is straightforward. I deployed AWX 2.0.0 in 2018 and have upgraded it to every subsequent release (currently running 9.1.0) without issue. Below is my upgrade method which preserves all data including secrets between upgrades and does not rely on using the tower cli / awx cli tool.
AWX path assumptions:
Existing installation: /opt/awx
New release: /tmp/awx
AWX inventory file assumptions:
use_docker_compose=true
postgres_data_dir=/opt/postgres
docker_compose_dir=/var/lib/awx
Manual upgrade process:
diff -u /tmp/awx/installer/inventory /opt/awx/installer/inventory > /tmp/awx_inv_patch
patch /tmp/awx/installer/inventory < /tmp/awx_inv_patch
diff -s /tmp/awx/installer/inventory /opt/awx/installer/inventory
cp -Rp /tmp/awx/* /opt/awx/
/var/lib/awx/docker-compose.yml
and change the version numbers
after image: ansible/awx_web:
and image: ansible/awx_task:
to match the
new version of AWX that you're upgrading to.cd /var/lib/awx
docker-compose stop
cd /opt/awx/inventory
ansible-playbook -i inventory install.yml
AWX starts the upgrade process, which usually completes within a couple minutes. I'll typically monitor the upgrade progress with docker logs -f awx_web
until I see RESULT 2 / OKREADY
appear.
cd /var/lib/awx
docker-compose stop
docker-compose pull && docker-compose up --force-recreate -d
/tmp/awx
and /tmp/awx_inv_patch
.Updgrades in AWX are not supported by ansible/redhat. Only the commercial Tower Licence allows to access scripts and procedures to do this.
From the awx project FAQ
Q: Can I upgrade from one version of AWX to another?
A: Direct in-place upgrades between AWX versions are not supported. It is possible to migrate data between different versions of AWX using the tower-cli tool. To migrate between different instances of AWX, please follow the instructions at https://github.com/ansible/awx/blob/devel/DATA_MIGRATION.md.
The reference link on github AWX project will teach you how to export your current data with tower-cli
and reimport it in the new version you install. Note that all credentials are exported with blank secrets so you will have to update them with the passwords/secrets once imported.