refinery(8) -- command line interface for kx refinery¶
Synopsis¶
refinery global-options command command-options
Argument order¶
The command line arguments that are passed into the refinery CLI are split into 3 order-dependent sections:
global-options: These options are always immediately following the executable name and control the CLI as a whole
command: The name of the command to run
command-options: All command line arguments specified after the command are passed to the command itself
Argument separators¶
The global options and command options are specified in a different format:
- Global options are specified as --argument=value
- Command options are specified as --argument value
If a global option value has a space in it, you must enclose the value in double quotes
Description¶
Global options¶
These options configure the Command Line Interface as a whole:
--help¶
Show usage summary information for all global options
--list¶
Prints all the available commands within the Refinery CLI
--profile=config-profile¶
Selects one of the profiles with the Refinery CLI configuration file to run the CLI with.
See MANDATORY CONFIGURATION below for more info
--install-root=root-install-path¶
The root folder of the KX Refinery installation to work on.
See MANDATORY CONFIGURATION below for more info
--install-user=admin-username¶
The KX Refinery super-user username.
See MANDATORY CONFIGURATION below for more info
--install-pass=admin-password¶
The KX Refinery super-user password.
See MANDATORY CONFIGURATION below for more info
--install-pass-encrypt¶
Provides the ability to generate an encrypted version of the Refinery super-user password that can be stored in the CLI configuration file.
A separate encryption password needs to be supplied interactively to encrypt during creation and to decrypt on every CLI invocation. The CLI configuration will be printed to standard out and should be copied to the CLI configuration file.
--debug¶
Enables all debug logging within the CLI for additional information
--no-color¶
Disables any color logging
--quiet¶
Reduces the amount of logging the CLI prints to the console. Command-specific output is unaffected.
--kdb-no-validate¶
Do not perform any validation of kdb+ prior to running any commands or global features. This option simply defers the error until kdb+ is required for a specific command. This can be useful on servers that do not have Refinery installed.
--kdb-taskset=taskset-cpu-list¶
CPU core binding (with taskset -c) for any kdb+ process that executes within the CLI
--kdb-use-tls¶
Forces the CLI kdb+ process to connect to all Refinery kdb+ processes via TLS. For TLS to work:
- Specify a CA certificate file or path with
--kdb-tls-ca-src= - Define
$KX_SSL_CA_CERT_FILEor$KX_SSL_CA_CERT_PATHin your environment
--kdb-tls-ca-src=ca-file-or-folder-path¶
If --kdb-use-tls has been specified, this argument can be used to specify the CA certificate file or folder. This is not required if either $KX_SSL_CA_CERT_FILE or $KX_SSL_CA_CERT_PATH is defined in your environment.
--version¶
Prints Refinery CLI and kdb+ version information
Mandatory configuration¶
There are 3 mandatory configuration options that must be set for the Refinery CLI to run correctly. This configuration can be defined in 2 ways - either passing the arguments via the command line or a configuration file can be created at $HOME/.refinery/cli-config.
The configuration file should be defined as follows:
[refinery]
KX_REF_CLI_INSTALL_ROOT=*root-install-path*
KX_REF_CLI_INSTALL_USER=*admin-username*
KX_REF_CLI_INSTALL_PASS=*admin-password*
The password can be omitted from this file and then specified during run-time in 2 ways:
- Directly on the command line (
--install-pass=) - Interactive prompt during execution (no arguments required)
Each profile is identified by the name within the square brackets. By default, with a single KX Refinery installation to manage, this value should be [refinery]. Additional profiles can be specified within this file and then referenced with the --profile= global command line option.
Optionally, the super-user password can be encrypted (see --install-pass-encrypt). If an encrypted password is used, the decryption password must be specified on every invocation of the CLI.
Return value¶
The exit code indicates whether or not the specified command was executed successfully. If not, some exit codes provide information regarding the error.
1: If the Refinery CLI is misconfigured (missing environment variables or no commands found)
2: If kdb+ does not exist or does not run correctly during self-test
3: If --kdb-use-tls is specified and the configuration for TLS connections in kdb+ is invalid
126: If the command specified did not run successfully
127: If the command specified is invalid
128: If any invalid global command options are specified
Dependencies¶
The CLI has the following dependencies:
Bash¶
Version >= 4.2 is required
kdb+¶
Version >= 3.0 is required. If oem verison installed (see VERSION below), only 64-bit kdb+ is supported.
kdb+ configuration is automatic if Refinery is installed and CLI configured correctly. The standard $QHOME and $QLIC environment variables can also be set if required
Copyright¶
Copyright (c) 2019 - 2020 KX Systems Inc
Version¶
RELEASE_NAME