GridGain CLI Tool
Overview
The GridGain CLI tool uses REST API as a communication protocol between the node and the CLI, allowing you to configure the node. By default, the CLI tool runs in the interactive mode, but you can also execute commands without entering it.
When using the GridGain CLI tool, the arguments should be put in quotation marks, and the string should not include line breaks. For example:
cluster config update "ignite.security.authentication.providers.basic4={type=basic,username=name,password=pass}"
Otherwise, special POSIX characters in strings ({
and }
in the above command) will be handled appropriately, leading to potentially unpredictable results.
Alternatively, you can use the backslash (\
) to escape all special characters in your command. For example:
cluster config update ignite.security.authentication.providers.basic4=\{type=basic,username=name,password=pass\}
Commands and Options
The following commands can be executed in the interactive CLI mode.
CLI Commands
These commands help you configure your CLI tool and cluster.
Command | Parameters | Description |
---|---|---|
|
|
Creates a profile with the given name, optionally by copying an existing profile, optionally activating the new profile upon creation. |
|
|
Activates the profile identified by name. |
|
Lists configuration profiles. |
|
|
Gets the current profile details. |
|
|
|
Gets the value for the specified configuration key. |
|
|
Sets configuration parameters using comma-separated input key-value pair(s). |
|
Shows the currently active configuration. |
|
|
|
Removes the specified configuration key. |
Cluster Commands
These commands let you manage your cluster.
Command | Parameters | Description |
---|---|---|
|
|
Shows configuration of the cluster indicated by the endpoint URL and, optionally, by a configuration path selector. |
|
|
Updates configuration of the cluster indicated by the endpoint URL with the provided argument values. |
|
|
Initializes a cluster, optionally for the indicated cluster URL, optionally with Cluster Management Group and Cluster Metastorage nodes specified, with the cluster configuration optionally provided in a file or multiple files. The path to config files is resolved relative to the folder the CLI tool is started from. |
|
|
Disables metrics from the specifies source on all nodes of the cluster. |
|
|
Enables metrics for the specifies source on all nodes of the cluster. |
|
Prints a list of metric sources for each of the cluster’s nodes, along with each source’s status (enabled or disabled). |
|
|
|
Displays the detailed status of the specified cluster. |
|
|
Shows Physical Topology of the specified cluster, optionally in a plain format. |
|
|
Shows Logical Topology of the specified cluster, optionally in a plain format. |
|
|
Deploys the specified version of a unit, from the specified path, optionally tp specific nodes. |
|
|
Un-deploys the specified unit version, optionally for the specified cluster. |
|
|
Lists cluster’s deployed units, optionally filtered by status. |
|
|
Connects to the specified node, optionally with the specified user name (u) an password (p). |
|
Disconnects from the current cluster. |
Snapshot Commands
Command | Parameters | Description |
---|---|---|
|
|
Creates a new snapshot, optionally at the indicated timestamp, optionally for the indicated cluster URL, optionally for the specified tables only. |
|
|
Deletes the specified snapshot, optionally for the indicated cluster URL. |
|
|
Restores data from the specified snapshot, optionally for the indicated cluster URL, optionally for the specified tables only. |
|
|
Provides information about the current status of the specified snapshot, optionally for the indicated cluster URL, optionally for the specified tables only. If no snapshot ID is specified, provides information about the status of all snapshots. |
Node Commands
These commands address specific node(s) in a cluster.
Command | Parameters | Description |
---|---|---|
|
|
Gets the specified node (n) configuration. |
|
|
Updates the local node configuration with the arguments in the HOCON format. |
|
|
Shows the status of the default node, or a different one if specified. |
|
|
Shows the node’s build version. |
|
|
Lists node’s metrics. |
|
|
Enables a metric source for the node. |
|
|
Disables a metric source for the node. |
|
|
Lists node metrics' sources. |
|
|
Lists node’s deployment units. |
Disaster Recovery Commands
These commands enable you to:
-
Recover data partitions in a number of disaster scenarios
-
Recover system system RAFT groups
Command | Parameters | Description |
---|---|---|
|
|
Restarts the indicated partitions of the specified table (if not specified, all existing partitions) on the indicated nodes in the indicated zones. |
|
|
Resets the indicated partitions (if not specified, all existing partitions) in the indicated zones (if not specified, in all existing zones). This operation is irreversible. It can lead to data loss. Use with caution, only when strictly necessary. |
|
|
Returns the partition states (local or global), optionally for the indicated nodes and/or zones and/or partitions. |
|
|
Initiates CMG node group repair to restore the lost majority. The command is sent to the node indicated by the |
|
|
Initiates MG node group repair to restore the lost majority. |
|
|
Initiates migration of a CMG or MG node that did not take part in recovery performed by |
User and Role Commands
These commands help you manage access to the system - users and and roles.
Command | Parameters | Description |
---|---|---|
|
|
Creates a new role, optionally for the indicated cluster endpoint URL. New roles do not have any privileges. |
|
|
Deletes the specified role, optionally from the indicated cluster endpoint URL. Role with assigned privileges cannot be deleted. |
|
|
Lists roles, optionally for the indicated cluster endpoint URL, optionally filtered by user(s). |
|
|
Shows the role information, optionally including privileges assigned to the role and/or the users who have that role, optionally for the indicated cluster endpoint URL. |
|
|
Grants to the specified role a privilege (permission to perform the specified action on an the specified object). For more information, see User Permissions and Roles. |
|
|
Revokes privilege(s) (permissions)(s) to perform the specified action on the specified object) from the role. For more information, see User Permissions and Roles. |
|
|
Creates a new user. |
|
|
Deletes the user. |
|
|
Edits user configuration. |
|
|
Provides a list of users on the server, optionally filtered by role. |
|
|
Provides extended information about the specific user, optionally with information about roles assigned to that user. |
|
|
Assigns role(s) to the specified user. |
|
|
Revokes role(s) from the specified user. |
Data Center Replication Commands
These commands address data center replication needs.
Command | Parameters | Description |
---|---|---|
|
|
Creates a replication from the source cluster to the current cluster. |
|
|
Deletes replication specified by the cluster URL and replication name. |
|
|
Sets a replication flush point with the provided ISO time. |
|
|
Lists all replications for the specified cluster, along with their statuses, optionally in a plain format. |
|
|
Starts or resumes the replication specified by name. |
|
|
Stops replication specified by ID. |
|
|
Shows the current status of the specific replication. |
Distribution Commands
These commands address partition distribution.
Command | Parameters | Description |
---|---|---|
|
|
Resets the algorithm state for partition distribution in all tables within the specified zones. Generates partition assignments "from scratch" (as if the same table (zone) was just created on the data nodes. This ensures data colocation between tables in a zone. |
Miscellaneous Commands
These are general-purpose commands.
Command | Parameters | Description |
---|---|---|
|
Clears the terminal. |
|
|
Stops the current interactive session. |
|
|
|
Provides information on available command groups, commands in the specified group, or for the specified command. |
|
|
Executes the specified SQL query (command) or the queries included in the specified file, on the specified cluster. |
|
|
Revokes the JWT token. Can revoke a specific token, or all tokens for the specified user. |
|
Displays the current CLI tool version. |
© 2024 GridGain Systems, Inc. All Rights Reserved. Privacy Policy | Legal Notices. GridGain® is a registered trademark of GridGain Systems, Inc.
Apache, Apache Ignite, the Apache feather and the Apache Ignite logo are either registered trademarks or trademarks of The Apache Software Foundation.