Skip to main content
The Docker Compose installation method provides a complete AWX development environment that runs locally on your machine. This method is designed exclusively for development, testing, and demonstration purposes.
The Docker Compose installation path is only recommended for development/test-oriented deployments and has no official published release. Never use this method for production environments.
For production deployments, use the AWX Operator installation method.

Overview

The Docker Compose development environment:
  • Runs AWX and all dependencies (PostgreSQL, Redis) in containers
  • Bind-mounts your local source code for real-time development
  • Provides hot-reloading for code changes
  • Includes development tools and debugging capabilities
  • Supports multi-node cluster configurations for testing
  • Integrates with external services (Splunk, Vault, Prometheus, etc.) for testing

Prerequisites

Before setting up the development environment, ensure you have the following installed:
Docker Engine must be installed and running on your host machine.
Install Docker CE for your distribution:After installation, start the Docker service and add your user to the docker group:
Log out and back in for group changes to take effect.
Verify Docker installation:
Docker Compose is required to orchestrate multiple containers.Docker Desktop users: Docker Compose is included.Linux users: Install the docker-compose plugin or standalone binary:
Verify installation:
Ansible is used to template configuration files for docker-compose.
Verify installation:
OpenSSL is required for generating SSL certificates.Most systems have OpenSSL pre-installed. Verify:
Ensure your system has adequate resources:
  • CPU: 4+ cores recommended
  • RAM: 8GB minimum, 16GB recommended
  • Disk: 20GB+ free space
  • OS: Tested on Fedora, Ubuntu LTS (18, 20), RHEL 8, CentOS Stream 8, macOS 11

Getting Started

1

Clone the AWX repository

Clone the AWX repository from GitHub. It’s recommended to clone a stable release tag rather than the latest commit:
Deploying from HEAD (or the latest commit) is not stable. Proceed at your own risk if you choose to use the development branch.
For development work, clone the devel branch:
2

Build the development image

Build the AWX development Docker image:
This builds the ansible/awx_devel image containing:
  • Operating system dependencies
  • Python environment with AWX requirements
  • Development tools
  • Symbolic links to your local source code
The build process may take 10-20 minutes depending on your internet connection and system performance.
Skip building: To use the latest pre-built image from GitHub Container Registry instead of building locally:
Then proceed directly to starting the containers.
3

Customize configuration (optional)

Edit the inventory file to customize your development environment:
tools/docker-compose/inventory
Most users can use the default configuration. Custom settings are only needed for external databases or specific development scenarios.
4

Start the development environment

Start all AWX containers and services:
This command:
  • Creates and starts the AWX, PostgreSQL, and Redis containers
  • Runs database migrations
  • Builds the UI (if not already built)
  • Attaches your terminal to the AWX container logs
You’ll see output from Django and the frontend build process. Wait for migrations to complete:
The first startup takes several minutes as the database is initialized and migrations run.

Building the UI

The AWX web interface must be built separately. This requires Node.js and npm on your local machine (not inside the container).
1

Install Node.js and npm

Install the required Node.js version. Check the ansible-ui README for the exact version requirements.
2

Build the UI

On your local machine (outside the container):
This clones the ansible-ui repository into awx/ui/src and builds the static files. When containers start, awx-manage collectstatic copies these files to the proper location.
3

Use local UI repo (optional)

To use a locally cloned ansible-ui repository for UI development:
For more information on UI development, see the ansible-ui contributing guide.

Accessing AWX

Once the containers are running and migrations are complete:
Access the AWX web interface at:
You’ll see a browser warning about the self-signed SSL certificate. This is expected in the development environment.

Create an Admin User

Before logging in, create an admin superuser:
Follow the prompts to set:
  • Username (e.g., admin)
  • Email address
  • Password
Remember these credentials - you’ll use them to log into the web interface.

Load Demo Data (Optional)

For testing, you can load demo projects, inventories, and job templates:
This creates sample data to help you explore AWX features.

Development Workflow

Working with the Source Code

Your local AWX source tree is bind-mounted into the container at /awx_devel. Changes you make to Python code, templates, or other files are immediately available inside the container.
To run commands or explore inside the AWX container:
From this shell, you can:
  • Run management commands: awx-manage <command>
  • Inspect logs: tail -f /var/log/supervisor/*
  • Test database queries: awx-manage dbshell
  • Run Python interactively: awx-manage shell
Execute AWX management commands from your host:
Monitor AWX logs in real-time:
After making code changes, restart AWX services:

Using docker-compose-test

For more control over the development environment, start the containers without automatically launching services:
This drops you into a shell inside the AWX container. Manually bootstrap and start services:
launch_awx.sh automatically calls bootstrap_development.sh, so you can skip the first command if you just want to start services.

Advanced Configuration

Cluster Mode

Test AWX in a multi-node cluster configuration:
This creates a mesh topology with:
  • Multiple AWX control plane nodes
  • Execution nodes (receptor containers)
  • A hop node connecting execution nodes to control plane

Detached Mode

Run containers in the background:
View logs separately:

Custom Image Tag

Use a specific image tag or branch:

Disable Color Output

Useful for CI environments:

Integration Testing

The development environment supports integration with external services for testing:
Test external logging with Splunk:
After containers start, configure AWX to forward logs:
Access Splunk at http://localhost:8000 (credentials: admin/splunk_admin).

Troubleshooting

If you see Waiting for postgres to be ready to accept connections indefinitely:
  1. Stop and remove all containers:
  2. Remove volumes and networks:
  3. Start fresh:
If port 8043 is already in use, modify the port mapping in tools/docker-compose/_sources/docker-compose.yml or stop the conflicting service.
Docker images and volumes can consume significant disk space. Clean up:
If the web interface shows errors:
  1. Ensure UI is built:
  2. Collect static files:
  3. Restart the web service:
If database schema changes after pulling new code:

Stopping and Cleaning Up

Stop containers

Remove all AWX data

To completely remove containers, volumes, and networks:
This deletes all database data, settings, and persistent volumes. You’ll need to recreate your admin user and reload any test data.

Purge everything

To remove all Docker containers, images, and volumes (if you only have AWX containers):

Additional Resources

For questions or issues with the development environment, visit the Ansible Forum with the AWX tag.