Agent Update

Updating Agent via Platform Wizard

When a new version of Agent is released, a triangular icon appears next to its version number.

To update Agent via Platform Wizard:

  1. A new “Update Instructions” item will appear in Agent menu. Click on it.

  2. In the opened window, choose your Linux distribution. If Agent needs to be updated via a local archive, check the box “I do not have access to the Internet, use a local/offline installation”.

  3. After choosing the distribution, commands for updating Agent will appear in the window.

    Copy and run the following commands:

    apt-get update
    apt-get --only-upgrade install pmaagent=6.2.0
    systemctl daemon-reload && systemctl restart pmaagent
    

    Wait 1 minute and run the second part of the last command again:

    systemctl restart pmaagent
    
  4. Click “Done” to complete the update. If you need to cancel the update, click “Cancel”.

Automated Agent Update via Ansible

When updating Agent, the current Ansible Playbook/Role shall be used. “Awide Labs Ltd” LLC provides an Ansible role for automating Agent’s lifecycle (installation/update/configuration).

Requirements for running Ansible-playbook

The following components shall be installed on all nodes specified in the inventory file:

  • Python3 with pip module >= 3.10.0;

  • Database AwideDB or PostgreSQL, including postgresql-contrib, with external management by Patroni or without external management.

Ansible version 9.5.0 or higher, with core version 2.16, shall be installed on the node from which the playbook will be run.

Running Ansible-playbook

Before running the Ansible playbook, complete the following steps:

  1. Download the Ansible role from the link.

  2. Fill in the inventory file based on the inventory_template file.

  3. Create a new file in the group_vars directory containing variables for the group of nodes from the inventory file. For example, sample_group.yml file for sample_group from inventory_template. Use group_vars/all.yml file as a template.

  4. Fill the created file with data relevant for running the playbook.

  5. If required, specify the public key of the user under which Platform is launched in roles/tantor_agent/files/id_rsa.pub file. This key will be added to the postgres user.

  6. If you need to predefine variables at the node level, add a file named after that node with the .yml extension to the host_vars directory. For example, the file hostnameA.yml from inventory_template.

  7. Replace the value of sample_group in Agent.yml file with the group specified in the inventory file for which all tasks will be executed.

Note

The logic of the Ansible playbook is configured in the main variables file — group_vars/<file created in step three of the instructions above>.yml

The playbook shall be run under a user with passwordless access to all nodes in the inventory file with the ability to switch to privileged mode (root).

To update Agent, run the Ansible playbook. To do this, use the following command:

ansible-playbook -i <path to the inventory file> -l <group of nodes from the inventory file> agent.yml -D