Skip to content

Commit bc8448e

Browse files
authored
Add tt pack DEB/RPM content description (#4206)
Resolves #4078
1 parent 42f3050 commit bc8448e

File tree

2 files changed

+45
-5
lines changed

2 files changed

+45
-5
lines changed

doc/book/admin/instance_config.rst

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,14 +151,23 @@ The application's layout looks similar to the one defined when :ref:`developing
151151

152152
- ``tt.yaml``: a ``tt`` configuration file.
153153

154+
.. note::
154155

156+
In DEB/PRM packages generated by :ref:`tt pack <tt-pack>`, there are also ``.service``
157+
unit files for each packaged application.
158+
159+
.. _admin-instance_config-deploy-app:
160+
161+
Deploying the application
162+
-------------------------
155163

156164
.. _admin-instances_to_run:
157165

158166
Instances to run
159167
~~~~~~~~~~~~~~~~
160168

161-
One more difference for a deployed application is the content of the ``instances.yaml`` file that specifies instances to run in the current environment.
169+
When deploying a distributed cluster application from a `.tar.gz` archive, you can
170+
define instances to run on each machine by changing the content of the ``instances.yaml`` file.
162171

163172
- On the developer's machine, this file might include all the instances defined in the cluster configuration.
164173

@@ -200,5 +209,22 @@ One more difference for a deployed application is the content of the ``instances
200209
storage-a-002:
201210
storage-b-002:
202211
203-
204212
The :ref:`Starting and stopping instances <admin-start_stop_instance>` section describes how to start and stop Tarantool instances.
213+
214+
.. _admin-deploy-rpm-deb:
215+
216+
DEB and RPM packages
217+
~~~~~~~~~~~~~~~~~~~~
218+
219+
Tarantool applications installed from DEB and RPM packages built with :ref:`tt pack <tt-pack>`
220+
can run as ``systemd`` services. They run on behalf of the ``tarantool`` system user.
221+
It is created automatically during the package installation.
222+
223+
By default, the application artifacts are placed in the following directories:
224+
225+
- ``/var/lib/tarantool/sys_env`` -- application data
226+
- ``/var/log/tarantool/sys_env`` -- logs
227+
- ``/var/run/tarantool/sys_env`` -- runtime artifacts
228+
229+
If you want to change these directories, make sure that the ``tarantool`` user
230+
has enough permissions on the directories you use.

doc/reference/tooling/tt_cli/pack.rst

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,27 @@ Packaging the application
1313
- ``deb``: create a DEB package.
1414
- ``rpm``: create an RPM package.
1515

16-
The command below creates a DEB package for an application:
16+
.. _tt-pack-example:
1717

18-
.. code-block:: console
18+
Example: a DEB package
19+
----------------------
20+
21+
The command below creates a DEB package with all applications from the current ``tt``
22+
environment:
23+
24+
.. code-block:: console
1925
20-
$ tt pack deb
26+
$ tt pack deb
2127
2228
This command generates a ``.deb`` file whose name depends on the environment directory name and the operating system architecture, for example, ``test-env_0.1.0.0-1_x86_64.deb``.
29+
The package contains the following files:
30+
31+
- The content of the application directories: source files, resources, dependencies.
32+
- ``tt`` environment files: ``tarantool`` and ``tt`` executables, ``tt.yaml`` configuration file,
33+
external modules, headers.
34+
- ``.service`` unit files that allow running applications as ``systemd`` services
35+
(a separate file for each application).
36+
2337
You can also pass various :ref:`options <tt-pack-options>` to the ``tt pack`` command to adjust generation properties, for example, customize a bundle name, choose which artifacts should be included, specify the required application dependencies.
2438

2539

0 commit comments

Comments
 (0)