# Upgrading from 1.0.6.11 to 2.0 using tower-cli

**URL:** <https://forum.ansible.com/t/upgrading-from-1-0-6-11-to-2-0-using-tower-cli/28852>\
**Category:** AWX Project\
**Tags:** awx\
**Created:** [October 23, 2018, 12:39pm UTC](https://forum.ansible.com/t/upgrading-from-1-0-6-11-to-2-0-using-tower-cli/28852 "2018-10-23T12:39:53Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nrk](https://avatars.discourse-cdn.com/v4/letter/n/9de0a6/32.png) [@nrk](https://forum.ansible.com/u/nrk)\
**Post date:** [October 23, 2018, 12:39pm UTC](https://forum.ansible.com/t/upgrading-from-1-0-6-11-to-2-0-using-tower-cli/28852/1 "2018-10-23T12:39:53Z")

</div>

Hi all,

We are testing the upgrade procedure using the tower-cli. We followed the steps listed below:

- Setup a new instance of AWX pointing to a new database
- Create an export from our production instance
- Import the assets.json into the new instance

After this procedure, we have some doubts.

1 - As tower-cli does not export the credential passwords, we have to update them after the import. We saw that we can perform an upgrade of the field in the database with the value of the previous database and seems to work. Can we go with this approach?

2 - After the import, templates are not imported because projects should be synced before, as they are getting the playbooks from our Bitbucket. The only way to do this, is, perform an import, configure the credentials, sync the projects and then, run a new import. There is any issue if we run more than one import over the same instance?  
3 - About the LDAP configuration. Can we setup the ldap configuration before importing the assets.json?

And last question, there is no way to upgrade directly from 1.0.x to 2.0?

Thanks in advance.

Cheers

---

<div class="post-metadata">

**Author:** ![Serge\_van\_Ginderacht](https://avatars.discourse-cdn.com/v4/letter/s/b782af/32.png) [@Serge\_van\_Ginderacht](https://forum.ansible.com/u/Serge_van_Ginderacht)\
**Post date:** [October 23, 2018, 1:33pm UTC](https://forum.ansible.com/t/upgrading-from-1-0-6-11-to-2-0-using-tower-cli/28852/2 "2018-10-23T13:33:52Z")

</div>

Hi,

> 1 - As tower-cli does not export the credential passwords, we have to update them after the import. We saw that we can perform an upgrade of the field in the database with the value of the previous database and seems to work. Can we go with this approach?

AFAIK, that will indeed work, if both instances use the same encryption secret (awx\_secret).

> 2 - After the import, templates are not imported because projects should be synced before, as they are getting the playbooks from our Bitbucket. The only way to do this, is, perform an import, configure the credentials, sync the projects and then, run a new import. There is any issue if we run more than one import over the same instance?

I noticed this too, didn’t troubleshoot further into it yet. I /think/ that should work though.

> 3 - About the LDAP configuration. Can we setup the ldap configuration before importing the assets.json?

I just mailed about the script I published,which migrates the credential secrets and the ldap config, you might be interested in it:

[https://github.com/autops/awx-migrate](https://github.com/autops/awx-migrate)

> And last question, there is no way to upgrade directly from 1.0.x to 2.0?

No, as i understood, database upgrades are not (yet) supported.

Serge

---

<div class="post-metadata">

**Author:** ![Serge\_van\_Ginderacht](https://avatars.discourse-cdn.com/v4/letter/s/b782af/32.png) [@Serge\_van\_Ginderacht](https://forum.ansible.com/u/Serge_van_Ginderacht)\
**Post date:** [October 23, 2018, 1:40pm UTC](https://forum.ansible.com/t/upgrading-from-1-0-6-11-to-2-0-using-tower-cli/28852/3 "2018-10-23T13:40:36Z")

</div>

> > 2 - After the import, templates are not imported because projects should be synced before, as they are getting the playbooks from our Bitbucket. The only way to do this, is, perform an import, configure the credentials, sync the projects and then, run a new import. There is any issue if we run more than one import over the same instance?
> 
> I noticed this too, didn’t troubleshoot further into it yet. I /think/ that should work though.

Actually, I noticed the script took it’s time to sync projects before going further on, so not sure if that is the real problem.  
Might be related to [https://github.com/ansible/tower-cli/pull/586#issuecomment-432176155](https://github.com/ansible/tower-cli/pull/586#issuecomment-432176155)

---

<div class="post-metadata">

**Author:** ![jowestco](https://avatars.discourse-cdn.com/v4/letter/j/85f322/32.png) [@jowestco](https://forum.ansible.com/u/jowestco)\
**Post date:** [October 26, 2018, 7:42pm UTC](https://forum.ansible.com/t/upgrading-from-1-0-6-11-to-2-0-using-tower-cli/28852/4 "2018-10-26T19:42:26Z")

</div>

You can setup the LDAP integration before running the send/receive; that will only migrate assets, not settings.

Tower-CLI will rebuild assets in this order:

‘user’,  
‘organization’,  
‘team’,  
‘credential\_type’,  
‘credential’,  
‘notification\_template’,  
‘inventory\_script’,  
‘project’,  
‘inventory’,  
‘job\_template’,  
‘workflow’

If you don’t have a lot of credentials you might want to try the following:  
Export users, organizations, teams, credential\_types and credentials and import those into the target  
Update the password for the credentials  
Export the notification\_templates, inventory\_scripts, projects, inventory, job\_templates and workflows and import those into the target

Some credential types have their passwords in extended data making import/export hard for them because the data has to be updated in one sweep so breaking this up will help if you use those types of credentials.

Another thing you could do would be have a vault file with your password in it, export everything, merge it with the vaulted file and push the whole thing to the target.

-John
