Until this spring, about a third of our customer control planes still ran Ansible Tower 3.8 on plain VMs. The rest ran AWX on Kubernetes. Two stacks meant two upgrade procedures, two backup stories and two sets of runbooks for ourselves, and the Tower side was stuck on Python 3.6 virtualenvs that nobody wanted to touch. On June 27 we moved the last tenant. This is what we learned doing the final 19.
Why not restore from backup
The obvious route is to restore a Tower backup into AWX. It does not work across this gap: the database schema, the secret key handling and the job event tables have all moved on. We used the supported alternative, awxkit's export and import, one tenant at a time.
$ export CONTROLLER_HOST=https://tower.tenant-19.runbooks.ansiblecloud.io CONTROLLER_OAUTH_TOKEN=...
$ awx export > tenant.json
$ export CONTROLLER_HOST=https://tenant-19.runbooks.ansiblecloud.io CONTROLLER_OAUTH_TOKEN=...
$ awx import < tenant.json
Export gives you organizations, teams, projects, inventories, job templates, workflows and schedules. It does not give you job history, and it does not give you secrets.
What broke
Credentials. Every secret field comes out of an export as $encrypted$. There is no way around this, and it is the right behaviour, but it means every credential has to be re-entered. We had 612 of them across 19 tenants. For 440 we could pull the value from the customer's own secret store with a one-off playbook. The other 172 meant a customer admin pasting passwords into a form while we watched a shared screen. Plan for this first, not last. We now keep a credential manifest (name, type, owner, source of truth) for every tenant before any migration starts.
Virtualenvs became execution environments. Tower 3.8 let each organization point at a custom virtualenv. AWX runs jobs in container images instead. For each custom venv we ran pip freeze, turned it into an ansible-builder definition and built an image. Most venvs were a stock install plus boto3 and netaddr. Three were unreproducible, with packages installed by hand years ago, and those three customers got a short consulting call about what their playbooks actually needed.
Ansible itself jumped. Several tenants were still on Ansible 2.9. Bare module names like ec2 or docker had become collection modules, and a couple of options had been renamed. We ran ansible-lint with the fqcn rule across every project and opened pull requests against the customers' playbook repos, 71 in total, most of them mechanical. Then we ran each template with --check against a staging inventory before cutover.
**The tower_* modules.** Playbooks that managed Tower itself (and a surprising number did) used tower_job_template and friends. Those became the awx.awx collection. Same arguments, new names.
Custom inventory scripts. The old Tower feature of pasting a script into the UI is gone. We moved each script into the customer's project repository and pointed an SCM-backed inventory source at it. Two tenants had scripts with hard-coded credentials, which we also fixed, since we were in there.
Schedules and time zones. The rrules imported intact. The UI, however, shows times in the viewer's browser zone, and two tenants concluded that their 02:00 patch window had moved to 01:00. It had not. We added a line about it to the cutover email.
The cutover itself
For each tenant we did the same short sequence:
- Disable all schedules on the Tower side and wait for running jobs to finish.
- Final export, import, then credential re-entry.
- Run a smoke template:
pingandgather_factsagainst every inventory group, with--limitper group so a failure points at a subnet and not at the whole tenant. - Re-point the project webhooks at the new control plane.
- Enable schedules. Leave the Tower VM running, read-only, for 14 days.
Median time with schedules disabled was 38 minutes. The worst was four hours, because a tenant's smoke test found that their jump host only allowed SSH from the old Tower address. We rolled that one back, fixed the firewall rule, and went again the next morning.
Numbers
| Tenants migrated | 19 |
| Calendar time | 6 weeks |
| Credentials re-entered | 612 |
| Playbook pull requests opened | 71 |
| Median schedule-disabled window | 38 min |
| Rollbacks | 1 |
What we would do differently
Build the credential manifest before anything else. Run the smoke template from the new control plane against the real inventory a week early, not on cutover day. And tell customers up front that their execution environment is now part of their code: it lives in their repository, it has a version, and it will not change underneath them unless they change it.
If you are sitting on a Tower install and wondering how bad it is, write to support@ansiblecloud.io. We have done enough of these that we can usually tell you in an afternoon.
Written by Daniel Reyes. Comments, corrections and arguments to daniel.reyes@ansiblecloud.io.