Toolbox
Overview
Toolbox Config File (toolbox.hcl): Overrides the default settings for a given user.
Toolbox State File (toolbox-state.hcl): Maintains a list of hosts that are part of the user’s SingleStoreDB cluster.
Toolbox Config File (toolbox.hcl)
The Toolbox config file overrides the default settings for a given user.
Default location
${XDG_CONFIG_HOME}/memsql-toolbox/toolbox.hcl
If XDG_CONFIG_HOME
is not set, ${HOME}/.config
will be used instead (e.g., /home/alice/memsql-toolbox/toolbox.hcl
).
Format
Settings
state
: The path to the state file, where Toolbox stores the set of hosts that are part of the cluster.cache
: The path to the cache file, which Toolbox uses to speed up Toolbox commands.runtimeDir
: The path to the runtime directory, where Toolbox stores temporary session data.user
: The username of the user that is allowed to run Toolbox with this config file.parallelism
: The maximum number of operations to run in parallel.
Remarks
Toolbox uses a description of the cluster that is stored the user’s home directory by default.
Running a Toolbox command as the root user (by using sudo
, for example) will use a different cluster description than the one stored for your user. Toolbox should not be run with sudo
, since it has no need for the elevated permissions.
If you intend to run Toolbox commands as root, add user = "root"
to /root/.config/memsql-toolbox/toolbox.hcl
. After you save this change, you will be able to run Toolbox commands as root.
Example
The following example shows expanded system defaults for user alice
on a 4-core host:
version = 1 state = "/home/alice/.local/share/memsql-toolbox/toolbox-state.hcl" cache = "/home/alice/.local/share/memsql-toolbox/toolbox-cache.hcl" runtimeDir = "/run/user/1000" user = "alice" parallelism = 4
Toolbox State File (toolbox-state.hcl)
The Toolbox state file maintains a list of hosts that are part of the user’s SingleStoreDB cluster.
There are two types of hosts: Local and Remote. Remote hosts may optionally contain an ssh
block that overrides default SSH configuration for that host.
Default location
${XDG_DATA_HOME}/memsql-toolbox/toolbox-state.hcl
If XDG_DATA_HOME
is not set, ${HOME}/.local/share
will be used instead (e.g., /home/alice/.local/share/memsql-toolbox/toolbox-state.hcl
).
Format
Examples
Example (empty)
The following is an empty state file.
version = 1
Example (3 hosts)
The following is a state file that specifies three hosts and their connection information.
version = 1 host { hostname = "memsql-01.example.com" } host { hostname = "memsql-02.example.com" localhost = true } host { hostname = "memsql-03.example.com" ssh { host = "memsql-03.example.com" port = 23 privateKey = "/home/bob/.ssh/id_rsa" user = "bob" } } secure = "dGhpc2tleWlzdGhpcnR5dHdvY2hhcmFjdGVyc2xvbmc="