@@ -28,8 +28,7 @@ For each Tarantool instance, you need two files:
2828 * An :ref: `instance file <admin-instance_file >` with
2929 instance-specific initialization logic and parameters. Put this file, or a
3030 symlink to it, into the **instance directory **
31- (see :ref: `instance_dir <admin-instance_dir >` parameter in ``tarantoolctl ``
32- configuration file).
31+ (see ``instances_enabled `` parameter in :ref: `tt configuration file <tt-config_file >`).
3332
3433 For example, ``/etc/tarantool/instances.enabled/my_app.lua `` (here we load
3534 ``my_app.lua `` module and make a call to ``start() `` function from that
@@ -53,7 +52,7 @@ Instance file
5352-------------
5453
5554After this short introduction, you may wonder what an instance file is, what it
56- is for, and how ``tarantoolctl `` uses it. After all, Tarantool is an application
55+ is for, and how ``tt `` uses it. After all, Tarantool is an application
5756server, so why not start the application stored in ``/usr/share/tarantool ``
5857directly?
5958
@@ -76,7 +75,7 @@ An instance file is designed to not differ in any way from a Lua application.
7675It must, however, configure the database, i.e. contain a call to
7776:doc: `box.cfg{} </reference/reference_lua/box_cfg >` somewhere in it, because it’s the
7877only way to turn a Tarantool script into a background process, and
79- ``tarantoolctl `` is a tool to manage background processes. Other than that, an
78+ ``tt `` is a tool to manage background processes. Other than that, an
8079instance file may contain arbitrary Lua code, and, in theory, even include the
8180entire application business logic in it. We, however, do not recommend this,
8281since it clutters the instance file and leads to unnecessary copy-paste when
@@ -155,82 +154,24 @@ You get the following output:
155154 If an error happens during the execution of the preload script or module, Tarantool
156155reports the problem and exits.
157156
158- .. _admin-tarantoolctl_config_file :
157+ .. _admin-tt_config_file :
159158
160- tarantoolctl configuration file
161- -------------------------------
159+ tt configuration file
160+ ---------------------
162161
163- While instance files contain instance configuration, the ``tarantoolctl ``
164- configuration file contains the configuration that ``tarantoolctl `` uses to
165- override instance configuration. In other words, it contains system-wide
166- configuration defaults. If ``tarantoolctl `` fails to find this file with
167- the method described in section
168- :ref: `Starting/stopping an instance <admin-start_stop_instance >`, it uses
169- default settings.
162+ While instance files contain instance configuration, the :ref: `tt <tt-cli >` configuration file
163+ contains the configuration that ``tt `` uses to set up the application environment.
164+ This includes the path to instance files, various working directories, and other
165+ parameters that connect the application to the system.
170166
171- Most of the parameters are similar to those used by
172- :doc: `box.cfg{} </reference/reference_lua/box_cfg >`. Here are the default settings
173- (possibly installed in ``/etc/default/tarantool `` or ``/etc/sysconfig/tarantool ``
174- as part of Tarantool distribution -- see OS-specific default paths in
175- :ref: `Notes for operating systems <admin-os_notes >`):
167+ To create a default ``tt `` configuration, run ``tt init ``. This creates a ``tt.yaml ``
168+ configuration file. Its location depends on the :ref: `tt launch mode <tt-config_modes >`
169+ (system or local).
176170
177- .. code-block :: lua
178-
179- default_cfg = {
180- pid_file = "/var/run/tarantool",
181- wal_dir = "/var/lib/tarantool",
182- memtx_dir = "/var/lib/tarantool",
183- vinyl_dir = "/var/lib/tarantool",
184- log = "/var/log/tarantool",
185- username = "tarantool",
186- language = "Lua",
187- }
188- instance_dir = "/etc/tarantool/instances.enabled"
189-
190- where:
191-
192- * | ``pid_file ``
193- | Directory for the pid file and control-socket file; ``tarantoolctl`` will
194- add “/instance_name” to the directory name.
195-
196- * | ``wal_dir ``
197- | Directory for write-ahead .xlog files; ``tarantoolctl`` will add
198- "/instance_name" to the directory name.
199-
200- * | ``memtx_dir ``
201- | Directory for snapshot .snap files; ``tarantoolctl`` will add
202- "/instance_name" to the directory name.
203-
204- * | ``vinyl_dir ``
205- | Directory for vinyl files; ``tarantoolctl`` will add "/instance_name" to the
206- directory name.
207-
208- * | ``log ``
209- | The place where the application log will go; ``tarantoolctl`` will add
210- "/instance_name.log" to the name.
211-
212- * | ``username ``
213- | The user that runs the Tarantool instance. This is the operating-system user
214- name rather than the Tarantool-client user name. Tarantool will change its
215- effective user to this user after becoming a daemon.
216-
217- * | ``language ``
218- | The :ref:`interactive console <interactive_console>` language. Can be either ``Lua`` or ``SQL``.
219-
220- .. _admin-instance_dir :
221-
222- * | ``instance_dir ``
223- | The directory where all instance files for this host are stored. Put
224- instance files in this directory, or create symbolic links.
225-
226- The default instance directory depends on Tarantool's ``WITH_SYSVINIT ``
227- build option: when ON, it is ``/etc/tarantool/instances.enabled ``,
228- otherwise (OFF or not set) it is ``/etc/tarantool/instances.available ``.
229- The latter case is typical for Tarantool builds for Linux distros with
230- ``systemd ``.
231-
232- To check the build options, say ``tarantool --version ``.
171+ Some ``tt `` configuration parameters are similar to those used by
172+ :doc: `box.cfg{} </reference/reference_lua/box_cfg >`, for example, ``memxt_dir ``
173+ or ``wal_dir ``. Other parameters define the ``tt `` environment, for example,
174+ paths to installation files used by ``tt `` or to connected :ref: `external modules <tt-external_modules >`.
233175
234- As a full-featured example, you can take
235- `example.lua <https://github.com/tarantool/tarantool/blob/2.1/extra/dist/example.lua >`_
236- script that ships with Tarantool and defines all configuration options.
176+ Find the detailed information about the ``tt `` configuration parameters and launch modes
177+ on the :ref: `tt configuration page <tt-config >`.
0 commit comments