SingleStoreDB Toolbox and memsqlctl Differences
On this page
SingleStore provides the following tools for managing SingleStoreDB clusters:
-
SingleStoreDB Toolbox: A high-level collection of tools that can be used to deploy, administer, and manage a SingleStoreDB cluster.
This collection of command-line tools is intended for multi-host administration and the commands are proxied through memsqlctl
.SingleStoreDB Toolbox should be installed separately from SingleStoreDB. -
memsqlctl
: A low-level tool used to control and manage nodes on a host (the host wherememsqlctl
is installed).As memsqlctl
is a part of SingleStoreDB package, it is installed along with the SingleStoreDB database engine on each host.
SingleStoreDB Toolbox
SingleStoreDB Toolbox (or simply “Toolbox”) is a collection of command-line tools that can be used to deploy and manage clusters.
Toolbox consists of four primary tools:
-
sdb-deploy
: Used to deploy and upgrade the SingleStoreDB server across hosts in a cluster. -
sdb-admin
: Used to perform cluster administrative tasks, such as adding nodes, enabling high availability, setting up cluster monitoring, performing backup operations, optimizing performance settings, and more. -
sdb-report
: Used to collect diagnostic information about a cluster. -
sdb-toolbox-config
: Primarily used to register and unregister hosts in a cluster.
Toolbox can be installed on a cluster host or any Linux computer with network access to all of the associated cluster hosts.
-
The user that runs
memsqld
-
The Linux
root
user -
A Linux user with
sudo
privileges
Toolbox requires the following information to operate:
-
A list of cluster hosts
-
The credentials for each host, such as Linux username and SSH key
Toolbox stores the list of registered cluster hosts and their credentials in a state file.env
sub-command of a Toolbox command, such as sdb-admin env
or sdb-report env
.
Contrary to SingleStore’s legacy management tool, MemSQL Ops, Toolbox does not actively manage a cluster.memsqlctl
command which, in turn, issues the command to all nodes in the cluster.
memsqlctl
The memsqlctl
low-level management tool that can run commands against nodes on the same host, where it uses the following configuration files when manipulating the cluster:
-
memsql.
: Stores engine variables, the values of which are loaded when a node starts.cnf -
memsqlctl.
: Overrides the default settings for the entire database system.hcl It also contains the location of the nodes.
file.hcl -
nodes.
: Contains information about SingleStoreDB nodes that exist on that host.hcl Included are the location of the memsql.
file used by that node and an encrypted password to use to connect to the node.cnf
The memsqlctl
tool is included in the singlestoredb-server
/ memsql-server
package/tarball file (along with the SingleStoreDB engine) and does not require a separate installation.memsqld
, which reads the memsql.
configuration file when starting up.
Important
As memsqlctl
controls the memsqld
process and node configuration, memsqlctl
must be run as the user who runs memsqld
, or a Linux user with root
privileges.
Several administrative tasks supported by memsqlctl
can be accomplished via a SQL interface.memsqlctl
helps avoid the manual configurations involved when performing certain tasks, thereby minimizing human error.
For example, to create a node manually, one must:
-
Craft a new
memsql.
file from scratchcnf -
Start
memsqld
manually, specifying all of the requiredmemsqld
arguments on the command line
As starting memsqld
this way can be error-prone, memsqlctl
can (and should) be used instead.memsqlctl
, these actions are performed by reading information about the nodes on a host from the memsqlctl.
file.
The following directory structures show the location of key cluster processes and the associated configuration files.
For each node:
-
/opt/singlestoredb-server-<version>/memsqld
-- or --/opt/memsql-server-<version>/memsqld
-
/usr/bin/memsqlctl
-
/etc/memsql/memsqlctl.
hcl -
/var/lib/memsql/nodes.
hcl -
/var/lib/memsql/<node-ID>/memsql.
cnf
Last modified: July 24, 2023