Setting Up Ansible (AWX) On Debian
Ansible Tower VS AWX
The best way to learn is by constructing your own knowledge, not passively absorbing information. A lot of great projects are open source these days, including The AWX Project. At zero cost, you can build your automation skill set, increasing your chances at landing that next big promotion.
This post will cover how to setup Ansible AWX on Debian. I use a combination of Ansible and Terraform in the NetDevOps toolchain. These tools play a huge role in keeping my knowledge relevant as Tech progresses.
What is AWX?
So, maybe you have heard of this Linux Distro called Fedora. This is the fast moving upstream project for Red Hat Enterprise Linux (RHEL). Red Hat also funds CentOS which is essentially a clone of RHEL minus all Red Hat branding. This is kind of how AWX works upstream for the official Ansible Tower product.
Red Hat also announced CentOS Stream which sits between bleeding edge Fedora, and rock solid RHEL. Sitting somewhere in the middle, this would allow developers an easier path for getting their packages in RHEL.
How does it differ from Ansible Tower?
The AWX Project
- Fast iterating with frequent releases
- No paid enterprise support available
- Direct in-place upgrades are not supported
- Not recommended for use in Production
- Licensed under Apache 2.0
AWX is a fantastic tool for the lab, testing, and demos. If you want to dip a toe into the Ansible Tower world without forking over the cash, look no further.
- Commercial derivative of AWX
- Longer release cycle aimed at long-term supportability
- Fully supported and license based solution
- In-place upgrade to latest version (from up to two major releases behind)
- Recommended for use in Production
Ansible Tower is the reliable solution you want for the enterprise. Deployment may differ since you will likely make use of scale-out clustering for added redundancy and capacity.
AWX runs as a containerized application using Docker images deployed to either OpenShift, Kubernetes, or Docker Engine.
Standalone Deployment with Debian + Docker
In the spirit of keeping this simple, I use Docker running on Debian Linux in the lab. I also run everything on virtual machines as snapshots are a beautiful thing. Any hypervisor should work - VMware Workstation, Oracle VirtualBox, ESXi, or even KVM. For this setup, I’ll be using VMware Workstation.
My love for Linux started back in the 90s with Slackware. At some point or another, I tested out Debian and my wish for the perfect operating system was granted. For me it strikes the right balance between ease of use, stability, and airy minimalism. Using the Debian netinstall, you only install what you need. I have AWX running smoothly with:
- Processor: 1
- Memory: 2 GB
- Hard Disk: 12 GB
The official prerequisites for AWX can be found here. I’ll be using Debian 10 - Buster however any release >= 10 will work. At this point, Debian should be installed, running, and reachable.
If running in a virtual machine, a snapshot should be taken now. In the event anything goes wrong, this is an easy way to revert back to our beginning state.
Disclaimer: Downloading and executing scripts from the internet may potentially harm your machine. Make sure to review the source code before execution so that you have a good understanding of what is going to happen.
The Installer Script
The installer is pretty basic. It will make sure we are up to date, install some dependencies, clone the projects, set a few parameters, and start the install.
Running The Installer
Depending on host machine horsepower, this may take a few minutes. You should see progress as the installer deploys the containers.
Validation + Login
If using VMware Workstation with network adapter type: NAT, you can see what IP Address it gave you with /sbin/ifconfig. You should then be able to reach this IP from your host machine.
On the permanent instance I have up and running in the lab, I’m using GitHub Actions to build and release after each AWX software release. I use Linux KVM as a Type-1 hypervisor with a static IP of my choice assigned.
We should now be able to login with default credentials for AWX. There are many best practice considerations we would work through for handling authentication in a production environment but for the lab, we just want to roll up our sleeves and dive in, right?
Don’t wait to get started with automation. If you wait, you may miss out on a great opportunity. With so much open source software available, there is no upfront cost other than a laptop powerful enough to run a few virtual machines.
In the land of network engineering, getting your feet wet with public cloud and automation can help you make that next big step in your career. There is currently a high-demand with low-supply for these skills in the network engineering space.