Introduction

The world of IT automation is rapidly evolving, and Red Hat is at the forefront with its containerized Ansible Automation Platform. In this guide, we will walk you through the containerized Ansible Automation Platform installation process on Red Hat Enterprise Linux 9 (RHEL 9). This innovation opens doors to a more streamlined and efficient management experience.

Why Containerized Ansible Automation Platform?

As the Ansible Automation Platform has grown in complexity with the addition of new services and components, managing it has become more challenging. The containerized Ansible Automation Platform represents a significant step towards improving this management experience. It simplifies installation, enhances security, and provides a launchpad for new features, all while reducing the platform’s footprint.

The containerized Ansible Automation Platform offers several advantages:

  1. Slimmed Down Installation: The installation process is simplified, making it more accessible to users.
  2. Layered Installation: This approach provides flexibility and customization options.
  3. Enhanced Security: The use of rootless Podman containers ensures security from the outset.
  4. Platform for Future Features: The containerized platform sets the stage for future enhancements.
  5. Lighter Footprint: It caters to various markets and solutions, ensuring optimal performance.

With this technical preview release, you gain access to exciting features such as:

  • Applying Your License: Use the controller_license_file option to apply your Ansible Automation Platform license during installation.
  • Pre-Seeding Configurations: Pre-seed automation controller configuration as code for greater flexibility.

Setting Up the Containerized Ansible Automation Platform

Let’s dive into the step-by-step installation process:

  1. Download and Unpack the Installation Bundle:
  • Visit the Red Hat Network (RHN) portal and download the latest release of the installation bundle. Choose between ‘online’ (requires internet access) and ‘offline’ bundle options.
  • Extract the installation files to a directory of your choice. It’s worth noting that the installation is now designed to run as a non-root user.
  1. Edit the Inventory File:

In the installation directory, you’ll find an inventory file that provides essential, optional, and recommended configurations. You can tailor these configurations to your needs. An example of the inventory file structure is provided for you to modify.

  • Edit the inventory file and fill in the necessary variables, ensuring your configurations align with your specific requirements.
[automationcontroller]
aap.example.com ansible_connection=local

[automationhub]
aap.example.com ansible_connection=local

[automationeda]
aap.example.com ansible_connection=local

[database]
aap.example.com ansible_connection=local

[all:vars]
postgresql_admin_username=postgres
postgresql_admin_password=redhat
registry_username=<YOUR-RHN-USERNAME>
registry_password=<YOUR-RHN-PASSWORD>

controller_admin_password=redhat
controller_pg_host=aap.example.com
controller_pg_password=redhat

hub_admin_password=redhat
hub_pg_host=aap.example.com
hub_pg_password=redhat

eda_admin_password=redhat
eda_pg_host=aap.example.com
eda_pg_password=redhat
controller_main_url=https://aap.example.com
Join 50+ hours of courses in our exclusive community
  1. Set Environment Variables:

Define the ANSIBLE_COLLECTIONS_PATH environment variable to specify where the installer collections can be found. For example, supposing the aap directory inside the devops user:

$ export ANSIBLE_COLLECTIONS_PATH=/home/devops/aap/collections
  1. Run the Installer:

You’re now ready to initiate the installation process. Run the installer collections playbook with the following command:

$ ansible-playbook -i inventory ansible.containerized_installer.install

You can customize your installation using various options like -v for increased verbosity or -K to request a privilege escalation password. Refer to the ansible-playbook documentation for more options.

If you’ve separated your variable information into a separate file, you can use the following command:

$ ansible-playbook -i inventory -e @vars.yml ansible.containerized_installer.install [--ask-vault-pass] [-K] [-vvvv]

Accessing the Services

Upon successful installation, you can access the Ansible Automation Platform services via your web browser. By default, these services are available on specific ports:

  • Automation Controller: Port 443
  • Ansible Automation Hub: Port 444
  • Event-Driven Ansible Controller: Port 445

Open your browser and enter https://aap.example.com: to access the services.

IMAGE

Containers Overview

Underneath the containerized Ansible Automation Platform, rely on Podman and some containers. We can list and analyze the containers using the following command:

$ podman ps
CONTAINER ID  IMAGE                                                                             COMMAND               CREATED         STATUS                 PORTS       NAMES
45079e0f8b65  registry.redhat.io/rhel8/redis-6:latest                                           run-redis             3 days ago      Up Less than a second              redis
0e686ba496a7  registry.redhat.io/rhel8/postgresql-13:latest                                     run-postgresql        37 minutes ago  Up 35 minutes                      postgresql
631bd7c95a48  registry.redhat.io/ansible-automation-platform-24/ee-supported-rhel8:latest       /usr/bin/receptor...  35 minutes ago  Up 6 minutes                       receptor
7507d7732073  registry.redhat.io/ansible-automation-platform-24/controller-rhel8:latest         /usr/bin/launch_a...  19 minutes ago  Up 6 minutes                       automation-controller-rsyslog
6190a2861e06  registry.redhat.io/ansible-automation-platform-24/controller-rhel8:latest         /usr/bin/launch_a...  8 minutes ago   Up 6 minutes                       automation-controller-task
120a89253743  registry.redhat.io/ansible-automation-platform-24/controller-rhel8:latest         /usr/bin/launch_a...  8 minutes ago   Up 6 minutes                       automation-controller-web
06d289e13a85  registry.redhat.io/ansible-automation-platform-24/eda-controller-rhel8:latest     gunicorn --bind 1...  6 minutes ago   Up 3 minutes                       automation-eda-api
69734ae71fe8  registry.redhat.io/ansible-automation-platform-24/eda-controller-rhel8:latest     daphne -b 127.0.0...  5 minutes ago   Up 3 minutes                       automation-eda-daphne
a9826b5bd8b1  registry.redhat.io/ansible-automation-platform-24/eda-controller-ui-rhel8:latest  /bin/sh -c nginx ...  5 minutes ago   Up 3 minutes                       automation-eda-web
6ae0cc6cff7f  registry.redhat.io/ansible-automation-platform-24/eda-controller-rhel8:latest     aap-eda-manage rq...  4 minutes ago   Up 3 minutes                       automation-eda-worker-1
975c215f33af  registry.redhat.io/ansible-automation-platform-24/eda-controller-rhel8:latest     aap-eda-manage rq...  4 minutes ago   Up 3 minutes                       automation-eda-worker-2
1463aefa60a1  registry.redhat.io/ansible-automation-platform-24/hub-rhel8:latest                pulp-api              3 minutes ago   Up About a minute                  automation-hub-api
4cde68f02d25  registry.redhat.io/ansible-automation-platform-24/hub-rhel8:latest                pulp-content          2 minutes ago   Up About a minute                  automation-hub-content
f547ea12d7b2  registry.redhat.io/ansible-automation-platform-24/hub-web-rhel8:latest            nginx -g daemon o...  2 minutes ago   Up About a minute                  automation-hub-web
a415d2b016f8  registry.redhat.io/ansible-automation-platform-24/hub-rhel8:latest                pulp-worker           2 minutes ago   Up About a minute                  automation-hub-worker-1
edc21a8710ce  registry.redhat.io/ansible-automation-platform-24/hub-rhel8:latest                pulp-worker           2 minutes ago   Up About a minute                  automation-hub-worker-2

Pro Tip — Controller Post-Installation

Enabling the post-installation options is an important aspect of configuring the containerized Ansible Automation Platform. Users can take full advantage of these features by uncommenting and filling in the necessary variables. Let’s explore these options in more detail:

The controller_postinstall option allows you to trigger post-installation tasks. This can be beneficial for applying additional configurations or licenses after the initial setup. To enable this feature, uncomment the line:

controller_postinstall=true

Applying the Manifest License

The controller_license_file option is crucial for applying the Ansible Automation Platform license. To use this feature, you need to specify the full path to your manifest .zip file. This is how you enable and configure it:

controller_license_file=<full path to your manifest .zip file>

Replace <full path to your manifest .zip file> with the actual path to your license manifest file. This file typically contains information about your licensing agreement and permissions to use the Ansible Automation Platform.

Config-as-Code Directory

The controller_postinstall_dir option is used to specify the directory where the configuration files for the Ansible Automation Platform should be located. This allows you to manage your configurations as code, which can be particularly useful for version control and automation. To enable this feature, you can configure it as follows:

controller_postinstall_dir=<full path to your config-as-code directory>

Replace <full path to your config-as-code directory> with the actual path where your configuration files are stored. This directory may contain various configuration files or scripts that define how the Ansible Automation Platform should behave.

By uncommenting and filling in these variables, users can take full advantage of post-installation customization and license management, enhancing the flexibility and capabilities of the containerized Ansible Automation Platform. These features provide the means to tailor the platform to specific needs and configurations, ensuring it aligns perfectly with your organization’s requirements.

Conclusion

The containerized Ansible Automation Platform on RHEL 9 marks a significant leap in IT automation. Red Hat’s commitment to streamlining and enhancing the platform’s management experience is evident in this technical preview. Users can look forward to a more user-friendly, secure, and flexible solution that caters to a variety of deployment scenarios.

The technical preview is available for download from the Red Hat Portal Downloads section, and comprehensive documentation is provided for a detailed installation walkthrough. As the future unfolds, Red Hat continues to innovate, with more exciting features and enhancements on the horizon. Stay tuned for further updates and enhancements to this powerful automation platform.

Subscribe to the YouTube channel, Medium, and Website, X (formerly Twitter) to not miss the next episode of the Ansible Pilot.

Academy

Learn the Ansible automation technology with some real-life examples in my Udemy 300+ Lessons Video Course.

BUY the Complete Udemy 300+ Lessons Video Course

My book Ansible By Examples: 200+ Automation Examples For Linux and Windows System Administrator and DevOps

BUY the Complete PDF BOOK to easily Copy and Paste the 250+ Ansible code

Want to keep this project going? Please donate

Patreon Buy me a Pizza