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
Docker
Docker Engine must be installed and running on your host machine.Verify Docker installation:
- Linux
- macOS
- Windows
Install Docker CE for your distribution:Log out and back in for group changes to take effect.
- Fedora: Docker CE for Fedora
- CentOS: Docker CE for CentOS
- Ubuntu: Docker CE for Ubuntu
- Debian: Docker CE for Debian
- Arch: Docker for Arch Linux
Docker Compose
Docker Compose
Docker Compose is required to orchestrate multiple containers.Docker Desktop users: Docker Compose is included.Linux users: Install the Verify installation:
docker-compose plugin or standalone binary:Ansible
Ansible
Ansible is used to template configuration files for docker-compose.Verify installation:
OpenSSL
OpenSSL
OpenSSL is required for generating SSL certificates.Most systems have OpenSSL pre-installed. Verify:
System Resources
System Resources
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
Clone the AWX repository
Clone the AWX repository from GitHub. It’s recommended to clone a stable release tag rather than the latest commit:For development work, clone the devel branch:
Build the development image
Build the AWX development Docker image:This builds the Skip building: To use the latest pre-built image from GitHub Container Registry instead of building locally:Then proceed directly to starting the containers.
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.
Customize configuration (optional)
Edit the inventory file to customize your development environment:
tools/docker-compose/inventory
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
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).Install Node.js and npm
Install the required Node.js version. Check the ansible-ui README for the exact version requirements.
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.Accessing AWX
Once the containers are running and migrations are complete:- Web Interface
- API
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:- 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: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.
Start a shell in the container
Start a shell in 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
Run management commands
Run management commands
Execute AWX management commands from your host:
View logs
View logs
Monitor AWX logs in real-time:
Restart services
Restart services
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: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:- 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: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:- Splunk
- HashiCorp Vault
- Prometheus & Grafana
- OpenTelemetry & Loki
- Minikube
Test external logging with Splunk:After containers start, configure AWX to forward logs:Access Splunk at
http://localhost:8000 (credentials: admin/splunk_admin).Troubleshooting
Database connection issues
Database connection issues
If you see
Waiting for postgres to be ready to accept connections indefinitely:-
Stop and remove all containers:
-
Remove volumes and networks:
-
Start fresh:
Port conflicts
Port conflicts
If port 8043 is already in use, modify the port mapping in
tools/docker-compose/_sources/docker-compose.yml or stop the conflicting service.Out of disk space
Out of disk space
Docker images and volumes can consume significant disk space. Clean up:
UI not loading
UI not loading
If the web interface shows errors:
-
Ensure UI is built:
-
Collect static files:
-
Restart the web service:
Rebuild after schema changes
Rebuild after schema changes
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: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.