Deploy AWX on Minikube Cluster¶
Minikube Cluster based deployment of Ansible AWX. (Ansible Tower)
Note
This document assumes you are running Ubuntu Server 20.04 or later.
Install Minikube Cluster¶
Update the Ubuntu Server¶
Download and Install Minikube (Ubuntu Server)¶
Additional Documentation: https://minikube.sigs.k8s.io/docs/start/
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube_latest_amd64.deb
sudo dpkg -i minikube_latest_amd64.deb
# Download Docker and Common Tools
sudo apt install docker.io nfs-common iptables nano htop -y
# Configure Docker User
sudo usermod -aG docker nicole
nicole
username in the sudo usermod -aG docker nicole
command to whatever your local username is. ::: Fully Logout then sign back in to the server¶
Validate that permissions allow you to run docker commands while non-root¶
Initialize Minikube Cluster¶
Additional Documentation: https://github.com/ansible/awx-operator
Make sure Minikube Cluster Automatically Starts on Boot¶
/etc/systemd/system/minikube.service
:::caution Be sure to change the [Unit]
Description=Minikube service
After=network.target
[Service]
Type=oneshot
RemainAfterExit=yes
User=nicole
ExecStart=/usr/bin/minikube start --driver=docker
ExecStop=/usr/bin/minikube stop
[Install]
WantedBy=multi-user.target
nicole
username in the User=nicole
line of the config to whatever your local username is. ::: :::info You can remove the --addons=ingress
if you plan on running AWX behind an existing reverse proxy using a "NodePort" connection. ::: Restart Service Daemon and Enable/Start Minikube Automatic Startup¶
Make command alias for kubectl
¶
Be sure to add the following to the bottom of your existing profile file noted below.
:::tip If this is a virtual machine, now would be the best time to take a checkpoint / snapshot of the VM before moving forward, in case you need to perform rollbacks of the server(s) if you accidentally misconfigure something. :::Make AWX Operator Kustomization File:¶
Find the latest tag version here: https://github.com/ansible/awx-operator/releases
kustomization.yml
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- github.com/ansible/awx-operator/config/default?ref=2.4.0
- awx.yml
images:
- name: quay.io/ansible/awx-operator
newTag: 2.4.0
namespace: awx
awx.yml
apiVersion: awx.ansible.com/v1beta1
kind: AWX
metadata:
name: awx
---
apiVersion: v1
kind: Service
metadata:
name: awx-service
namespace: awx
spec:
type: NodePort
ports:
- port: 80
targetPort: 80
nodePort: 30080 # Choose an available port in the range of 30000-32767
selector:
app.kubernetes.io/name: awx-web
Apply Configuration File¶
Run from the same directory as the awx-operator.yaml
file.
kubectl apply -k .
command to fully apply the awx.yml
configuration file to bootstrap the awx deployment. :::