register-host
On this page
Description
Registers a host in the cluster.
Note
SingleStore is not automatically deployed to a host when running this command.
-
Add a host to a cluster to increase capacity
-
Add a host back to a cluster
-
Replace a host in a cluster
Refer to Cluster Expansion Steps for additional information.
This command writes the host name and SSH details to the state file maintained by Toolbox.
The --host
flag provides SSH connection details for this host.[username@]hostname[:port]
.--cluster-hostname
is not also specified.
The --cluster-hostname
option provides the ability to override the cluster hostname for the host they are registering.singlestore-abc.
rather than singlestore-abc.
.
The --identity-file
flag provides an optional SSH private key to be used to connect to the host.
Include the --tar-install-state <state-file-name-including-path>
option to specify where to write the tarInstallState
file on a host, which can be outside of the tarInstallDir
.packages.
and resides in the tar
install directory as specified by the --tar-install-dir
option, which is the recommended configuration.
Examples
sdb-toolbox-config register-host --host 127.0.0.1 --localhost
sdb-toolbox-config register-host --host user@192.0.12.3:50 --cluster-hostname first_host
Usage
Usage:
sdb-toolbox-config register-host [flags]
For flags that can accept multiple values (indicated by VALUES after the name of the flag),
separate each value with a comma.
Flags:
--allow-duplicate-host-fingerprints Whether to allow hosts with identical SSH host keys. (ADVANCED)
--cluster-hostname SSH_ADDRESS The cluster-addressable hostname for this host. Tools will use this value to configure intra-node communication. Specify the hostname without additional parameters (e.g., memsql-abc.domain instead of memsql-abc.domain:3306)
-h, --help Help for register-host
--host SSH_ADDRESS SSH connection details for this host in the standard SSH [username@]hostname[:port] format. The hostname value will be used as the cluster-addressable hostname if '--cluster-hostname' is not specified
-i, --identity-file ABSOLUTE_PATH The identity file for the host
--localhost Whether this instance of Toolbox is located on the host
--memsqlctl-config-path string The path to the memsqlctl.hcl file on the target host. (ADVANCED)
--memsqlctl-path string The path to the memsqlctl binary on the target host. (ADVANCED)
--skip-auto-config Skip automatic operating system configuration
--skip-validation Skip validation of --memsqlctl-path and --memsqlctl-config-path
--tar-install-dir string The directory to use for tar packages on the target host. (ADVANCED)
--tar-install-state string The path to the packages.hcl file on the target host. (ADVANCED)
Global Flags:
--backup-cache FILE_PATH File path for the backup cache
--cache-file FILE_PATH File path for the Toolbox node cache
-c, --config FILE_PATH File path for the Toolbox configuration
--disable-colors Disable color output in console, which some terminal sessions/environments may have difficulty with
--disable-spinner Disable the progress spinner, which some terminal sessions/environments may have issues with
-j, --json Enable JSON output
--parallelism POSITIVE_INTEGER Maximum number of operations to run in parallel
--runtime-dir DIRECTORY_PATH Where to store Toolbox runtime data
--ssh-max-sessions POSITIVE_INTEGER Maximum number of SSH sessions to open per host, must be at least 3
--ssh-strict-host-key-checking Enable strict host key checking for SSH connections
--ssh-user-known-hosts-file FILE_PATH Path to the user known_hosts file for SSH connections. If not set, /dev/null will be used
--state-file FILE_PATH Toolbox state file path
-v, --verbosity count Increase logging verbosity: valid values are 1, 2, 3. Usage -v=count or --verbosity=count
-y, --yes Enable non-interactive mode and assume the user would like to move forward with the proposed actions by default
Remarks
This command is interactive unless you use either --yes
or --json
flag to override interactive behavior.
Output
The following example uses the register-host
command to register the current local host as a host for cluster deployment.
sdb-toolbox-config register-host --host node-1 --localhost
Toolbox is about to register the following host:
· Host: node-1
· Localhost: true
Would you like to continue? [y/N]: y
✓ Successfully registered host node-1
+----------------+------------+-------------+---------------+
| Host | Local Host | SSH address | Identity File |
+----------------+------------+-------------+---------------+
| node-1 | Yes | | |
+----------------+------------+-------------+---------------+
Last modified: July 2, 2024