However, I was interested in getting Ansible Tower up an running on my laptop using OpenShift for some personal education.
Ansible Tower and OpenShift are very cool tools — but also a bit too expensive for just playing around. Luckily there are upstream open source projects for both tools:
- AWX is the upstream open source project of Ansible Tower
- OKD is the upstream open source project of OpenShift
However, as the hardware requirements for OKD are still too high for my laptop, I decided to use CRC (Cloud Ready Containers), which is the free OpenShift development environment provided by RedHat.
Finally I was successful, and just if anybody else is interested here are the steps install this setup.
First of all you need a bit of hardware (at least 4 vCPUs, 8 GB memory and 32 GB free space) and a RedHat Developer account to download CRC. My setup is 8 vCPUs, 32 GB memory and enough free space on hard disk. Also I’m using Fedora 33 (which is the open source upstream project for RedHat Enterprise Linux) as operating system.
The high level overview (seems so easy):
- Install Ansible engine
- Download and install CRC (I was using v1.20)
- Clone AWX repo and prepare installation files
- Install AWX (I was using v15.0.0)
[Hint: just check the comments for this story — I have also added instructions for how to install actual AWX version using AWX Operator on CRC.]
The detailed steps:
- Install Ansible (needed to install AWX — how cool is that!) using
sudo dnf install ansible
- Install CRC — for this just follow the instructions provided by CRC download page
Hint: in CRC v1.20 there is an issue with wildcard DNS setup on Fedora 33. A workaround for this are the following commands (before installing CRC):
sudo resolvectl domain crc ~testing
sudo resolvectl dns crc 192.168.130.11
sudo resolvectl default-route crc false
After downloading the CRC binary and pull secret, you need to trigger two commands:
crc start. Below you can see how the output looks after successful invocation.
Before continuing with AWX installation, ensure that you can login as
developer using both CRC UI and oc CLI.
3. Clone the AWX repo (ensure to choose a released version like 15.0.0)
git clone -b 15.0.0 https://github.com/ansible/awx.git
Then just follow the AWX installation instructions for OpenShift (Minishift, which is the previous version of CRC). When preparing the inventory you need to enable the following parameters:
The last step is to run the install playbook (that’s why we need to install Ansible previously):
ansible-playbook -i inventory \
-e openshift_password=developer \
-e docker_registry_password=$(oc whoami -t)
Result of successful playbook run (which takes some time):
In CRC you should see two pods up and running in the
In the end AWX can be accessed using https://awx-web-svc-awx.apps-crc.testing URL. You can login using
admin_passwordfrom AWX inventory file.
In case of errors during CRC (or AWX) setup it was helpful to have fresh CRC setup again. For this you need to trigger the following commands.
Also, in case CRC is up an running, but the AWX playbook is failing, you can start the playbook again after fixing the issue.
These steps are an easy and free way to setup Ansible Tower on your laptop. The advantage to use AWX instead of Ansible Tower with trial license is that all the features are available and there are no limitations on the number of managed hosts. Of course this setup is not recommended for production environment.