Skip to content

AWX distribution using Docker Swarm

License

Notifications You must be signed in to change notification settings

AlanPadi95/docker-awx-stack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AWX (Ansible tower distribution) on Docker

Run the latest version of AWX with Docker and Docker Compose.

AWX provides a web-based user interface, REST API, and task engine built on top of Ansible. It is the upstream project for Tower, a commercial derivative of AWX.

ℹ️ The stack include an Elasticsearch beat image, Metricbeat to send information to a Elastic Stack about the status of the machine and services in the stack.

Check out to the Docker Elastic stack development.

Based on the official Docker images from Ansible, Redis and PostgreSQL:

Addtitional images:

Requirements

Host setup

By default, the stack exposes the following ports:

  • 80: AWX web page

Docker for Desktop

Windows

Ensure the Shared Drives feature is enabled for the C: drive.

MacOS

The default Docker for Mac configuration allows mounting files from /Users/, /Volumes/, /private/, and /tmp exclusively. Make sure the repository is cloned in one of those locations or follow the instructions from the documentation to add more locations.

Usage

Bringing up the stack

Clone this repository, then start the stack using Docker Compose:

$ git clone https://github.com/AlanPadi95/docker-awx-stack.git
...
$ docker-compose up

You can also run all services in the background (detached mode) by adding the -d flag to the above command.

ℹ️ You must run docker-compose build first whenever you switch branch or update a base image.

If you are starting the stack for the very first time, please read the section below attentively.

Cleanup

AWX data is persisted in PostgreSQL server, inside a volume by default.

In order to entirely shutdown the stack and remove all persisted data, use the following Docker Compose command:

$ docker-compose down -v

Swarm mode

Support for Docker Swarm mode is provided in the form of a docker-compose.yml file, which can be deployed in an existing Swarm cluster using the following command:

$ docker stack deploy -c docker-compose.yml awx

If all components get deployed without any error, the following command will show 6 running services:

$ docker stack services awx

Configuration

User authentication

The stack is pre-configured with the following privileged user:

  • user: admin
  • password: password

For more information about AWX configurations, please take a little look to the official administration guide, the user guide and the official GitHub Repository.