Ansible open sources Ansible Tower with AWX

Ever since Red Hat acquired Ansible, I and many others have anticipated whether or when Ansible Tower would be open sourced. Ansible Tower is one of the nicest automation tools I've used... but since I haven't been on a project with the budget to support the Tower licensing fees, I have only used it for testing small-scale projects.

I wrote a guide for Automating your Automation with Ansible Tower, and it's both on the web and in Chapter 11 of Ansible for DevOps, and in the guide, I wrote:

For smaller teams, especially when everyone on the team is well-versed in how to use Ansible, YAML syntax, and follows security best practices with playbooks and variables files, using the CLI can be a sustainable approach... Ansible Tower provides a great mechanism for team-based Ansible usage.

There are a lot of companies (mine included!) using Jenkins as a substitute for Ansible Tower, and this can work pretty well, but Jenkins doesn't integrate deeply with all Ansible's powerful inventory management, secret management, and playbook management. Tower also supports a lot more flexible authentication and role-based playbook permissions model which makes it a perfect fit for team-based playbook management.

To be clear though, Ansible Tower itself will still be a licensed product offering from Red Hat, but the code that builds Ansible Tower releases is open sourced, and is available in the AWX Project. According to the AWX Project FAQ, the best way to think of this open source model is in the analogy Fedora is to Red Hat Enterprise Linux as AWX is to Ansible Tower:

AWX is designed to be a frequently released, fast-moving project where all new development happens.

Ansible Tower is produced by taking selected releases of AWX, hardening them for long-term supportability, and making them available to customers as the Ansible Tower offering.

This is a tested and trusted method of software development for Red Hat, which follows a similar model to Fedora and Red Hat Enterprise Linux.

I'm excited to see the code behind Tower has finally been open sourced via AWX, and I hope to start using it for a few services like Hosted Apache Solr shortly. I'll be updating my book's chapter on Ansible Tower and AWX as soon as I'm able—and if you buy the book on LeanPub, you'll get that updated content for free, as soon as I finish writing it!

Getting started with AWX

tl;dr: Run the two commands below to run my AWX Docker images, then access http://localhost/ after your CPU calms down, and enter username admin and password password:

curl -O https://raw.githubusercontent.com/geerlingguy/awx-container/master/docker-compose.yml
docker-compose up -d

Install AWX using a script Ansible

If Docker's not your thing, I'm also maintaining an AWX example in my Ansible Vagrant Examples GitHub repository. Read through the AWX example README file for instructions in getting everything set up, and follow the project's issue tracker for further development of the example (I'm working to make it run in more environments, more easily!).

I'm also building an Ansible AWX role on Ansible Galaxy (which is used by the Vagrant example); it's still in a pretty early stage, but should work okay. I'll hopefully get time to optimize it more in the coming weeks!

After you install it, you'll be greeted by this angry potato:

Ansible AWX login screen angry potato

Log in with the credentials admin and password.

What's up with the name 'AWX'?

Originally, Ansible Tower was called "AWX" — see this old blog post from 2013. And apparently that was kind of a short-hand for 'AnsibleWorks', the original name of the company that became Ansible, that became Ansible by Red Hat. Straight from the horse's mouth:

Ansible for DevOps discounted during AnsibleFest

Right now, Ansible for DevOps is 25% off in celebration of AnsibleFest, so pick up a copy today and supercharge your automation with Ansible!

Comments

you have an extra ] at the end of the 2nd link in this article

Looking forward to the new chapter! Thanks for your hard work.

Any ETA on the new chapters? Very interested in the Ansible Container one :)

Hi,

Thanks for the awesome work.

Is there a way to install the same under standalone machine rather running on a docker?

Thanks
Ethan

Yes, but it's not entirely documented yet. I'm working on it here: https://github.com/geerlingguy/ansible-role-awx/issues/2

Wow, it is looking good. I will try this soon, thanks for your share. :-D

for docker noobs like myself, this bombs out pretty hard.

i think the root cause is this:

postgres_1 | ERROR: relation "conf_setting" does not exist at character 158

here's the pastebin:

https://pastebin.com/DzeXkQsb

i had to start the webserver on port 81, because other things

and im on sierra.

Thanks for the docker-compose file! The docker containers are running and I get the web page, but it's a mess. It seems it can't locate /static/css/vendor.c7c34fcde5e8a885ab9c.css for example. It also can't find the app and vendor js files.

I had _exactly_ the same problem! What I did to fix it was simply comment out the `image: "ansible/awx_{web,task}:latest"` lines, and use the `image: "geerlingguy/awx_{web,task}:latest"` lines instead in the docker-compose.yml file.

Then the Compose configuration starts up, and starts initializing. Beware that it takes a while (several minutes!) while the systems sets up in the background (and you get no output in the terminal while that's happening), before it lets you log in.

As a follow up.

I replaced:
alias /var/lib/awx/public/static/;
with
alias /var/lib/awx/venv/awx/ui/static/;

in /etc/nginx/nginx.conf and now I have proper login page - BUT it seems to have problems connecting to the API

Why do have your own docker images (geerlingguy/awx_task and geerlingguy/awx_web) instead of using the offical ones?

Hi, i have 2 questions.

First, once this is installed, we should be able to access web interface via http://hostname/#/login? If so - it doesnt work for me.

Second question, i see that "docker-compose" created couple mounted drives, is it normal? I am newbie, dont judge =)

none                             31G  4.4G   25G  15% /var/lib/docker/aufs/mnt/f6eced43a30e828a740aba78624b2522dbb88da41985c936c6ec9d1a0fa469da
none                             31G  4.4G   25G  15% /var/lib/docker/aufs/mnt/7707f03518e0e1cf2ca897d93393f93f6d57e86982a535caead42e0aebb9c0d5
none                             31G  4.4G   25G  15% /var/lib/docker/aufs/mnt/8f64d807978271fae195cdbfa768682b7ea8e8402ecdb0552b3b88a5b11ea679
shm                              64M     0   64M   0% /var/lib/docker/containers/2fc062b8e9c8f539f3b55490afc95b2e64fcea63a006097de795ccc4c5b48c70/shm
shm                              64M     0   64M   0% /var/lib/docker/containers/a0afafc2675685798029a978039bf441e83c0193dd1ba73f68cdcde6e3db8167/shm
shm                              64M  4.0K   64M   1% /var/lib/docker/containers/382ef08099d574097ab0b261b9692a4982542920b33b321c2d4109fa115b223e/shm
none                             31G  4.4G   25G  15% /var/lib/docker/aufs/mnt/3cde469e3e0898f6eae33f40f55575b9c491d5196c75752380c098ac5b05447e
shm                              64M     0   64M   0% /var/lib/docker/containers/01e666f66267c2691b4eb9ddaf771075881e83650ec5084f17fc6a9d9b14bf31/shm
none                             31G  4.4G   25G  15% /var/lib/docker/aufs/mnt/f6b41816de88fb28404e0e3c685cfe5e71281a99c6c5731c8063de9a82bae2c9
shm                              64M  128K   64M   1% /var/lib/docker/containers/001fd27d4e9c242d51131ddf0c57965cb5253e0a48b762e14b6d5c5303541d70/shm

Hey how do I add letsencrypt certs on the server?

Good to see your presentation at AnsibleFest2018 in Austin. Using the info here to setup an AWX instance. Thank you.

Is there a version mapping between AWX and Ansible Tower to understand the stable version of AWX..