Reinstalling an Open Horizon agent

To update an agent, you must uninstall the current agent and install the agent that is included with the latest Mesh update.

About this task

The network traffic is disrupted because you must delete the linked Red Hat® Service Interconnect gateway before you can update the agent.

To reinstall an Open Horizon agent, you must complete the following tasks:

  1. Disconnect the gateway from the namespace.
  2. Delete the gateway.
  3. Uninstall the current agent.
  4. Install the agent that is included with the latest Mesh update .
  5. Deploy the gateway again.

Procedure

  1. On the Gateways page in the Mesh console, click the Red Hat Service Interconnect gateway that is linked to the agent that you are updating.
  2. In the Connected namespaces section, click the namespace where the gateway is running.
  3. On the Namespace details page, click Edit Edit icon.
  4. Click Disconnect, then click Next. Then click Save changes to disconnect the gateway from the namespace.
  5. In the Health field on the Gateways page, check the status of the gateway.
    When the gateway has a Not deployed status, you can delete the gateway.
  6. On the Edge gateway details page, click Delete gateway.
    When the gateway is deleted, the following notification is displayed:
    The <gateway name> was successfully deleted.
  7. Check that the gateway is deleted.
    For example, use the palmctl CLI to run a command like this:
    palmctl get gateway --name gw1
    If the gateway was successfully deleted, output that is similar to the following example is displayed:
    [ERROR] gateway with name gw1 not found

    You can now uninstall the current agent.

  8. Prepare the agent-uninstall.sh script.
    The script is located in the folder where the agent installation package was extracted to when the agent was originally installed.
    Or you can download the script by running the following command:
    wget https://raw.githubusercontent.com/open-horizon/anax/master/agent-install/agent-uninstall.sh
  9. Change the permissions so that the script can run:
    chmod +x agent-uninstall.sh
  10. Uninstall the agent by running the following command:
    sudo -s -E ./agent-uninstall.sh -m <agent_namespace> -k -d -u $HZN_EXCHANGE_USER_AUTH
  11. Install the latest version of the agent. Follow the instructions in Installing an Open Horizon agent.
  12. Deploy the Red Hat Service Interconnect gateway again. Follow the instructions in Deploying Service Interconnect edge gateways with the Mesh console.