Skip to content

Add tt pack DEB/RPM content description #4206

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
May 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 28 additions & 2 deletions doc/book/admin/instance_config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <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.

Expand Down Expand Up @@ -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 <admin-start_stop_instance>` 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 <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.
20 changes: 17 additions & 3 deletions doc/reference/tooling/tt_cli/pack.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <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.


Expand Down
Loading