Skip to main content
This guide covers building AWX images, API documentation, and understanding the build system.

Building Images

Development Image

The development image includes all dependencies needed for AWX development:
This builds the ansible/awx_devel image based on the Dockerfile template at tools/ansible/roles/dockerfile/templates/Dockerfile.j2.

Build Options

Custom image name and tag:
Custom receptor image:
Docker cache control:

Production Image

To build a production-ready AWX image:
The production image is optimized for deployment and does not include development tools.

Multi-platform Builds

AWX supports building for multiple platforms:

Building API Documentation

AWX includes support for building Swagger/OpenAPI documentation.

Generate API Documentation

From inside the development container:
This will write a file named swagger.json that contains the API specification in OpenAPI format.

View the Documentation

A variety of online tools are available for translating the OpenAPI specification into more consumable formats: Simply upload or paste the swagger.json content into these tools.

Build System Overview

Makefile Targets

AWX uses a comprehensive Makefile with numerous targets. Here are the key ones:

Development

Testing

UI Build

Collection

Build Variables

Key environment variables that control the build:

Python Package Building

Source Distribution

Build a source distribution (sdist) of AWX:

Virtual Environment Setup

AWX requires specific packages to be installed from source:

Requirements Management

AWX uses pip-tools to manage Python dependencies.

Requirements Files

Located in the requirements/ directory:
  • requirements.in - Base runtime requirements
  • requirements_dev.in - Development requirements
  • requirements_git.txt - Git-based dependencies

Update Requirements

To update pinned requirements:

Building for Deployment

Kubernetes Image

For Kubernetes/OpenShift deployments:
This builds an image suitable for deployment with the AWX Operator.

Custom Build Arguments

You can pass custom build arguments:

Build Artifacts

Generated Files

The build process generates several artifacts:

Clean Build Artifacts

Dependency Management

Editable Dependencies

For development, you can install editable dependencies:
This installs Python packages in editable mode, allowing you to modify them during development.

Receptor Integration

AWX integrates with Receptor for mesh networking:

Troubleshooting Builds

Common Build Issues

Docker build fails:
Python dependency conflicts:
UI build fails:

Build Logs

To capture detailed build logs:

CI/CD Integration

AWX uses GitHub Actions for continuous integration. The workflow files are located in .github/workflows/.

Running CI Locally

You can run similar checks locally:

Version Management

AWX version is managed through tools/scripts/scm_version.py:

Next Steps