Update 12/17/2021 – AWX has changed a bit on the install and the old playbook has been updated. Please see notes at the end for white screen issue.

Having worked a fair amount in my day job with Ansible and Ansible Tower, I was delighted to find out that there was a free version of Ansible Tower called Ansible AWX. Unfortunately, I discovered that documentation on using the product was either severely lacking, or incompatible with current version. Luckily I was able to find a post from Computer For Geeks that was able to get me ninety percent of the way there.

There are a couple of prerequisites in order to run this installer.

  1. You must have VM or Physical CentOS 8/Rocky Linux Machine running
  2. You must have sudo or root privileges on the machine.

The Computer For Geeks post is great, but there are a couple steps missed.

  1. Kubernetes requires swap to be off
  2. Kubernetes recommends that the Firewall be turned off or ports to be allowed in the firewall. For this tutorial, we are going with the firewall off.
  3. Resources must be above 1CPU and 1GB Memory. For my case I have 4CPUs and 8GB of memory. You may be able to go lower but I have not tested.

Once you have the VM provisioned you can execute the following playbook from my GitHub

After the playbook has executed you’ll still need to do a couple of things, and they are all detailed from Step 4 in the the Computer For Geeks Post.

Some more gotchas. I mistakenly left my CentOS VM at the defaults (1VCPU and 1GB Memory), and was stuck with the awx-operator pod at pending.

I was unsure as to why this was the case even after multiple reboots. I decided to try to troubleshoot the kubernetes instance, which I’m not very familiar with yet. Looking at the documentation I ran the below command.

The output at the end gave me the reason.

Shutting down the VM, add resources and restarting I saw this, which was progress.

Once the pod showed Running, I was able to get the port of the Ansible AWX instance and go to my browser. You will see this while the instance comes up.

After a couple minutes you will be granted by a login screen, and can follow the Computers of Geeks Post.

If you get a blank white screen do the following

kubectl -n awx exec -it awx-XXX-XXX -c awx-web — bash

The awx-XXX-XXX can be obtained by running kubectl get pods -n awx

You’ll see output like below

[root@awx ~]# kubectl get pods -n awx
NAME READY STATUS RESTARTS AGE
awx-postgres-0 1/1 Running 1 103m
awx-6846fd65b5-tq2b9 4/4 Running 4 102m
awx-operator-controller-manager-647f4c5c7d-2xspm 2/2 Running 2 106m

Once inside the awx-web container run the following

ln -s /var/lib/awx/venv/awx/lib/python3.8/site-packages/awx/ui/build/static /var/lib/awx/public/static

Refresh your web browser of choice and you’ll get the login screen once again.

I actually deployed tower2 from my first instance of AWX after working out the steps by hand. I’ll be working on a series of post detailing how I setup my instance of AWX and what I utilize it for.

Advertisement

Published by mdicecca112

Systems Engineer from the Greater Boston Area

Leave a comment

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: