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 30 argument to radkit-service

  • setting the RADKIT_SERVICE_SSH_CONNECTION_TIMEOUT=30 environment variable before starting radkit-service

  • adding 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

Using RADKit Client, it is also possible to change settings from the REPL or a script using the Client Settings API:

from radkit_client.sync import change_settings
from radkit_common.settings import deinit_settings, init_settings


# Load settings from config file
deinit_settings()
init_settings("/opt/radkit/my-custom-settings.toml")

# Change some specific settings
change_settings(
    '{"cloud_client": {"oauth_provider": "custom-oauth", "token_refresh_check_interval": 100}}'
)

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-gui or radkit-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 env command to be sure. You might need to edit a different file instead of ~/.profile.

Windows

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