build an older version of awx

hi

i don want to build the actual awx version. (2.1.2)

i want e.g. 2.1.0.

is it possible to set the version number in the inventory?

this sounds like it is possible, but there is no variable

Remove these lines if you want to run a local image build

Otherwise the setup playbook will install the official Ansible images. Versions may

be selected based on: latest, 1, 1.0, 1.0.0, 1.0.0.123

by default the base will be used to search for ansible/awx_web and ansible/awx_task

dockerhub_base=ansible

Thanx

I’ve managed to do this by modifying the VERSION file. I’ve also seen somewhere that there was an inventory variable, but I don’t remember what it was nor have I tried it.

I have the same problem.
I want to install AWX 2.1.2 version and now the standard installation is AWX 3.0.0
Which is the variable that I have to configure to install in the inventory?

dockerhub_base?

There used to be a variable in installer/inventory called dockerhub_version that controlled which version of AWX was installed. It seems like it this variable was removed and AWX now uses the VERSION file to determine its version. The commit this happened is: https://github.com/ansible/awx/commit/b75f8ceca6a0da6d0cf078eeea68a15646054bfa#diff-bfa9126dc8059138bf7554d741cb6a5d

If you’re pulling images from Dockerhub it seems like changing the contents of VERSION file will let you pull specific image versions. But if you’re building your own images it’s not a good idea to just change the contents of the VERSION file bc you’ll still be running the latest software, it will just be tagged as a different version of AWX. A better method would be to switch to the release tag you want on Github, clone that repository, and build the software as your normally would from there.

I have a doubt with the awx upgrade procedure.

I stooped the dockers of my old awx installation 1.0.8.
I want to install 2.1.2 AWX.
I did a export of all objects with tower-cli receive and when I finish I will import the objects with tower-cli send.

I don´t remove anything with docker rm, because I wanted to have a backup installation to reverse the upgrade if I have some problem.

I cloned de project awx git clone https://github.com/ansible/awx.git and then I edited inventory file and VERSION file to install 2.1.2.

Then I executed the installer playbook.
The upgrade have finished OK.
When I enter to AWX, I see that all my objects are in the new installation without doing the import with tower-cli send.

Is it possible that the migration from 1.8 to 2.1.2 is trasparent without doing the import of objects?
I see that postgres version in both AWX instalation is the same? Is it consistent this upgrade or it will appear errors post-upgrade?

Which is the best procedure to upgrade?
This procedure that I executed or It´s better deleting the old docker and containers and It do a clean installation?

It’s also possible to check out the Tower repository AT the version that you want to install:

git clone ...
git checkout 2.1.2

Alberto,

When you do a Docker install, the postgres_data_dir variable in the inventory file controls where on the local filesystem Docker will mount the Postgres DB container and that’s where your DB files (AWX objects) are stored. If you do a reinstall and point the DB at the same location on the filesystem, the DB will be re-initialized with the same data that was in the DB previously. AWX doesn’t keep any data inside of it - everything is in the DB. Just stopping and removing the AWX containers won’t affect your data so long as the DB files remain in tact.

If you want to test the export tool on a single Docker host, you’ll probably need to

  1. perform an install
  2. create some AWX objects
  3. export data using the tool
  4. stop/remove the containers
  5. delete the postgres_data_dir directory
  6. pull a different version of AWX / re-deploy
  7. import the data using the tool
  8. verify the data isn’t corrupt

The new upgrade AWX 2.1.2 is not OK.
If I press the i botton at th rigth web portal, I see that the version of AWX is 2.1.2.
But the new features of AWX2.1.1 doesnt´t appear.
For example the job template doesn´t have the Job Slicing option.

It looks that I have a hybrid installation of AWX, the part of web is 2.1.2 and the structure of postgres tables is of the 1.8 version.

My postgres data dir is /srv/pgdocker.
Is a good practice rename this drectory and make the new installation in this directory that is empty?

The new installation will appear withouts objects and then it will be necessary recover from tower-cli export.

It is very likely that the db structure has changed since you are upgrading from a very old version. You should remove your old data, install the new AWX and then import your exported objects. But keep in mind that it might not work, depending on what they changed in the db structure.
I think it’s best you go on IRC and ask the AWX guys.