Automation has become a key factor in streamlining operations, reducing human errors, and improving overall efficiency. One popular tool that has revolutionized automation is Red Hat Ansible Automation Platform, an enterprise automation platform. Ansible's versatility and ease of use make it a great choice for managing complex IT infrastructure. In this article, we'll explore different types of nodes, peering relationships, and how Ansible controllers orchestrate the nodes as part of an automation mesh.
Automation mesh
Automation mesh is a key component of Ansible Automation Platform that enables customers to automate at scale in a cloud-native way. It gives customers maximum flexibility in planning distributed, remote, or otherwise complex automation deployments, along with visibility, control, and reporting.
Ansible controller
The controller acts as a central hub that orchestrates and manages automation tasks across the network. It provides a single point of control and enables administrators to define and execute automation workflows effortlessly.
Types of nodes
A node represents a specific computing device or system that is managed by the configuration management tool. Each node is usually assigned a unique identifier, and the tool can interact with and configure the nodes based on their individual specifications.
- Control plane nodes: These are accessed either via the web UI and API. Execution capabilities are disabled on these nodes.
node_type=control
- Execution nodes: This is where Ansible playbooks are actually executed. This node will run an automation execution environment which in turn runs the Ansible playbook.
node_type=execution
- Hop nodes: These optional nodes can be used to interconnect control nodes and Execution nodes.
node_type=hop
- Hybrid nodes: This performs automation controller runtime functions as well as executing automation (not covered in this blog).
node_type=hybrid
Receptors
Receptor is another upstream project used by Ansible Automation Platform. Using this technology, you can connect controller, hop, and execution nodes through an overlay network. It is part of the Ansible Automation Platform installer. On each node in your automation overlay, there will be a receptor application that runs as a daemon. The following diagram (Figure 1) defines secure connection between controller node and execution nodes.
Prerequisites
- Installed Ansible controller.
- Execution and hop nodes with Red Hat Enterprise Linux (RHEL) 8.4+ installed.
- Activate subscription manager in execution/hop node.
- ssh connectivity between controller node, execution node, hop node.
- The following ports need to open on nodes.
|
Installation of automation controller with execution nodes
To install automation controllers, you can refer to this blog. Visit our product page to download Ansible Automation Platform. In this tutorial we are covering extensions of Ansible such as connecting execution nodes and hop nodes with Automation controllers.
To create automation mesh, we have to define all the configurations inside the Inventory file. The connectivity is totally based on how we define the values inside the file. The following example covers a single automation controller and two execution nodes.
After downloading the Ansible Automation platform bundle, extract it. After that, make the changes in the inventory file as per the following parameters.
[automationcontroller]
fqdn ansible_connection=local
[all:vars]
admin_password='redhat’'
pg_host=''
pg_port=''
pg_database='awx'
pg_username='awx'
pg_password='redhat'
[execution_nodes]
aap_e_1.example.com ansible_ssh_user=rhel ansible_become=true node_type=execution peers=aap_e_2.example.com ansible_ssh_user=rhel ansible_become=true
aap_e_2.example.com ansible_ssh_user=rhel ansible_become=true node_type=execution
[autometioncontroller:vars]
peers=execution_nodes
node_type=control
After updating Inventory file, you can start the installation process. The following command will trigger the installation process.
sudo ./setup.sh
The installation process takes time. After successful installation, log in to automation controller UI using defined credentials in the inventory file. From the[all:vars]
section you can get your password for the controller and your username will be admin.
Go to https://localhost and log in to the automation controller. To see execution and hop nodes are connected with automation controller, go to Topology View from left menu under Administration. You will get the view as shown below (Figure 2).
To see the utilization of connected execution nodes, you can visit the left menu under Administration and click on Instances. From this you can control the instances/servers from the following panel (Figure 3).
It is possible to create a more complex mesh network according to your requirements. The following are some of the more complicated mesh designs covered with inventory files.
First automation mesh design example
Figure 4 shows an automation mesh design example.
[automationcontroller]
fqdn ansible_connection=local
[execution_nodes]
aap_e_1.example.com
aap_e_2.example.com
aap_h_1.example.com
aap_e_3.example.com
[instance_group_local]
aap_e_1.example.com
aap_e_2.example.com
[hop]
aap_h_1.example.com
[hop:vars]
peers=instance_group_local
[instance_group_remote]
aap_e_3.example.com
[instance_group_remote:vars]
peers=hop
[automationcontroller:vars]
node_type=control
peers=hop
peers=instance_group_remote
Second automation mesh design example
Figure 5 illustrates another example automation mesh design.
[automationcontroller]
aap_c_1.example.com
aap_c_2.example.com
aap_c_3.example.com
[automationcontroller:vars]
node_type=control
peers=instance_group_local
[execution_nodes]
aap_e_1.example.com
aap_e_2.example.com
aap_e_3.example.com
aap_e_4.example.com
aap_h_1.example.com node_type=hop
aap_h_2.example.com node_type=hop
aap_h_3.example.com node_type=hop
[instance_group_local]
aap_e_1.example.com
aap_e_2.example.com
[instance_group_remote]
aap_e_3.example.com
[instance_group_remote:vars]
peers=local_hop
[instance_group_multi_hop_remote]
aap_e_4.example.com
[instance_group_multi_hop_remote:vars]
peers=remote_multi_hop
[local_hop]
aap_h_1.example.com
aap_h_2.example.com
[local_hop:vars]
peers=automationcontroller
[remote_multi_hop]
aap_h_3 peers=local_hop
Continue your automation journey with Ansible Automation Platform
Utilizing your infrastructure to its full potential can be achieved with automation mesh, which is the next level of automated processes.
Get started with Ansible Automation Platform by exploring interactive hands-on labs. Download Ansible Automation Platform at no cost and begin your automation journey.