Skip to content

Commit 02049d3

Browse files
committed
Fix
1 parent 7f0cb82 commit 02049d3

File tree

1 file changed

+33
-29
lines changed

1 file changed

+33
-29
lines changed

doc/reference/tooling/tt_cli/configuration.rst

Lines changed: 33 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,11 @@ The ``tt`` configuration file is a YAML file with the following structure:
4343
- path: path/to/app/templates1
4444
- path: path/to/app/templates2
4545
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+
4651
.. _tt-config_file_env:
4752

4853
env section
@@ -167,56 +172,55 @@ executable files are found in the working directory, they will be used.
167172

168173
.. _tt-config_migrating-from-1:
169174

170-
Migrating tt configuration from 1.* to 2.*
171-
------------------------------------------
175+
Migrating from tt 1.* to 2.0 or later
176+
-------------------------------------
172177

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
175180
migrate to tt 2.0 or later:
176181

177182
#. **Update the tt configuration file**.
178183
In tt 2.0, the following changes were made to the configuration file:
179184

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.
183187
* Environment configuration parameters were moved from the ``app`` section
184188
to the new section ``env``. These parameters are ``instances.enabled``,
185189
``bin_dir``, ``inc_dir``, and ``restart_on_failure``.
186190
* The paths in the ``app`` section are now relative to the app directory in ``instances.enabled``
187191
instead of the environment root.
188192

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:
195199

196200
.. code-block:: text
197201
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.*:
213217

214218
#. Create the ``var`` directory inside the application directory.
215219
#. Create the ``lib``, ``log``, and ``run`` directories inside ``var``.
216220
#. Move directories with instance artifacts from the old ``var`` directory
217221
to the new ``var`` directories in applications' directories.
218222

219-
#. **Move the files accessed from the application code**
223+
#. **Move the files accessed from the application code**.
220224
The working directory of instance processes was changed from the ``tt`` working
221225
directory to the application directory inside ``instances.enabled``. If the
222226
application accesses files using relative paths, move the files accordingly

0 commit comments

Comments
 (0)