# build an older version of awx

**URL:** <https://forum.ansible.com/t/build-an-older-version-of-awx/29406>\
**Category:** AWX Project\
**Tags:** awx\
**Created:** [January 9, 2019, 1:59pm UTC](https://forum.ansible.com/t/build-an-older-version-of-awx/29406 "2019-01-09T13:59:23Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Me\_Mo](https://avatars.discourse-cdn.com/v4/letter/m/54ee81/32.png) [@Me\_Mo](https://forum.ansible.com/u/Me_Mo)\
**Post date:** [January 9, 2019, 1:59pm UTC](https://forum.ansible.com/t/build-an-older-version-of-awx/29406/1 "2019-01-09T13:59:23Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Darkhan](https://avatars.discourse-cdn.com/v4/letter/d/34f0e0/32.png) [@Darkhan](https://forum.ansible.com/u/Darkhan)\
**Post date:** [January 24, 2019, 1:04pm UTC](https://forum.ansible.com/t/build-an-older-version-of-awx/29406/2 "2019-01-24T13:04:25Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Alberto\_Jimenez\_Loza](https://avatars.discourse-cdn.com/v4/letter/a/97f17d/32.png) [@Alberto\_Jimenez\_Loza](https://forum.ansible.com/u/Alberto_Jimenez_Loza)\
**Post date:** [January 25, 2019, 11:24am UTC](https://forum.ansible.com/t/build-an-older-version-of-awx/29406/3 "2019-01-25T11:24:16Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Uriel](https://avatars.discourse-cdn.com/v4/letter/u/53a042/32.png) [@Uriel](https://forum.ansible.com/u/Uriel)\
**Post date:** [January 25, 2019, 3:49pm UTC](https://forum.ansible.com/t/build-an-older-version-of-awx/29406/4 "2019-01-25T15:49:35Z")

</div>

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](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.

---

<div class="post-metadata">

**Author:** ![Alberto\_Jimenez\_Loza](https://avatars.discourse-cdn.com/v4/letter/a/97f17d/32.png) [@Alberto\_Jimenez\_Loza](https://forum.ansible.com/u/Alberto_Jimenez_Loza)\
**Post date:** [January 28, 2019, 2:19pm UTC](https://forum.ansible.com/t/build-an-older-version-of-awx/29406/5 "2019-01-28T14:19:35Z")

</div>

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](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?

---

<div class="post-metadata">

**Author:** ![matburt](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/matburt/32/3612_2.png) [@matburt](https://forum.ansible.com/u/matburt)\
**Post date:** [January 28, 2019, 4:51pm UTC](https://forum.ansible.com/t/build-an-older-version-of-awx/29406/6 "2019-01-28T16:51:03Z")

</div>

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

```auto
git clone ...
git checkout 2.1.2

```

---

<div class="post-metadata">

**Author:** ![Uriel](https://avatars.discourse-cdn.com/v4/letter/u/53a042/32.png) [@Uriel](https://forum.ansible.com/u/Uriel)\
**Post date:** [January 28, 2019, 8:48pm UTC](https://forum.ansible.com/t/build-an-older-version-of-awx/29406/7 "2019-01-28T20:48:15Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Alberto\_Jimenez\_Loza](https://avatars.discourse-cdn.com/v4/letter/a/97f17d/32.png) [@Alberto\_Jimenez\_Loza](https://forum.ansible.com/u/Alberto_Jimenez_Loza)\
**Post date:** [January 29, 2019, 7:50am UTC](https://forum.ansible.com/t/build-an-older-version-of-awx/29406/8 "2019-01-29T07:50:13Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Darkhan](https://avatars.discourse-cdn.com/v4/letter/d/34f0e0/32.png) [@Darkhan](https://forum.ansible.com/u/Darkhan)\
**Post date:** [February 1, 2019, 9:23am UTC](https://forum.ansible.com/t/build-an-older-version-of-awx/29406/9 "2019-02-01T09:23:50Z")

</div>

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.
