Cloud Malaya Lab
  • Home Cloud Lab
    • Architecture
    • DNS Server
  • DevOps & DevSecOps
    • Kubernetes
      • Fundamental
        • Taints in Kubernetes
        • Kubernetes Observability (Monitoring) Guide
        • DNS in Kubernetes (CoreDNS)
        • Storage in Kubernetes
          • Container Storage Interface - CSI
          • Ephemeral Storage Explain
        • Cluster CPU & Memory Inspections
        • Open Source and Free Storage Solution Kubernetes
      • PoC Lab
        • Configure Access to Multiple Cluster using KUBE_CONFIG
        • High Availability Portable Mini Kubernetes Data Center with K3s
          • Lab 1: Build the K3s Infrastructure
          • Lab 2: Automate the K3s clusters deployment with Ansible
          • Lab 3: Multi Master K3s kubeconfig files for smooth accessibility
          • Lab 4: Network Configurations & Tools
        • AWX/Ansible Tower Deployment on Kubernetes
          • Lab 1 - Understanding Requirements
          • Lab 2 - AWX,AWX Operator Configurations & Deployments
          • Lab 3 - Ingress Networking & Connectivity via Nginx
          • Lab 4: AWX Web Console & accessibility on LAN
        • Troubleshooting: Ansible Tower - Reset admin password
    • Monitoring & Observability
      • Splunk
        • Splunk Deployment for SME (Malay Version)
    • System Administration - Linux
      • RedHat Derivatives
        • Add User to Sudoers
        • Yum Update vs Yum Upgrade
        • DNF update vs upgrade
        • SMP PREEMPT_DYNAMIC Definitions
      • Virtualization
        • KVM
      • Storage
  • Digital Infrastructure & Cloud Solutions
    • Solution & System Design
      • Public Cloud
        • Fundamental
          • AWS
          • Azure
          • GCP
        • Lab
          • Simple CD menggunakan Github Action
      • Private Cloud & On-Premise
      • On-Premise to Cloud Design
        • AWS Direct Connect
      • High Availability & Fault Tolerance Design
      • Disaster Recovery
Powered by GitBook
On this page
  • Lab Objective
  • Deployment Steps
  1. DevOps & DevSecOps
  2. Kubernetes
  3. PoC Lab
  4. AWX/Ansible Tower Deployment on Kubernetes

Lab 2 - AWX,AWX Operator Configurations & Deployments

PreviousLab 1 - Understanding RequirementsNextLab 3 - Ingress Networking & Connectivity via Nginx

Last updated 1 year ago

Lab Objective

In this lab we will learns how to deploy & configure AWX as a containers to K8s cluster.

Deployment Steps

Step 1: Prepare YML files for configurations.

Basically, only three YML's file required to deploy the AWX onto our K8s cluster.

create kustomization.yml file with the following content:

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.1 #change to any preference version

# Set the image tags to match the git version from above
images:
  - name: quay.io/ansible/awx-operator
    newTag: 1.1.1 #change to any preference version

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

as you can see the version of AWX Operator is defined on newTag key as well as on the resources key.

create awx-demo.yml file with the following content:

apiVersion: awx.ansible.com/v1beta1
kind: AWX
namespace: awx
metadata:
  name: awx-demo
spec:
  service_type: nodeport
  # default nodeport_port is 30080
  nodeport_port: 30000 #you may change this node port between 30000-32768

Here you will see minimal content definitions specified in the YML because AWX Operator has taken care the actual AWX deployment files.

Step 2: Deploy the AWX Operator controller manager.

Now, with all the k8s object config files in hand, we are going to execute it one by one,

Execute the build in kustomization.yml

$ kubectl apply -k .

Once executed, AWX operator will deploy the following objects on k8s.

Ensure that all AWX controllers manager objects are up and running,

Step 3: Deploy the AWX.

Now, this is where we want to execute our AWX deployment.

Run$ kubectl apply -f awx-demo.yml

After the execution, we can see below additional objects has been created

Notes, for the pods to get ready, it might take sometimes so we will just have to wait for a while.

Finally, ensure that all the required secrets has also been created during the deployment.

Step 4: Verify all the k8s object resources & connectivity to the service

At this stage, we will need to verify below resources has been created inside the awx namespace.

Below screenshots is from my end for your references.

Step 5: Verify connectivity from the Service

Now we have everythings up and running, we need to do final check and it can be done by the AWX API check.

Run $ minikube service list

Referring to above image, this is the URL that we will need to use to query the AWX Ping API's

AWX Service URL: http://192.168.39.154:30000

To query the API, we can run

$ curl -L -q http://192.168.39.154:30000/api/v2/ping 2>/dev/null

or

$ curl -L -q $(minikube service awx-demo-service --url -n awx)/api/v2/ping 2>/dev/null

We shall receives below response if everythings is good.

~End of Lab 2 - AWX,AWX Operator Configurations & Deployments~

Continue to Lab 3 - Ingress Networking & Connectivity via Nginx
Note: The YML files
Objects that has been created
Deployment object
Pod object
Replica Sets object
Services object
ConfigMap object
awx-demo and awx-demo-postgres pods created
awx-demo-postgres-13 stateful sets created
awx-demo-service & awx-demo-postgres-13 services has been added
awx-demo-awx-configmap created
the PVC for AWX
All the secrets
Exposed service in Minikube
Response from the Ping API's