Configuration
The key artifact that defines the tt
environment and various aspects of its
execution is its configuration file.
By default, the configuration file is called tarantool.yaml
. The location
where tt
searches for it depends on the launch mode.
You can also pass the configuration file explicitly in the --cfg
argument.
The tt
configuration file is a YAML file with the following content:
tt:
modules:
directory: path/to/modules/dir
app:
instances_available: path/to/available/applications
run_dir: path/to/run_dir
log_dir: path/to/log_dir
log_maxsize: num (MB)
log_maxage: num (days)
log_maxbackups: num
restart_on_failure: bool
directory
– the directory where external modules are stored.
instances_available
– the directory where instances are stored.run_dir
– the directory for instance runtime artifacts, such as console sockets or PID files.log_dir
– the directory where log files are stored.log_maxsize
– the maximum size of the log file before it gets rotated, in megabytes. Default: 100.log_maxage
– the maximum age of log files in days. The age of a log file is defined by the timestamp encoded in its name. Default: not defined (log files aren’t deleted based on their age).Примечание
A day is defined as exactly 24 hours. It may not exactly correspond to calendar days due to daylight savings, leap seconds, and other time adjustments.
log_maxbackups
– the maximum number of stored log files. Default: not defined (log files aren’t deleted based on their count).restart_on_failure
– restart the instance on failure:true
orfalse
. Default:false
.
tt
launch mode defines its working directory and the way it searches for the
configuration file. There are three launch modes:
- default
- system
- local
Argument: none
Configuration file: searched from the current directory to the root.
Taken from /etc/tarantool
if the file is not found.
Working directory: The directory where the configuration file is found.
Argument: --system
or -S
Configuration file: Taken from /etc/tarantool
.
Working directory: Current directory.
Argument: --local=DIRECTORY
or -L=DIRECTORY
Configuration file: Searched from the specified directory to the root.
Taken from /etc/tarantool
if the file is not found.
Working directory: The specified directory. If tarantool
or tt
executable files are found in the working directory, they will be used.