Settings management
Note
For a detailed list of all possible settings, their default values, as well as their corresponding identifiers in CLI, environment and TOML notation, see Settings reference.
General
The RADKit components have settings that come with default values and can be overridden at startup through various methods, persistent or non-persistent.
For example, RADKit Service has an SSH connection timeout setting expressed in seconds, that governs how long it will wait before declaring an SSH connection attempt to a device as having timed out. This setting has a default value of 15 seconds. It can be changed to, say, 30 seconds by either (from highest to lowest priority):
passing the
--setting service.ssh.connection_timeout 30argument toradkit-servicesetting the
RADKIT_SERVICE_SSH_CONNECTION_TIMEOUT=30environment variable before startingradkit-serviceadding the following lines to
~/.radkit/service/settings.toml:[service.ssh] connection_timeout = 30
The first two methods change the setting once, but the new value is not persisted. By using the third method, the new value will be read and applied every time RADKit Service starts up.
TOML settings
The RADKit Client, Service and Control support reading customized settings from a dedicated file in TOML syntax located by default within their subdirectory of the main RADKit directory:
client/settings.toml
service/settings.toml
control/settings.toml
To specify a different location for the settings file, see Special settings.
Note
It is possible to automatically write or update the TOML settings file from
the WebU using the Settings pane and then modifying any of desired values and hitting
“Apply & Save” button.
Client API
In RADKit Client, it is possible to change settings from the REPL by assigning
new values to the settings object directly (e.g. client.settings.client.logging.level = "DEBUG") or
in a script using the Client Settings API as the example shown below:
from radkit_client import Client
# Load specific settings from config file
with Client.create() as client:
# Check specific setting from config file
print(client.settings.client.logging.level)
# You can modify the `client.settings` object directly.
client.settings.client.logging.session_log_max_age = 30
client.settings.client.logging.level = "DEBUG"
Environment variables
This section contains basic instructions to set up environment variables on the OSes supported by RADKit. It is only intended as a helpful quick reference. In doubt, always refer to the documentation of your operating system.
Linux and macOS
Edit or create ~/.profile and add lines at the end, one per variable, for example:
export RADKIT_DIRECTORY="/tmp/radkit"
export RADKIT_CLOUD_CLIENT_PROXY_URL="http://proxy.example.com:80"
Note
You must start a new Terminal window (or start a new login shell) for these to take effect; the RADKit applications can then be launched from the prompt in that window as
radkit-client,radkit-service,radkit-service-guiorradkit-control(depending on which packages you have installed).This method might not work in some cases, depending on the shell you use and how it is started; always check the output of the
envcommand to be sure. You might need to edit a different file instead of~/.profile.
Windows
Global (recommended)
Right-click the Windows Start Menu icon, click System, scroll down and click Advanced system settings, then click Environment Variables…. Add your variables there one at at time, with the appropriate values, under the User variables section.
With this method, the environment variables you define will always apply to RADKit regardless of how you start it: from a Start Menu shortcut or via the CLI. To define temporary settings in a specific command prompt window, read on.
Within CMD.exe
This procedure must be repeated within each new CMD.exe window. For a permanent solution,
check out the Global (recommended) section above.
Define your variables one at a time using the set command without any quotes
(" or '), for example:
set RADKIT_DIRECTORY=C:\TEMP\RADKit
set RADKIT_CLOUD_CLIENT_PROXY_URL=http://proxy.example.com:80
Within PowerShell
This procedure must be repeated within each new PowerShell window. For a permanent solution, check out the Global (recommended) section above.
Define your variables one at a time using the $Env: syntax with double quotes ("),
for example:
$Env:RADKIT_DIRECTORY="C:\TEMP\RADKit"
$Env:RADKIT_CLOUD_CLIENT_PROXY_URL="http://proxy.example.com:80"
Running the CLI applications
Starting with RADKit 1.7.0, the Windows installer offers to add the RADKit CLI commands to
the system PATH. If you have un-selected that option, or if you have installed a previous
version of RADKit, cd to the env\Scripts subdirectory of your RADKit installation
folder and start the RADKit applications from the CLI, for example:
C:\> cd "\Program Files\Cisco RADKit\env\Scripts"
C:\Program Files\Cisco RADKit\env\Scripts> radkit-client