create-node

Info

MemSQL Helios does not support this command.

Create a MemSQL node on a specific host.

Usage

memsql-admin create-node will create a MemSQL node on a registered host by
creating its config file and various data directories on the filesystem.
It will also by default start the node.

Example usages:

    memsql-admin create-node --host host1 --password TEST_PASSWORD

This will create a node on host1 with its files in the default install directory
on host1. The node will also be started and the MemSQL root password
will be set to "TEST_PASSWORD".

If you do not want to use the --password flag to pass in the MemSQL
root password you may also set the environment variable "MEMSQL_PASSWORD".

The --password must be specified if the node will be started, but it may be set
to the empty string (equivalent to no password) for convenience in demo or
testing situations:

    memsql-admin create-node --host host1 --password ""


If you only want to lay out the node's data and directories on the filesystem
but do not want to start the process, set --no-start:

    memsql-admin create-node --host host1 --no-start

Note that you must NOT specify a password when you use --no-start and thus when
the node is eventually started, its MemSQL root password will not be set. You
will have to run 'memsql-admin change-root-password' to set it.


To configure the port (default 3306):

    memsql-admin create-node --host host1 ... --port 3307


By default the node's data and directories will be rooted in a base install
directory (named a randomly generated UUID) which is in the default install dir.
To find out where the default install dir is on host1, run "memsqlctl env" on
host1. Note that the memsql-server rpm and deb packages configure the default
install dir to be /var/lib/memsql.


If you want to change where the node's base install dir is on host1:

    memsql-admin create-node --host host1 ... --base-install-dir /memsql_node_1

This will lay out all of the node's data and directories on host1 in
/memsql_node_1. The filesystem will resemble:
/memsql_node_1
  memsql.cnf
  data/
  auditlogs/
  plancache/
  tracelogs/


If you want to change the location of only one directory and leave the rest
in a directory rooted in the default install dir on host1:

    memsql-admin create-node --host host1 ... --datadir /data/memsql_node_1/data

The filesystem will resemble:
{default install dir}
  {base dir}
    memsql.cnf
    auditlogs/
    plancache/
    tracelogs/

/data/memsql_node_1
  data/

Usage:
  memsql-admin create-node [flags]

Flags:
      --auditlogsdir STRING       absolute path to the auditlogs dir on the target host
      --base-install-dir STRING   absolute path to the base install directory on the target host
      --bind-address STRING       the bind address
      --datadir STRING            absolute path to the data dir on the target host
      --disable-auto-restart      disable automatic restarting of memsqld on error
  -h, --help                      help for create-node
      --host string               where to create the node
      --memsql-config STRING      absolute path to the MemSQL config file path on the target host
      --no-start                  don't start the node
  -p, --password STRING           the password
      --plancachedir STRING       absolute path to the plancache dir on the target host
  -P, --port PORT                 the port
      --tracelogsdir STRING       absolute path to the tracelogs dir on the target host

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                    the Toolbox configuration file path
  -j, --json                                Enable JSON output
      --parallelism POSITIVE_INTEGER        Maximum amount of operations to be run in parallel
      --runtime-dir DIRECTORY_PATH          where to put Toolbox runtime data
      --ssh-max-sessions POSITIVE_INTEGER   Maximum number of SSH sessions to open per host, must be at least 3
      --state-file FILE_PATH                the 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

Before running this command, MemSQL must be installed on the host first. Use memsql-deploy install to install MemSQL on the host machine.

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