Registers a host in the cluster.


This command will write the host name and SSH details to the state file
maintained by memsql-toolbox.

The address provided to the flag --host will be used by cluster nodes to
address each other. A node running on this host will be addressable by the
hostname:port combination. Toolbox will try to connect by SSH to this hostname
to do any cluster operations.

The --ssh flag is optional. It provides the ability to override how toolbox
connects to this host to execute operations. The value follows the format

Subsequently, memsqlctl operations that connect to this host will be performed
by using these SSH options.

The --identity-file flag provides an optional SSH private key to be used to
connect to the host.

  memsql-toolbox-config register-host [flags]

  -h, --help                           help for register-host
      --host string                    The cluster-addressable hostname of the host.
  -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)
      --ssh SSH_ADDRESS                The SSH address of the host.
      --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:
      --cache-file FILE_PATH         File path for the Toolbox node cache
  -c, --config FILE_PATH             the Toolbox configuration file path
  -j, --json                         Enable JSON output
      --runtime-dir DIRECTORY_PATH   where to put Toolbox runtime data
      --state-file FILE_PATH         the Toolbox state file path
  -v, --verbosity count              Increase logging verbosity
  -y, --yes                          Enable non-interactive mode and assume the user would like to move forward with the proposed actions by default


This command is interactive unless you use either the --yes or --json flags to override interactive behavior.


The following example uses the register-host command to register the current local host machine as a host for cluster deployment.

memsql-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        |             |               |
Was this article useful?