Skip to content

Commit 77f9f00

Browse files
authored
Add tt commands: binaries list/switch, kill, download (#4303)
Resolves #4026, #4032, #4222
1 parent 1a09b95 commit 77f9f00

File tree

5 files changed

+191
-16
lines changed

5 files changed

+191
-16
lines changed
Lines changed: 75 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,88 @@
11
.. _tt-binaries:
22

3-
Showing a list of installed binaries
4-
====================================
3+
Managing binaries in the current environment
4+
============================================
55

66
.. code-block:: console
77
8-
$ tt binaries
8+
$ tt binaries COMMAND [COMMAND_OPTION ...]
99
10-
``tt binaries`` shows a list of installed binaries and their versions.
10+
``tt binaries`` manages Tarantool and ``tt`` binaries installed in the current environment.
1111

12-
Examples
13-
--------
12+
``COMMAND`` is one of the following:
1413

15-
Show a list of installed Tarantool versions:
14+
- :ref:`list <tt-binaries-list>`
15+
- :ref:`switch <tt-binaries-switch>`
16+
17+
18+
.. _tt-binaries-list:
19+
20+
list
21+
----
22+
23+
.. code-block:: console
24+
25+
$ tt binaries list
26+
27+
``tt binaries list`` shows a list of installed binaries and their versions.
28+
29+
To show a list of installed Tarantool versions:
1630

1731
.. code-block:: console
1832
19-
$ tt binaries
33+
$ tt binaries list
2034
List of installed binaries:
2135
• tarantool:
22-
2.11.1 [active]
23-
2.10.8
36+
3.1.0 [active]
37+
2.11.2
38+
• tt:
39+
2.3.0
40+
2.2.1 [active]
41+
42+
.. _tt-binaries-switch:
43+
44+
switch
45+
------
46+
47+
.. code-block:: console
48+
49+
$ tt binaries switch [PROGRAM_NAME] [VERSION]
50+
51+
``tt binaries switch`` switches binaries used in the current environment.
52+
The possible values of ``PROGRAM_NAME`` are:
53+
54+
* ``tarantool``: Tarantool Community Edition.
55+
* ``tarantool-ee``: Tarantool Enterprise Edition.
56+
* ``tt``: the ``tt`` command-line utility.
57+
58+
When called without arguments, the command lets you choose the program and
59+
version interactively:
60+
61+
.. code-block:: console
62+
63+
$ tt binaries switch
64+
Use the arrow keys to navigate: ↓ ↑ → ←
65+
? Select program:
66+
▸ tarantool
67+
tarantool-ee
68+
tt
69+
70+
You can also specify the program name and version in the call.
71+
72+
To view ``tt`` versions installed in the current environment and switch
73+
between them:
74+
75+
.. code-block:: console
76+
77+
$ tt binaries switch tt
78+
Use the arrow keys to navigate: ↓ ↑ → ←
79+
? Select version:
80+
▸ 2.2.1
81+
2.3.0 [active]
82+
83+
To switch to a specific Tarantool EE version installed in the current environment:
84+
85+
.. code-block:: console
86+
87+
$ tt binaries switch tarantool-ee 3.1.0
88+

doc/reference/tooling/tt_cli/commands.rst

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ help for the given command.
3838
- Create an application from a template
3939
* - :doc:`crud <crud>`
4040
- Interact with the CRUD module (`Enterprise only <https://www.tarantool.io/compare/>`_)
41+
* - :doc:`download <download>`
42+
- Download the Tarantool Enterprise SDK
4143
* - :doc:`export <export>`
4244
- Export data to a file (`Enterprise only <https://www.tarantool.io/compare/>`_)
4345
* - :doc:`help <help>`
@@ -50,6 +52,8 @@ help for the given command.
5052
- Install Tarantool or ``tt``
5153
* - :doc:`instances <instances>`
5254
- List enabled applications
55+
* - :doc:`kill <kill>`
56+
- Terminate Tarantool applications or instances
5357
* - :doc:`logrotate <logrotate>`
5458
- Rotate instance logs
5559
* - :doc:`pack <pack>`
@@ -59,19 +63,19 @@ help for the given command.
5963
* - :doc:`replicaset <replicaset>`
6064
- Manage replica sets
6165
* - :doc:`restart <restart>`
62-
- Restart a Tarantool instance
66+
- Restart Tarantool applications or instances
6367
* - :doc:`rocks <rocks>`
6468
- Use the LuaRocks package manager
6569
* - :doc:`run <run>`
6670
- Run Lua code in a Tarantool instance
6771
* - :doc:`search <search>`
6872
- Search available Tarantool and ``tt`` versions
6973
* - :doc:`start <start>`
70-
- Start a Tarantool instance
74+
- Start Tarantool applications or instances
7175
* - :doc:`status <status>`
72-
- Get the current status of a Tarantool instance
76+
- Get the current status of applications or instances
7377
* - :doc:`stop <stop>`
74-
- Stop a Tarantool instance
78+
- Stop Tarantool applications or instances
7579
* - :doc:`tdg2 <tdg2>`
7680
- Interact with `Tarantool Data Grid 2 <https://www.tarantool.io/ru/tdg/latest/>`_ clusters
7781
* - :doc:`uninstall <uninstall>`
@@ -95,12 +99,14 @@ help for the given command.
9599
coredump <coredump>
96100
create <create>
97101
crud <crud>
102+
download <download>
98103
export <export>
99104
help <help>
100105
import <import>
101106
init <init>
102107
install <install>
103108
instances <instances>
109+
kill <kill>
104110
logrotate <logrotate>
105111
pack <pack>
106112
play <play>
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
.. _tt-download:
2+
3+
Downloading Tarantool Enterprise SDK
4+
====================================
5+
6+
.. code-block:: console
7+
8+
$ tt download VERSION [OPTION ...]
9+
10+
``tt download`` downloads Tarantool Enterprise SDK from the customer zone.
11+
12+
The ``VERSION`` is a part of the SDK archive name between ``tarantool-enterprise-sdk-``
13+
and the platform identifier. For example, to download ``tarantool-enterprise-sdk-gc64-3.0.0-0-gf58f7d82a-r23.linux.x86_64.tar.gz``,
14+
run:
15+
16+
.. code-block:: console
17+
18+
$ tt download gc64-3.0.0-0-gf58f7d82a-r23
19+
20+
``tt`` automatically chooses the bundle for the current platform.
21+
22+
.. _tt-download-authentication:
23+
24+
Authentication
25+
~~~~~~~~~~~~~~
26+
27+
To download the Tarantool Enterprise SDK using ``tt download``, you need to provide
28+
access credentials for the Tarantool customer zone. Use one of the following ways to pass
29+
the username and the password:
30+
31+
* A text file specified in the ``ee.credential_path`` parameter of the
32+
:ref:`tt environment configuration <tt-config_file>`:
33+
34+
.. code-block:: yaml
35+
36+
# tt.yaml
37+
# ...
38+
ee:
39+
credential_path: cred.txt
40+
41+
`cred.txt` should contain a username and a password on separate lines:
42+
43+
.. code-block:: text
44+
45+
myuser@tarantool.io
46+
p4$$w0rD
47+
48+
* Environment variables ``TT_CLI_EE_USERNAME`` and ``TT_CLI_EE_PASSWORD``:
49+
50+
.. code-block:: console
51+
52+
$ export TT_CLI_EE_USERNAME=myuser@tarantool.io
53+
$ export TT_CLI_EE_PASSWORD=p4$$w0rD
54+
$ tt download gc64-3.0.0-0-gf58f7d82a-r23
55+
56+
Options
57+
-------
58+
59+
.. option:: --dev
60+
61+
Download a development build.
62+
63+
.. option:: --directory-prefix STRING
64+
65+
The downloaded SDK location. Default: ``.`` (current directory).

doc/reference/tooling/tt_cli/install.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,9 @@ Authentication
7777
~~~~~~~~~~~~~~
7878

7979
To install Tarantool EE using ``tt install``, you need to provide access credentials
80-
for Tarantool customer zone. Use one of the following ways to pass the username and the password:
80+
for the Tarantool customer zone. Use one of the following ways to pass the username and the password:
8181

82-
* A text file specified in the ``ee.credentials_path`` parameter of the
82+
* A text file specified in the ``ee.credential_path`` parameter of the
8383
:ref:`tt enviromnment configuration <tt-config_file>`:
8484

8585
.. code-block:: yaml

doc/reference/tooling/tt_cli/kill.rst

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
.. _tt-kill:
2+
3+
Terminating Tarantool instances
4+
===============================
5+
6+
.. code-block:: console
7+
8+
$ tt kill APPLICATION[:APP_INSTANCE]
9+
10+
``tt kill`` terminates instances with ``SIGQUIT`` and ``SIGKILL`` signals.
11+
12+
To terminate all instances of the ``app`` application:
13+
14+
.. code-block:: console
15+
16+
$ tt stop app
17+
18+
To terminate the ``storage-001-r`` instance of the ``app`` application without confirmation:
19+
20+
.. code-block:: console
21+
22+
$ tt stop app:storage-001-r --force
23+
24+
To terminate the ``storage-001-r`` instance of the ``app`` application and generate its core dump:
25+
26+
.. code-block:: console
27+
28+
$ tt stop app:storage-001-r --dump
29+
30+
Options
31+
-------
32+
33+
.. option:: -d, --dump
34+
35+
Generate core dumps of terminated processes.
36+
37+
.. option:: -f, --force
38+
39+
Kill instances without confirmation.

0 commit comments

Comments
 (0)