This section is an introduction to using the InCenter CLI. By default, CLI access to InCenter via SSH is enabled. The IP address and credentials to use for SSH access are discussed in Section 3.1, SSH Access to the CLI.
SSH access requires authentication with the credentials of a User object. The predefined admin user can be used (default password admin) for access. Alternatively, new users can be defined and doing this is described in Chapter 9, Managing Users.
Changing the SSH CLI Prompt and Welcome Message
The default CLI prompt takes the form:admin@InCenter:/>
The default domain in the CLI prompt ("InCenter") can be changed, but only for the SSH CLI. For example, to change the SSH prompt domain to the string "myhostname.com", the command sequence would be:
admin@InCenter:/> cc Settings admin@InCenter:/Settings> set SSH PromptName=myhostname.com Updated SSH admin@myhostname.com:/Settings> cc admin@myhostname.com:/>
In addition to changing the prompt, it is also possible to set the SSH CLI welcome message. For example:
admin@InCenter:/> cc Settings admin@InCenter:/Settings> set SSH WelcomeMessage=HelloThere
These changes need to be followed by an activate/commit command sequence to make them permanent.
The following make up the basic command set of the InCenter CLI for manipulating objects either within node configurations or InCenter itself:add - Used for adding an object to InCenter.
set - Used for changing the properties of an existing object.
show - Used to display the current values of InCenter objects.
delete - Used for deleting InCenter objects.
activate - Used for deploying InCenter changes.
commit - Used to make deployed changes permanent following an activate command.
help - Used to provide help information about a command.
Other commands exist for specific administration purposes. For example, the cfglog command is used to display errors/warnings after activating a change. The user command allows management of the InCenter user database.
The InCenter CLI provides a useful feature known as tab completion. When entering CLI commands, the Tab key can be pressed at any time. This can have the following functions:
The property name is automatically completed where possible.
The property value is completed where possible.
Where no property name or property value has been entered, a list of possible options is presented.
Consider following example, where the command entered so far is add Standalone:
admin@InCenter:/> add Standalone
If the Tab key is pressed, InCenter will autocomplete the object type:
admin@InCenter:/> add StandaloneNode
If the Tab key is pressed again, InCenter will autocomplete the first mandatory property followed by an equals sign:
admin@InCenter:/> add StandaloneNode Name=
If a Tab key is pressed again, InCenter cannot autocomplete the value but will provide help about the type of value that should be entered:
admin@InCenter:/> add StandaloneNode Name=
Name: Name
Type: string
Special Characters Used with Tab Completion
When entering the value of an object property, the tab character can be preceded by any of the following special characters:Entering the period "." (period) character before entering tab will insert the current value of the object property.
Entering the " * " (asterisk/star) character before entering tab will cause the default property value to be automatically filled in. However, note that only mandatory properties have a default value. Optional properties do not have a default value.