CRIB SHEET: Installing Ansible AWX with Kubernetes On Ubuntu 20.04.

CRIB SHEET: Installing Ansible AWX with Kubernetes On Ubuntu 20.04.

As of writing (September 2023) this is the quickest and lightest way I've found of installing Ansible AWX on a fresh Ubuntu 20.04 build. This build 2.5.3 supports Execution Environments. It is assumed that the reader has basic knowledge of Kubernetes and this article is written as Crib Notes only, mainly as I have a memory like a Sieve.

  • Update and upgrade repositories.

sudo apt update && sudo apt upgrade -y        

  • Install Git

sudo apt install git        

  • Install Rancher

curl -sfL https://get.k3s.io | sh -        

  • Fix permissions for logged in user on k3s.yaml file

sudo chown user:group /etc/rancher/k3s/k3s.yaml        

  • Check Kubernetes is now installed

kubectl version        

  • Install Kustomize

curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh"  | bash        

  • add Kustomize to path

sudo mv kustomize /usr/local/bin        

Create Kustomization.yaml definition file can be found at this link https://github.com/ansible/awx-operator/blob/devel/docs/installation/basic-install.md

Replace <tag> with latest version (currently 2.5.3)

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=<tag>

# Set the image tags to match the git version from above
images:
  - name: quay.io/ansible/awx-operator
    newTag: <tag>

# Specify a custom namespace in which to install AWX
namespace: awx        

  • Build the file.

kustomize build .| kubectl apply -f-        

  • Check build

kubectl get pods --namespace awx        

Create awx.yaml file.

---
apiVersion: awx.ansible.com/v1beta1
kind: AWX
metadata:
  name: awx
spec:
  service_type: nodeport
  nodeport_port: 30080        

Edit kustomize.yaml file and add the line

- awx.yaml

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=<tag>
  - awx.yaml

# Set the image tags to match the git version from above
images:
  - name: quay.io/ansible/awx-operator
    newTag: <tag>

# Specify a custom namespace in which to install AWX
namespace: awx        

Build

kustomize build .| kubectl apply -f-        

wait till all containers are up in

kubectl get pods --namespace awx        

When all containers are up (after a few minutes) grab the admin password

kubectl get secret --namespace awx awx-demo-admin-password -o jsonpath="{.data.password}" | base64 --decode ; echo        

The password should now be displayed. Copy it and browse to your Ubuntu machines IP address on port 30080 in your web browser.

https://x.x.x.x:30080

Now login to AWX as admin and the password you've just copied.

Nicholas Sheridan

Network Engineer

5 个月

Awesome - kick the tyres on it by running it on kind as well great for prototyping https://kind.sigs.k8s.io/

Thank you, great job!

回复

要查看或添加评论,请登录

Stephen Paynter的更多文章

  • Creating a Docker GitLab Runner

    Creating a Docker GitLab Runner

    Ever wondered how to set up your own GitLab Runner using Docker. Let's dive in! Step 1: Prerequisites Before we begin…

    3 条评论
  • Automating Exchange Shell With Ansible Via Powershell.

    Automating Exchange Shell With Ansible Via Powershell.

    Lets take a look at how I've been automating Exchange Shell via Powershell using Ansible. I have Exchange Shell…

    2 条评论
  • Ansible-Navigator: The Basics

    Ansible-Navigator: The Basics

    Im now solely using Ansible-Navigator to run Ansible Playbooks within my home lab. All my runtimes are done within…

    3 条评论
  • What is Git Bundle?

    What is Git Bundle?

    Git Bundle is a feature in Git that allows developers to package repositories into a single file for easy sharing. This…

    2 条评论
  • The Devnet Diaries : Flask

    The Devnet Diaries : Flask

    Creating an API with Flask is a relatively simple process that can be accomplished in just a few steps. Flask is a…

    3 条评论
  • Python Classes, a simplified look.

    Python Classes, a simplified look.

    By what you wrote, you are missing a critical piece of understanding: the difference between a class and an object…

    1 条评论
  • Running the Cisco CWS DevNet Expert Image

    Running the Cisco CWS DevNet Expert Image

    I've had some fun over the last few days trying to get the Devnet Expert Candidate Workstation image running. Here's…

    6 条评论
  • Ansible AWX on Docker

    Ansible AWX on Docker

    A step by step installation process for Ansible AWX on Ubuntu 20.4 on Docker.

    10 条评论
  • Installing Ansible AWX on Ubuntu 20.4 With Kubernetes KS3

    Installing Ansible AWX on Ubuntu 20.4 With Kubernetes KS3

    A workflow to get you up and running with Ansible AWX. Minimum requirements , Ubuntu 20.

    15 条评论
  • Cisco 300-435 ENAUTO Crib Sheet 4

    Cisco 300-435 ENAUTO Crib Sheet 4

    Part 4 in a series of crib notes I'm using to study for the Cisco ENAUTO DevNet exam. Its been a while since I posted…

    1 条评论

社区洞察

其他会员也浏览了