@@ -43,6 +43,11 @@ The ``tt`` configuration file is a YAML file with the following structure:
43
43
- path : path/to/app/templates1
44
44
- path : path/to/app/templates2
45
45
46
+ .. note ::
47
+
48
+ The ``tt `` configuration format and application layout has been changed in version
49
+ 2.0. Learn how to upgrade from earlier versions in :ref: `tt-config_migrating-from-1 `.
50
+
46
51
.. _tt-config_file_env :
47
52
48
53
env section
@@ -167,56 +172,55 @@ executable files are found in the working directory, they will be used.
167
172
168
173
.. _tt-config_migrating-from-1 :
169
174
170
- Migrating tt configuration from 1.* to 2.*
171
- ------------------------------------------
175
+ Migrating from tt 1.* to 2.0 or later
176
+ -------------------------------------
172
177
173
- In tt 2.0, incompatible changes were introduced into tt configuration and environment
174
- layout. If you have applications running on tt 1.*, take the following steps to
178
+ The ` tt ` configuration and application layout were changed in version 2.0.
179
+ If you have applications running on tt 1.*, complete the following steps to
175
180
migrate to tt 2.0 or later:
176
181
177
182
#. **Update the tt configuration file **.
178
183
In tt 2.0, the following changes were made to the configuration file:
179
184
180
- * The root section ``tt `` was removed. The sections that were directly
181
- enclosed into it, such as ``app ``, ``repo ``, and other, have been moved
182
- to the top level.
185
+ * The root section ``tt `` was removed. Its child sections -- ``app ``, ``repo ``,
186
+ ``modules ``, and other -- have been moved to the top level.
183
187
* Environment configuration parameters were moved from the ``app `` section
184
188
to the new section ``env ``. These parameters are ``instances.enabled ``,
185
189
``bin_dir ``, ``inc_dir ``, and ``restart_on_failure ``.
186
190
* The paths in the ``app `` section are now relative to the app directory in ``instances.enabled ``
187
191
instead of the environment root.
188
192
189
- #. **Move existing application artifacts **.
190
- The default location for application artifacts (logs, snapshots, and other files)
191
- in `` tt `` 1.* was the ``var `` directory inside the environment. Starting from `` tt `` 2.0,
192
- the application artifacts are created in the ``var `` directory inside the application
193
- directory, which is ``instances.enabled/<app-name> ``. Here is an example of
194
- an application directory:
193
+ #. **Move application artifacts **.
194
+ With `` tt `` 1.*, application artifacts (logs, snapshots, pid , and other files)
195
+ were created in the ``var `` directory inside the * environment root * . Starting from
196
+ `` tt `` 2.0, these artifacts are created in the ``var `` directory inside the
197
+ * application directory* , which is ``instances.enabled/<app-name> ``. This is
198
+ how an application directory looks :
195
199
196
200
.. code-block :: text
197
201
198
- instances.enabled/app/
199
- ├── init.lua
200
- ├── instances.yml
201
- └── var
202
- ├── lib
203
- │ ├── instance1
204
- │ └── instance2
205
- ├── log
206
- │ ├── instance1
207
- │ └── instance2
208
- └── run
209
- ├── instance1
210
- └── instance2
211
-
212
- To continue using existing artifacts after migration from ``tt `` 1.*:
202
+ instances.enabled/app/
203
+ ├── init.lua
204
+ ├── instances.yml
205
+ └── var
206
+ ├── lib
207
+ │ ├── instance1
208
+ │ └── instance2
209
+ ├── log
210
+ │ ├── instance1
211
+ │ └── instance2
212
+ └── run
213
+ ├── instance1
214
+ └── instance2
215
+
216
+ To continue using existing application artifacts after migration from ``tt `` 1.*:
213
217
214
218
#. Create the ``var `` directory inside the application directory.
215
219
#. Create the ``lib ``, ``log ``, and ``run `` directories inside ``var ``.
216
220
#. Move directories with instance artifacts from the old ``var `` directory
217
221
to the new ``var `` directories in applications' directories.
218
222
219
- #. **Move the files accessed from the application code **
223
+ #. **Move the files accessed from the application code **.
220
224
The working directory of instance processes was changed from the ``tt `` working
221
225
directory to the application directory inside ``instances.enabled ``. If the
222
226
application accesses files using relative paths, move the files accordingly
0 commit comments