Gateway Hub

Uninstall Gateway Hub nodes

Overview

This document guides you through how to uninstall nodes in a Gateway Hub installation. To perform uninstall commands, you need the installation configuration file.

Uninstall nodes

You can uninstall Gateway Hub using the hubctl command. This command uninstalls all the nodes specified in the installation configuration file in the hosts list or linked hosts_file.

For more information about the installation configuration file, see Install.

In environments where you cannot connect to all nodes in the cluster, you can remove specific nodes by editing the hosts list or linked hosts_file. This allows you to uninstall the Gateway Hub in stages.

Caution: You cannot perform partial uninstallations. Removing a node unexpectedly will break the cluster.

To uninstall Gateway Hub, run:

Copy
hubctl setup uninstall config.yaml

This lists the nodes selected for removal and prompts for confirmation.

Copy
###########################################################################
# WARNING ! You are about to completely uninstall the Hub from all nodes. #
###########################################################################
Proceed ? [y/N]

Performing the uninstallation stops all processes and removes all programs and data associated with Gateway Hub on each node. You must also reboot each node to ensure temporary files and other miscellanea are removed.

After a completed uninstallation, the following prompt is displayed:

Copy
=======================================================================================
    The Hub has been uninstalled.
    Please note that the following directories have *not* been deleted:
    -------------------------------------------------------------------
    * /opt/hub/hub-data
    * /home/hub/data/postgres/pgdata (specified by <hub.postgres_timescale.data_dir>)
    * /home/hub/data/postgres/pgwal (specified by <hub.postgres_timescale.wal_dir>)
    * /home/hub/data/zookeeper/snapshot (specified by <hub.zookeeper.data_dir>)
    * /home/hub/data/zookeeper/txn (specified by <hub.zookeeper.transaction_log_dir>)
=======================================================================================

Some data is retained when uninstalling to avoid losing valuable information. You must remove these directories manually if required.

Systemd

If you have registered Gateway Hub orchestration service with systemd, then additional steps are required. For more information about using systemd, see Registration with systemd in Install.

To unregister the Gateway Hub orchestration service with systemd, do the following on each node:

Copy
sudo rm /usr/lib/systemd/system/hub-orchestration.service
sudo systemctl daemon-reload