Starting Tarantool applications
$ tt start [APPLICATION[:APP_INSTANCE]]
tt start
starts Tarantool applications. The application files must be stored
inside the instances_enabled
directory specified in the tt configuration file.
For detailed instructions on preparing and running Tarantool applications, see
Application environment and Starting and stopping instances.
See also: Stopping a Tarantool instance, Restarting a Tarantool instance, Checking instance status.
To start all instances of the application stored in the app
directory inside
instances_enabled
in accordance with its instances.yml
:
$ tt start app
To start all instances of the app
application appending their logs to stdout
(in the interactive mode):
$ tt start -i app
To start the router
instance of the app
application:
$ tt start app:router
When called without arguments, starts all enabled applications in the current environment:
$ tt start
tt start
can start entire Tarantool clusters based on their YAML configurations.
A cluster application directory inside instances_enabled
must contain the following files:
config.yaml
– a YAML configuration that defines the cluster topology and settings. It can either contain an explicit configuration in the YAML format or point to a centralized configuration storage (for Enterprise Edition).instances.yml
– a file that defines the list of cluster instances to run in the current environment.- (Optionally)
*.lua
files with code to load and run in the cluster.
For more information about Tarantool application layout, see Application environment.
Примечание
tt
also supports Tarantool applications with configuration in code,
which is considered a legacy approach since Tarantool 3.0. For information
about using tt
with such applications, refer to the Tarantool 2.11 documentation.
tt start
runs Tarantool applications in the background and uses its own watchdog
process for status checks (tt status) and application stopping (tt stop).
Важно
Do not switch on the background mode using the cluster configuration
(process.background: true
in the YAML configuration) or code (box.cfg.background = true
)
in applications that you run with tt
.
If you start such an application with tt start
, tt
won’t be able to check
the application status or stop it using the corresponding commands.
Enterprise Edition
The integrity check functionality is supported by the Enterprise Edition only.
tt start
can perform initial and periodical integrity checks of the environment,
application, and centralized configuration.
To enable integrity checks of environment and application files, you need to pack
the application using tt pack
with the --with-integrity-check
option.
This option generates and signs checksums of executables and configuration files in the current tt
environment. Learn more in Generating files for integrity checks.
To enable integrity check of the configuration at the centralized storage,
publish the configuration to this storage using tt cluster publish
with the --with-integrity-check
option.
This option generates and signs configuration checksums and saves them to the storage.
Learn more in Publishing configurations with integrity check.
To perform the integrity checks when running the application, start it with the
--integrity-check
global option.
Its argument must be a public key matching the private key that was used for
generating checksums.
$ tt --integrity-check public.pem start myapp
After such a call, tt
checks the environment, application, and configuration integrity
using the checksums and starts the application in case of the success. Then, integrity
checks are performed periodically while the application is running. By default,
they are performed once every 24 hours. You can adjust the integrity check period
by adding the --integrity-check-period
option:
$ tt --integrity-check public.pem start myapp --integrity-check-period 60
Additionally, Tarantool checks the integrity of the modules that the application uses
at the load time, that is, when require('module')
is called.
If an integrity check fails, tt
stops the application.
-
-i
,
--interactive
¶
Start the application or instance in the interactive mode. In this mode, instance logs are printed to the standard output in real time.
You can use the
SIGINT
signal (CTRL+C
) to stoptt
and its child Tarantool processes in the interactive mode. No watchdog processes are created.
-
--integrity-check-interval
NUMBER
¶ Integrity check interval in seconds. Default: 86400 (24 hours). Set this option to
0
to disable periodic checks.See also: Integrity check