Skip to content

Instantly share code, notes, and snippets.

@deekayen

deekayen/upgrade.sh

Last active Aug 27, 2020
Embed
What would you like to do?
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

This comment has been minimized.

Copy link

@jorzekowsky jorzekowsky commented Aug 6, 2019

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

@minsis

This comment has been minimized.

Copy link

@minsis 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

This comment has been minimized.

Copy link
Owner Author

@deekayen 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

This comment has been minimized.

Copy link

@minsis 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

This comment has been minimized.

Copy link

@minsis 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