You are viewing an older version of this section. View current production version.
register-host
SingleStore Managed Service does not support this command.
Register a host.
Usage
Registers a host in the cluster.
This command will write the host name and SSH details to the state file
maintained by singlestoredb-toolbox.
The --host flag provides SSH connection details for this host.
The value follows standard SSH format [username@]hostname[:port].
The hostname portion of this value will be used as the cluster-addressable
hostname if '--cluster-hostname' is not also specified.
The --cluster-hostname provides the ability to override the cluster hostname
for the host they are registering. Tools will use this value when configuring
intra-node communication. Only specify the cluster hostname without other metadata
such as username or port, i.e., memsql-abc.domain rather than
memsql-abc.domain:3306.
The --identity-file flag provides an optional SSH private key to be used to
connect to the host.
Example usages:
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:
sdb-toolbox-config register-host [flags]
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 OS 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 the
--yes
or--json
flags to override interactive behavior. -
Include the
--tar-install-state <state-file-name-including-path>
option to specify where to write thetarInstallState
file on a host, which can be outside of thetarInstallDir
.By default, this file is named
packages.hcl
and resides in thetar
install directory as specified by the--tar-install-dir
option, which is the recommended configuration.
Output
The following example uses the register-host
command to register the current local host machine 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 | | |
+----------------+------------+-------------+---------------+