register-host

Description

Registers a host in the cluster.

Note

SingleStore is not automatically deployed to a host when running this command. Rather, this command must be used in conjunction with other Toolbox commands to:

  • 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. 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 option provides the ability to override the cluster hostname for the host they are registering. Toolbox will use this value when configuring intra-node communication. Only specify the cluster hostname without other metadata such as username or port. For example: singlestore-abc.domain rather than singlestore-abc.domain:3306.

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. By default, this file is named packages.hcl 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

Was this article helpful?

Verification instructions

Note: You must install cosign to verify the authenticity of the SingleStore file.

Use the following steps to verify the authenticity of singlestoredb-server, singlestoredb-toolbox, singlestoredb-studio, and singlestore-client SingleStore files that have been downloaded.

You may perform the following steps on any computer that can run cosign, such as the main deployment host of the cluster.

  1. (Optional) Run the following command to view the associated signature files.

    curl undefined
  2. Download the signature file from the SingleStore release server.

    • Option 1: Click the Download Signature button next to the SingleStore file.

    • Option 2: Copy and paste the following URL into the address bar of your browser and save the signature file.

    • Option 3: Run the following command to download the signature file.

      curl -O undefined
  3. After the signature file has been downloaded, run the following command to verify the authenticity of the SingleStore file.

    echo -n undefined |
    cosign verify-blob --certificate-oidc-issuer https://oidc.eks.us-east-1.amazonaws.com/id/CCDCDBA1379A5596AB5B2E46DCA385BC \
    --certificate-identity https://kubernetes.io/namespaces/freya-production/serviceaccounts/job-worker \
    --bundle undefined \
    --new-bundle-format -
    Verified OK