Configure a standalone Driver
Set the connection, task, and integration parameters of a standalone Driver with its state file, a configuration file, environment variables, or flags.
A standalone Driver reads its parameters from five sources. A source higher in the list overrides the sources below it:
- Command line flags. See the CLI reference.
- Environment variables.
- A configuration file.
- The state file, which
synnax-driver loginwrites. - The defaults.
The parameter flags and the configuration file apply only to
synnax-driver start --standalone. The Linux and NI Linux Real-Time service always
starts with the same command. To configure the service, use login and the
environment file. Run login once, also when the environment file
holds the connection: login creates the folder of the state file, and the service
cannot.
State file
The state file holds the connection parameters that login saves, and the rack key: the
key that the Core knows this Driver by.
The --state-file flag of start --standalone, login, and clear sets a different
path. The service always uses the default path.
The state file holds the password as plain text, and each user of the computer can read and change the file. Give the Driver a user with only the Host role.
To remove the saved login and the rack key, run synnax-driver clear. On the next
start, the Driver shows in the devices toolbar as a new Driver. The old entry stays on
the Core.
Environment variables
The Driver reads each parameter from a variable named SYNNAX_DRIVER_ and the key in
upper case. The integrations have no variable.
SYNNAX_DRIVER_HOST=10.0.0.45
SYNNAX_DRIVER_PORT=9090
SYNNAX_DRIVER_USERNAME=driver
SYNNAX_DRIVER_PASSWORD=password
SYNNAX_DRIVER_SECURE=false
SYNNAX_DRIVER_CORRECT_SKEW=true
SYNNAX_DRIVER_OP_TIMEOUT=60
SYNNAX_DRIVER_POLL_INTERVAL=1
SYNNAX_DRIVER_SHUTDOWN_TIMEOUT=30
SYNNAX_DRIVER_WORKER_COUNT=4To learn what each parameter does, see Parameters.
Environment file
On Linux and NI Linux Real-Time, the service and login read /etc/synnax/driver.env.
Write one KEY=value on each line, with no export. login uses the file only for
variables such as GRPC_DEFAULT_SSL_ROOTS_FILE_PATH. It does not read the
SYNNAX_DRIVER_ variables.
install creates the file. Only root can read it, so edit it and run login as root:
with sudo on Linux, and as admin on NI Linux Real-Time. Restart the service after
you edit the file.
start --standalone does not read the file. For a Driver in a terminal, export the
variables in the shell:
export SYNNAX_DRIVER_WORKER_COUNT=8
synnax-driver start --standaloneConfiguration file
Give a JSON file to start --standalone with the --config flag. Each key is optional.
The file cannot hold comments.
{
"connection": {
"host": "10.0.0.45",
"port": 9090,
"username": "driver",
"password": "password",
"secure": false
},
"timing": {
"correct_skew": true
},
"manager": {
"op_timeout": 60,
"poll_interval": 1,
"shutdown_timeout": 30,
"worker_count": 4
},
"integrations": ["arc", "ethercat", "http", "labjack", "modbus", "ni", "opc"]
}The integrations list replaces the default list. Leave out remote_info, so that the
Driver registers with the Core on the first start and saves its rack key in the state
file.
Parameters
host= localhostThe host of the Core.
port= 9090The port of the Core.
username= synnaxThe username of the Driver user.
password= seldonThe password of the Driver user.
secure= falseConnect to the Core over TLS.
correct_skew= trueKeep the timestamps of hardware-timed NI and LabJack reads in step with the clock of the computer.
op_timeout= 60The number of seconds after which a task operation that has not finished, such as a start, gives the task the error
operation timed out.poll_interval= 1The number of seconds between two checks for task operations that have not finished.
shutdown_timeout= 30The number of seconds that the Driver waits for task operations when it stops.
worker_count= 4The number of threads that run task operations. Use a value from 1 to 64.
rack_key= 0The key that the Core knows this Driver by. With 0, or when the Core has no such key, the Driver registers as a new Driver named after the host name of the computer.
cluster_key= nil UUIDThe key of the Core that owns
rack_key. When it is not the key of the Core, the Driver ignoresrack_keyand registers as a new Driver, so set both keys.integrations= allThe device integrations to run:
arc,ethercat,http,labjack,modbus,ni, andopc. NI Linux RT has nomodbus.
For a boolean environment variable, use true or false.