top of page
Writer's picturebeCloudReady Team

How to Install AWX & Run Ansible Playbooks in AWX Using k8s

Updated: Jan 24

Quick recap


Ansible Tower and AWX are both tools that help manage and run Ansible, which is a popular tool for automating tasks like software deployment, configuration management, and many other IT needs.

  • Ansible Tower is like the polished, professional version. It's officially supported by Red Hat, the company behind Ansible. This means it gets regular updates, better security, and technical support. Think of it as a premium, ready-for-business product.

  • AWX, on the other hand, is more like the experimental, community version of Tower. It's where all the new features are tried out first. It's free and open-source, but it doesn't have the official support or the polished finish that Tower has. It's a bit like a testing ground for new ideas that might eventually make their way into Tower.


What is AWX


AWX is a web application (open-source) that provides user interfaces (UI), REST API and task engine for Ansible. It is an open-source community project, sponsored by Red Hat, that enables users to better control their Ansible project use in IT environments. AWX is the upstream project from which the Red Hat Ansible Tower offering is ultimately derived.


What is Ansible

Ansible is an open-source software provisioning, configuration management, and application deployment tool enabling infrastructure as code. It runs on many Unix-like systems, and can configure both Unix-like systems as well as Microsoft Windows. Ansible is agentless, temporarily connecting remotely via SSH or Windows Remote Management (allowing remote PowerShell execution) to do its tasks.


What is Kubernetes (k8s)

Kubernetes is a portable, extensible, open-source platform for managing containerized workloads and services, that facilitates both declarative configuration and automation. It has a large, rapidly growing ecosystem. Kubernetes services, support, and tools are widely available.


Technology

  1. AWX

  2. Ansible

  3. Kubernetes

  4. Vagrant

  5. Visual Studio Code

  6. Rhel 7

  7. Git/GitHub


Before installing AWX on Kubernetes, we should have the following requirements,


  • A running Kubernetes Cluster

  • kubeconfig file.


So, Let’s start installing and running playbooks in AWX using Kubernetes.


Step 1: Clone the repository https://github.com/becloudready/awx in your linux system as shown below.

Step 2: Next go inside the folder awx by running the following command.

cd awx/
git checkout -b branch origin/branch-17


To run the playbooks in AWX, go through the following steps.

Step 1: In the AWX web interface as shown in figure below. Click on inventories option & then click on Add option & select Add inventory.




Enter the following details & click on save as shown in figure below.



Now in the inventory window select the host option and click on Add. Enter the following details to create new host as shown in figure below & click save.



Step 2: To create the credentials, click on Credentials option & then click Add option as shown in figure below.



Enter the following details to create new credentials as shown in figure below & click save.



Step 3: Now, to create new project select Projects option & then click Add option as shown in figure below.



Enter the following details to create new project as shown in figure below & save it.



Step 4: Next to create templates, click on Templates option & then click on Add option & select Add job template option as shown in figure below.



Enter the following details to create new job template as shown in figure below & save it.



Step 5: Finally, to run the playbook, click on Templates option & select the new job template created in previous step & click on Launch Template option as shown in figure below.



The following output shows playbook runs successfully as shown in figure below.



Congratulations! You have successfully installed & run playbook in AWX using Kubernetes.

456 views0 comments

Recent Posts

See All

Comments


bottom of page