Using the Admin CLI
The Hammerspace product (Product) provides a custom, administrator Command Line Interface (Admin CLI, or CLI) with a restricted shell and a set of administration-specific commands.
The shell and commands provide auto completion and built-in help. The Admin CLI does not provide access to bash, other shells, or common Linux commands. The CLI provides a history function that is accessible by using the up and down arrow keys.
The CLI can be accessed by logging on as admin on the physical or remote console of a bare-metal server, on the virtual console of a VM, or by SSH to the IP address, hostname, or FQDN of the management IP of the cluster.
ssh admin@<server_ip_address>
In cloud deployments, the username and authentication protocol are specific to the cloud.
| Platform | Admin username |
|---|---|
ISO-based installs (bare-metal, VMware, Hyper-V, KVM) |
admin |
Amazon AWS |
ec2-user using Key Pair or IAM |
Microsoft Azure |
admin |
Google Cloud |
admin |
Note: The password for the cluster is set during installation.
Getting Help in the Admin CLI
The following tips will help you use the Admin CLI more easily:
-
Typing a question mark alone on the command line will display a list of all available commands and a brief description of each one. For example, admin@anvil-1.selab.hammer.space> ?
-
Typing part of a command name followed by Tab or Space will list possible matching commands. If there is only one match, pressing Tab or Space will complete the command.
-
Pressing Enter after typing part of a command will list possible matches if there are more than one, or complete and execute the command if there is only one match. Typing part of a command followed by ?* will list possible matches along with a brief description of each matching command.
-
The help command gives general help for using the CLI and editing commands.
Admin CLIadmin@anvil-1.selab.hammer.space> help CONTEXT SENSITIVE HELP [?] - Display context sensitive help. This is either a list of possible command completions with summaries, or the full syntax of the current command. A subsequent repeat of this key, when a command has been resolved, will display a detailed reference. AUTO-COMPLETION The following keys both perform auto-completion for the current command line. If the command prefix is not unique then the bell will ring and a subsequent repeat of the key will display possible completions. [enter] - Auto-completes, syntax-checks then executes a command. If there is a syntax error then offending part of the command line will be highlighted and explained. [space] or [tab] - Auto-completes, or if the command is already resolved inserts a space. USEFUL KEYS [CTRL-A] - Move to the start of the line [CTRL-E] - Move to the end of the line. [CTRL-C] - Delete and abort the current line [CTRL-D] - Delete the character to the right on the insertion point. [CTRL-K] - Delete all the characters to the right of the insertion point. [CTRL-U] - Delete the whole line. [backspace] - Delete the character to the left of the insertion point.The Product commands include built-in, context-sensitive help. Typing the command name followed by ? or --help* will list options and their descriptions. You can even use ? or --help* after entering some parameters. Using ? in this way will return you to the partially completed command line. Using --help will return to a blank command prompt, but clicking the up arrow will retrieve the partially completed command. The CLI gives hints as to syntax errors when typing or editing commands, especially when complete or partially complete with options and parameters. If you are unable to type a space where one is needed, that means that there is a syntax error somewhere else in the command, such as a space missing earlier in the parameters. Values for parameters containing spaces and some other special characters must escape the space with a backslash (\*) before each space, or by putting the whole parameter in single or double quotes.
Common Options
--name* is the name of an object managed within Hammerspace, such as a share, volume name, storage system name, or objective. They are primarily used internally and not visible to regular users. One exception is the share name, which is also used as the SMB name of a share. When creating or adding most objects, the name is arbitrary in that it does not have to match the object’s actual name. For example, you can name a storage system something other than its host name or FQDN. For some objects, the name can be changed arbitrarily without impact to users and applications, again, share name being an exception. --id* is a UUID for an object. --internal-id* is a short, sequentially assigned numeric identifier for an object. These are useful when copying and pasting a lengthy UUID is not possible, such as in a remote desktop or virtual console session. * Commands that operate on an object require that the name, id, or internal-id option be specified.