Broken Upgrade paths

Broken Upgrade paths

Confirmed Breaking Upgrade paths:

  • ->

Here you need to get creative.

Got an answer from the AWX Team:

"Upgrades between AWX versions are not expected to work. However, we have recently added an import/export capability to tower-cli/awx-cli, which allows you to export your job templates and other objects (not including credential secrets) to a JSON file, which you can then re-import to a freshly installed 1.0.6."

They are referring to the awx-cli tool from their separate repo.. also, the awx-manage tool have a dumpdata/loaddata tool...

I'm going to see if I can do a workaround for upgrades.

Upgrade Method Using Export/Import Utility

For the guys that really want to push their luck :)... Something like this will probably work.

You have to install awx-cli in advance, available in the repo:

yum install ansible-tower-cli

As far as I can see.. this is missing when using the awx-cli export/import:

  • Users (export is blank), and therefore user permissions isn't set
  • Log/History is not exported (not high priority in the short run)
  • Inventory Groups (custom created groups fails for me, going from>
  • Credential passwords (there should be an option to include them)
  • LDAP/Auth config (is just not included)

Create a backup of AWX data

awx-cli receive --organization all --team all --credential_type all --credential all --notification_template all --user all --inventory_script all --inventory all --project all --job_template all --workflow all > alldata

Stop all services, re-create the database

systemctl stop awx-celery-worker awx-cbreceiver awx-celery-beat awx-channels-worker awx-daphne awx-web
su - postgres -c "dropdb awx"
su - postgres -c "createdb -O awx awx"

Migrate AWX data into the new database

sudo -u awx /opt/awx/bin/awx-manage migrate

Re-create the admin user, provision the instance and queues

echo "from django.contrib.auth.models import User; User.objects.create_superuser('admin', 'root@localhost', 'test')" | sudo -u awx /opt/awx/bin/awx-manage shell
sudo -u awx /opt/awx/bin/awx-manage provision_instance --hostname=$(hostname)
sudo -u awx /opt/awx/bin/awx-manage register_queue --queuename=tower --hostnames=$(hostname)

Restore AWX data from the file (alldata)

awx-cli send alldata

Migration issues