AWX provides a web-based user interface, REST API, and task engine built on top of Ansible. It is one of the upstream projects for Red Hat Ansible Automation Platform. Installing it is not a trivial task (for me at least).
What I will cover in this post is how to prepare your environment so you can start and play with AWX. I am using a Hyper-V virtual machine with a clean Ubuntu 22.04 server.
Ubuntu in Hyper-V VM
So we start with a plain and simple Ubuntu installation in a VM. I downloaded Ubuntu 22.04 from the official website (https://ubuntu.com/download/server). Next step is creating a new VM in my Hyper-V environment, I called mine LAB-AWX. Before installing Ubuntu, enable the Secure Boot option and select the Microsoft UEFI Certificate Authority. Now you can select the Generation 2 option while creating the VM.

Like I said, install Ubuntu with all default options. Make sure your VM has a network adapter connected to an External Virtual Switch so you can download all required software. Make a note of the IP address of your VM, it is shown on screen after you log in.

Visual Studio Code
You could use any terminal application to connect to your Ubuntu environment, including Hyper-V’s native “Connect” one. I will use Visual Studio Code however. In VSCode, install the extension called “remote ssh”. This extension allows you to connect to the Ubuntu virtual machine.
To connect to the VM, in the lower left corner, click on the green square. In the top of the window, select Connect to Host and fill in the VM’s IP address.

Once connected, you can open a new Terminal windows (by pressing CTRL+Shift+`
), or use the menu Terminal -> New Terminal.
Install Kubernetes
Now it is finally time to install Kubernetes.
curl -sfL https://get.k3s.io | sh -
This will download the software and install it.
To check the installation, issue:
kubectl version
This will fail because of missing permissions. You could get it working by using sudo each time, but that is annoying. To fix this, you need to grant permissions to file /etc/rancher/k3s/k3s.yaml. First determine your name and group using whoami and groups. In my case it is roger and roger, so grant the permissions like so:
sudo chown roger:roger /etc/rancher/k3s/k3s.yaml
Running the kubectl version statement will output the version information.
Kustomize
Before installing Ansible we will download and install Kustomize. This tool makes it easier to deploy configurations to your Kubernetes cluster.
curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | bash sudo mv kustomize /usr/local/bin/
Once Kustomize is installed, the folder will be moved to /usr/local/bin/ directory.
AWX
Now it is finally time to install AWX. The preferred way to install it is by making use of the so called AWX Operator. This Operator will take care of everything, and we will use Kustomize to install and configure it for us.
In your terminal, create a new file (you can use nano kustomization.yaml), and paste in the following code (indentation is important!):
--- apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: # Find the latest tag here: https://github.com/ansible/awx-operator/releases - github.com/ansible/awx-operator/config/default?ref=1.1.3 # Set the image tags to match the git version from above images: - name: quay.io/ansible/awx-operator newTag: 1.1.3 # Specify a custom namespace in which to install AWX namespace: awx
Save and exit your kustomization.yaml file, and run this:
kustomize build . | kubectl apply -f -
This will take a while to finish, you can check the progress using this:
kubectl get pods --namespace awx
When it is finished, create a new file (nano awx.yaml) and apply the configuration to Kubernetes:
--- apiVersion: awx.ansible.com/v1beta1 kind: AWX metadata: name: awx spec: service_type: nodeport nodeport_port: 30080
As you can see on the last line, the resulting AWX webportal will be accessible on TCP port 30080. You can change this port if you want. Save and exit this file.
Now open your kustomization.yaml file again and add an additional resource. Final result will look like this:
--- apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: # Find the latest tag here: https://github.com/ansible/awx-operator/releases - github.com/ansible/awx-operator/config/default?ref=1.1.3 - awx.yaml # Set the image tags to match the git version from above images: - name: quay.io/ansible/awx-operator newTag: 1.1.3 # Specify a custom namespace in which to install AWX namespace: awx
Save and exit the file again, and re-apply the configuration:
kustomize build . | kubectl apply -f -
Allow it some time to finish, you can check progress by using
kubectl get pods --namespace awx
When all ran fine, you will now have a bunch of pods, and your AWX website can be accessed. In order to log into the environment, you need to extract the generated admin password. You can do this like so:
kubectl get secret awx-admin-password -o jsonpath="{.data.password}" --namespace awx | base64 --decode
Copy the password.
After all this work, we are finally able to open up the portal for the first time. On your host, open a webbrowser and navigate to <ip of your ubuntu vm>:30080. Login with user admin and the password you just copied (tip: in the portal change it to a more user friendly password;-))

AWX is now running hopefully. In a next post we will add some Windows VMs to our testlab, and see if we can actually do with our beautiful AWX test environment.