Skip to content

Commit 0952d19

Browse files
committed
updated pot
1 parent 6d966b6 commit 0952d19

File tree

4 files changed

+393
-533
lines changed

4 files changed

+393
-533
lines changed

locale/en/book/admin/instance_config.pot

Lines changed: 167 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -8,185 +8,256 @@ msgid ""
88
msgstr ""
99
"Project-Id-Version: Tarantool 3.0\n"
1010
"Report-Msgid-Bugs-To: \n"
11-
"POT-Creation-Date: 2023-11-17 14:22+0000\n"
11+
"POT-Creation-Date: 2023-12-20 07:42+0000\n"
1212
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1313
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
1414
"Language-Team: LANGUAGE <[email protected]>\n"
1515
"MIME-Version: 1.0\n"
1616
"Content-Type: text/plain; charset=UTF-8\n"
1717
"Content-Transfer-Encoding: 8bit\n"
1818

19-
#: ../../doc/book/admin/instance_config.rst:4
20-
msgid "Instance configuration"
21-
msgstr ""
22-
2319
#: ../../doc/book/admin/instance_config.rst:6
24-
msgid "For each Tarantool instance, you need two files:"
20+
msgid "Application environment"
2521
msgstr ""
2622

2723
#: ../../doc/book/admin/instance_config.rst:8
28-
msgid "[Optional] An :ref:`application file <app_server-launching_app>` with instance-specific logic. Put this file into the ``/usr/share/tarantool/`` directory."
24+
msgid "This section provides a high-level overview on how to prepare a Tarantool application for deployment and how the application's environment and layout might look. This information is helpful for understanding how to administer Tarantool instances using :ref:`tt CLI <tt-cli>` in both development and production environments."
2925
msgstr ""
3026

3127
#: ../../doc/book/admin/instance_config.rst:12
32-
msgid "For example, ``/usr/share/tarantool/my_app.lua`` (here we implement it as a :ref:`Lua module <app_server-modules>` that bootstraps the database and exports ``start()`` function for API calls):"
28+
msgid "The main steps of creating and preparing the application for deployment are:"
29+
msgstr ""
30+
31+
#: ../../doc/book/admin/instance_config.rst:14
32+
msgid ":ref:`admin-instance_config-init-environment`."
3333
msgstr ""
3434

3535
#: ../../doc/book/admin/instance_config.rst:16
36-
msgid "local function start()\n"
37-
" box.schema.space.create(\"somedata\")\n"
38-
" box.space.somedata:create_index(\"primary\")\n"
39-
" <...>\n"
40-
"end\n"
41-
"\n"
42-
"return {\n"
43-
" start = start;\n"
44-
"}"
36+
msgid ":ref:`admin-instance_config-develop-app`."
4537
msgstr ""
4638

47-
#: ../../doc/book/admin/instance_config.rst:28
48-
msgid "An :ref:`instance file <admin-instance_file>` with instance-specific initialization logic and parameters. Put this file, or a symlink to it, into the **instance directory** (see ``instances_enabled`` parameter in :ref:`tt configuration file <tt-config_file>`)."
39+
#: ../../doc/book/admin/instance_config.rst:18
40+
msgid ":ref:`admin-instance_config-package-app`."
4941
msgstr ""
5042

51-
#: ../../doc/book/admin/instance_config.rst:33
52-
msgid "For example, ``/etc/tarantool/instances.enabled/my_app.lua`` (here we load ``my_app.lua`` module and make a call to ``start()`` function from that module):"
43+
#: ../../doc/book/admin/instance_config.rst:20
44+
msgid "In this section, a `sharded_cluster <https://github.com/tarantool/doc/tree/latest/doc/code_snippets/snippets/sharding/instances.enabled/sharded_cluster>`_ application is used as an example. This cluster includes 5 instances: one router and 4 storages, which constitute two replica sets."
5345
msgstr ""
5446

55-
#: ../../doc/book/admin/instance_config.rst:37
56-
msgid "#!/usr/bin/env tarantool\n"
57-
"\n"
58-
"box.cfg {\n"
59-
" listen = 3301;\n"
60-
"}\n"
61-
"\n"
62-
"-- load my_app module and call start() function\n"
63-
"-- with some app options controlled by sysadmins\n"
64-
"local m = require('my_app').start({...})"
47+
#: ../../doc/book/admin/instance_config.rst:None
48+
#: ../../doc/book/admin/instance_config.rst:0
49+
#: ../../doc/book/admin/instance_config.rst:0
50+
msgid "Cluster topology"
6551
msgstr ""
6652

67-
#: ../../doc/book/admin/instance_config.rst:52
68-
msgid "Instance file"
53+
#: ../../doc/book/admin/instance_config.rst:34
54+
msgid "Initializing a local environment"
6955
msgstr ""
7056

71-
#: ../../doc/book/admin/instance_config.rst:54
72-
msgid "After this short introduction, you may wonder what an instance file is, what it is for, and how ``tt`` uses it. After all, Tarantool is an application server, so why not start the application stored in ``/usr/share/tarantool`` directly?"
57+
#: ../../doc/book/admin/instance_config.rst:36
58+
msgid "Before creating an application, you need to set up a local environment for ``tt``:"
7359
msgstr ""
7460

75-
#: ../../doc/book/admin/instance_config.rst:59
76-
msgid "A typical Tarantool application is not a script, but a daemon running in background mode and processing requests, usually sent to it over a TCP/IP socket. This daemon needs to be started automatically when the operating system starts, and managed with the operating system standard tools for service management -- such as ``systemd`` or ``init.d``. To serve this very purpose, we created **instance files**."
61+
#: ../../doc/book/admin/instance_config.rst:38
62+
msgid "Create a home directory for the environment."
63+
msgstr ""
64+
65+
#: ../../doc/book/admin/instance_config.rst:40
66+
msgid "Run ``tt init`` in this directory:"
67+
msgstr ""
68+
69+
#: ../../doc/book/admin/instance_config.rst:42
70+
msgid "~/myapp$ tt init\n"
71+
" • Environment config is written to 'tt.yaml'"
72+
msgstr ""
73+
74+
#: ../../doc/book/admin/instance_config.rst:47
75+
msgid "This command creates a default ``tt`` configuration file ``tt.yaml`` for a local environment and the directories for applications, control sockets, logs, and other artifacts:"
76+
msgstr ""
77+
78+
#: ../../doc/book/admin/instance_config.rst:51
79+
msgid "~/myapp$ ls\n"
80+
"bin distfiles include instances.enabled modules templates tt.yaml"
81+
msgstr ""
82+
83+
#: ../../doc/book/admin/instance_config.rst:56
84+
msgid "Find detailed information about the ``tt`` configuration parameters and launch modes on the :ref:`tt configuration page <tt-config>`."
7785
msgstr ""
7886

7987
#: ../../doc/book/admin/instance_config.rst:66
80-
msgid "You can have more than one instance file. For example, a single application in ``/usr/share/tarantool`` can run in multiple instances, each of them having its own instance file. Or you can have multiple applications in ``/usr/share/tarantool`` -- again, each of them having its own instance file."
88+
msgid "Creating and developing an application"
8189
msgstr ""
8290

83-
#: ../../doc/book/admin/instance_config.rst:71
84-
msgid "An instance file is typically created by a system administrator. An application file is often provided by a developer, in a Lua rock or an rpm/deb package."
91+
#: ../../doc/book/admin/instance_config.rst:68
92+
msgid "You can create an application in two ways:"
8593
msgstr ""
8694

87-
#: ../../doc/book/admin/instance_config.rst:74
88-
msgid "An instance file is designed to not differ in any way from a Lua application. It must, however, configure the database, i.e. contain a call to :doc:`box.cfg{} </reference/reference_lua/box_cfg>` somewhere in it, because it’s the only way to turn a Tarantool script into a background process, and ``tt`` is a tool to manage background processes. Other than that, an instance file may contain arbitrary Lua code, and, in theory, even include the entire application business logic in it. We, however, do not recommend this, since it clutters the instance file and leads to unnecessary copy-paste when you need to run multiple instances of an application."
95+
#: ../../doc/book/admin/instance_config.rst:70
96+
msgid "Manually by preparing its layout in a directory inside ``instances_enabled``. The directory name is used as the application identifier."
8997
msgstr ""
9098

91-
#: ../../doc/book/admin/instance_config.rst:87
92-
msgid "Preloading Lua scripts and modules"
99+
#: ../../doc/book/admin/instance_config.rst:73
100+
msgid "From a template by using the :ref:`tt create <tt-create>` command."
93101
msgstr ""
94102

95-
#: ../../doc/book/admin/instance_config.rst:89
96-
msgid "Tarantool supports loading and running chunks of Lua code before the loading instance file. To load or run Lua code immediately upon Tarantool startup, specify the ``TT_PRELOAD`` environment variable. Its value can be either a path to a Lua script or a Lua module name:"
103+
#: ../../doc/book/admin/instance_config.rst:75
104+
msgid "In this example, the application's layout is prepared manually and looks as follows."
97105
msgstr ""
98106

99-
#: ../../doc/book/admin/instance_config.rst:93
100-
msgid "To run the Lua script ``script.lua`` from the ``preload/path/`` directory inside the working directory in Tarantool before ``main.lua``, set ``TT_PRELOAD`` as follows:"
107+
#: ../../doc/book/admin/instance_config.rst:77
108+
msgid "~/myapp$ tree\n"
109+
".\n"
110+
"├── bin\n"
111+
"├── distfiles\n"
112+
"├── include\n"
113+
"├── instances.enabled\n"
114+
"│ └── sharded_cluster\n"
115+
"│ ├── config.yaml\n"
116+
"│ ├── instances.yaml\n"
117+
"│ ├── router.lua\n"
118+
"│ ├── sharded_cluster-scm-1.rockspec\n"
119+
"│ └── storage.lua\n"
120+
"├── modules\n"
121+
"├── templates\n"
122+
"└── tt.yaml"
101123
msgstr ""
102124

103125
#: ../../doc/book/admin/instance_config.rst:96
104-
msgid "$ TT_PRELOAD=/preload/path/script.lua tarantool main.lua"
126+
msgid "The ``sharded_cluster`` directory contains the following files:"
127+
msgstr ""
128+
129+
#: ../../doc/book/admin/instance_config.rst:98
130+
msgid "``config.yaml``: contains the :ref:`configuration <configuration>` of the cluster. This file might include the entire cluster topology or provide connection settings to a centralized configuration storage."
131+
msgstr ""
132+
133+
#: ../../doc/book/admin/instance_config.rst:99
134+
msgid "``instances.yml``: specifies instances to run in the current environment. For example, on the developer’s machine, this file might include all the instances defined in the cluster configuration. In the production environment, this file includes :ref:`instances to run on the specific machine <admin-instances_to_run>`."
105135
msgstr ""
106136

107137
#: ../../doc/book/admin/instance_config.rst:100
108-
msgid "Tarantool runs the ``script.lua`` code, waits for it to complete, and then starts running ``main.lua``."
138+
msgid "``router.lua``: includes code specific for a :ref:`router <vshard-architecture-router>`."
109139
msgstr ""
110140

111-
#: ../../doc/book/admin/instance_config.rst:103
112-
msgid "To load the ``preload.module`` into the Tarantool Lua interpreter executing ``main.lua``, set ``TT_PRELOAD`` as follows:"
141+
#: ../../doc/book/admin/instance_config.rst:101
142+
msgid "``sharded_cluster-scm-1.rockspec``: specifies the required external dependencies (for example, ``vshard``)."
113143
msgstr ""
114144

115-
#: ../../doc/book/admin/instance_config.rst:106
116-
msgid "$ TT_PRELOAD=preload.module tarantool main.lua"
145+
#: ../../doc/book/admin/instance_config.rst:102
146+
msgid "``storage.lua``: includes code specific for :ref:`storages <vshard-architecture-storage>`."
117147
msgstr ""
118148

119-
#: ../../doc/book/admin/instance_config.rst:110
120-
msgid "Tarantool loads the ``preload.module`` code into the interpreter and starts running ``main.lua`` as if its first statement was ``require('preload.module')``."
149+
#: ../../doc/book/admin/instance_config.rst:104
150+
msgid "You can find the full example here: `sharded_cluster <https://github.com/tarantool/doc/tree/latest/doc/code_snippets/snippets/sharding/instances.enabled/sharded_cluster>`_."
121151
msgstr ""
122152

123-
#: ../../doc/book/admin/instance_config.rst:115
124-
msgid "``TT_PRELOAD`` values that end with ``.lua`` are considered scripts, so avoid module names with this ending."
153+
#: ../../doc/book/admin/instance_config.rst:114
154+
msgid "Packaging the application"
125155
msgstr ""
126156

127-
#: ../../doc/book/admin/instance_config.rst:118
128-
msgid "To load several scripts or modules, pass them in a single quoted string, separated by semicolons:"
157+
#: ../../doc/book/admin/instance_config.rst:116
158+
msgid "To package the ready application, use the :ref:`tt pack <tt-pack>` command. This command can create an installable DEB/RPM package or generate ``.tgz`` archive."
129159
msgstr ""
130160

131-
#: ../../doc/book/admin/instance_config.rst:121
132-
msgid "$ TT_PRELOAD=\"/preload/path/script.lua;preload.module\" tarantool main.lua"
161+
#: ../../doc/book/admin/instance_config.rst:119
162+
msgid "The structure below reflects the content of the packed ``.tgz`` archive for the `sharded_cluster <https://github.com/tarantool/doc/tree/latest/doc/code_snippets/snippets/sharding/instances.enabled/sharded_cluster>`_ application:"
133163
msgstr ""
134164

135-
#: ../../doc/book/admin/instance_config.rst:125
136-
msgid "In the preload script, the three dots (``...``) value contains the module name if you're preloading a module or the path to the script if you're running a script."
165+
#: ../../doc/book/admin/instance_config.rst:121
166+
msgid "~/myapp$ tree -a\n"
167+
".\n"
168+
"├── bin\n"
169+
"│ ├── tarantool\n"
170+
"│ └── tt\n"
171+
"├── include\n"
172+
"├── instances.enabled\n"
173+
"│ └── sharded_cluster -> ../sharded_cluster\n"
174+
"├── modules\n"
175+
"├── sharded_cluster\n"
176+
"│ ├── .rocks\n"
177+
"│ │ └── share\n"
178+
"│ │ └── ...\n"
179+
"│ ├── config.yaml\n"
180+
"│ ├── instances.yaml\n"
181+
"│ ├── router.lua\n"
182+
"│ ├── sharded_cluster-scm-1.rockspec\n"
183+
"│ └── storage.lua\n"
184+
"└── tt.yaml"
137185
msgstr ""
138186

139-
#: ../../doc/book/admin/instance_config.rst:128
140-
msgid "The :ref:`arg <index-init_label>` value from the main script is visible in the preload script or module."
187+
#: ../../doc/book/admin/instance_config.rst:144
188+
msgid "The application's layout looks similar to the one defined when :ref:`developing the application <admin-instance_config-develop-app>` with some differences:"
141189
msgstr ""
142190

143-
#: ../../doc/book/admin/instance_config.rst:131
144-
msgid "For example, when preloading this script:"
191+
#: ../../doc/book/admin/instance_config.rst:146
192+
msgid "``bin``: contains the ``tarantool`` and ``tt`` binaries packed with the application bundle."
145193
msgstr ""
146194

147-
#: ../../doc/book/admin/instance_config.rst:133
148-
msgid "-- preload.lua --\n"
149-
"print(\"Preloading:\")\n"
150-
"print(\"... arg is:\", ...)\n"
151-
"print(\"Passed args:\", arg[1], arg[2])"
195+
#: ../../doc/book/admin/instance_config.rst:148
196+
msgid "``instances.enabled``: contains a symlink to the packed ``sharded_cluster`` application."
152197
msgstr ""
153198

154-
#: ../../doc/book/admin/instance_config.rst:140
155-
msgid "You get the following output:"
199+
#: ../../doc/book/admin/instance_config.rst:150
200+
msgid "``sharded_cluster``: a packed application. In addition to files created during the application development, includes the ``.rocks`` directory containing application dependencies (for example, ``vshard``)."
156201
msgstr ""
157202

158-
#: ../../doc/book/admin/instance_config.rst:142
159-
msgid "$ TT_PRELOAD=preload.lua tarantool main.lua arg1 arg2\n"
160-
"Preloading:\n"
161-
"... arg is: preload.lua\n"
162-
"Passed args: arg1 arg2\n"
163-
"'strip_core' is set but unsupported\n"
164-
"... main/103/main.lua I> Tarantool 2.11.0-0-g247a9a4 Darwin-x86_64-Release\n"
165-
"... main/103/main.lua I> log level 5\n"
166-
"... main/103/main.lua I> wal/engine cleanup is paused\n"
167-
"< ... >"
203+
#: ../../doc/book/admin/instance_config.rst:152
204+
msgid "``tt.yaml``: a ``tt`` configuration file."
168205
msgstr ""
169206

170-
#: ../../doc/book/admin/instance_config.rst:154
171-
msgid "If an error happens during the execution of the preload script or module, Tarantool reports the problem and exits."
207+
#: ../../doc/book/admin/instance_config.rst:159
208+
msgid "Instances to run"
172209
msgstr ""
173210

174-
#: ../../doc/book/admin/instance_config.rst:160
175-
msgid "tt configuration file"
211+
#: ../../doc/book/admin/instance_config.rst:161
212+
msgid "One more difference for a deployed application is the content of the ``instances.yaml`` file that specifies instances to run in the current environment."
176213
msgstr ""
177214

178-
#: ../../doc/book/admin/instance_config.rst:162
179-
msgid "While instance files contain instance configuration, the :ref:`tt <tt-cli>` configuration file contains the configuration that ``tt`` uses to set up the application environment. This includes the path to instance files, various working directories, and other parameters that connect the application to the system."
215+
#: ../../doc/book/admin/instance_config.rst:163
216+
msgid "On the developer's machine, this file might include all the instances defined in the cluster configuration."
180217
msgstr ""
181218

182-
#: ../../doc/book/admin/instance_config.rst:167
183-
msgid "To create a default ``tt`` configuration, run ``tt init``. This creates a ``tt.yaml`` configuration file. Its location depends on the :ref:`tt launch mode <tt-config_modes>` (system or local)."
219+
#: ../../doc/book/admin/instance_config.rst:170
220+
msgid "``instances.yaml``:"
184221
msgstr ""
185222

186-
#: ../../doc/book/admin/instance_config.rst:171
187-
msgid "Some ``tt`` configuration parameters are similar to those used by :doc:`box.cfg{} </reference/reference_lua/box_cfg>`, for example, ``memxt_dir`` or ``wal_dir``. Other parameters define the ``tt`` environment, for example, paths to installation files used by ``tt`` or to connected :ref:`external modules <tt-external_modules>`."
223+
#: ../../doc/book/admin/instance_config.rst:172
224+
msgid "storage-a-001:\n"
225+
"storage-a-002:\n"
226+
"storage-b-001:\n"
227+
"storage-b-002:\n"
228+
"router-a-001:"
188229
msgstr ""
189230

190231
#: ../../doc/book/admin/instance_config.rst:176
191-
msgid "Find the detailed information about the ``tt`` configuration parameters and launch modes on the :ref:`tt configuration page <tt-config>`."
232+
msgid "In the production environment, this file includes instances to run on the specific machine."
233+
msgstr ""
234+
235+
#: ../../doc/book/admin/instance_config.rst:183
236+
msgid "``instances.yaml`` (Server-001):"
237+
msgstr ""
238+
239+
#: ../../doc/book/admin/instance_config.rst:185
240+
msgid "router-a-001:"
241+
msgstr ""
242+
243+
#: ../../doc/book/admin/instance_config.rst:189
244+
msgid "``instances.yaml`` (Server-002):"
245+
msgstr ""
246+
247+
#: ../../doc/book/admin/instance_config.rst:191
248+
msgid "storage-a-001:\n"
249+
"storage-b-001:"
250+
msgstr ""
251+
252+
#: ../../doc/book/admin/instance_config.rst:196
253+
msgid "``instances.yaml`` (Server-003):"
254+
msgstr ""
255+
256+
#: ../../doc/book/admin/instance_config.rst:198
257+
msgid "storage-a-002:\n"
258+
"storage-b-002:"
259+
msgstr ""
260+
261+
#: ../../doc/book/admin/instance_config.rst:204
262+
msgid "The :ref:`Starting and stopping instances <admin-start_stop_instance>` section describes how to start and stop Tarantool instances."
192263
msgstr ""

0 commit comments

Comments
 (0)