Get started using Ansible AWX (Open Source Tower version) in one minute

Since yesterday's announcement that Ansible had released the code behind Ansible Tower, AWX, under an open source license, I've been working on an AWX Ansible role, a demo AWX Vagrant VM, and an AWX Ansible Container project.

As part of that last project, I have published two public Docker Hub images, awx_web and awx_task, which can be used with a docker-compose.yml file to build AWX locally in about as much time as it takes to download the Docker images:

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

After docker-compose is finished, wait a couple minutes for the initial database migration to run, then you should be able to access AWX at http://localhost/ (the default login is admin/password):

Ansible AWX Dashboard - after initialization - with Angry Potato

You can find out all the details as to how this works, and how you can build the Docker images yourself using Ansible Container in the project repository: AWX (Built with Ansible Container).

Comments

Trying your images but it seems to fail and on the PostgreSQL docker console all i see is the following repeated (MACOS laptop runnign stable docker) )

ERROR:  relation "conf_setting" does not exist at character 158
STATEMENT:  SELECT "conf_setting"."id", "conf_setting"."created", "conf_setting"."modified", "conf_setting"."key", "conf_setting"."value", "conf_setting"."user_id" FROM "conf_setting" WHERE ("conf_setting"."user_id" IS NULL AND
...
"main_schedule"."next_run" DESC

@Nick - Usually this just means the initial database migration hasn't completed yet. It takes 5-10 minutes after setup is complete, and until that time, if you access the home page, you'll see a 500 error and signin attempts will fail.

Check the logs of the awx_task container instead, and see if it's still running the migration.

Where does this angry potato come from?

That... I'm still not entirely sure of. Though the AWX team at Ansible has a few nicknames already in the running:

Trying your images but it just show "CANCEL OK × OK working... "

docker logs awx_task_1 showed that the initialization process seems completed

Applying social_auth.0003_alter_email_max_length... OK
Applying social_auth.0004_auto_20160423_0400... OK
Applying social_auth.0005_auto_20160727_2333... OK
Applying sso.0001_initial... OK
Applying sso.0002_expand_provider_options... OK
Python 2.7.5 (default, Nov 6 2016, 00:28:07)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-11)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)

>>>
>>> Default organization added.
Demo Credential, Inventory, and Job Template added.
Successfully registered instance awx
(changed: True)
Creating instance group tower
Added instance awx to tower
(changed: True)
2017-09-11 04:13:55,336 CRIT Supervisor running as root (no user in config file)
2017-09-11 04:13:55,336 WARN For [program:awx-celeryd-beat], redirect_stderr=true but stderr_logfile has also been set to a filename, the filename has been ignored
2017-09-11 04:13:55,342 INFO RPC interface 'supervisor' initialized
2017-09-11 04:13:55,342 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2017-09-11 04:13:55,342 INFO supervisord started with pid 90
2017-09-11 04:13:56,345 INFO spawned: 'celery' with pid 93
2017-09-11 04:13:56,346 INFO spawned: 'channels-worker' with pid 94
2017-09-11 04:13:56,347 INFO spawned: 'callback-receiver' with pid 95
2017-09-11 04:13:56,348 INFO spawned: 'awx-celeryd-beat' with pid 96
2017-09-11 04:13:57,351 INFO success: celery entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2017-09-11 04:13:57,351 INFO success: channels-worker entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2017-09-11 04:13:57,351 INFO success: callback-receiver entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2017-09-11 04:13:57,351 INFO success: awx-celeryd-beat entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
^C

You probably need to wait a bit longer for all the migrations to finish. Also, try opening a different browser after the 5-10 minute period (you'll know when your CPU goes down to idle again). Sometimes the browser caches that weird unformatted page and doesn't seem to be able to pick up the actual rendered page once the web container actually starts working correctly.

Another option that also works is to docker-compose stop and then start (again, after the initial database migration is complete).

Hmm, I'm having the same issue now and my CPU usage has gone down. Getting 404s on all the CSS and JS files. Tried it a few times now. Other suggestions?

In the image itself, nginx.conf is pointing to /var/lib/awx/public/static/ for static,
but all of the content is at /usr/lib/python2.7/site-packages/awx/ui/static/

Hello Jeff,

Very good documented. I used this URL https://github.com/geerlingguy/awx-container to build all the container. When I try to run the sudo -E ansible-playbook -i 'localhost,' -c local prebuild.yml I'm getting the following error.

TASK [Build base web image] **********************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "failed": true, "msg": "Error building awx_web - code: None, message: Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers), logs: [u'Step 1/32 : FROM centos:7\\n']"}
to retry, use: --limit @/git/awx-container/prebuild/prebuild.retry

The server is behind a Proxy.
Can you please advise?

I'm able to resolve my issue.