Agent Maintenance Tool: Introduction
How the Agent Maintenance Tool automates agent installation and upgrades via the Supervisor.
Introduction#
Manual installation and upgrade of agents on the target box involves IT personnel from the business owners. The number of these operations for the agents increases based on the target boxes present in the data center. These issues are addressed with the Supervisor handling the maintenance of agents.
The agent maintenance tool supports the following maintenance operations for HEAL agents:
- Installing agent.
- Updating agent configuration.
- Upgrading agent.
- Rolling back the agent.
Architecture#

Agent Package Format#
The agent package format is as below:
<agentname>_<osname>_<osversion>_<architecture>_<32bit/64bit>_<version>.tar.gz/.zip
Directory Structure For the Agent#
The directory structure for the agent is as below:
<install_path>/<agent name>/<agent id>
Agent Maintenance Command Process#
The agent maintenance command process is as follows:
1. The tool issues agent maintenance commands and monitors the responses.
2. Users must provide necessary details as arguments for each command.
3. The tool prepares and adds command messages to the queue.
4. The Supervisor Controller, a server-side component, issues commands to the Supervisor at the target server.
5. The Supervisor Controller retrieves commands from the queue and sends them to the Supervisor on the target server for execution.
6. The tool waits for the responses in the maintenance response message queue and processes the response once available.
Audit and Record-Keeping#
All command details are stored in the Percona Database for audit purposes.
Installation and Upgrade Requirements#
1. For installing and upgrading an agent, the Supervisor needs an agent package.
2. The supervisor downloads agent packages from the RAN server via HAProxy.
Prerequisites#
1. Install and configure HEAL. HEAL should be up and running on the HEAL server.
2. Install Java 8 on the server where the agent maintenance tool needs to be set up.
3. Manually install and configure Supervisor on the target server.
4. Navigate to the below directory on the primary node of the HEAL server.
<Install_Path>/InfraService
5. Create a folder named downloads.
6. Copy the agent package files in this folder from the directory below for the agents that you need to install, upgrade, or roll back.
<heal installer path>/binary
7. If agents are already installed manually, then please make sure that proper directory structure is followed, and supervisor is up and running
8. Enable the communication from the server where the tool is running to the RMQ data port on the HEAL server like firewall setting, etc.
9. Execute the following command to grant execute permission to run the script.
chmod +x agent-maintenance-tool.sh
10. The supervisor should be up and running. It should communicate with the HEAL server for running the self-upgrade.
11. Ensure that the supervisor version 2.1.2.12 is running on target servers.
12. The format of an agent tar file name should be as follows.
<agent name>_version.tar.gz
13. When you copy a file from the Windows file system to Unix, it may happen that the file contains special characters (Ctrl M) in the line endings. These characters may cause issues when scripts in Unix read the file. Execute the following command after you copy the file to Unix to remove those special characters from the file.
dos2unix version.txt
14. Make sure only the files and directories which appsone user owns are available under the agent directory.
15. When using this tool using TLS 1.3, set JAVA_HOME to JDK11 or above versions on the server where this tool runs.
16. To make sure that the configuration is valid, just start CA/LFA/PSA from CC. If able to start, then configs are valid.
Setting up Agent Maintenance Tool#
Agent Maintenance is a standalone command line tool. It can be set up on any server.
1. Copy the file below to the server.
agent-maintenance-tool-1.9.tar.gz
2. Untar the files.
gunzip agent-maintenance-tool-1.9.tar.gz
tar -xvf agent-maintenance-tool-1.9.tar
3. Navigate to the below folder.
<base_dir>/<agent-maintenance-tool>/config
4. Edit the conf.properties file as follows.
| Property | Description |
|---|---|
| command.queue.host | IP address or host name of the server where RabbitMQ runs. |
| command.queue.port | Data port where RabbitMQ runs. |
| command.queue.secure | It can be either true or false. For TLS communication, set it to true, otherwise false. |
| command.request.queue.name command.response.queue.name |
Do not modify the values for these attributes. |
| agent.config.output.dir | Configuration file(s) retrieved using the GetConfig command are stored at this location. Provide the path on the server with rwx permission. |
| agent.config.allowed.files | This is an optional attribute. There are configuration files associated with each agent. Specify comma-separated configuration file names for each agent. If a new config file gets added for any agent, add the same to the list. Uncomment this attribute and then provide the values. |
| agent.config.allowed.agenttype | This is an optional attribute. Comma-separated list of allowed agents. If a new agent gets added, add to the list. Uncomment this attribute and then provide the values. |