Ansible Pilot

Run and Stop Ansible AWX in Docker containers - Ansible AWX

How to start and stop the Ansible AWX modern web-UI and API interface and requirements PostgreSQL and Redis in Docker containers.

September 21, 2022
Access the Complete Video Course and Learn Quick Ansible by 200+ Practical Lessons

How to Run and Stop Ansible AWX in Docker container?

I’m going to show you how to start and stop the Ansible AWX in Docker containers. You can take advantage of the AWX 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.

The Best Resources For Ansible

Video Course

Books

demo

How to Run and Stop Ansible AWX in Docker containers. This requires Building from scratch Ansible AWX for Docker containers in a previous lesson.

code

Once you have a successful build of Ansible AWX for Docker containers, you can run the AWX container using the following command. The process is also spinning the requirements of PostgreSQL and Redis containers.

$ make docker-compose

Your session will be attached to the AWX container, and start watching for log messages and events in real-time when the container was launched. The first time you start the environment, database migrations run in order to build the PostgreSQL initial database schema and data. By default, six Docker containers are running on your machine: tools_awx_1, tools_postgres_1, tools_redis_1, tools_receptor_hop, tools_receptor_1, tools_receptor_2. You can verify the containers running in your system using the docker ps command:

[[email protected] awx]$ docker ps 
CONTAINER ID   IMAGE                            COMMAND                  CREATED        STATUS         PORTS                                                                                                                                                                                                                                                                                                                                                                                NAMES
bce34be76a94   ghcr.io/ansible/awx_devel:HEAD   "/entrypoint.sh rece…"   14 hours ago   Up 2 minutes   22/tcp, 8013/tcp, 8043/tcp, 8080/tcp                                                                                                                                                                                                                                                                                                                                                 tools_receptor_2
c11c7c1114f1   ghcr.io/ansible/awx_devel:HEAD   "/entrypoint.sh rece…"   14 hours ago   Up 2 minutes   22/tcp, 8013/tcp, 8043/tcp, 8080/tcp                                                                                                                                                                                                                                                                                                                                                 tools_receptor_1
05589a6b6185   quay.io/ansible/receptor:devel   "/usr/local/bin/dumb…"   14 hours ago   Up 3 minutes   0.0.0.0:5555->5555/tcp, :::5555->5555/tcp, 7323/tcp                                                                                                                                                                                                                                                                                                                                  tools_receptor_hop
d9570e9d9027   ghcr.io/ansible/awx_devel:HEAD   "/entrypoint.sh laun…"   14 hours ago   Up 3 minutes   0.0.0.0:2222->2222/tcp, :::2222->2222/tcp, 0.0.0.0:6899->6899/tcp, :::6899->6899/tcp, 0.0.0.0:7899-7999->7899-7999/tcp, :::7899-7999->7899-7999/tcp, 0.0.0.0:8013->8013/tcp, :::8013->8013/tcp, 0.0.0.0:8043->8043/tcp, :::8043->8043/tcp, 0.0.0.0:8080->8080/tcp, :::8080->8080/tcp, 22/tcp, 0.0.0.0:8888->8888/tcp, :::8888->8888/tcp, 0.0.0.0:3000->3001/tcp, :::3000->3001/tcp   tools_awx_1
c39fe279ecb2   postgres:12                      "docker-entrypoint.s…"   14 hours ago   Up 3 minutes   5432/tcp                                                                                                                                                                                                                                                                                                                                                                             tools_postgres_1
820ebdc15a10   redis:latest                     "redis-server /usr/l…"   14 hours ago   Up 3 minutes   6379/tcp                                                                                                                                                                                                                                                                                                                                                                             tools_redis_1
[[email protected] awx]$

Run Ansible AWX in Docker containers

Access the Ansible AWX Web UI

The Ansible AWX Web-UI is available at the URL https://localhost:8043/. A successful connection with your browser is going to show you the following login screen ( https://localhost:8043/#/login ).

Run Ansible AWX UI in Docker containers

Access the Ansible AWX Web API

The Ansible AWX API is available at the URL https://localhost:8043/api/. A successful connection with your browser is going to show you the following API endpoint ( https://localhost:8043/api/ ). The Ansible AWX API is a Browsable API so easy to navigate via the browser. Please note that some API endpoints require authentication.

Access the Ansible AWX API in Docker containers

Recap

Now you know how to Run and Stop 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.

Academy

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

BUY the Complete PDF BOOK to easily Copy and Paste the 200+ Ansible code

Want to keep this project going? Please donate

Access the Complete Video Course and Learn Quick Ansible by 200+ Practical Lessons
Trustpilot
Follow me

Subscribe not to miss any new releases

FREE Top 10 Best Practices

Top 10 Best Practices of Ansible Automation: save time, reduce errors and stress