Skip to content

Instantly share code, notes, and snippets.

@deekayen
Last active June 17, 2021 04:41
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save deekayen/af33872cf64faa28e95ba593582abd5e to your computer and use it in GitHub Desktop.
Save deekayen/af33872cf64faa28e95ba593582abd5e to your computer and use it in GitHub Desktop.
Upgrade Ansible AWX containers
docker stop awx_task
docker rm awx_task
docker rmi ansible/awx_task:latest
docker stop awx_web
docker rm awx_web
docker rmi ansible/awx_web:latest
git pull
cd installer
# Review inventory
ansible-playbook -i inventory install.yml
@jorzekowsky
Copy link

line 7 should be: docker rmi ansible/awx_web:latest

@minsis
Copy link

minsis commented Aug 6, 2019

The problem with this method is migration. Since its using a playbook to pull down docker images and run them, there's no migration path for your database. So it'll work fine up until the release before a database change happens.

@deekayen
Copy link
Author

deekayen commented Aug 6, 2019

I thought the attitude of the AWX team was to omit effort that would support migrations between releases so they could do work faster on new features. At least that was my understanding when I posted this gist.

@minsis
Copy link

minsis commented Aug 7, 2019

Probably to a certain degree. It’s a known problem. If they make changes to the database there’s no good way to migrate to the next version with docker. It makes sense since docker images just run the application where an installer would get you the upgrades to your database as needed. You can mitigate some of it by exporting your templates through the UI but things like logins, AD integration, project files doesn’t carry over. It gets worse when you have to build your image like I have to.

Unless somethings changed that I’m not aware of, but it’s basically why I don’t upgrade regularly with it. In fact I only ever upgraded once because once was enough! I just happened to be in an upgrade path that had a database change and it hosed me. Luckily I was still in the POC phase of using it so it didn’t hurt too bad.

Anyways, it’s just something to keep in mind when doing it. Just have to be sure there’s no database change in your upgrade path.

@minsis
Copy link

minsis commented Aug 7, 2019

https://github.com/ansible/awx/blob/devel/DATA_MIGRATION.md

Here's an article you can read on it as well. It has some steps you can take to migrate some of the data. But its not as straight forward as deleting the docker container and running the installer playbook to upgrade.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment