Red Hat has provided two GUI tools for centralized management of remote nodes using Ansible.
Ansible Tower is a web-based interface and REST API endpoint for Ansible. It provides centralized logging and auditing, role-based access control and push-button deployment.
AWX is an automation utility based on Ansible Tower that provides a web graphical interface, REST API as well as a task engine that allows users to manage their Ansible projects. In other words we can AWX is an open source version of Anisble Tower. With AWX, you can perform a number of tasks including inventory management, workflow automation, job scheduling, managing credentials and reporting to mention just a few.
One advantage with AWX is that you get to leverage all the enterprise features that ship with Ansible Tower for an unlimited number of nodes. In other words, the 10-node limit doesn’t apply to AWX. Additionally, AWX is ideal for lab or development environments. It’s however not considered an ideal tool for production environments compared to Ansible Tower.
AWX needs a containerized environment to function. A couple of options that support AWX include Kubernetes, OpenShift and Docker Compose. In this guide, however, we are going to use Docker compose because it’s quite easy to set up and is resource friendly.
Requirements for Ansible AWX
Before we get started, ensure that the CentOS 8 node has the following:
- Ansible already installed.
- 4 GB of RAM
- 3.4 GHz CPU with 2 Cores
- Hard disk space 40 GB
With all the requirements fulfilled, let’s get the ball rolling!
Step 1) Install EPEL on CentOS 8
Begin by installing EPEL on CentOS 8 node because it provides some of the quintessential packages required by AWX. Therefore, log in as root user to your CentOS 8 node and run the command:
[[email protected] ~]# dnf install epel-release -y
Step 2) Install additional packages and dependencies
Additionally, we need to take an extra step and install essential packages that will be required as we get along with the installation of AWX:
[[email protected] ~]# dnf install git gcc gcc-c++ nodejs gettext device-mapper-persistent-data lvm2 bzip2 python3-pip
Step 3) Install Docker CE on CentOS 8
RedHat / CentOS no longer supports the direct installation of docker, so if you run dnf install docker-ce, you are going to run into an error. To install docker on CentOS 8, we need to append the Docker repository to the system using the dnf config-manager tool.
[[email protected] ~]# dnf config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo
The next step is to install Docker, run the command:
[[email protected] ~]# dnf install docker-ce-3:18.09.1-3.el7
Now, run the following command to know what exact version of docker we have installed.
[[email protected] ~]# rpm -qa | grep docker
[[email protected] ~]# docker --version
Now, proceed to start and enable docker using the commands
[[email protected] ~]# systemctl start docker
[[email protected] ~]# systemctl enable -now docker.service
With docker installed, we can now proceed to install Docker compose.
Step 4) Install Docker-Compose on CentOS 8
To install docker-compose, first run the command below to download docker compose file
[[email protected] ~]# curl -L "https://github.com/docker/compose/releases/download/1.25.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
After downloading the docker-compose file, move it to the /usr/bin/ directory.
[[email protected] ~]# mv /usr/local/bin/docker-compose /usr/bin/docker-compose
Remember to assign …