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.
- You must have VM or Physical CentOS 8/Rocky Linux Machine running
- You must have sudo or root privileges on the machine.
The Computer For Geeks post is great, but there are a couple steps missed.
- Kubernetes requires swap to be off
- 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.
- 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.
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.