# How to migrate from awx 17.x to 18.x

**URL:** <https://forum.ansible.com/t/how-to-migrate-from-awx-17-x-to-18-x/35099>\
**Category:** AWX Project\
**Tags:** awx\
**Created:** [May 3, 2021, 12:23pm UTC](https://forum.ansible.com/t/how-to-migrate-from-awx-17-x-to-18-x/35099 "2021-05-03T12:23:09Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Selvam\_Elangovan](https://avatars.discourse-cdn.com/v4/letter/s/8c91f0/32.png) [@Selvam\_Elangovan](https://forum.ansible.com/u/Selvam_Elangovan)\
**Post date:** [May 3, 2021, 12:23pm UTC](https://forum.ansible.com/t/how-to-migrate-from-awx-17-x-to-18-x/35099/1 "2021-05-03T12:23:09Z")

</div>

Hi!

I am using awx 17.x and plan to migrate to 18.x which uses kubernets operators method of installation.

could some one please share the details to migrate from 17.x to 18.x?

Thanks & Regards,  
Selvam E.

---

<div class="post-metadata">

**Author:** ![Selvam\_Elangovan](https://avatars.discourse-cdn.com/v4/letter/s/8c91f0/32.png) [@Selvam\_Elangovan](https://forum.ansible.com/u/Selvam_Elangovan)\
**Post date:** [May 3, 2021, 12:25pm UTC](https://forum.ansible.com/t/how-to-migrate-from-awx-17-x-to-18-x/35099/2 "2021-05-03T12:25:14Z")

</div>

Hi!

I am using awx 17.x and plan to migrate to 18.x which uses kubernets operators method of installation.

could some one please share the details to migrate from 17.x to 18.x?

environment: kubernetes cluster

Thanks & Regards,  
Selvam E.

---

<div class="post-metadata">

**Author:** ![Selvam\_Elangovan](https://avatars.discourse-cdn.com/v4/letter/s/8c91f0/32.png) [@Selvam\_Elangovan](https://forum.ansible.com/u/Selvam_Elangovan)\
**Post date:** [May 7, 2021, 2:42pm UTC](https://forum.ansible.com/t/how-to-migrate-from-awx-17-x-to-18-x/35099/3 "2021-05-07T14:42:01Z")

</div>

How we can migrate awx from 17.x to 18.x. could some one help me here.

---

<div class="post-metadata">

**Author:** ![Alexandre\_BORTOLUZZI](https://avatars.discourse-cdn.com/v4/letter/a/5fc32e/32.png) [@Alexandre\_BORTOLUZZI](https://forum.ansible.com/u/Alexandre_BORTOLUZZI)\
**Post date:** [October 14, 2021, 1:46pm UTC](https://forum.ansible.com/t/how-to-migrate-from-awx-17-x-to-18-x/35099/4 "2021-10-14T13:46:18Z")

</div>

Hello,  
We encountered some issues from AWX 17.1.0 to 18.0.0  
Can we have any help or news about this please ?

---

<div class="post-metadata">

**Author:** ![Wei-Yen\_Tan](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/wei-yen_tan/32/4111_2.png) [@Wei-Yen\_Tan](https://forum.ansible.com/u/Wei-Yen_Tan)\
**Post date:** [October 14, 2021, 1:49pm UTC](https://forum.ansible.com/t/how-to-migrate-from-awx-17-x-to-18-x/35099/5 "2021-10-14T13:49:34Z")

</div>

What problems are yoy experiencing?

---

<div class="post-metadata">

**Author:** ![Wei-Yen\_Tan](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/wei-yen_tan/32/4111_2.png) [@Wei-Yen\_Tan](https://forum.ansible.com/u/Wei-Yen_Tan)\
**Post date:** [October 14, 2021, 1:54pm UTC](https://forum.ansible.com/t/how-to-migrate-from-awx-17-x-to-18-x/35099/6 "2021-10-14T13:54:43Z")

</div>

Also what are yoy trying to migrate? Everything or parts?

---

<div class="post-metadata">

**Author:** ![Selvam\_Elangovan](https://avatars.discourse-cdn.com/v4/letter/s/8c91f0/32.png) [@Selvam\_Elangovan](https://forum.ansible.com/u/Selvam_Elangovan)\
**Post date:** [October 15, 2021, 5:57am UTC](https://forum.ansible.com/t/how-to-migrate-from-awx-17-x-to-18-x/35099/7 "2021-10-15T05:57:46Z")

</div>

Here is what I did for the upgrade and it is working fine.

![](https://us1.discourse-cdn.com/ansible/original/2X/f/f17e60c85446be2e16c781afd33f774ca9b25063.png)

| 
### Selvam Elangovan \<[selvame2002@gmail.com](mailto:selvame2002@gmail.com)\>
 |

Thu, Oct 7, 5:15 PM (8 days ago)

> |   
> |
> 
> - | - |

> >

| 

to Wei-Yen, AWX, Andrea  
 ![](https://us1.discourse-cdn.com/ansible/original/2X/5/56d45f8a17f5078a20af9962c992ca4678450765.gif)

 |

![](https://us1.discourse-cdn.com/ansible/original/2X/f/f17e60c85446be2e16c781afd33f774ca9b25063.png)

| 
### Selvam Elangovan \<[selvame2002@gmail.com](mailto:selvame2002@gmail.com)\>
 |

Thu, Oct 7, 5:15 PM (8 days ago)

> |   
> |
> 
> - | - |

> >

| 

to Wei-Yen, AWX, Andrea  
 ![](https://us1.discourse-cdn.com/ansible/original/2X/5/56d45f8a17f5078a20af9962c992ca4678450765.gif)

 |

---

<div class="post-metadata">

**Author:** ![Selvam\_Elangovan](https://avatars.discourse-cdn.com/v4/letter/s/8c91f0/32.png) [@Selvam\_Elangovan](https://forum.ansible.com/u/Selvam_Elangovan)\
**Post date:** [October 15, 2021, 5:59am UTC](https://forum.ansible.com/t/how-to-migrate-from-awx-17-x-to-18-x/35099/8 "2021-10-15T05:59:04Z")

</div>

Here is what I did for the upgrade.

Execute below:

Awx upgrade based on k8 operator:  
kubectl delete deployment awx-operator  
kubectl delete serviceaccount awx-operator  
kubectl delete clusterrolebinding awx-operator  
kubectl delete clusterrole awx-operator

unzip -d awx-operator-0.14.0.zip  
export NAMESPACE=awx  
Please go to the unzipped directory and execute below  
make deploy

The operator will be successfully installed however the postgress configuration i.e secret is not available in operator hence it will fail to  
update the awx ansible tower.

Follow the below to update ansible tower aka awx

kubectl -n awx edit deployment.apps/awx  
Change the image\_verison to the latest one. example: 19.4.0

It will automatically pull the image and install it.

Once done, run below i.e. after all the pods and container on running.

kubectl -n awx exec -it pod/podname -c awx-web bash  
awx-manage showmigrations | grep -v ‘’ | grep ‘’ | wc -l  
awx-manage showmigrations  
awx-manage migrate --noinput  
awx-manage changepassword admin

Once above done, then you have successfully updated the awx from 19.x to 19.4.0

Note: THE Postgres is external.

---

<div class="post-metadata">

**Author:** ![Wei-Yen\_Tan](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/wei-yen_tan/32/4111_2.png) [@Wei-Yen\_Tan](https://forum.ansible.com/u/Wei-Yen_Tan)\
**Post date:** [October 15, 2021, 6:01am UTC](https://forum.ansible.com/t/how-to-migrate-from-awx-17-x-to-18-x/35099/9 "2021-10-15T06:01:10Z")

</div>

interesting. In my upgrades from 18-19+ I just changed this :

Change the image\_verison to the latest one. example: 19.4.0

The operator did everything else

---

<div class="post-metadata">

**Author:** ![Alexandre\_BORTOLUZZI](https://avatars.discourse-cdn.com/v4/letter/a/5fc32e/32.png) [@Alexandre\_BORTOLUZZI](https://forum.ansible.com/u/Alexandre_BORTOLUZZI)\
**Post date:** [October 15, 2021, 12:34pm UTC](https://forum.ansible.com/t/how-to-migrate-from-awx-17-x-to-18-x/35099/10 "2021-10-15T12:34:24Z")

</div>

Hello,

We are trying to migrate our K8S instance in version 17.1.0 to the operator in 0.14.0 and the AWX image in 18.0.0.  
We currently have an external Postgres database

When we do the upgrade, the operator exits successfully but we cannot download a project or run a template.  
We get a “Runtime error: status 0” error.

Do you have an idea?

---

<div class="post-metadata">

**Author:** ![Alexandre\_BORTOLUZZI](https://avatars.discourse-cdn.com/v4/letter/a/5fc32e/32.png) [@Alexandre\_BORTOLUZZI](https://forum.ansible.com/u/Alexandre_BORTOLUZZI)\
**Post date:** [October 15, 2021, 1:18pm UTC](https://forum.ansible.com/t/how-to-migrate-from-awx-17-x-to-18-x/35099/11 "2021-10-15T13:18:26Z")

</div>

This is the error :

_Traceback (most recent call last):_  
_File “/var/lib/awx/venv/awx/lib/python3.6/site-packages/awx/main/tasks.py”, line 1476,_  
_in run res = receptor\_job.run()_  
_File “/var/lib/awx/venv/awx/lib/python3.6/site-packages/awx/main/tasks.py”, line 3094,_  
_in run return self.\_run\_internal(receptor\_ctl)_  
_File “/var/lib/awx/venv/awx/lib/python3.6/site-packages/awx/main/tasks.py”, line 3150,_  
_in \_run\_internal raise RuntimeError(detail)_  
_RuntimeError: exit status 0_

---

<div class="post-metadata">

**Author:** ![Wei-Yen\_Tan](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/wei-yen_tan/32/4111_2.png) [@Wei-Yen\_Tan](https://forum.ansible.com/u/Wei-Yen_Tan)\
**Post date:** [October 15, 2021, 5:08pm UTC](https://forum.ansible.com/t/how-to-migrate-from-awx-17-x-to-18-x/35099/12 "2021-10-15T17:08:21Z")

</div>

Ahhhh I reread this. Are you saying that the upgrade succedded but no jobs (jobs are not working). Right , are yoy using a custom execution environment at all?

---

<div class="post-metadata">

**Author:** ![Alexandre\_BORTOLUZZI](https://avatars.discourse-cdn.com/v4/letter/a/5fc32e/32.png) [@Alexandre\_BORTOLUZZI](https://forum.ansible.com/u/Alexandre_BORTOLUZZI)\
**Post date:** [October 18, 2021, 12:52pm UTC](https://forum.ansible.com/t/how-to-migrate-from-awx-17-x-to-18-x/35099/13 "2021-10-18T12:52:14Z")

</div>

Yes indeed we use custom venv to set a specific version to deploy on rhel 5 for example

---

<div class="post-metadata">

**Author:** ![Wei-Yen\_Tan](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/wei-yen_tan/32/4111_2.png) [@Wei-Yen\_Tan](https://forum.ansible.com/u/Wei-Yen_Tan)\
**Post date:** [October 18, 2021, 1:28pm UTC](https://forum.ansible.com/t/how-to-migrate-from-awx-17-x-to-18-x/35099/14 "2021-10-18T13:28:48Z")

</div>

In awx 19 there is no venv anymore. There is only execution environments. Any customizations you have in a venv will have to be customised for that. You will have to create one for that and include your venv in that

[https://docs.ansible.com/automation-controller/latest/html/userguide/execution\_environments.html?extIdCarryOver=true&sc\_cid=701f2000001OH6fAAG](https://docs.ansible.com/automation-controller/latest/html/userguide/execution_environments.html?extIdCarryOver=true&sc_cid=701f2000001OH6fAAG)

I also wrote a blog post that might be helpful

[https://weiyentan.github.io/2021/creating-execution-environments/](https://weiyentan.github.io/2021/creating-execution-environments/)

I hope that helps.

---

<div class="post-metadata">

**Author:** ![Michael\_Nhan](https://avatars.discourse-cdn.com/v4/letter/m/58f4c7/32.png) [@Michael\_Nhan](https://forum.ansible.com/u/Michael_Nhan)\
**Post date:** [October 20, 2021, 8:34pm UTC](https://forum.ansible.com/t/how-to-migrate-from-awx-17-x-to-18-x/35099/15 "2021-10-20T20:34:48Z")

</div>

We also updated an external pg from 17.x to 18+ and have not found a solution for the runtime error you’re seeing. We don’t use custom venv. We’ve tried changing all templates and projects to the default ee, but still nothing but runtime error.

---

<div class="post-metadata">

**Author:** ![Wei-Yen\_Tan](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/wei-yen_tan/32/4111_2.png) [@Wei-Yen\_Tan](https://forum.ansible.com/u/Wei-Yen_Tan)\
**Post date:** [October 20, 2021, 8:36pm UTC](https://forum.ansible.com/t/how-to-migrate-from-awx-17-x-to-18-x/35099/16 "2021-10-20T20:36:33Z")

</div>

What’s in your job template and or project?

---

<div class="post-metadata">

**Author:** ![Michael\_Nhan](https://avatars.discourse-cdn.com/v4/letter/m/58f4c7/32.png) [@Michael\_Nhan](https://forum.ansible.com/u/Michael_Nhan)\
**Post date:** [October 20, 2021, 9:00pm UTC](https://forum.ansible.com/t/how-to-migrate-from-awx-17-x-to-18-x/35099/17 "2021-10-20T21:00:13Z")

</div>

A playbook from a private git repo, credentials, and inventory nothing fancy. Even creating a new template that calls a simple playbook with a single machine inventory fails with runtime error while trying to sync repo from git. I’ve confirmed a new install works fine. So we may have to look into exporting work flow and templates, and see if we can get them working on a new install. It does require keying all the credentials back in.

---

<div class="post-metadata">

**Author:** ![Wei-Yen\_Tan](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/wei-yen_tan/32/4111_2.png) [@Wei-Yen\_Tan](https://forum.ansible.com/u/Wei-Yen_Tan)\
**Post date:** [October 20, 2021, 9:08pm UTC](https://forum.ansible.com/t/how-to-migrate-from-awx-17-x-to-18-x/35099/18 "2021-10-20T21:08:56Z")

</div>

And are you using the default ee?

---

<div class="post-metadata">

**Author:** ![Wei-Yen\_Tan](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/wei-yen_tan/32/4111_2.png) [@Wei-Yen\_Tan](https://forum.ansible.com/u/Wei-Yen_Tan)\
**Post date:** [October 20, 2021, 9:09pm UTC](https://forum.ansible.com/t/how-to-migrate-from-awx-17-x-to-18-x/35099/19 "2021-10-20T21:09:24Z")

</div>

Sorry just reread your message.

---

<div class="post-metadata">

**Author:** ![Alexandre\_BORTOLUZZI](https://avatars.discourse-cdn.com/v4/letter/a/5fc32e/32.png) [@Alexandre\_BORTOLUZZI](https://forum.ansible.com/u/Alexandre_BORTOLUZZI)\
**Post date:** [October 27, 2021, 7:58am UTC](https://forum.ansible.com/t/how-to-migrate-from-awx-17-x-to-18-x/35099/20 "2021-10-27T07:58:04Z")

</div>

Just FYI, we have upgrade our instance to the 19.0.0 and next 19.2.2 version. It works fine with our external database.  
I see this line in CHANGELOG : “There are now 2 default Instance Groups: ‘controlplane’ and ‘default’”  
This corrects the problem of Runtime error
