Build Ansible AWX in Docker containers - Ansible AWX
How to build Ansible AWX in Docker containers in the latest Fedora taking care of the preliminary requirements.
How to build Ansible AWX in Docker containers?
AWX is the Open Source upstream project of the Ansible Automation Controller, included in the Ansible Automation Platform (formerly Ansible Tower). Running in Docker containers to use the modern web-UI and API interface. Running in Docker containers is recommended only for experienced users and developers. I’m Luca Berton and welcome to today’s episode of Ansible Pilot.
Ansible AWX supports only the x86_64 operating system:
- Fedora (maintained versions)
- Ubuntu LTS (20.04 or 22.04)
- Red Hat Enterprise Linux 8+, CentOS Stream 8+
- macOS 11
Ansible AWX is the upstream project of Ansible Automation Controller (formerly Ansible Tower), providing a modern web-UI and API interface to manage Ansible Playbooks, inventories, Credentials, and Vaults between your team in your organization.
Running AWX in local Docker containers allows you to test the AWX web-UI and API to manage Ansible Playbook execution easily. AWX run on Docker is considered for Testing or Development only; the preferred way is via the AWX Operator since version 18.0. This initial configuration sometimes is a roadblock for some Ansible AWX users.
The Best Resources For Ansible
- CYBER DEALS at The Linux Foundation! Up to 65% off, and a FREE GIFT with EVERY PURCHASE! Limited Time, Don't Delay!
- Udemy: Learn Ansible Automation in 250+examples & practical lessons: Learn Ansible with some real-life examples of how to use the most common modules and Ansible Playbook
- Ansible by Examples: 200+ Automation Examples For Linux and Windows System Administrator and DevOps
- Ansible Cookbook: A Comprehensive Guide to Unleashing the Power of Ansible via Best Practices, Troubleshooting, and Linting Rules with Luca Berton
- Ansible For Windows By Examples: 50+ Automation Examples For Windows System Administrator And DevOps
- Ansible For Linux by Examples: 100+ Automation Examples For Linux System Administrator and DevOps
- Ansible Linux Filesystem By Examples: 40+ Automation Examples on Linux File and Directory Operation for Modern IT Infrastructure
- Ansible For Security by Examples: 100+ Automation Examples to Automate Security and Verify Compliance for IT Modern Infrastructure
- Ansible Tips and Tricks: 10+ Ansible Examples to Save Time and Automate More Tasks
- Ansible Linux Users & Groups By Examples: 20+ Automation Examples on Linux Users and Groups Operation for Modern IT Infrastructure
- Ansible For PostgreSQL by Examples: 10+ Examples To Automate Your PostgreSQL database
- Ansible For Amazon Web Services AWS By Examples: 10+ Examples To Automate Your AWS Modern Infrastructure
- Ansible Automation Platform By Example: A step-by-step guide for the most common user scenarios
How to Build Ansible AWX in Docker containers.
I’m going to show you how to build the latest Ansible AWX in the latest Fedora using Docker containers and the latest receptor image.
The additional software must be installed:
Please note that the latest Docker technology should be installed in the target system, the Docker service must be started, and the current user added to the docker group. Also, the latest docker-compose Python module must be installed for a successful installation.
How to build the Ansible AWX Base Container Image and download the latest Ansible Receptor Image.
Clone the latest stable tag Ansible AWX repository
git clone -b x.y.z https://github.com/ansible/awx.git
Substitute x.y.z with the latest release version number (for example, 21.5.0).
Configure the inventory (optional) You can customize the inventory parameters pg_password, broadcast_websocket_secret, secret_key, and any other settings you need for your deployment.
The Ansible AWX Base Container Image build the AWX Base Container Image.
$ make docker-compose-build
This command builds the AWX base container image (it takes a while and connects to the internet to download dependencies, packages, and libraries).
After successful execution the docker images the command shows you a new ansible/awx_devel image:
[lberton@ansible awx]$ docker images REPOSITORY TAG IMAGE ID CREATED SIZE ghcr.io/ansible/awx_devel HEAD 4d593fc25fc2 21 hours ago 1.8GB
- The Ansible Receptor Image
Download the Receptor Image The process also downloads the latest devel image from the receptor. Verify that the receptor image was successfully downloaded using the docker images command:
[lberton@ansible awx]$ docker images REPOSITORY TAG IMAGE ID CREATED SIZE quay.io/ansible/receptor devel 981db0fc0f90 7 days ago 233MB
A successful build end with a prompt without any errors.
Now you know how to Build Ansible AWX in Docker containers.Subscribe to the YouTube channel, Medium, Website, Twitter, and Substack to not miss the next episode of the Ansible Pilot.
Learn the Ansible automation technology with some real-life examples in my
My book Ansible By Examples: 200+ Automation Examples For Linux and aws System Administrator and DevOps
Want to keep this project going? Please donate