diff --git a/doc/book/admin/instance_config.rst b/doc/book/admin/instance_config.rst index 35bacc21a2..054f6e7d64 100644 --- a/doc/book/admin/instance_config.rst +++ b/doc/book/admin/instance_config.rst @@ -151,14 +151,23 @@ The application's layout looks similar to the one defined when :ref:`developing - ``tt.yaml``: a ``tt`` configuration file. +.. note:: + In DEB/PRM packages generated by :ref:`tt pack `, there are also ``.service`` + unit files for each packaged application. + +.. _admin-instance_config-deploy-app: + +Deploying the application +------------------------- .. _admin-instances_to_run: Instances to run ~~~~~~~~~~~~~~~~ -One more difference for a deployed application is the content of the ``instances.yaml`` file that specifies instances to run in the current environment. +When deploying a distributed cluster application from a `.tar.gz` archive, you can +define instances to run on each machine by changing the content of the ``instances.yaml`` file. - On the developer's machine, this file might include all the instances defined in the cluster configuration. @@ -200,5 +209,22 @@ One more difference for a deployed application is the content of the ``instances storage-a-002: storage-b-002: - The :ref:`Starting and stopping instances ` section describes how to start and stop Tarantool instances. + +.. _admin-deploy-rpm-deb: + +DEB and RPM packages +~~~~~~~~~~~~~~~~~~~~ + +Tarantool applications installed from DEB and RPM packages built with :ref:`tt pack ` +can run as ``systemd`` services. They run on behalf of the ``tarantool`` system user. +It is created automatically during the package installation. + +By default, the application artifacts are placed in the following directories: + +- ``/var/lib/tarantool/sys_env`` -- application data +- ``/var/log/tarantool/sys_env`` -- logs +- ``/var/run/tarantool/sys_env`` -- runtime artifacts + +If you want to change these directories, make sure that the ``tarantool`` user +has enough permissions on the directories you use. \ No newline at end of file diff --git a/doc/reference/tooling/tt_cli/pack.rst b/doc/reference/tooling/tt_cli/pack.rst index 31aa2cdf6c..e199128b57 100644 --- a/doc/reference/tooling/tt_cli/pack.rst +++ b/doc/reference/tooling/tt_cli/pack.rst @@ -13,13 +13,27 @@ Packaging the application - ``deb``: create a DEB package. - ``rpm``: create an RPM package. -The command below creates a DEB package for an application: +.. _tt-pack-example: - .. code-block:: console +Example: a DEB package +---------------------- + +The command below creates a DEB package with all applications from the current ``tt`` +environment: + +.. code-block:: console - $ tt pack deb + $ tt pack deb 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``. +The package contains the following files: + +- The content of the application directories: source files, resources, dependencies. +- ``tt`` environment files: ``tarantool`` and ``tt`` executables, ``tt.yaml`` configuration file, + external modules, headers. +- ``.service`` unit files that allow running applications as ``systemd`` services + (a separate file for each application). + You can also pass various :ref:`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.