📋

Ansible AWX Installation Guide

Jul 2, 2024

Ansible AWX Installation Guide

Introduction

  • Presenter: Calvin
  • Purpose: To provide a bare-bones install guide for Ansible AWX
  • Previous method: Live stream (proved to be a distraction)
  • Deviating from developer's guide (minikube) to use Kubernetes via Rancher for a more stable, multi-user accessible solution

Environment Setup

  • Hardware Specs: 4 CPUs, 8GB RAM, 60GB hard drive
  • Virtualization Tools: VMware vCenter, Workstation, Fusion, KVM, VirtualBox, Vagrant
  • OS: Linux (required for Kubernetes), using Ubuntu 20.04 for this guide
  • Access Information: Note the virtual machine's IP address (important for SSH and web access)

Tools Installation

Visual Studio Code (VS Code)

  • Recommended for SSH connections and file management
  • Access VS Code downloads via Google search
  • Install and open VS Code
  • Add VS Code extension: Remote – SSH (by Microsoft)

SSH Configuration

  • Add new SSH host in VS Code
  • Format: ssh <username>@<IP_address>
  • Use SSH key for connection
  • Connect VS Code to the remote host using the configuration

Initial System Updates

  • Run initial updates on the Linux system: sudo apt update && sudo apt upgrade -y

Kubernetes Installation

  • Use Rancher for Kubernetes deployment
  • Simple single command via Rancher documentation: curl -sfL https://get.k3s.io | sh -
  • Validate installation: kubectl version
    • Note: Update file permissions if needed for configuration file located at /etc/rancher/k3s/k3s.yaml: sudo chown <username>:<group> /etc/rancher/k3s/k3s.yaml
    • Check node status: kubectl get nodes
    • Check running workloads: kubectl get pods

Install Customize

  • Follow instructions from Ansible AWX documentation
  • Download customize using a curl command and move to user local bin: curl -O -L https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize/vX.Y.Z/kustomize_vX.Y.Z_linux_amd64.tar.gz tar -xzf kustomize_vX.Y.Z_linux_amd64.tar.gz sudo mv kustomize /usr/local/bin/
  • Validate installation: which kustomize

AWX Operator Installation

  • Create a customization file customization.yaml: apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: - github.com/ansible/awx-operator/config/default?ref=0.14.0
  • Apply customization using kubectl: kubectl apply -k .
  • Validate AWX operator installation: kubectl get pods -n awx

Install AWX

  • Create a file awx.yaml with specifics for AWX service
  • Add configuration for port exposure (default 30080)
  • Update customization.yaml to include the new AWX configuration file: resources: - github.com/ansible/awx-operator/config/default?ref=0.14.0 - awx.yaml
  • Apply the customization again kubectl apply -k .
  • Monitor the installation process via logs
  • Validate AWX pods are running kubectl get pods -n awx

Access AWX

  • Retrieve admin password: kubectl get secret awx-demo-admin-password -n awx -o jsonpath="{.data.password}" | base64 --decode
  • Navigate to the AWX web interface using the IP and port number (i.e., http://<your-node-ip>:30080)
  • Log in using admin and the retrieved password

Next Steps

  • Start configuring AWX:
    • Begin with credentials (SSH keys, GitHub access, etc.)

Conclusion

  • Summary: Streamlined approach for installing Ansible AWX using Kubernetes and Rancher
  • Encouragement to share experiences and issues
  • Look forward to the next video focusing on production setup of AWX

Additional Resources

  • Ansible AWX documentation
  • Rancher Kubernetes documentation