Skip to content

Commit 6cef2a0

Browse files
committed
Roles: configuration reference
1 parent d77da3b commit 6cef2a0

File tree

1 file changed

+108
-3
lines changed

1 file changed

+108
-3
lines changed

doc/reference/configuration/configuration_reference.rst

+108-3
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,100 @@ This topic describes all :ref:`configuration parameters <configuration>` provide
1111
Most of the configuration options described in this reference can be applied to a specific instance, replica set, group, or to all instances globally.
1212
To do so, you need to define the required option at the :ref:`specified level <configuration_scopes>`.
1313

14+
15+
16+
.. _configuration_reference_app:
17+
18+
app
19+
---
20+
21+
Using Tarantool as an application server, you can run your own Lua applications.
22+
In the ``app`` section, you can load the application and provide an application configuration in the ``app.cfg`` section.
23+
24+
.. NOTE::
25+
26+
``app`` can be defined in any :ref:`scope <configuration_scopes>`.
27+
28+
- :ref:`app.cfg <configuration_reference_app_cfg>`
29+
- :ref:`app.file <configuration_reference_app_file>`
30+
- :ref:`app.module <configuration_reference_app_module>`
31+
32+
33+
.. _configuration_reference_app_cfg:
34+
35+
.. confval:: app.cfg
36+
37+
**Since:** :doc:`3.0.0 </release/3.0.0>`.
38+
39+
A configuration of the application loaded using ``app.file`` or ``app.module``.
40+
41+
**Example**
42+
43+
In the example below, the application is loaded from the ``myapp.lua`` file placed next to the YAML configuration file:
44+
45+
.. literalinclude:: /code_snippets/snippets/config/instances.enabled/application/config.yaml
46+
:language: yaml
47+
:end-at: greeting
48+
:dedent:
49+
50+
Example on GitHub: `application <https://github.com/tarantool/doc/tree/latest/doc/code_snippets/snippets/config/instances.enabled/application>`_
51+
52+
|
53+
| Type: map
54+
| Default: nil
55+
| Environment variable: TT_APP_CFG
56+
57+
58+
.. _configuration_reference_app_file:
59+
60+
.. confval:: app.file
61+
62+
**Since:** :doc:`3.0.0 </release/3.0.0>`.
63+
64+
A path to a Lua file to load an application from.
65+
66+
|
67+
| Type: string
68+
| Default: nil
69+
| Environment variable: TT_APP_FILE
70+
71+
72+
.. _configuration_reference_app_module:
73+
74+
.. confval:: app.module
75+
76+
**Since:** :doc:`3.0.0 </release/3.0.0>`.
77+
78+
A Lua module to load an application from.
79+
80+
**Example**
81+
82+
The ``app`` section can be placed in any :ref:`configuration scope <configuration_scopes>`.
83+
As an example use case, you can provide different applications for storages and routers in a sharded cluster:
84+
85+
.. code-block:: yaml
86+
87+
groups:
88+
storages:
89+
app:
90+
module: storage
91+
# ...
92+
routers:
93+
app:
94+
module: router
95+
# ...
96+
97+
|
98+
| Type: string
99+
| Default: nil
100+
| Environment variable: TT_APP_MODULE
101+
102+
103+
104+
105+
106+
107+
14108
.. _configuration_reference_audit:
15109

16110
audit_log
@@ -2586,8 +2680,8 @@ The ``process`` section defines configuration parameters of the Tarantool proces
25862680
If not specified, defaults to the current working directory.
25872681

25882682
Other directory and file parameters, if set as relative paths,
2589-
are interpreted as relative to ``process.work_dir``. For example,
2590-
:ref:`directories for storing snapshots and write-ahead logs <configuration_options_directories>`
2683+
are interpreted as relative to ``process.work_dir``, for example, directories for storing
2684+
:ref:`snapshots and write-ahead logs <configuration_persistence>`.
25912685

25922686
|
25932687
| Type: string
@@ -2974,7 +3068,7 @@ The ``replication`` section defines configuration parameters related to :ref:`re
29743068
roles
29753069
-----
29763070

2977-
This section describes configuration parameters related to roles.
3071+
This section describes configuration parameters related to :ref:`application roles <application_roles>`.
29783072

29793073
.. NOTE::
29803074

@@ -2990,6 +3084,11 @@ This section describes configuration parameters related to roles.
29903084

29913085
**Since:** :doc:`3.0.0 </release/3.0.0>`.
29923086

3087+
Specify the roles of an instance.
3088+
To specify a role's configuration, use the :ref:`roles_cfg <configuration_reference_roles_cfg>` option.
3089+
3090+
See also: :ref:`configuration_application_roles`
3091+
29933092
|
29943093
| Type: array
29953094
| Default: nil
@@ -3002,6 +3101,12 @@ This section describes configuration parameters related to roles.
30023101

30033102
**Since:** :doc:`3.0.0 </release/3.0.0>`.
30043103

3104+
Specify a role's configuration.
3105+
This option accepts a role name as the key and a role's configuration as the value.
3106+
To specify the roles of an instance, use the :ref:`roles <configuration_reference_roles>` option.
3107+
3108+
See also: :ref:`configuration_application_roles`
3109+
30053110
|
30063111
| Type: map
30073112
| Default: nil

0 commit comments

Comments
 (0)