Use Hermes to install Ansible AWX – Part 1: The Operator

Here I describe customisation / settings needed for Hermes Agent to be able to be used to install the Ansible AWX server system to a RHEL based host by root ssh commands and sessions.

Firstly, setup the SSH key for your hermes user to be able to ssh to the target host as the root user.

ssh-keygen -t ed25519

Copy the resulting ~/.ssh/id_ed25519.pub to /root/.ssh/authorized_keys file on the target host and ensure the permissions of root’s authorized_keys file is correct with chmod 600 /root/.ssh/authorized_keys

Now your hermes user can ssh as root to the target AWX host and we can run some prompts through Hermes to action an install of the Ansible AWX software requirements and environment.

The initial prompt to prepare the chat session and config what Hermes will do is:

I want you to install Ansible AWX on this server.

You are executing terminal commands on the target through the configured
Hermes SSH backend.

The SSH account is root.

Before changing anything:

1. Determine the Linux distribution and version.
2. Determine CPU, RAM and free disk space.
3. Check whether Kubernetes, K3s, Docker, Podman, kubectl, Helm or an
   existing AWX installation is present.
4. Check listening TCP ports.
5. Check firewall configuration.
6. Check the server hostname and IP addresses.

Do not modify the system yet.

Produce an installation plan for deploying AWX using the AWX Operator
on a single-node K3s Kubernetes installation.

Use AWX Operator 2.19.1 / AWX 24.6.1 unless compatibility checks show
that this is inappropriate.

Show me the proposed commands and identify any destructive operations
before proceeding.

Assuming that responds well, the prompt to start to action the install is:

Proceed with the AWX installation plan.

Requirements:

- Install K3s if Kubernetes is not already installed.
- Verify the Kubernetes node becomes Ready before continuing.
- Install kubectl access for root.
- Install AWX Operator 2.19.1.
- Create a namespace for AWX.
- Deploy an AWX instance called awx.
- Configure persistent storage.
- Configure the AWX service so it is accessible from my LAN.
- Wait for all AWX pods to become Ready.
- Retrieve the generated AWX admin password.
- Verify the AWX HTTP interface responds.

After every major stage, verify that the previous stage succeeded.

If a command fails, diagnose the error rather than blindly continuing.

Do not disable SELinux or the firewall globally.
Do not delete existing filesystems, containers, Kubernetes resources
or firewall configuration without asking me first.

At completion report:

- AWX URL
- admin username
- command used to retrieve the admin password
- Kubernetes namespace
- kubectl commands for checking AWX status
- commands for starting/checking the system after a reboot

If you hit a default Hermes limit with a message like:

Iteration budget exhausted (90/90) — asking model to summarise

Then run the following hermes commands in a new shell and resume the hermes chat or terminal session:

# Increase the maximum iteration budget per turn
hermes config set agent.max_turns 400

# Enable the bounded auto-continuation feature
hermes config set agent.auto_continue_on_max_iterations.enabled true
hermes config set agent.auto_continue_on_max_iterations.max_auto_continues 5

If there’s a problem with the process and for some reason Hermes stops the activity towards completing and verifying the AWX install, then you can often get it to continue by resuming the hermes chat or terminal session and telling it to “Proceed with the remaining steps towards completing and verifying the AWX install“.

This results in a functional AWX Operator install on the IP Address of the target host.

This entry was posted in Sales. Bookmark the permalink.

Leave a Reply