hubctl tool
Overview Copied
You can manage the Gateway Hub cluster using the hubctl
tool included with the downloaded binaries. By default, you can find hubctl
in the hub
directory of your installation machine.
The hubctl
tool reads configuration information from a YAML file that you must create when installing Gateway Hub.
You can use hubctl
and your configuration file to reconfigure, upgrade, or uninstall Gateway Hub.
For more information about configuration files, see Installation configuration file in Install.
Commands Copied
The hubctl
tool is the primary way you should reconfigure and manage the Gateway Hub platform components.
To perform many operations with hubctl
, you will need a YAML configuration file.
To use hubctl
, run commands in the following format:
hubctl <command> <options> <config_file>
The following commands are available:
setup
— this command can be run with the following options:install
— perform a new installation of Gateway Hub using the provided configuration file.reconfigure
— reconfigure an existing Gateway Hub. This changes Gateway Hub’s settings to match the provided configuration file. Protected settings cannot be changed by thesetup reconfigure
command.uninstall
— uninstall Gateway Hub. Some additional steps may be necessary, a summary is provided when the uninstall process is complete.upgrade
— upgrade an existing Gateway Hub. When upgrading you can also perform reconfiguration, including options available only in the latest version. However, protected settings cannot be changed. For more information, see Upgrade.
config
— this command can be run with the following options:list
— list the available configuration files for Gateway Hub services. By default, this will list all files. You can optionally specify a service to see only files relevant to that service.get
— fetch the available configuration files for a specified Gateway Hub service. By default, this will fetch all files related to the specified service. You can optionally specify a particular file to fetch only that.set
— update a Gateway Hub service configuration file on all nodes to match a specified local copy. You can update one or multiple files using one command.edit
— update a single Gateway Hub service configuration file on all nodes using your text editor. This command fetches a specified file and opens it in your text editor. When you save the local copy of the file, changes are propagated to all nodes.
start
— start Gateway Hub on all nodes.stop
— stop Gateway Hub on all nodes.restart
— restart Gateway Hub on all nodes.status
— prints the status of all nodes to standard out.diagnostics
— generates a.tgz
file of logs and diagnostics from all nodes. For more information, see Obtain a diagnostic file from the command line in Troubleshooting User Guide.y
— bypasses all prompts for user input.
Note
To manage Gateway Hub usinghubctl
, all nodes must be reachable from your machine. Making changes to configuration files directly may break Gateway Hub functionality.
systemd and reconfiguration Copied
If the Gateway Hub orchestration service has been registered with systemd, you will need to mask the orchestration service when reconfiguring Gateway Hub.
For more information about registration with systemd, see Registration with systemd in Install.
To perform reconfiguration commands:
-
Mask and stop the orchestration service by running the following on each node:
sudo systemctl mask hub-orchestration sudo systemctl stop hub-orchestration
-
Start Gateway Hub and perform the reconfiguration using
hubctl
, then stop Gateway Hub. You are only required to run this on one node, the changes will affect the whole cluster.hubctl start <config_file> hubctl setup reconfigure <config_file> hubctl stop <config_file>
-
Unmask and restart the orchestration service by running the following on each node:
sudo systemctl unmask hub-orchestration sudo systemctl start hub-orchestration