Skip to content

Commit d3d60a0

Browse files
Document 'tt pack' (#3724)
1 parent fde2719 commit d3d60a0

File tree

2 files changed

+155
-0
lines changed

2 files changed

+155
-0
lines changed

doc/reference/tooling/tt_cli/commands.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ help for the given command.
4040
- List enabled applications
4141
* - :doc:`logrotate <logrotate>`
4242
- Rotate instance logs
43+
* - :doc:`pack <pack>`
44+
- Package an application
4345
* - :doc:`play <play>`
4446
- Play the contents of ``.snap`` or ``.xlog`` files to another Tarantool instance
4547
* - :doc:`restart <restart>`
@@ -78,6 +80,7 @@ help for the given command.
7880
install <install>
7981
instances <instances>
8082
logrotate <logrotate>
83+
pack <pack>
8184
play <play>
8285
restart <restart>
8386
rocks <rocks>
Lines changed: 152 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,152 @@
1+
.. _tt-pack:
2+
3+
Packaging the application
4+
=========================
5+
6+
.. code-block:: bash
7+
8+
tt pack TYPE [options] ..
9+
10+
``tt pack`` packages an application into a distributable bundle of the specified ``TYPE``:
11+
12+
- ``tgz``: create a ``.tgz`` archive.
13+
- ``deb``: create a DEB package.
14+
- ``rpm``: create an RPM package.
15+
16+
The command below creates a DEB package for an application:
17+
18+
.. code-block:: console
19+
20+
tt pack deb
21+
22+
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``.
23+
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.
24+
25+
26+
.. _tt-pack-options:
27+
28+
Options
29+
-------
30+
31+
.. option:: --all
32+
33+
Include all artifacts in a bundle.
34+
In this case, a bundle might include snapshots, WAL files, and logs.
35+
36+
.. option:: --app-list APPLICATIONS
37+
38+
Specify the applications included in a bundle.
39+
40+
**Example**
41+
42+
.. code-block:: console
43+
44+
tt pack tgz --app-list app1,app3
45+
46+
.. option:: --cartridge-compat
47+
48+
**Applicable to:** ``tgz``
49+
50+
Package a Cartridge CLI-compatible archive.
51+
52+
.. option:: --deps STRINGS
53+
54+
**Applicable to:** ``deb``, ``rpm``
55+
56+
Specify dependencies included in RPM and DEB packages.
57+
58+
**Example**
59+
60+
.. code-block:: console
61+
62+
tt pack deb --deps 'wget,make>0.1.0,unzip>1,unzip<=7'
63+
64+
.. option:: --deps-file STRING
65+
66+
**Applicable to:** ``deb``, ``rpm``
67+
68+
Specify the path to a file containing dependencies included in RPM and DEB packages.
69+
For example, the ``package-deps.txt`` file below contains several dependencies and their versions:
70+
71+
.. code-block:: text
72+
73+
unzip==6.0
74+
neofetch>=6,<7
75+
gcc>8
76+
77+
If this file is placed in the current directory, a ``tt pack`` command might look like this:
78+
79+
.. code-block:: console
80+
81+
tt pack deb --deps-file package-deps.txt
82+
83+
.. option:: --filename
84+
85+
Specify a bundle name.
86+
87+
**Example**
88+
89+
.. code-block:: console
90+
91+
tt pack tgz --filename sample-app.tar.gz
92+
93+
.. option:: --name PACKAGE_NAME
94+
95+
Specify a package name.
96+
97+
**Example**
98+
99+
.. code-block:: console
100+
101+
tt pack tgz --name sample-app --version 1.0.1
102+
103+
.. option:: --preinst
104+
105+
**Applicable to:** ``deb``, ``rpm``
106+
107+
Specify the path to a pre-install script for RPM and DEB packages.
108+
109+
**Example**
110+
111+
.. code-block:: console
112+
113+
tt pack deb --preinst pre.sh
114+
115+
.. option:: --postinst
116+
117+
**Applicable to:** ``deb``, ``rpm``
118+
119+
Specify the path to a post-install script for RPM and DEB packages.
120+
121+
**Example**
122+
123+
.. code-block:: console
124+
125+
tt pack deb --postinst post.sh
126+
127+
.. option:: --use-docker
128+
129+
Build a package in an Ubuntu 18.04 Docker container.
130+
Before executing ``tt pack`` with this option, make sure Docker is running.
131+
132+
.. option:: --version PACKAGE_VERSION
133+
134+
Specify a package version.
135+
136+
**Example**
137+
138+
.. code-block:: console
139+
140+
tt pack tgz --name sample-app --version 1.0.1
141+
142+
.. option:: --with-binaries
143+
144+
Include Tarantool and ``tt`` binaries in a bundle.
145+
146+
.. option:: --without-binaries
147+
148+
Don't include Tarantool and ``tt`` binaries in a bundle.
149+
150+
.. option:: --without-modules
151+
152+
Don't include external modules in a bundle.

0 commit comments

Comments
 (0)