From 4e01139228d2194199026df74a86b51b4b522cdc Mon Sep 17 00:00:00 2001
From: Pavel Semyonov
Date: Mon, 2 Oct 2023 13:11:44 +0700
Subject: [PATCH 01/14] Fix options formatting in tt reference
---
doc/reference/tooling/tt_cli/binaries.rst | 6 +-
doc/reference/tooling/tt_cli/build.rst | 30 ++++-----
doc/reference/tooling/tt_cli/cartridge.rst | 58 ++++++++---------
doc/reference/tooling/tt_cli/cat.rst | 70 +++++++++++----------
doc/reference/tooling/tt_cli/cfg.rst | 10 +--
doc/reference/tooling/tt_cli/check.rst | 10 +--
doc/reference/tooling/tt_cli/clean.rst | 29 ++++-----
doc/reference/tooling/tt_cli/completion.rst | 4 +-
doc/reference/tooling/tt_cli/connect.rst | 51 +++++++--------
doc/reference/tooling/tt_cli/coredump.rst | 16 ++---
doc/reference/tooling/tt_cli/create.rst | 61 +++++++++---------
doc/reference/tooling/tt_cli/help.rst | 10 +--
doc/reference/tooling/tt_cli/init.rst | 6 +-
doc/reference/tooling/tt_cli/install.rst | 66 ++++++++++---------
doc/reference/tooling/tt_cli/instances.rst | 6 +-
doc/reference/tooling/tt_cli/logrotate.rst | 6 +-
doc/reference/tooling/tt_cli/pack.rst | 20 +++---
doc/reference/tooling/tt_cli/play.rst | 60 +++++++++---------
doc/reference/tooling/tt_cli/restart.rst | 6 +-
doc/reference/tooling/tt_cli/rocks.rst | 24 +++----
doc/reference/tooling/tt_cli/run.rst | 43 ++++++-------
doc/reference/tooling/tt_cli/search.rst | 40 ++++++------
doc/reference/tooling/tt_cli/start.rst | 14 ++---
doc/reference/tooling/tt_cli/status.rst | 14 ++---
doc/reference/tooling/tt_cli/stop.rst | 15 ++---
doc/reference/tooling/tt_cli/uninstall.rst | 8 +--
doc/reference/tooling/tt_cli/version.rst | 2 +-
27 files changed, 334 insertions(+), 351 deletions(-)
diff --git a/doc/reference/tooling/tt_cli/binaries.rst b/doc/reference/tooling/tt_cli/binaries.rst
index 47ed957a33..ceaa72b2a5 100644
--- a/doc/reference/tooling/tt_cli/binaries.rst
+++ b/doc/reference/tooling/tt_cli/binaries.rst
@@ -3,7 +3,7 @@
Showing a list of installed binaries
====================================
-.. code-block:: bash
+.. code-block:: console
tt binaries
@@ -14,9 +14,9 @@ Examples
Show a list of installed Tarantool versions:
-.. code-block:: bash
+.. code-block:: console
- user@sample-server:~/test-env$ tt binaries
+ $ tt binaries
List of installed binaries:
• tarantool:
2.11.1 [active]
diff --git a/doc/reference/tooling/tt_cli/build.rst b/doc/reference/tooling/tt_cli/build.rst
index 40e5c321ed..d5606d4eb0 100644
--- a/doc/reference/tooling/tt_cli/build.rst
+++ b/doc/reference/tooling/tt_cli/build.rst
@@ -3,25 +3,19 @@
Building an application
=======================
-.. code-block:: bash
+.. code-block:: console
- tt build [PATH] [flags]
+ tt build [PATH] [--spec SPEC_FILE_PATH]
``tt build`` builds a Tarantool application locally.
-Flags
------
-
-.. container:: table
-
- .. list-table::
- :widths: 30 70
- :header-rows: 0
+Options
+-------
- * - ``--spec``
- - Path to a ``.rockspec`` file to use for the current build
+.. option:: --spec SPEC_FILE_PATH
+ Path to a ``.rockspec`` file to use for the current build
Details
-------
@@ -68,18 +62,18 @@ Examples
* Build the application ``app1`` from its directory:
- .. code-block:: bash
+ .. code-block:: console
- tt build
+ $ tt build
* Build the application ``app1`` from the ``simple_app`` directory inside the current directory:
- .. code-block:: bash
+ .. code-block:: console
- tt build simple_app
+ $ tt build simple_app
* Build the application ``app1`` from its directory explicitly specifying the rockspec file to use:
- .. code-block:: bash
+ .. code-block:: console
- tt build --spec app1-scm-1.rockspec
\ No newline at end of file
+ $ tt build --spec app1-scm-1.rockspec
\ No newline at end of file
diff --git a/doc/reference/tooling/tt_cli/cartridge.rst b/doc/reference/tooling/tt_cli/cartridge.rst
index 800b22482f..11d7fd69fa 100644
--- a/doc/reference/tooling/tt_cli/cartridge.rst
+++ b/doc/reference/tooling/tt_cli/cartridge.rst
@@ -3,7 +3,7 @@
Managing a Cartridge application
================================
-.. code-block:: bash
+.. code-block:: console
tt cartridge COMMAND [command options]
@@ -22,7 +22,7 @@ Managing a Cartridge application
admin
-----
-.. code-block:: bash
+.. code-block:: console
tt cartridge admin ADMIN_FUNC_NAME [options]
@@ -61,7 +61,7 @@ Example
Get a list of the available admin functions:
-.. code-block:: bash
+.. code-block:: console
tt cartridge admin --name APPNAME --list
@@ -71,7 +71,7 @@ Get a list of the available admin functions:
Get help for a specific function:
-.. code-block:: bash
+.. code-block:: console
tt cartridge admin --name APPNAME probe --help
@@ -84,7 +84,7 @@ Get help for a specific function:
Call a function with an argument:
-.. code-block:: bash
+.. code-block:: console
tt cartridge admin --name APPNAME probe --uri localhost:3301
@@ -97,7 +97,7 @@ Call a function with an argument:
bench
-----
-.. code-block:: bash
+.. code-block:: console
tt cartridge bench [options]
@@ -162,7 +162,7 @@ Options
failover
--------
-.. code-block:: bash
+.. code-block:: console
tt cartridge failover COMMAND [command options]
@@ -188,7 +188,7 @@ Subcommands
Usage:
- .. code-block:: bash
+ .. code-block:: console
tt cartridge failover set MODE [options]
@@ -204,7 +204,7 @@ Subcommands
Usage:
- .. code-block:: bash
+ .. code-block:: console
tt cartridge failover setup --file STRING
@@ -224,7 +224,7 @@ Subcommands
Usage:
- .. code-block:: bash
+ .. code-block:: console
tt cartridge failover status
@@ -233,7 +233,7 @@ Subcommands
Usage:
- .. code-block:: bash
+ .. code-block:: console
tt cartridge failover disable
@@ -257,7 +257,7 @@ Options
repair
------
-.. code-block:: bash
+.. code-block:: console
tt cartridge repair COMMAND [command options]
@@ -279,7 +279,7 @@ Subcommands
Usage:
- .. code-block:: bash
+ .. code-block:: console
tt cartridge repair list-topology [options]
@@ -288,7 +288,7 @@ Subcommands
Usage:
- .. code-block:: bash
+ .. code-block:: console
tt cartridge repair remove-instance UUID [options]
@@ -297,7 +297,7 @@ Subcommands
Usage:
- .. code-block:: bash
+ .. code-block:: console
tt cartridge repair set-advertise-uri INSTANCE-UUID NEW-URI [options]
@@ -310,7 +310,7 @@ Subcommands
Usage:
- .. code-block:: bash
+ .. code-block:: console
tt cartridge repair set-leader REPLICASET-UUID INSTANCE-UUID [options]
@@ -351,7 +351,7 @@ The following options work with any ``repair`` command, except ``list-topology``
replicasets
-----------
-.. code-block:: bash
+.. code-block:: console
tt cartridge replicasets COMMAND [command options]
@@ -374,7 +374,7 @@ Subcommands
Usage:
- .. code-block:: bash
+ .. code-block:: console
tt cartridge replicasets setup [options]
@@ -388,7 +388,7 @@ Subcommands
Usage:
- .. code-block:: bash
+ .. code-block:: console
tt cartridge replicasets save [options]
@@ -401,7 +401,7 @@ Subcommands
Usage:
- .. code-block:: bash
+ .. code-block:: console
tt cartridge replicasets list [options]
@@ -416,7 +416,7 @@ Subcommands
Usage:
- .. code-block:: bash
+ .. code-block:: console
tt cartridge replicasets join INSTANCE_NAME... [options]
@@ -429,7 +429,7 @@ Subcommands
Usage:
- .. code-block:: bash
+ .. code-block:: console
tt cartridge replicasets list-roles [options]
@@ -438,7 +438,7 @@ Subcommands
Usage:
- .. code-block:: bash
+ .. code-block:: console
tt cartridge replicasets list-vshard-groups [options]
@@ -447,7 +447,7 @@ Subcommands
Usage:
- .. code-block:: bash
+ .. code-block:: console
tt cartridge replicasets add-roles ROLE_NAME... [options]
@@ -461,7 +461,7 @@ Subcommands
Usage:
- .. code-block:: bash
+ .. code-block:: console
tt cartridge replicasets remove-roles ROLE_NAME... [options]
@@ -474,7 +474,7 @@ Subcommands
Usage:
- .. code-block:: bash
+ .. code-block:: console
tt cartridge replicasets set-weight WEIGHT [options]
@@ -487,7 +487,7 @@ Subcommands
Usage:
- .. code-block:: bash
+ .. code-block:: console
tt cartridge replicasets set-failover-priority INSTANCE_NAME... [options]
@@ -500,7 +500,7 @@ Subcommands
Usage:
- .. code-block:: bash
+ .. code-block:: console
tt cartridge replicasets bootstrap-vshard [options]
@@ -509,6 +509,6 @@ Subcommands
Usage:
- .. code-block:: bash
+ .. code-block:: console
tt cartridge replicasets expel INSTANCE_NAME... [options]
diff --git a/doc/reference/tooling/tt_cli/cat.rst b/doc/reference/tooling/tt_cli/cat.rst
index d79e8b71a7..ac1b907f01 100644
--- a/doc/reference/tooling/tt_cli/cat.rst
+++ b/doc/reference/tooling/tt_cli/cat.rst
@@ -3,71 +3,73 @@
Printing the contents of .snap and .xlog files
==============================================
-.. code-block:: bash
+.. code-block:: console
- tt cat FILE .. [flags]
+ tt cat FILE ... [OPTION ...]
``tt cat`` prints the contents of :ref:`snapshot ` (``.snap``) and
:ref:`WAL ` (``.xlog``) files to stdout. A single call of ``tt cat`` can
print the contents of multiple files.
-Flags
------
+Options
+-------
-.. container:: table
+.. option:: --format {yaml|json|lua}
- .. list-table::
- :widths: 20 80
- :header-rows: 0
+ Output format: ``yaml`` (default), ``json``, or ``lua``.
- * - ``--format``
- - Output format: ``yaml`` (default), ``json``, or ``lua``
- * - ``--from``
- - Show operations starting from the given LSN
- * - ``--to``
- - Show operations up to the given LSN. Default: 18446744073709551615
- * - ``--replica``
- - Filter the output by replica ID. Can be passed more than once
- * - ``--space``
- - Filter the output by space ID. Can be passed more than once
- * - ``--show-system``
- - Show the contents of system spaces
+.. option:: --from LSN
-Details
--------
+ Show operations starting from the given LSN.
+
+.. option:: --to LSN
+
+ Show operations up to the given LSN. Default: ``18446744073709551615``.
+
+.. option:: --replica ID
+
+ Filter the output by replica ID. Can be passed more than once.
+
+ When calling ``tt cat`` with filters by LSN (``--from`` and ``--to`` flags) and
+ replica ID (``--replica``), remember that LSNs differ across replicas.
+ Thus, if you pass more than one replica ID via ``--from`` or ``--to``,
+ the result may not reflect the actual sequence of operations.
+
+.. option:: --space ID
+
+ Filter the output by space ID. Can be passed more than once.
+
+.. option:: --show-system
-When calling ``tt cat`` with filters by LSN (``--from`` and ``--to`` flags) and
-replica ID (``--replica``), remember that LSNs differ across replicas.
-Thus, if you pass more than one replica ID via ``--from`` or ``--to``,
-the result may not reflect the actual sequence of operations.
+ Show the contents of system spaces.
Examples
--------
* Output contents of ``00000000000000000000.xlog`` WAL file in the YAML format:
- .. code-block:: bash
+ .. code-block:: console
- tt cat 00000000000000000000.xlog
+ $ tt cat 00000000000000000000.xlog
* Output operations on spaces with ``space_id`` 512 and 513 from the
``00000000000000000012.snap`` snapshot file in the JSON format:
- .. code-block:: bash
+ .. code-block:: console
- tt cat 00000000000000000012.snap --space 512 --space 513 --format json
+ $ tt cat 00000000000000000012.snap --space 512 --space 513 --format json
* Output operations on all spaces, including system spaces,
from the ``00000000000000000000.xlog`` WAL file:
- .. code-block:: bash
+ .. code-block:: console
- tt cat 00000000000000000000.xlog --show-system
+ $ tt cat 00000000000000000000.xlog --show-system
* Output operations with LSNs between 100 and 500 on replica 1
from the ``00000000000000000000.xlog`` WAL file:
- .. code-block:: bash
+ .. code-block:: console
- tt cat 00000000000000000000.xlog --from 100 --to 500 --replica 1
+ $ tt cat 00000000000000000000.xlog --from 100 --to 500 --replica 1
diff --git a/doc/reference/tooling/tt_cli/cfg.rst b/doc/reference/tooling/tt_cli/cfg.rst
index ef39b545d4..6334482355 100644
--- a/doc/reference/tooling/tt_cli/cfg.rst
+++ b/doc/reference/tooling/tt_cli/cfg.rst
@@ -1,9 +1,9 @@
Environment configuration
=========================
-.. code-block:: bash
+.. code-block:: console
- tt cfg COMMAND [command flags]
+ tt cfg COMMAND [OPTION ...]
``tt cfg`` manages a ``tt`` environment :ref:`configuration `.
@@ -20,7 +20,7 @@ Commands
* - ``dump``
- Print a ``tt`` environment configuration.
- Flags:
+ Options:
* ``-r``, ``--raw``: Print a raw content of the ``tt.yaml`` configuration file.
@@ -30,6 +30,6 @@ Examples
The following command prints a ``tt`` environment configuration:
-.. code-block:: bash
+.. code-block:: console
- tt cfg dump
+ $ tt cfg dump
diff --git a/doc/reference/tooling/tt_cli/check.rst b/doc/reference/tooling/tt_cli/check.rst
index a911963e5f..b86c3e78ec 100644
--- a/doc/reference/tooling/tt_cli/check.rst
+++ b/doc/reference/tooling/tt_cli/check.rst
@@ -3,7 +3,7 @@
Checking an application file
============================
-.. code-block:: bash
+.. code-block:: console
tt check APP_FILE
@@ -24,13 +24,13 @@ Examples
* Check the syntax of the ``app.lua`` file from the ``instances_enabled`` directory:
- .. code-block:: bash
+ .. code-block:: console
- tt check app
+ $ tt check app
* Check the syntax of the ``init.lua`` file from the ``instance1/`` directory inside ``instances_enabled``:
- .. code-block:: bash
+ .. code-block:: console
- tt check instance1
\ No newline at end of file
+ $ tt check instance1
\ No newline at end of file
diff --git a/doc/reference/tooling/tt_cli/clean.rst b/doc/reference/tooling/tt_cli/clean.rst
index e39b21f65f..01ad8ecfa2 100644
--- a/doc/reference/tooling/tt_cli/clean.rst
+++ b/doc/reference/tooling/tt_cli/clean.rst
@@ -3,7 +3,7 @@
Cleaning instance files
=======================
-.. code-block:: bash
+.. code-block:: console
tt clean INSTANCE|APPLICATION [flags]
@@ -11,19 +11,12 @@ Cleaning instance files
other files. To avoid accidental deletion of files, ``tt clean`` shows
the files it is going to delete and asks for confirmation.
-Flags
------
+Options
+-------
-.. container:: table
+.. option:: -f, --force
- .. list-table::
- :widths: 30 70
- :header-rows: 0
-
- * - ``-f``
-
- ``--force``
- - Clean files without confirmation
+ Clean files without confirmation.
Examples
@@ -34,21 +27,21 @@ Single instance
* Clean the files of the ``app`` instance:
- .. code-block:: bash
+ .. code-block:: console
- tt clean app
+ $ tt clean app
Multiple instances
~~~~~~~~~~~~~~~~~~
* Clean the files of all instances of the ``app`` application:
- .. code-block:: bash
+ .. code-block:: console
- tt clean app
+ $ tt clean app
* Clean the files of the ``master`` instance of the ``app`` application:
- .. code-block:: bash
+ .. code-block:: console
- tt clean app:master
\ No newline at end of file
+ $ tt clean app:master
\ No newline at end of file
diff --git a/doc/reference/tooling/tt_cli/completion.rst b/doc/reference/tooling/tt_cli/completion.rst
index 13a0ba8c53..2b654505ac 100644
--- a/doc/reference/tooling/tt_cli/completion.rst
+++ b/doc/reference/tooling/tt_cli/completion.rst
@@ -3,7 +3,7 @@
Generating completion for tt
============================
-.. code-block:: bash
+.. code-block:: console
tt completion SHELL
@@ -16,7 +16,7 @@ Examples
Generate ``tt`` completion for the current ``bash`` terminal:
-.. code-block:: bash
+.. code-block:: console
. <(tt completion bash)
diff --git a/doc/reference/tooling/tt_cli/connect.rst b/doc/reference/tooling/tt_cli/connect.rst
index 877757dee7..ce93d36aca 100644
--- a/doc/reference/tooling/tt_cli/connect.rst
+++ b/doc/reference/tooling/tt_cli/connect.rst
@@ -3,37 +3,30 @@
Connecting to a Tarantool instance
==================================
-.. code-block:: bash
+.. code-block:: console
- tt connect URI|INSTANCE_NAME [flags]
+ tt connect URI|INSTANCE [OPTION ...]
``tt connect`` connects to a Tarantool instance by its URI or name specified
during its startup (``tt start``).
-Flags
------
+Options
+-------
-.. container:: table
+.. option:: -u, --username
- .. list-table::
- :widths: 30 70
- :header-rows: 0
+ Username
- * - ``-u``
+.. option:: -p, --password
- ``--username``
- - Username
- * - ``-p``
+ Password
- ``--password``
- - Password
- * - ``-f``
+.. option:: -f, --file
- ``--file``
- - Connect and evaluate the script from a file.
+ Connect and evaluate the script from a file.
- ``-`` – read the script from stdin.
+ ``-`` – read the script from stdin.
Details
-------
@@ -59,31 +52,31 @@ Examples
* Connect to the ``app`` instance in the same environment:
- .. code-block:: bash
+ .. code-block:: console
- tt connect app
+ $ tt connect app
* Connect to the ``master`` instance of the ``app`` application in the same environment:
- .. code-block:: bash
+ .. code-block:: console
- tt connect app:master
+ $ tt connect app:master
* Connect to the ``192.168.10.10`` host on port ``3301`` with authentication:
- .. code-block:: bash
+ .. code-block:: console
- tt connect 192.168.10.10:3301 -u myuser -p p4$$w0rD
+ $ tt connect 192.168.10.10:3301 -u myuser -p p4$$w0rD
* Connect to the ``app`` instance and evaluate the code from the ``test.lua`` file:
- .. code-block:: bash
+ .. code-block:: console
- tt connect app -f test.lua
+ $ tt connect app -f test.lua
* Connect to the ``app`` instance and evaluate the code from stdin:
- .. code-block:: bash
+ .. code-block:: console
- echo "function test() return 1 end" | tt connect app -f - # Create the test() function
- echo "test()" | tt connect app -f - # Call this function
\ No newline at end of file
+ $ echo "function test() return 1 end" | tt connect app -f - # Create the test() function
+ $ echo "test()" | tt connect app -f - # Call this function
\ No newline at end of file
diff --git a/doc/reference/tooling/tt_cli/coredump.rst b/doc/reference/tooling/tt_cli/coredump.rst
index 1c9be46a6a..77a9da08ef 100644
--- a/doc/reference/tooling/tt_cli/coredump.rst
+++ b/doc/reference/tooling/tt_cli/coredump.rst
@@ -3,13 +3,13 @@
Manipulating Tarantool core dumps
=================================
-.. code-block:: bash
+.. code-block:: console
tt coredump COMMAND [ARGUMENT]
``tt coredump`` provides commands for manipulating Tarantool core dumps.
-.. note::
+.. important::
``tt coredump`` does not support macOS.
@@ -54,20 +54,20 @@ Examples
* Pack a ``tar.gz`` file with a Tarantool core dump and supporting data:
- .. code-block:: bash
+ .. code-block:: console
- tt coredump pack name.core
+ $ tt coredump pack name.core
* Unpack a ``tar.gz`` archive packed by ``tt coredump pack``:
- .. code-block:: bash
+ .. code-block:: console
- tt coredump unpack tarantool-core-dump.tar.gz
+ $ tt coredump unpack tarantool-core-dump.tar.gz
* Inspect the unpacked core dump with ``gdb``:
- .. code-block:: bash
+ .. code-block:: console
- tt coredump inspect tarantool-core-dump
\ No newline at end of file
+ $ tt coredump inspect tarantool-core-dump
\ No newline at end of file
diff --git a/doc/reference/tooling/tt_cli/create.rst b/doc/reference/tooling/tt_cli/create.rst
index 46d1041ee8..a0316602fd 100644
--- a/doc/reference/tooling/tt_cli/create.rst
+++ b/doc/reference/tooling/tt_cli/create.rst
@@ -3,42 +3,39 @@
Creating an application from a template
=======================================
-.. code-block:: bash
+.. code-block:: console
- tt create TEMPLATE_NAME [flags]
+ tt create TEMPLATE_NAME [OPTION ...]
``tt create`` creates a new Tarantool application from a template.
-Flags
------
+Options
+-------
+
+.. option:: -d PATH, --dst PATH
+
+ Path to the directory where the application will be created.
+
+.. option:: -f, --force
+
+ Force rewrite the application directory if it already exists.
+
+.. option:: --name NAME
-.. container:: table
+ Application name.
- .. list-table::
- :widths: 30 70
- :header-rows: 0
+.. option:: -s, --non-interactive
- * - ``-d``
+ Non-interactive mode.
- ``--dst``
- - Path to the directory where the application will be created
- * - ``-f``
+.. option:: --var [VAR=VALUE ...]
- ``--force``
- - Force rewrite the application directory if it already exists
- * - ``-n``
+ Variable definition. Usage: ``--var var_name=value``.
- ``--name``
- - Application name
- * - ``-s``
+.. option:: --vars-file FILEPATH
- ``--non-interactive``
- - Non-interactive mode
- * - ``--var``
- - Variable definition. Usage: ``--var var_name=value``
- * - ``--vars-file``
- - Path to the file with variable definitions
+ Path to the file with variable definitions.
Details
-------
@@ -159,16 +156,16 @@ flag to disable the interactive input. In this case, the values are searched in
* In the ``--var`` flag. Pass a string of the ``var=value`` format after the ``--var``
flag. You can pass multiple variables, each after a separate ``--var`` flag:
- .. code-block:: bash
+ .. code-block:: console
- tt create template app --var user_name=admin
+ $ tt create template app --var user_name=admin
* In a file. Specify ``var=value`` pairs in a plain text file, each on a new line, and
pass it as the value of the ``--vars-file`` flag:
- .. code-block:: bash
+ .. code-block:: console
- tt create template app --vars-file variables.txt
+ $ tt create template app --vars-file variables.txt
``variables.txt`` can look like this:
@@ -196,15 +193,15 @@ Examples
* Create the application ``app1`` from the ``simple_app`` template in the current directory:
- .. code-block:: bash
+ .. code-block:: console
- tt create simple_app --name app1
+ $ tt create simple_app --name app1
* Create the ``app1`` application in ``/opt/tt/apps/``, set the ``user_name``
variable to ``admin``, force rewrite the application directory if it already exists.
User interaction is disabled.
- .. code-block:: bash
+ .. code-block:: console
- tt create cartridge --name app1 --var user_name=admin -f --non-interactive -dst /opt/tt/apps/
+ $ tt create cartridge --name app1 --var user_name=admin -f --non-interactive -dst /opt/tt/apps/
diff --git a/doc/reference/tooling/tt_cli/help.rst b/doc/reference/tooling/tt_cli/help.rst
index 80fdeb5abd..d1bdafe79f 100644
--- a/doc/reference/tooling/tt_cli/help.rst
+++ b/doc/reference/tooling/tt_cli/help.rst
@@ -3,7 +3,7 @@
Displaying help for tt and its commands
=======================================
-.. code-block:: bash
+.. code-block:: console
tt help [COMMAND]
@@ -17,12 +17,12 @@ Examples
* Display ``tt`` help
- .. code-block:: bash
+ .. code-block:: console
- tt help
+ $ tt help
* Display help for the ``start`` command:
- .. code-block:: bash
+ .. code-block:: console
- tt help start
\ No newline at end of file
+ $ tt help start
\ No newline at end of file
diff --git a/doc/reference/tooling/tt_cli/init.rst b/doc/reference/tooling/tt_cli/init.rst
index f845a39075..ac2bdf3d0a 100644
--- a/doc/reference/tooling/tt_cli/init.rst
+++ b/doc/reference/tooling/tt_cli/init.rst
@@ -3,7 +3,7 @@
Creating a tt environment
=========================
-.. code-block:: bash
+.. code-block:: console
tt init
@@ -47,6 +47,6 @@ Example
Create a ``tt`` environment in the current directory:
-.. code-block:: bash
+.. code-block:: console
- tt init
\ No newline at end of file
+ $ tt init
\ No newline at end of file
diff --git a/doc/reference/tooling/tt_cli/install.rst b/doc/reference/tooling/tt_cli/install.rst
index 861419cb48..f8047c12ae 100644
--- a/doc/reference/tooling/tt_cli/install.rst
+++ b/doc/reference/tooling/tt_cli/install.rst
@@ -5,7 +5,7 @@ Installing Tarantool software
.. code-block:: bash
- tt install PROGRAM_NAME [version] [flags]
+ tt install PROGRAM_NAME [VERSION] [OPTION ...]
``tt install`` installs the latest or an explicitly specified version of Tarantool
or ``tt``. The possible values of ``PROGRAM_NAME`` are:
@@ -21,31 +21,37 @@ or ``tt``. The possible values of ``PROGRAM_NAME`` are:
(see the :ref:`ee section ` of the configuration file) or
provide them interactively.
-Flags
------
+Options
+-------
+
+.. option:: --dynamic
+
+ **Applicable to:** ``tarantool``, ``tarantool-ee``
+
+ Use dynamic linking for building Tarantool.
+
+.. option:: -f, --force
+
+ Skip dependency check before installation.
+
+.. option:: --local-repo
+
+ Install a program from the local repository, which is specified in the
+ :ref:`repo section ` of the ``tt`` configuration file.
+
+.. option:: --no-clean
+
+ Don't delete temporary files.
+
+.. option:: --reinstall
-.. container:: table
+ Reinstall a previously installed program.
- .. list-table::
- :widths: 20 80
- :header-rows: 0
+.. option:: --use-docker
- * - ``--dynamic``
- - (``tarantool`` and ``tarantool-ee``) Use dynamic linking for building Tarantool
- * - ``-f``
+ **Applicable to:** ``tarantool``, ``tarantool-ee``
- ``--force``
- - Skip dependency check before installation
- * - ``--local-repo``
- - Install a program from the local repository, which is specified
- in the :ref:`repo section ` of the ``tt``
- configuration file
- * - ``--no-clean``
- - Don't delete temporary files
- * - ``--reinstall``
- - Reinstall a previously installed program
- * - ``--use-docker``
- - (``tarantool`` and ``tarantool-ee``) Build Tarantool in an Ubuntu 18.04 Docker container
+ Build Tarantool in an Ubuntu 18.04 Docker container.
Details
-------
@@ -71,24 +77,24 @@ Example
* Install the latest available version of Tarantool:
- .. code-block:: bash
+ .. code-block:: console
- tt install tarantool
+ $ tt install tarantool
* Install Tarantool 2.11.1 from the local repository:
- .. code-block:: bash
+ .. code-block:: console
- tt install tarantool 2.11.1 --local-repo
+ $ tt install tarantool 2.11.1 --local-repo
* Reinstall Tarantool 2.10.8:
- .. code-block:: bash
+ .. code-block:: console
- tt install tarantool 2.10.8 --reinstall
+ $ tt install tarantool 2.10.8 --reinstall
* Install Tarantool :ref:`built from sources `:
- .. code-block:: bash
+ .. code-block:: console
- tt install tarantool-dev ~/src/tarantool/build
+ $ tt install tarantool-dev ~/src/tarantool/build
diff --git a/doc/reference/tooling/tt_cli/instances.rst b/doc/reference/tooling/tt_cli/instances.rst
index a71e110ab1..bc5163ce94 100644
--- a/doc/reference/tooling/tt_cli/instances.rst
+++ b/doc/reference/tooling/tt_cli/instances.rst
@@ -3,7 +3,7 @@
Listing enabled applications
============================
-.. code-block:: bash
+.. code-block:: console
tt instances
@@ -21,6 +21,6 @@ Example
* Show the list of enabled applications:
- .. code-block:: bash
+ .. code-block:: console
- tt instances
\ No newline at end of file
+ $ tt instances
\ No newline at end of file
diff --git a/doc/reference/tooling/tt_cli/logrotate.rst b/doc/reference/tooling/tt_cli/logrotate.rst
index 62ad8b9907..b0d6bf4364 100644
--- a/doc/reference/tooling/tt_cli/logrotate.rst
+++ b/doc/reference/tooling/tt_cli/logrotate.rst
@@ -3,7 +3,7 @@
Rotating instance logs
======================
-.. code-block:: bash
+.. code-block:: console
tt logrotate INSTANCE
@@ -15,6 +15,6 @@ Examples
Rotate logs of the ``app`` instance:
-.. code-block:: bash
+.. code-block:: console
- tt logrotate app
\ No newline at end of file
+ $ tt logrotate app
\ 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 6f07b2ba45..5b98194b3f 100644
--- a/doc/reference/tooling/tt_cli/pack.rst
+++ b/doc/reference/tooling/tt_cli/pack.rst
@@ -3,9 +3,9 @@
Packaging the application
=========================
-.. code-block:: bash
+.. code-block:: console
- tt pack TYPE [options] ..
+ tt pack TYPE [OPTION ...] ..
``tt pack`` packages an application into a distributable bundle of the specified ``TYPE``:
@@ -41,7 +41,7 @@ Options
.. code-block:: console
- tt pack tgz --app-list app1,app3
+ $ tt pack tgz --app-list app1,app3
.. option:: --cartridge-compat
@@ -59,7 +59,7 @@ Options
.. code-block:: console
- tt pack deb --deps 'wget,make>0.1.0,unzip>1,unzip<=7'
+ $ tt pack deb --deps 'wget,make>0.1.0,unzip>1,unzip<=7'
.. option:: --deps-file STRING
@@ -78,7 +78,7 @@ Options
.. code-block:: console
- tt pack deb --deps-file package-deps.txt
+ $ tt pack deb --deps-file package-deps.txt
.. option:: --filename
@@ -88,7 +88,7 @@ Options
.. code-block:: console
- tt pack tgz --filename sample-app.tar.gz
+ $ tt pack tgz --filename sample-app.tar.gz
.. option:: --name PACKAGE_NAME
@@ -98,7 +98,7 @@ Options
.. code-block:: console
- tt pack tgz --name sample-app --version 1.0.1
+ $ tt pack tgz --name sample-app --version 1.0.1
.. option:: --preinst
@@ -110,7 +110,7 @@ Options
.. code-block:: console
- tt pack deb --preinst pre.sh
+ $ tt pack deb --preinst pre.sh
.. option:: --postinst
@@ -122,7 +122,7 @@ Options
.. code-block:: console
- tt pack deb --postinst post.sh
+ $ tt pack deb --postinst post.sh
.. option:: --use-docker
@@ -137,7 +137,7 @@ Options
.. code-block:: console
- tt pack tgz --name sample-app --version 1.0.1
+ $ tt pack tgz --name sample-app --version 1.0.1
.. option:: --with-binaries
diff --git a/doc/reference/tooling/tt_cli/play.rst b/doc/reference/tooling/tt_cli/play.rst
index e04bbb3768..7dfcdf9e59 100644
--- a/doc/reference/tooling/tt_cli/play.rst
+++ b/doc/reference/tooling/tt_cli/play.rst
@@ -5,31 +5,39 @@ Playing the contents of .snap and .xlog files to a Tarantool instance
.. code-block:: bash
- tt play URI FILE .. [flags]
+ tt play URI FILE ... [OPTION ...]
``tt play`` plays the contents of :ref:`snapshot ` (``.snap``) and
:ref:`WAL ` (``.xlog``) files to another Tarantool instance.
A single call of ``tt play`` can play multiple files.
-Flags
------
+Options
+-------
+
+.. option:: --from LSN
+
+ Play operations starting from the given LSN.
+
+.. option:: --to LSN
+
+ Play operations up to the given LSN. Default: ``18446744073709551615``.
+
+.. option:: --replica ID
-.. container:: table
+ Filter the operations by replica ID. Can be passed more than once.
- .. list-table::
- :widths: 20 80
- :header-rows: 0
+ When calling ``tt cat`` with filters by LSN (``--from`` and ``--to`` flags) and
+ replica ID (``--replica``), remember that LSNs differ across replicas.
+ Thus, if you pass more than one replica ID via ``--from`` or ``--to``,
+ the result may not reflect the actual sequence of operations.
- * - ``--from``
- - Play operations starting from the given LSN
- * - ``--to``
- - Play operations up to the given LSN. Default: 18446744073709551615
- * - ``--replica``
- - Filter the operations by replica id. Can be passed more than once
- * - ``--space``
- - Filter the operations by space id. Can be passed more than once
- * - ``--show-system``
- - Play the operations on system spaces
+.. option:: --space ID
+
+ Filter the output by space ID. Can be passed more than once.
+
+.. option:: --show-system
+
+ Show the operations on system spaces.
Details
-------
@@ -49,31 +57,25 @@ on this instance. This means that:
* Replica IDs will change in accordance with the destination instance configuration.
-
-When calling ``tt play`` with filters by LSN (``--from`` and ``--to`` flags) and
-replica ID (``--replica``), remember that LSNs differ across replicas.
-Thus, if you pass more than one replica ID via ``--from`` or ``--to``,
-the result may not reflect the actual sequence of operations.
-
Examples
--------
* Play the contents of ``00000000000000000000.xlog`` to the instance on
``192.168.10.10:3301``:
- .. code-block:: bash
+ .. code-block:: console
- tt play 192.168.10.10:3301 00000000000000000000.xlog
+ $ tt play 192.168.10.10:3301 00000000000000000000.xlog
* Play operations on spaces with ``space_id`` 512 and 513 from the
``00000000000000000012.snap`` snapshot file:
- .. code-block:: bash
+ .. code-block:: console
- tt play 192.168.10.10:3301 00000000000000000012.snap --space 512 --space 513
+ $ tt play 192.168.10.10:3301 00000000000000000012.snap --space 512 --space 513
* Play the contents of ``00000000000000000000.xlog`` including operations on system spaces:
- .. code-block:: bash
+ .. code-block:: console
- tt play 192.168.10.10:3301 00000000000000000000.xlog --show-system
+ $ tt play 192.168.10.10:3301 00000000000000000000.xlog --show-system
diff --git a/doc/reference/tooling/tt_cli/restart.rst b/doc/reference/tooling/tt_cli/restart.rst
index 418958bf5f..ea4ceca8ce 100644
--- a/doc/reference/tooling/tt_cli/restart.rst
+++ b/doc/reference/tooling/tt_cli/restart.rst
@@ -3,7 +3,7 @@
Restarting a Tarantool instance
===============================
-.. code-block:: bash
+.. code-block:: console
tt restart INSTANCE
@@ -23,7 +23,7 @@ Examples
Restart the ``app`` instance with automatic confirmation:
-.. code-block:: bash
+.. code-block:: console
- tt restart app -y
+ $ tt restart app -y
diff --git a/doc/reference/tooling/tt_cli/rocks.rst b/doc/reference/tooling/tt_cli/rocks.rst
index 8978a4ef82..48986feeae 100644
--- a/doc/reference/tooling/tt_cli/rocks.rst
+++ b/doc/reference/tooling/tt_cli/rocks.rst
@@ -108,40 +108,40 @@ Examples
* Install the rock ``queue`` from the Tarantool rocks repository:
- .. code-block:: bash
+ .. code-block:: console
- tt rocks install queue
+ $ tt rocks install queue
* Search for the rock ``queue`` in **both** the Tarantool rocks repository and
the `default LuaRocks repository `_:
- .. code-block:: bash
+ .. code-block:: console
- tt rocks search queue --server='https://luarocks.org'
+ $ tt rocks search queue --server='https://luarocks.org'
* List the documentation files for the installed rock ``queue``:
- .. code-block:: bash
+ .. code-block:: console
- tt rocks doc queue --list
+ $ tt rocks doc queue --list
Without the ``--list`` flag, this command displays documentation in the user's default browser.
* Create a ``*.rock`` file from the installed rock ``queue``:
- .. code-block:: bash
+ .. code-block:: console
- tt rocks pack queue
+ $ tt rocks pack queue
* Unpack a ``*.rock`` file:
- .. code-block:: bash
+ .. code-block:: console
- tt rocks unpack queue-scm-1.all.rock
+ $ tt rocks unpack queue-scm-1.all.rock
* Remove the installed rock ``queue``:
- .. code-block:: bash
+ .. code-block:: console
- tt rocks remove queue
+ $ tt rocks remove queue
\ No newline at end of file
diff --git a/doc/reference/tooling/tt_cli/run.rst b/doc/reference/tooling/tt_cli/run.rst
index d2a6452e7e..b21a915020 100644
--- a/doc/reference/tooling/tt_cli/run.rst
+++ b/doc/reference/tooling/tt_cli/run.rst
@@ -5,35 +5,28 @@ Running code in a Tarantool instance
.. code-block:: bash
- tt run [SCRIPT|-e EXPR] [flags]
+ tt run [SCRIPT|-e EXPR] [OPTION ...]
``tt run`` executes Lua code in a Tarantool instance.
-Flags
------
+Options
+-------
+
+.. option:: -e EXPR, --evaluate EXPR
-.. container:: table
+ Execute the specified expression in a Tarantool instance.
- .. list-table::
- :widths: 30 70
- :header-rows: 0
+.. option:: -l LIB_NAME, --library LIB_NAME
- * - ``-e EXPR``
+ Require the specified library.
- ``--evaluate EXPR``
- - Execute the specified expression in a Tarantool instance
- * - ``-l LIB_NAME``
+.. option:: -i, --interactive
- ``--library LIB_NAME``
- - Require the specified library
- * - ``-i``
+ Enter the interactive mode after the script execution.
- ``--interactive``
- - Enter the interactive mode after the script execution
- * - ``-v``
+.. option:: -v, --version
- ``--version``
- - Print the Tarantool version that is used for script execution
+ Print the Tarantool version that is used for script execution.
Details
-------
@@ -54,18 +47,18 @@ Examples
* Execute the ``app.lua`` file in a Tarantool instance:
- .. code-block:: bash
+ .. code-block:: console
- tt run app.lua
+ $ tt run app.lua
* Execute an expression in a Tarantool instance:
- .. code-block:: bash
+ .. code-block:: console
- tt run -e "print('hi there')"
+ $ tt run -e "print('hi there')"
* Execute the ``app.lua`` file in a Tarantool instance and leave it running:
- .. code-block:: bash
+ .. code-block:: console
- tt run app.lua -i
+ $ tt run app.lua -i
diff --git a/doc/reference/tooling/tt_cli/search.rst b/doc/reference/tooling/tt_cli/search.rst
index 5f05732fd6..fd38063caf 100644
--- a/doc/reference/tooling/tt_cli/search.rst
+++ b/doc/reference/tooling/tt_cli/search.rst
@@ -5,7 +5,7 @@ Listing available Tarantool versions
.. code-block:: bash
- tt search PROGRAM_NAME [flags]
+ tt search PROGRAM_NAME [OPTION ...]
``tt search`` lists versions of Tarantool and ``tt`` that are available for
installation. The possible values of ``PROGRAM_NAME`` are:
@@ -20,35 +20,37 @@ installation. The possible values of ``PROGRAM_NAME`` are:
(see the :ref:`ee section ` of the configuration file) or
provide interactively.
-Flags
------
+Options
+-------
-.. container:: table
+.. option:: --debug
- .. list-table::
- :widths: 20 80
- :header-rows: 0
+ **Applicable to:** ``taranttol-ee``
- * - ``--debug``
- - (``tarantool-ee`` only) Search for debug builds of Tarantool Enterprise SDK
- * - ``--local-repo``
- - Search in the local repository, which is specified in the
- :ref:`repo section ` of the ``tt``
- configuration file
- * - ``--version``
- - (``tarantool-ee`` only) Tarantool Enterprise version
+ Search for debug builds of Tarantool Enterprise SDK.
+
+.. option:: --local-repo
+
+ Search in the local repository, which is specified in the
+ :ref:`repo section ` of the ``tt`` configuration file.
+
+.. option:: --version VERSION
+
+ **Applicable to:** ``taranttol-ee``
+
+ Tarantool Enterprise version.
Example
--------
* List available Tarantool versions:
- .. code-block:: bash
+ .. code-block:: console
- tt search tarantool
+ $ tt search tarantool
* List available ``tt`` versions from the local repository:
- .. code-block:: bash
+ .. code-block:: console
- tt search --local-repo tt
\ No newline at end of file
+ $ tt search --local-repo tt
\ No newline at end of file
diff --git a/doc/reference/tooling/tt_cli/start.rst b/doc/reference/tooling/tt_cli/start.rst
index dc4f4d3017..40e76cc854 100644
--- a/doc/reference/tooling/tt_cli/start.rst
+++ b/doc/reference/tooling/tt_cli/start.rst
@@ -3,7 +3,7 @@
Starting a Tarantool instance
=============================
-.. code-block:: bash
+.. code-block:: console
tt start APPLICATION
@@ -32,9 +32,9 @@ Single instance
* Start an instance with the ``app.lua`` application from the ``instances_enabled``
directory:
- .. code-block:: bash
+ .. code-block:: console
- tt start app
+ $ tt start app
Multiple instances
@@ -43,12 +43,12 @@ Multiple instances
* Start all instances of the application stored in the ``app/`` directory inside
``instances_enabled`` in accordance with the :ref:`instances configuration `:
- .. code-block:: bash
+ .. code-block:: console
- tt start app
+ $ tt start app
* Start only the ``master`` instance of the application stored in the ``app/`` directory inside ``instances_enabled``:
- .. code-block:: bash
+ .. code-block:: console
- tt start app:master
\ No newline at end of file
+ $ tt start app:master
\ No newline at end of file
diff --git a/doc/reference/tooling/tt_cli/status.rst b/doc/reference/tooling/tt_cli/status.rst
index 990b9b71cd..5b43f6445d 100644
--- a/doc/reference/tooling/tt_cli/status.rst
+++ b/doc/reference/tooling/tt_cli/status.rst
@@ -3,7 +3,7 @@
Checking instance status
========================
-.. code-block:: bash
+.. code-block:: console
tt status INSTANCE|APPLICATION
@@ -18,21 +18,21 @@ Single instance
* Check the status of the ``app`` instance:
- .. code-block:: bash
+ .. code-block:: console
- tt status app
+ $ tt status app
Multiple instances
~~~~~~~~~~~~~~~~~~
* Check the status of all instances of the ``app`` application:
- .. code-block:: bash
+ .. code-block:: console
- tt status app
+ $ tt status app
* Check the status of the ``replica`` instance of the ``app`` application:
- .. code-block:: bash
+ .. code-block:: console
- tt status app:replica
\ No newline at end of file
+ $ tt status app:replica
\ No newline at end of file
diff --git a/doc/reference/tooling/tt_cli/stop.rst b/doc/reference/tooling/tt_cli/stop.rst
index 0c1807ad96..301c1e3fd3 100644
--- a/doc/reference/tooling/tt_cli/stop.rst
+++ b/doc/reference/tooling/tt_cli/stop.rst
@@ -3,7 +3,7 @@
Stopping a Tarantool instance
=============================
-.. code-block:: bash
+.. code-block:: console
tt stop INSTANCE|APPLICATION
@@ -14,23 +14,24 @@ Examples
Single instance
~~~~~~~~~~~~~~~
+
* Stop the ``app`` instance:
- .. code-block:: bash
+ .. code-block:: console
- tt stop app
+ $ tt stop app
Multiple instances
~~~~~~~~~~~~~~~~~~
* Stop all instances of the ``app`` application:
- .. code-block:: bash
+ .. code-block:: console
- tt stop app
+ $ tt stop app
* Stop the ``replica`` instance of the ``app`` application:
- .. code-block:: bash
+ .. code-block:: console
- tt stop app:replica
\ No newline at end of file
+ $ tt stop app:replica
\ No newline at end of file
diff --git a/doc/reference/tooling/tt_cli/uninstall.rst b/doc/reference/tooling/tt_cli/uninstall.rst
index c092b0b906..98a01cb399 100644
--- a/doc/reference/tooling/tt_cli/uninstall.rst
+++ b/doc/reference/tooling/tt_cli/uninstall.rst
@@ -3,9 +3,9 @@
Uninstalling Tarantool software
===============================
-.. code-block:: bash
+.. code-block:: console
- tt uninstall PROGRAM_NAME [version]
+ tt uninstall PROGRAM_NAME [VERSION]
``tt uninstall`` uninstalls a previously :doc:`installed ` Tarantool version.
@@ -14,6 +14,6 @@ Example
Uninstall Tarantool 2.10.4:
-.. code-block:: bash
+.. code-block:: console
- tt uninstall tarantool 2.10.4
\ No newline at end of file
+ $ tt uninstall tarantool 2.10.4
\ No newline at end of file
diff --git a/doc/reference/tooling/tt_cli/version.rst b/doc/reference/tooling/tt_cli/version.rst
index 9c9429495d..49c4386b55 100644
--- a/doc/reference/tooling/tt_cli/version.rst
+++ b/doc/reference/tooling/tt_cli/version.rst
@@ -3,7 +3,7 @@
Displaying the tt version
=========================
-.. code-block:: bash
+.. code-block:: console
tt version
From 6721961a66793a6010e2c2cb7023f37c204ffd8b Mon Sep 17 00:00:00 2001
From: Pavel Semyonov
Date: Mon, 2 Oct 2023 15:57:06 +0700
Subject: [PATCH 02/14] Fix options formatting in tt reference
---
doc/reference/tooling/tt_cli/binaries.rst | 2 +-
doc/reference/tooling/tt_cli/build.rst | 2 +-
doc/reference/tooling/tt_cli/cartridge.rst | 46 ++++++------
doc/reference/tooling/tt_cli/cat.rst | 4 +-
doc/reference/tooling/tt_cli/cfg.rst | 2 +-
doc/reference/tooling/tt_cli/check.rst | 2 +-
doc/reference/tooling/tt_cli/clean.rst | 2 +-
doc/reference/tooling/tt_cli/completion.rst | 4 +-
doc/reference/tooling/tt_cli/connect.rst | 8 +-
doc/reference/tooling/tt_cli/coredump.rst | 49 ++++++------
doc/reference/tooling/tt_cli/create.rst | 2 +-
doc/reference/tooling/tt_cli/help.rst | 2 +-
doc/reference/tooling/tt_cli/init.rst | 2 +-
doc/reference/tooling/tt_cli/install.rst | 6 +-
doc/reference/tooling/tt_cli/instances.rst | 2 +-
doc/reference/tooling/tt_cli/logrotate.rst | 2 +-
doc/reference/tooling/tt_cli/pack.rst | 2 +-
doc/reference/tooling/tt_cli/play.rst | 4 +-
doc/reference/tooling/tt_cli/restart.rst | 2 +-
doc/reference/tooling/tt_cli/rocks.rst | 82 ++++++++++++---------
doc/reference/tooling/tt_cli/run.rst | 4 +-
doc/reference/tooling/tt_cli/search.rst | 2 +-
doc/reference/tooling/tt_cli/start.rst | 2 +-
doc/reference/tooling/tt_cli/status.rst | 2 +-
doc/reference/tooling/tt_cli/stop.rst | 2 +-
doc/reference/tooling/tt_cli/uninstall.rst | 2 +-
doc/reference/tooling/tt_cli/version.rst | 2 +-
27 files changed, 129 insertions(+), 114 deletions(-)
diff --git a/doc/reference/tooling/tt_cli/binaries.rst b/doc/reference/tooling/tt_cli/binaries.rst
index ceaa72b2a5..5dd103709f 100644
--- a/doc/reference/tooling/tt_cli/binaries.rst
+++ b/doc/reference/tooling/tt_cli/binaries.rst
@@ -5,7 +5,7 @@ Showing a list of installed binaries
.. code-block:: console
- tt binaries
+ $ tt binaries
``tt binaries`` shows a list of installed binaries and their versions.
diff --git a/doc/reference/tooling/tt_cli/build.rst b/doc/reference/tooling/tt_cli/build.rst
index d5606d4eb0..03a101225e 100644
--- a/doc/reference/tooling/tt_cli/build.rst
+++ b/doc/reference/tooling/tt_cli/build.rst
@@ -5,7 +5,7 @@ Building an application
.. code-block:: console
- tt build [PATH] [--spec SPEC_FILE_PATH]
+ $ tt build [PATH] [--spec SPEC_FILE_PATH]
``tt build`` builds a Tarantool application locally.
diff --git a/doc/reference/tooling/tt_cli/cartridge.rst b/doc/reference/tooling/tt_cli/cartridge.rst
index 11d7fd69fa..d00f39f84a 100644
--- a/doc/reference/tooling/tt_cli/cartridge.rst
+++ b/doc/reference/tooling/tt_cli/cartridge.rst
@@ -5,7 +5,7 @@ Managing a Cartridge application
.. code-block:: console
- tt cartridge COMMAND [command options]
+ $ tt cartridge COMMAND {[OPTION ...]|SUBCOMMAND}
``tt cartridge`` manages a Cartridge application.
``COMMAND`` is one of the following:
@@ -24,7 +24,7 @@ admin
.. code-block:: console
- tt cartridge admin ADMIN_FUNC_NAME [options]
+ $ tt cartridge admin ADMIN_FUNC_NAME [ADMIN_OPTION ...]
``tt cartridge admin`` calls `admin functions `_ provided by the application.
@@ -56,8 +56,8 @@ Options
.. _tt_cartridge_admin_examples:
-Example
-~~~~~~~
+Examples
+~~~~~~~~
Get a list of the available admin functions:
@@ -99,7 +99,7 @@ bench
.. code-block:: console
- tt cartridge bench [options]
+ $ tt cartridge bench [OPTION ...]
``tt cartridge bench`` runs benchmarks for Tarantool.
@@ -164,7 +164,7 @@ failover
.. code-block:: console
- tt cartridge failover COMMAND [command options]
+ $ tt cartridge failover COMMAND [FAILOVER_OPTION ...]
``tt cartridge failover`` manages an application failover.
@@ -190,7 +190,7 @@ Subcommands
.. code-block:: console
- tt cartridge failover set MODE [options]
+ $ tt cartridge failover set MODE [FAILOVER_OPTION ...]
Options:
@@ -206,7 +206,7 @@ Subcommands
.. code-block:: console
- tt cartridge failover setup --file STRING
+ $ tt cartridge failover setup --file STRING
The ``failover.yml`` file might look as follows:
@@ -226,7 +226,7 @@ Subcommands
.. code-block:: console
- tt cartridge failover status
+ $ tt cartridge failover status
* - ``disable``
- Disable failover.
@@ -235,7 +235,7 @@ Subcommands
.. code-block:: console
- tt cartridge failover disable
+ $ tt cartridge failover disable
.. _tt_cartridge_failover_options:
@@ -259,7 +259,7 @@ repair
.. code-block:: console
- tt cartridge repair COMMAND [command options]
+ tt cartridge repair COMMAND [REPAIR_OPTION ...]
``tt cartridge repair`` repairs a running application.
@@ -281,7 +281,7 @@ Subcommands
.. code-block:: console
- tt cartridge repair list-topology [options]
+ $ tt cartridge repair list-topology [REPAIR_OPTION ...]
* - ``remove-instance``
- Remove the instance with the specified UUID from the cluster. If the instance isn't found, raise an error.
@@ -290,7 +290,7 @@ Subcommands
.. code-block:: console
- tt cartridge repair remove-instance UUID [options]
+ $ tt cartridge repair remove-instance UUID [REPAIR_OPTION ...]
* - ``set-advertise-uri``
- Change the instance's advertise URI. Raise an error if the instance isn't found or is expelled.
@@ -299,7 +299,7 @@ Subcommands
.. code-block:: console
- tt cartridge repair set-advertise-uri INSTANCE-UUID NEW-URI [options]
+ $ tt cartridge repair set-advertise-uri INSTANCE-UUID NEW-URI [REPAIR_OPTION ...]
* - ``set-leader``
- Set the instance as the leader of the replica set. Raise an error in the following cases:
@@ -353,7 +353,7 @@ replicasets
.. code-block:: console
- tt cartridge replicasets COMMAND [command options]
+ $ tt cartridge replicasets COMMAND [REPLICASETS_OPTION ...]
``tt cartridge replicasets`` manages an application's replica sets.
@@ -376,7 +376,7 @@ Subcommands
.. code-block:: console
- tt cartridge replicasets setup [options]
+ $ tt cartridge replicasets setup [REPLICASETS_OPTION ...]
Options:
@@ -390,7 +390,7 @@ Subcommands
.. code-block:: console
- tt cartridge replicasets save [options]
+ $ tt cartridge replicasets save [REPLICASETS_OPTION ...]
Options:
@@ -403,7 +403,7 @@ Subcommands
.. code-block:: console
- tt cartridge replicasets list [options]
+ $ tt cartridge replicasets list [REPLICASETS_OPTION ...]
Options:
@@ -418,7 +418,7 @@ Subcommands
.. code-block:: console
- tt cartridge replicasets join INSTANCE_NAME... [options]
+ $ tt cartridge replicasets join INSTANCE_NAME... [REPLICASETS_OPTION ...]
Options:
@@ -431,7 +431,7 @@ Subcommands
.. code-block:: console
- tt cartridge replicasets list-roles [options]
+ $ tt cartridge replicasets list-roles [REPLICASETS_OPTION ...]
* - ``list-vshard-groups``
- List the available vshard groups.
@@ -440,7 +440,7 @@ Subcommands
.. code-block:: console
- tt cartridge replicasets list-vshard-groups [options]
+ $ tt cartridge replicasets list-vshard-groups [REPLICASETS_OPTION ...]
* - ``add-roles``
- Add roles to the replica set.
@@ -449,7 +449,7 @@ Subcommands
.. code-block:: console
- tt cartridge replicasets add-roles ROLE_NAME... [options]
+ $ tt cartridge replicasets add-roles ROLE_NAME... [REPLICASETS_OPTION ...]
Options:
@@ -463,7 +463,7 @@ Subcommands
.. code-block:: console
- tt cartridge replicasets remove-roles ROLE_NAME... [options]
+ $ tt cartridge replicasets remove-roles ROLE_NAME... [REPLICASETS_OPTION ...]
Options:
diff --git a/doc/reference/tooling/tt_cli/cat.rst b/doc/reference/tooling/tt_cli/cat.rst
index ac1b907f01..bde21c256a 100644
--- a/doc/reference/tooling/tt_cli/cat.rst
+++ b/doc/reference/tooling/tt_cli/cat.rst
@@ -5,7 +5,7 @@ Printing the contents of .snap and .xlog files
.. code-block:: console
- tt cat FILE ... [OPTION ...]
+ $ tt cat FILE ... [OPTION ...]
``tt cat`` prints the contents of :ref:`snapshot ` (``.snap``) and
:ref:`WAL ` (``.xlog``) files to stdout. A single call of ``tt cat`` can
@@ -15,7 +15,7 @@ print the contents of multiple files.
Options
-------
-.. option:: --format {yaml|json|lua}
+.. option:: --format FORMAT
Output format: ``yaml`` (default), ``json``, or ``lua``.
diff --git a/doc/reference/tooling/tt_cli/cfg.rst b/doc/reference/tooling/tt_cli/cfg.rst
index 6334482355..4a9a8ae5d7 100644
--- a/doc/reference/tooling/tt_cli/cfg.rst
+++ b/doc/reference/tooling/tt_cli/cfg.rst
@@ -3,7 +3,7 @@ Environment configuration
.. code-block:: console
- tt cfg COMMAND [OPTION ...]
+ $ tt cfg COMMAND [OPTION ...]
``tt cfg`` manages a ``tt`` environment :ref:`configuration `.
diff --git a/doc/reference/tooling/tt_cli/check.rst b/doc/reference/tooling/tt_cli/check.rst
index b86c3e78ec..5bb21c9d5f 100644
--- a/doc/reference/tooling/tt_cli/check.rst
+++ b/doc/reference/tooling/tt_cli/check.rst
@@ -5,7 +5,7 @@ Checking an application file
.. code-block:: console
- tt check APP_FILE
+ $ tt check APP_FILE
``tt check`` checks the specified Tarantool application file for syntax errors.
diff --git a/doc/reference/tooling/tt_cli/clean.rst b/doc/reference/tooling/tt_cli/clean.rst
index 01ad8ecfa2..1602de31b8 100644
--- a/doc/reference/tooling/tt_cli/clean.rst
+++ b/doc/reference/tooling/tt_cli/clean.rst
@@ -5,7 +5,7 @@ Cleaning instance files
.. code-block:: console
- tt clean INSTANCE|APPLICATION [flags]
+ $ tt clean INSTANCE|APPLICATION [OPTION ...]
``tt clean`` cleans stored files of Tarantool instances: logs, snapshots, and
other files. To avoid accidental deletion of files, ``tt clean`` shows
diff --git a/doc/reference/tooling/tt_cli/completion.rst b/doc/reference/tooling/tt_cli/completion.rst
index 2b654505ac..36f7373292 100644
--- a/doc/reference/tooling/tt_cli/completion.rst
+++ b/doc/reference/tooling/tt_cli/completion.rst
@@ -5,7 +5,7 @@ Generating completion for tt
.. code-block:: console
- tt completion SHELL
+ $ tt completion SHELL
``tt completion`` generates tab-based completion for ``tt`` commands
in the specified shell: ``bash`` or ``zsh``.
@@ -18,7 +18,7 @@ Generate ``tt`` completion for the current ``bash`` terminal:
.. code-block:: console
- . <(tt completion bash)
+ $ . <(tt completion bash)
.. note::
diff --git a/doc/reference/tooling/tt_cli/connect.rst b/doc/reference/tooling/tt_cli/connect.rst
index ce93d36aca..49f11177db 100644
--- a/doc/reference/tooling/tt_cli/connect.rst
+++ b/doc/reference/tooling/tt_cli/connect.rst
@@ -5,7 +5,7 @@ Connecting to a Tarantool instance
.. code-block:: console
- tt connect URI|INSTANCE [OPTION ...]
+ $ tt connect URI|INSTANCE [OPTION ...]
``tt connect`` connects to a Tarantool instance by its URI or name specified
@@ -14,15 +14,15 @@ during its startup (``tt start``).
Options
-------
-.. option:: -u, --username
+.. option:: -u USERNAME, --username USERNAME
Username
-.. option:: -p, --password
+.. option:: -p PASSWORD, --password PASSWORD
Password
-.. option:: -f, --file
+.. option:: -f FILEPATH, --file FILEPATH
Connect and evaluate the script from a file.
diff --git a/doc/reference/tooling/tt_cli/coredump.rst b/doc/reference/tooling/tt_cli/coredump.rst
index 77a9da08ef..9d229a8dbd 100644
--- a/doc/reference/tooling/tt_cli/coredump.rst
+++ b/doc/reference/tooling/tt_cli/coredump.rst
@@ -5,10 +5,13 @@ Manipulating Tarantool core dumps
.. code-block:: console
- tt coredump COMMAND [ARGUMENT]
+ $ tt coredump COMMAND [COMMAND_OPTION ...]
``tt coredump`` provides commands for manipulating Tarantool core dumps.
+To be able to investigate Tarantool crashes, make sure that core dumps are enabled
+on the host. Here is the :ref:`instruction on enabling core dumps on Unix systems `.
+
.. important::
``tt coredump`` does not support macOS.
@@ -16,39 +19,39 @@ Manipulating Tarantool core dumps
Commands
--------
-.. container:: table
+pack
+~~~~
- .. list-table::
- :widths: 20 80
- :header-rows: 0
+Pack a Tarantool core dump and supporting data into a ``tar.gz`` archive.
+It includes:
- * - ``pack``
- - Pack a Tarantool core dump and supporting data into a ``tar.gz`` archive
- * - ``unpack``
- - Unpack a Tarantool core dump archive
- * - ``inspect``
- - Inspect a Tarantool core dump directory with the
- `GNU debugger `__ (``gdb``)
+* the Tarantool executable
+* Tarantool version information
+* OS information
+* Shared libraries
+Option: a path to a core dump file.
-Details
--------
+unpack
+~~~~~~
-To be able to investigate Tarantool crashes, make sure that core dumps are enabled
-on the host. Here is the :ref:`instruction on enabling core dumps on Unix systems `.
+Unpack a Tarantool core dump created with ``tt coredump pack`` into a new directory.
-``tt coredump pack`` packs the given core dump together with files and data
-that can help the crash investigation. This includes:
+Option: a path to a ``tar.gz`` archive packed by ``tt coredump pack``.
-* Tarantool executable
-* Tarantool version information
-* OS information
-* Shared libraries
+inspect
+~~~~~~~
-``tt coredump inspect`` requires ``gdb`` installed on the host.
+Inspect a Tarantool core dump directory with the `GNU debugger `__ (``gdb``)
The directory being inspected must have the same structure as the core dump archive
created by ``tt coredump pack``.
+.. note::
+
+ ``tt coredump inspect`` requires ``gdb`` installed on the host.
+
+Option: a path to a directory with an unpacked core dump archive.
+
Examples
--------
diff --git a/doc/reference/tooling/tt_cli/create.rst b/doc/reference/tooling/tt_cli/create.rst
index a0316602fd..fdf94974a4 100644
--- a/doc/reference/tooling/tt_cli/create.rst
+++ b/doc/reference/tooling/tt_cli/create.rst
@@ -5,7 +5,7 @@ Creating an application from a template
.. code-block:: console
- tt create TEMPLATE_NAME [OPTION ...]
+ $ tt create TEMPLATE_NAME [OPTION ...]
``tt create`` creates a new Tarantool application from a template.
diff --git a/doc/reference/tooling/tt_cli/help.rst b/doc/reference/tooling/tt_cli/help.rst
index d1bdafe79f..662e421feb 100644
--- a/doc/reference/tooling/tt_cli/help.rst
+++ b/doc/reference/tooling/tt_cli/help.rst
@@ -5,7 +5,7 @@ Displaying help for tt and its commands
.. code-block:: console
- tt help [COMMAND]
+ $ tt help [COMMAND]
``tt help`` displays help:
diff --git a/doc/reference/tooling/tt_cli/init.rst b/doc/reference/tooling/tt_cli/init.rst
index ac2bdf3d0a..a4a9cee48c 100644
--- a/doc/reference/tooling/tt_cli/init.rst
+++ b/doc/reference/tooling/tt_cli/init.rst
@@ -5,7 +5,7 @@ Creating a tt environment
.. code-block:: console
- tt init
+ $ tt init
``tt init`` creates a ``tt`` environment in the current directory. This includes:
diff --git a/doc/reference/tooling/tt_cli/install.rst b/doc/reference/tooling/tt_cli/install.rst
index f8047c12ae..ee02575329 100644
--- a/doc/reference/tooling/tt_cli/install.rst
+++ b/doc/reference/tooling/tt_cli/install.rst
@@ -5,7 +5,7 @@ Installing Tarantool software
.. code-block:: bash
- tt install PROGRAM_NAME [VERSION] [OPTION ...]
+ $ tt install PROGRAM_NAME [VERSION] [OPTION ...]
``tt install`` installs the latest or an explicitly specified version of Tarantool
or ``tt``. The possible values of ``PROGRAM_NAME`` are:
@@ -26,7 +26,7 @@ Options
.. option:: --dynamic
- **Applicable to:** ``tarantool``, ``tarantool-ee``
+ **Applicable to:** ``tarantool``, ``tarantool-ee``
Use dynamic linking for building Tarantool.
@@ -49,7 +49,7 @@ Options
.. option:: --use-docker
- **Applicable to:** ``tarantool``, ``tarantool-ee``
+ **Applicable to:** ``tarantool``, ``tarantool-ee``
Build Tarantool in an Ubuntu 18.04 Docker container.
diff --git a/doc/reference/tooling/tt_cli/instances.rst b/doc/reference/tooling/tt_cli/instances.rst
index bc5163ce94..e188cfc768 100644
--- a/doc/reference/tooling/tt_cli/instances.rst
+++ b/doc/reference/tooling/tt_cli/instances.rst
@@ -5,7 +5,7 @@ Listing enabled applications
.. code-block:: console
- tt instances
+ $ tt instances
``tt instances`` shows the list of enabled applications.
diff --git a/doc/reference/tooling/tt_cli/logrotate.rst b/doc/reference/tooling/tt_cli/logrotate.rst
index b0d6bf4364..476e04dd87 100644
--- a/doc/reference/tooling/tt_cli/logrotate.rst
+++ b/doc/reference/tooling/tt_cli/logrotate.rst
@@ -5,7 +5,7 @@ Rotating instance logs
.. code-block:: console
- tt logrotate INSTANCE
+ $ tt logrotate INSTANCE|APPLICATION
``tt logrotate`` rotates logs of a specified Tarantool instance.
Learn more about :ref:`rotating logs `.
diff --git a/doc/reference/tooling/tt_cli/pack.rst b/doc/reference/tooling/tt_cli/pack.rst
index 5b98194b3f..3e9aa13f06 100644
--- a/doc/reference/tooling/tt_cli/pack.rst
+++ b/doc/reference/tooling/tt_cli/pack.rst
@@ -5,7 +5,7 @@ Packaging the application
.. code-block:: console
- tt pack TYPE [OPTION ...] ..
+ $ tt pack TYPE [OPTION ...] ..
``tt pack`` packages an application into a distributable bundle of the specified ``TYPE``:
diff --git a/doc/reference/tooling/tt_cli/play.rst b/doc/reference/tooling/tt_cli/play.rst
index 7dfcdf9e59..273697c358 100644
--- a/doc/reference/tooling/tt_cli/play.rst
+++ b/doc/reference/tooling/tt_cli/play.rst
@@ -3,9 +3,9 @@
Playing the contents of .snap and .xlog files to a Tarantool instance
=====================================================================
-.. code-block:: bash
+.. code-block:: console
- tt play URI FILE ... [OPTION ...]
+ $ tt play URI FILE ... [OPTION ...]
``tt play`` plays the contents of :ref:`snapshot ` (``.snap``) and
:ref:`WAL ` (``.xlog``) files to another Tarantool instance.
diff --git a/doc/reference/tooling/tt_cli/restart.rst b/doc/reference/tooling/tt_cli/restart.rst
index ea4ceca8ce..c3aae3eec8 100644
--- a/doc/reference/tooling/tt_cli/restart.rst
+++ b/doc/reference/tooling/tt_cli/restart.rst
@@ -5,7 +5,7 @@ Restarting a Tarantool instance
.. code-block:: console
- tt restart INSTANCE
+ $ tt restart INSTANCE
``tt restart`` restarts the specified running Tarantool instance.
A ``tt restart`` call is equivalent to consecutive calls of
diff --git a/doc/reference/tooling/tt_cli/rocks.rst b/doc/reference/tooling/tt_cli/rocks.rst
index 48986feeae..1a0a43b53c 100644
--- a/doc/reference/tooling/tt_cli/rocks.rst
+++ b/doc/reference/tooling/tt_cli/rocks.rst
@@ -3,9 +3,9 @@
Using the LuaRocks package manager
==================================
-.. code-block:: bash
+.. code-block:: console
- tt rocks [FLAG ...] [VAR=VALUE] COMMAND [ARGUMENT]
+ $ tt rocks [FLAG ...] [VAR=VALUE] COMMAND [ARGUMENT]
``tt rocks`` provides means to manage Lua modules (rocks) via the
`LuaRocks `_ package manager. `tt` uses its own
@@ -14,42 +14,54 @@ LuaRocks installation connected to the `Tarantool rocks repository `_.
-Flags
------
+Options
+-------
-.. container:: table
+.. option:: --dev
- .. list-table::
- :widths: 30 70
- :header-rows: 0
+ Enable the sub-repositories in rocks servers for rockspecs of in-development versions.
+
+.. option:: --server=SERVER
+
+ Fetch rocks/rockspecs from this server (takes priority over config file).
+
+.. option:: --only-server=SERVER
+
+ Fetch rocks/rockspecs from this server only (overrides any entries in the config file).
+
+.. option:: --only-sources=URL
+
+ Restrict downloads to paths matching the given URL.
+
+.. option:: --lua-dir=PREFIX
+
+ Specify which Lua installation to use
+
+.. option:: --lua-version=VERSION
+
+ Specify which Lua version to use.
+
+.. option:: --tree=TREE
+
+ Specify which tree to operate on.
+
+.. option:: --local
+
+ Use the tree in the user's home directory.
+ Call ``tt rocks help path`` to learn how to enable it.
+
+.. option:: --global
+
+ Use the system tree when ``local_by_default`` is ``true``.
+
+.. option:: --verbose
+
+ Display verbose output for the command executed.
+
+.. option:: --timeout=SECONDS
- * - ``--dev``
- - Enable the sub-repositories in rocks servers
- for rockspecs of in-development versions
- * - ``--server=``
- - Fetch rocks/rockspecs from this server
- (takes priority over config file)
- * - ``--only-server=``
- - Fetch rocks/rockspecs from this server only
- (overrides any entries in the config file)
- * - ``--only-sources=``
- - Restrict downloads to paths matching the given URL
- * - ``--lua-dir=``
- - Specify which Lua installation to use
- * - ``--lua-version=``
- - Specify which Lua version to use
- * - ``--tree=``
- - Specify which tree to operate on
- * - ``--local``
- - Use the tree in the user's home directory.
- Call ``tt rocks help path`` to learn how to enable it
- * - ``--global``
- - Use the system tree when `local_by_default` is `true`
- * - ``--verbose``
- - Display verbose output for the command executed
- * - ``--timeout=``
- - Timeout on network operations, in seconds.
- 0 means no timeout (wait forever). Default: 30
+ Timeout on network operations, in seconds.
+ ``0`` means no timeout (wait forever). Default: ``30``.
Commands
--------
diff --git a/doc/reference/tooling/tt_cli/run.rst b/doc/reference/tooling/tt_cli/run.rst
index b21a915020..26b7d204c4 100644
--- a/doc/reference/tooling/tt_cli/run.rst
+++ b/doc/reference/tooling/tt_cli/run.rst
@@ -3,9 +3,9 @@
Running code in a Tarantool instance
====================================
-.. code-block:: bash
+.. code-block:: console
- tt run [SCRIPT|-e EXPR] [OPTION ...]
+ $ tt run [SCRIPT|-e EXPR] [OPTION ...]
``tt run`` executes Lua code in a Tarantool instance.
diff --git a/doc/reference/tooling/tt_cli/search.rst b/doc/reference/tooling/tt_cli/search.rst
index fd38063caf..933e421540 100644
--- a/doc/reference/tooling/tt_cli/search.rst
+++ b/doc/reference/tooling/tt_cli/search.rst
@@ -5,7 +5,7 @@ Listing available Tarantool versions
.. code-block:: bash
- tt search PROGRAM_NAME [OPTION ...]
+ $ tt search PROGRAM_NAME [OPTION ...]
``tt search`` lists versions of Tarantool and ``tt`` that are available for
installation. The possible values of ``PROGRAM_NAME`` are:
diff --git a/doc/reference/tooling/tt_cli/start.rst b/doc/reference/tooling/tt_cli/start.rst
index 40e76cc854..f9aadd7ec8 100644
--- a/doc/reference/tooling/tt_cli/start.rst
+++ b/doc/reference/tooling/tt_cli/start.rst
@@ -5,7 +5,7 @@ Starting a Tarantool instance
.. code-block:: console
- tt start APPLICATION
+ $ tt start {INSTANCE|APPLICATION[:APP_INSTANCE]}
``tt start`` starts Tarantool applications.
diff --git a/doc/reference/tooling/tt_cli/status.rst b/doc/reference/tooling/tt_cli/status.rst
index 5b43f6445d..50bd4b2cd9 100644
--- a/doc/reference/tooling/tt_cli/status.rst
+++ b/doc/reference/tooling/tt_cli/status.rst
@@ -5,7 +5,7 @@ Checking instance status
.. code-block:: console
- tt status INSTANCE|APPLICATION
+ $ tt status {INSTANCE|APPLICATION[:APP_INSTANCE]}
``tt status`` prints the current status of the specified Tarantool instance or
all instances of an application.
diff --git a/doc/reference/tooling/tt_cli/stop.rst b/doc/reference/tooling/tt_cli/stop.rst
index 301c1e3fd3..a2f44250c8 100644
--- a/doc/reference/tooling/tt_cli/stop.rst
+++ b/doc/reference/tooling/tt_cli/stop.rst
@@ -5,7 +5,7 @@ Stopping a Tarantool instance
.. code-block:: console
- tt stop INSTANCE|APPLICATION
+ $ tt stop {INSTANCE|APPLICATION[:APP_INSTANCE]}
``tt stop`` stops the specified running Tarantool instances.
diff --git a/doc/reference/tooling/tt_cli/uninstall.rst b/doc/reference/tooling/tt_cli/uninstall.rst
index 98a01cb399..b61a1317ac 100644
--- a/doc/reference/tooling/tt_cli/uninstall.rst
+++ b/doc/reference/tooling/tt_cli/uninstall.rst
@@ -5,7 +5,7 @@ Uninstalling Tarantool software
.. code-block:: console
- tt uninstall PROGRAM_NAME [VERSION]
+ $ tt uninstall PROGRAM_NAME [VERSION]
``tt uninstall`` uninstalls a previously :doc:`installed ` Tarantool version.
diff --git a/doc/reference/tooling/tt_cli/version.rst b/doc/reference/tooling/tt_cli/version.rst
index 49c4386b55..a7f8e688ac 100644
--- a/doc/reference/tooling/tt_cli/version.rst
+++ b/doc/reference/tooling/tt_cli/version.rst
@@ -5,6 +5,6 @@ Displaying the tt version
.. code-block:: console
- tt version
+ $ tt version
``tt version`` shows the version of the ``tt`` utility being used.
\ No newline at end of file
From 03fe5210efcf42b59bb98b530560995d0fa93117 Mon Sep 17 00:00:00 2001
From: Pavel Semyonov
Date: Mon, 2 Oct 2023 16:59:09 +0700
Subject: [PATCH 03/14] Fix options formatting in tt reference
---
doc/reference/tooling/tt_cli/cartridge.rst | 34 +++++++++++-----------
doc/reference/tooling/tt_cli/cfg.rst | 2 +-
doc/reference/tooling/tt_cli/check.rst | 26 +++++++++++++++--
doc/reference/tooling/tt_cli/clean.rst | 2 +-
doc/reference/tooling/tt_cli/logrotate.rst | 2 +-
doc/reference/tooling/tt_cli/restart.rst | 2 +-
doc/reference/tooling/tt_cli/rocks.rst | 2 +-
7 files changed, 45 insertions(+), 25 deletions(-)
diff --git a/doc/reference/tooling/tt_cli/cartridge.rst b/doc/reference/tooling/tt_cli/cartridge.rst
index d00f39f84a..4717eafb83 100644
--- a/doc/reference/tooling/tt_cli/cartridge.rst
+++ b/doc/reference/tooling/tt_cli/cartridge.rst
@@ -99,7 +99,7 @@ bench
.. code-block:: console
- $ tt cartridge bench [OPTION ...]
+ $ tt cartridge bench [BENCH_OPTION ...]
``tt cartridge bench`` runs benchmarks for Tarantool.
@@ -164,7 +164,7 @@ failover
.. code-block:: console
- $ tt cartridge failover COMMAND [FAILOVER_OPTION ...]
+ $ tt cartridge failover COMMAND [COMMAND_OPTION ...]
``tt cartridge failover`` manages an application failover.
@@ -190,7 +190,7 @@ Subcommands
.. code-block:: console
- $ tt cartridge failover set MODE [FAILOVER_OPTION ...]
+ $ tt cartridge failover set MODE [FAILOVER_SET_OPTION ...]
Options:
@@ -312,7 +312,7 @@ Subcommands
.. code-block:: console
- tt cartridge repair set-leader REPLICASET-UUID INSTANCE-UUID [options]
+ tt cartridge repair set-leader REPLICASET-UUID INSTANCE-UUID [REPAIR_OPTION ...]
.. _tt_cartridge_repair_options:
@@ -353,7 +353,7 @@ replicasets
.. code-block:: console
- $ tt cartridge replicasets COMMAND [REPLICASETS_OPTION ...]
+ $ tt cartridge replicasets COMMAND [COMMAND_OPTION ...]
``tt cartridge replicasets`` manages an application's replica sets.
@@ -376,7 +376,7 @@ Subcommands
.. code-block:: console
- $ tt cartridge replicasets setup [REPLICASETS_OPTION ...]
+ $ tt cartridge replicasets setup [--file FILEPATH] [--bootstrap-vshard]
Options:
@@ -390,7 +390,7 @@ Subcommands
.. code-block:: console
- $ tt cartridge replicasets save [REPLICASETS_OPTION ...]
+ $ tt cartridge replicasets save [--file FILEPATH]
Options:
@@ -403,7 +403,7 @@ Subcommands
.. code-block:: console
- $ tt cartridge replicasets list [REPLICASETS_OPTION ...]
+ $ tt cartridge replicasets list [--replicaset STRING]
Options:
@@ -418,7 +418,7 @@ Subcommands
.. code-block:: console
- $ tt cartridge replicasets join INSTANCE_NAME... [REPLICASETS_OPTION ...]
+ $ tt cartridge replicasets join INSTANCE_NAME ... [--replicaset STRING]
Options:
@@ -431,7 +431,7 @@ Subcommands
.. code-block:: console
- $ tt cartridge replicasets list-roles [REPLICASETS_OPTION ...]
+ $ tt cartridge replicasets list-roles
* - ``list-vshard-groups``
- List the available vshard groups.
@@ -440,7 +440,7 @@ Subcommands
.. code-block:: console
- $ tt cartridge replicasets list-vshard-groups [REPLICASETS_OPTION ...]
+ $ tt cartridge replicasets list-vshard-groups
* - ``add-roles``
- Add roles to the replica set.
@@ -449,7 +449,7 @@ Subcommands
.. code-block:: console
- $ tt cartridge replicasets add-roles ROLE_NAME... [REPLICASETS_OPTION ...]
+ $ tt cartridge replicasets add-roles ROLE_NAME ... [--replicaset STRING] [--vshard-group STRING]
Options:
@@ -463,7 +463,7 @@ Subcommands
.. code-block:: console
- $ tt cartridge replicasets remove-roles ROLE_NAME... [REPLICASETS_OPTION ...]
+ $ tt cartridge replicasets remove-roles ROLE_NAME ... [--replicaset STRING]
Options:
@@ -476,7 +476,7 @@ Subcommands
.. code-block:: console
- tt cartridge replicasets set-weight WEIGHT [options]
+ tt cartridge replicasets set-weight WEIGHT [--replicaset STRING]
Options:
@@ -489,7 +489,7 @@ Subcommands
.. code-block:: console
- tt cartridge replicasets set-failover-priority INSTANCE_NAME... [options]
+ tt cartridge replicasets set-failover-priority INSTANCE_NAME ... [--replicaset STRING]
Options:
@@ -502,7 +502,7 @@ Subcommands
.. code-block:: console
- tt cartridge replicasets bootstrap-vshard [options]
+ tt cartridge replicasets bootstrap-vshard
* - ``expel``
- Expel one or more instances from the cluster.
@@ -511,4 +511,4 @@ Subcommands
.. code-block:: console
- tt cartridge replicasets expel INSTANCE_NAME... [options]
+ tt cartridge replicasets expel INSTANCE_NAME ...
diff --git a/doc/reference/tooling/tt_cli/cfg.rst b/doc/reference/tooling/tt_cli/cfg.rst
index 4a9a8ae5d7..e24ae98eac 100644
--- a/doc/reference/tooling/tt_cli/cfg.rst
+++ b/doc/reference/tooling/tt_cli/cfg.rst
@@ -28,7 +28,7 @@ Commands
Examples
--------
-The following command prints a ``tt`` environment configuration:
+Print the current ``tt`` environment configuration:
.. code-block:: console
diff --git a/doc/reference/tooling/tt_cli/check.rst b/doc/reference/tooling/tt_cli/check.rst
index 5bb21c9d5f..9548deb9be 100644
--- a/doc/reference/tooling/tt_cli/check.rst
+++ b/doc/reference/tooling/tt_cli/check.rst
@@ -5,9 +5,9 @@ Checking an application file
.. code-block:: console
- $ tt check APP_FILE
+ $ tt check {INSTANCE|APPLICATION[:APP_INSTANCE]}
-``tt check`` checks the specified Tarantool application file for syntax errors.
+``tt check`` checks the specified Tarantool application or instance for syntax errors.
Details
-------
@@ -22,6 +22,9 @@ specified in the :ref:`tt configuration file `. ``APP_FILE``
Examples
--------
+Single instance
+~~~~~~~~~~~~~~~
+
* Check the syntax of the ``app.lua`` file from the ``instances_enabled`` directory:
.. code-block:: console
@@ -33,4 +36,21 @@ Examples
.. code-block:: console
- $ tt check instance1
\ No newline at end of file
+ $ tt check instance1
+
+Multiple instances
+~~~~~~~~~~~~~~~~~~
+
+* Check all source files of the application stored in the ``app/`` directory inside
+ ``instances_enabled`` in accordance with the :ref:`instances configuration `:
+
+ .. code-block:: console
+
+ $ tt check app
+
+* Check the source of the ``master`` instance of the application stored in the
+ ``app/`` directory inside ``instances_enabled``:
+
+ .. code-block:: console
+
+ $ tt check app:master
\ No newline at end of file
diff --git a/doc/reference/tooling/tt_cli/clean.rst b/doc/reference/tooling/tt_cli/clean.rst
index 1602de31b8..5e350aee28 100644
--- a/doc/reference/tooling/tt_cli/clean.rst
+++ b/doc/reference/tooling/tt_cli/clean.rst
@@ -5,7 +5,7 @@ Cleaning instance files
.. code-block:: console
- $ tt clean INSTANCE|APPLICATION [OPTION ...]
+ $ tt clean {INSTANCE|APPLICATION[:APP_INSTANCE]} [OPTION ...]
``tt clean`` cleans stored files of Tarantool instances: logs, snapshots, and
other files. To avoid accidental deletion of files, ``tt clean`` shows
diff --git a/doc/reference/tooling/tt_cli/logrotate.rst b/doc/reference/tooling/tt_cli/logrotate.rst
index 476e04dd87..3d29e90d01 100644
--- a/doc/reference/tooling/tt_cli/logrotate.rst
+++ b/doc/reference/tooling/tt_cli/logrotate.rst
@@ -5,7 +5,7 @@ Rotating instance logs
.. code-block:: console
- $ tt logrotate INSTANCE|APPLICATION
+ $ tt logrotate {INSTANCE|APPLICATION[:APP_INSTANCE]}
``tt logrotate`` rotates logs of a specified Tarantool instance.
Learn more about :ref:`rotating logs `.
diff --git a/doc/reference/tooling/tt_cli/restart.rst b/doc/reference/tooling/tt_cli/restart.rst
index c3aae3eec8..a3f1e4d8db 100644
--- a/doc/reference/tooling/tt_cli/restart.rst
+++ b/doc/reference/tooling/tt_cli/restart.rst
@@ -5,7 +5,7 @@ Restarting a Tarantool instance
.. code-block:: console
- $ tt restart INSTANCE
+ $ tt restart INSTANCE [OPTION ...]
``tt restart`` restarts the specified running Tarantool instance.
A ``tt restart`` call is equivalent to consecutive calls of
diff --git a/doc/reference/tooling/tt_cli/rocks.rst b/doc/reference/tooling/tt_cli/rocks.rst
index 1a0a43b53c..7f2a80cd5e 100644
--- a/doc/reference/tooling/tt_cli/rocks.rst
+++ b/doc/reference/tooling/tt_cli/rocks.rst
@@ -5,7 +5,7 @@ Using the LuaRocks package manager
.. code-block:: console
- $ tt rocks [FLAG ...] [VAR=VALUE] COMMAND [ARGUMENT]
+ $ tt rocks [OPTION ...] [VAR=VALUE] COMMAND [ARGUMENT]
``tt rocks`` provides means to manage Lua modules (rocks) via the
`LuaRocks `_ package manager. `tt` uses its own
From ae19df904d128ce0a1a55a2f05bd2c583f3944c5 Mon Sep 17 00:00:00 2001
From: Pavel Semyonov
Date: Mon, 2 Oct 2023 17:27:27 +0700
Subject: [PATCH 04/14] Fix options formatting in tt reference
---
doc/reference/tooling/tt_cli/arguments.rst | 33 -------------------
.../tooling/tt_cli/global_options.rst | 30 +++++++++++++++++
2 files changed, 30 insertions(+), 33 deletions(-)
delete mode 100644 doc/reference/tooling/tt_cli/arguments.rst
create mode 100644 doc/reference/tooling/tt_cli/global_options.rst
diff --git a/doc/reference/tooling/tt_cli/arguments.rst b/doc/reference/tooling/tt_cli/arguments.rst
deleted file mode 100644
index 4ba26254bd..0000000000
--- a/doc/reference/tooling/tt_cli/arguments.rst
+++ /dev/null
@@ -1,33 +0,0 @@
-Arguments
-=========
-
-``tt`` has the following arguments:
-
-.. container:: table
-
- .. list-table::
- :widths: 40 60
- :header-rows: 0
-
- * - ``--cfg=FILE``
-
- ``-c=FILE``
- - Path to the :ref:`configuration file `.
- * - ``--internal``
-
- ``-I``
- - Force the use of an internal module even if there is an :doc:`external module ` with the same name.
- * - ``--local=DIRECTORY``
-
- ``-L=DIRECTORY``
- - Use the ``tt`` environment from the specified directory.
- Learn more about the :ref:`local launch mode `.
- * - ``--system``
-
- ``-S``
- - Use the ``tt`` environment installed in the system.
- Learn more about the :ref:`system launch mode `.
- * - ``--help``
-
- ``-h``
- - Display help.
\ No newline at end of file
diff --git a/doc/reference/tooling/tt_cli/global_options.rst b/doc/reference/tooling/tt_cli/global_options.rst
new file mode 100644
index 0000000000..7a53893bcc
--- /dev/null
+++ b/doc/reference/tooling/tt_cli/global_options.rst
@@ -0,0 +1,30 @@
+Global options
+==============
+
+``tt`` has the following global options:
+
+.. option:: -c=FILE, --cfg=FILE
+
+ Path to the :ref:`configuration file `.
+
+.. option:: -h, --help
+
+ Display help.
+
+.. option:: -I, --internal
+
+ Force the use of an internal module even if there is an
+ :doc:`external module ` with the same name.
+
+.. option:: -L=DIRECTORY, --local=DIRECTORY
+ Use the ``tt`` environment from the specified directory.
+ Learn more about the :ref:`local launch mode `.
+
+.. option:: -S, --system
+
+ Use the ``tt`` environment installed in the system.
+ Learn more about the :ref:`system launch mode `.
+
+.. option:: -V, --verbose
+
+ Display detailed processing information (verbose mode).
From f403f1ffdd67c33838e6e3c9ef17343f34a19aec Mon Sep 17 00:00:00 2001
From: Pavel Semyonov
Date: Mon, 2 Oct 2023 17:31:39 +0700
Subject: [PATCH 05/14] Fix page name
---
doc/reference/tooling/tt_cli/index.rst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/reference/tooling/tt_cli/index.rst b/doc/reference/tooling/tt_cli/index.rst
index d5ca5c6742..0396f99048 100644
--- a/doc/reference/tooling/tt_cli/index.rst
+++ b/doc/reference/tooling/tt_cli/index.rst
@@ -19,7 +19,7 @@ concept explanation, and the ``tt`` command reference.
installation
configuration
- arguments
+ global_options
commands
external_modules
From 46ec587f309a78cf3027f0a4ad1acc7b4b011f9d Mon Sep 17 00:00:00 2001
From: Pavel Semyonov
Date: Mon, 2 Oct 2023 17:42:18 +0700
Subject: [PATCH 06/14] Fix links to renamed pages
---
doc/reference/tooling/tt_cli/configuration.rst | 2 +-
doc/reference/tooling/tt_cli/external_modules.rst | 2 +-
doc/reference/tooling/tt_cli/global_options.rst | 2 ++
3 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/doc/reference/tooling/tt_cli/configuration.rst b/doc/reference/tooling/tt_cli/configuration.rst
index cd9b5aaa6b..6548b5aec6 100644
--- a/doc/reference/tooling/tt_cli/configuration.rst
+++ b/doc/reference/tooling/tt_cli/configuration.rst
@@ -14,7 +14,7 @@ execution is its configuration file.
By default, the configuration file is called ``tt.yaml``. The location
where ``tt`` searches for it depends on the :ref:`launch mode `.
You can also pass the configuration file explicitly in the ``--cfg``
-:doc:`argument `.
+:ref:`option `.
The ``tt`` configuration file is a YAML file with the following content:
diff --git a/doc/reference/tooling/tt_cli/external_modules.rst b/doc/reference/tooling/tt_cli/external_modules.rst
index 8772ba3d67..ef2710aa1e 100644
--- a/doc/reference/tooling/tt_cli/external_modules.rst
+++ b/doc/reference/tooling/tt_cli/external_modules.rst
@@ -65,7 +65,7 @@ you need. The ``tt version`` call will execute this module instead of the built-
tt version # Calls the external module if it's available
You can force the use of the internal module by running ``tt`` with the ``--internal`` or ``-I``
-:doc:`argument `. The following call will execute the built-in ``version``
+:ref:`option `. The following call will execute the built-in ``version``
even if there is an external module with the same name:
.. code-block:: bash
diff --git a/doc/reference/tooling/tt_cli/global_options.rst b/doc/reference/tooling/tt_cli/global_options.rst
index 7a53893bcc..34929188b9 100644
--- a/doc/reference/tooling/tt_cli/global_options.rst
+++ b/doc/reference/tooling/tt_cli/global_options.rst
@@ -1,3 +1,5 @@
+.. _tt-global-options:
+
Global options
==============
From 3426309cb7e1b4f45cce2c6eb2a7861eb970e1af Mon Sep 17 00:00:00 2001
From: Pavel Semyonov
Date: Mon, 2 Oct 2023 18:08:05 +0700
Subject: [PATCH 07/14] Fix
---
doc/reference/tooling/tt_cli/global_options.rst | 1 +
1 file changed, 1 insertion(+)
diff --git a/doc/reference/tooling/tt_cli/global_options.rst b/doc/reference/tooling/tt_cli/global_options.rst
index 34929188b9..3d108033f3 100644
--- a/doc/reference/tooling/tt_cli/global_options.rst
+++ b/doc/reference/tooling/tt_cli/global_options.rst
@@ -19,6 +19,7 @@ Global options
:doc:`external module ` with the same name.
.. option:: -L=DIRECTORY, --local=DIRECTORY
+
Use the ``tt`` environment from the specified directory.
Learn more about the :ref:`local launch mode `.
From 07eedc02911c3477c0185c49f0cef0a37ea01237 Mon Sep 17 00:00:00 2001
From: Pavel Semyonov
Date: Tue, 3 Oct 2023 10:51:54 +0700
Subject: [PATCH 08/14] Apply suggestions from code review
Co-authored-by: Andrey Aksenov <38073144+andreyaksenov@users.noreply.github.com>
---
doc/reference/tooling/tt_cli/cartridge.rst | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/doc/reference/tooling/tt_cli/cartridge.rst b/doc/reference/tooling/tt_cli/cartridge.rst
index 4717eafb83..5eb04523bf 100644
--- a/doc/reference/tooling/tt_cli/cartridge.rst
+++ b/doc/reference/tooling/tt_cli/cartridge.rst
@@ -476,7 +476,7 @@ Subcommands
.. code-block:: console
- tt cartridge replicasets set-weight WEIGHT [--replicaset STRING]
+ $ tt cartridge replicasets set-weight WEIGHT [--replicaset STRING]
Options:
@@ -489,7 +489,7 @@ Subcommands
.. code-block:: console
- tt cartridge replicasets set-failover-priority INSTANCE_NAME ... [--replicaset STRING]
+ $ tt cartridge replicasets set-failover-priority INSTANCE_NAME ... [--replicaset STRING]
Options:
@@ -502,7 +502,7 @@ Subcommands
.. code-block:: console
- tt cartridge replicasets bootstrap-vshard
+ $ tt cartridge replicasets bootstrap-vshard
* - ``expel``
- Expel one or more instances from the cluster.
@@ -511,4 +511,4 @@ Subcommands
.. code-block:: console
- tt cartridge replicasets expel INSTANCE_NAME ...
+ $ tt cartridge replicasets expel INSTANCE_NAME ...
From f58c03205c0097e0c9e7a2b0b680e13feaa0eb82 Mon Sep 17 00:00:00 2001
From: Pavel Semyonov
Date: Tue, 3 Oct 2023 12:24:55 +0700
Subject: [PATCH 09/14] test subheadings instead of tables
---
doc/reference/tooling/tt_cli/cartridge.rst | 44 ++++++++++++++++++++++
1 file changed, 44 insertions(+)
diff --git a/doc/reference/tooling/tt_cli/cartridge.rst b/doc/reference/tooling/tt_cli/cartridge.rst
index 5eb04523bf..52e6c50571 100644
--- a/doc/reference/tooling/tt_cli/cartridge.rst
+++ b/doc/reference/tooling/tt_cli/cartridge.rst
@@ -173,6 +173,50 @@ failover
Subcommands
~~~~~~~~~~~
+set
+^^^
+
+Setup failover in the specified mode:
+
+* ``stateful``
+* ``eventual``
+* ``disabled``
+
+Usage:
+
+.. code-block:: console
+
+ $ tt cartridge failover set MODE [FAILOVER_SET_OPTION ...]
+
+Options:
+
+* ``--state-provider STRING``: A failover's state provider. Can be ``stateboard`` or ``etcd2``. Used only in the ``stateful`` mode.
+* ``--params STRING``: Failover parameters specified in a JSON-formatted string, for example, ``"{'fencing_timeout': 10', 'fencing_enabled': true}"``.
+* ``--provider-params STRING``: Failover provider parameters specified in a JSON-formatted string, for example, ``"{'lock_delay': 14}"``.
+
+setup
+^^^^^
+
+Setup failover with parameters described in a file.
+The failover configuration file defaults to ``failover.yml``.
+
+Usage:
+
+.. code-block:: console
+
+ $ tt cartridge failover setup --file STRING
+
+The ``failover.yml`` file might look as follows:
+
+.. code-block:: yaml
+
+ mode: stateful
+ state_provider: stateboard
+ stateboard_params:
+ uri: localhost:4401
+ password: passwd
+ failover_timeout: 15
+
.. container:: table
.. list-table::
From 508c84b7bb713f9a996b82e63a1729768eaa5a29 Mon Sep 17 00:00:00 2001
From: Pavel Semyonov
Date: Tue, 3 Oct 2023 13:04:56 +0700
Subject: [PATCH 10/14] test subheadings instead of tables
---
doc/reference/tooling/tt_cli/cartridge.rst | 230 +++++++++++++++++++--
1 file changed, 216 insertions(+), 14 deletions(-)
diff --git a/doc/reference/tooling/tt_cli/cartridge.rst b/doc/reference/tooling/tt_cli/cartridge.rst
index 52e6c50571..09cf54f57d 100644
--- a/doc/reference/tooling/tt_cli/cartridge.rst
+++ b/doc/reference/tooling/tt_cli/cartridge.rst
@@ -173,8 +173,12 @@ failover
Subcommands
~~~~~~~~~~~
-set
-^^^
+failover set
+^^^^^^^^^^^^
+
+.. code-block:: console
+
+ $ tt cartridge failover set MODE [FAILOVER_SET_OPTION ...]
Setup failover in the specified mode:
@@ -182,31 +186,42 @@ Setup failover in the specified mode:
* ``eventual``
* ``disabled``
-Usage:
-
-.. code-block:: console
-
- $ tt cartridge failover set MODE [FAILOVER_SET_OPTION ...]
-
Options:
* ``--state-provider STRING``: A failover's state provider. Can be ``stateboard`` or ``etcd2``. Used only in the ``stateful`` mode.
* ``--params STRING``: Failover parameters specified in a JSON-formatted string, for example, ``"{'fencing_timeout': 10', 'fencing_enabled': true}"``.
* ``--provider-params STRING``: Failover provider parameters specified in a JSON-formatted string, for example, ``"{'lock_delay': 14}"``.
-setup
-^^^^^
+failover setup
+^^^^^^^^^^^^^^
+
+.. code-block:: console
+
+ $ tt cartridge failover setup --file STRING
Setup failover with parameters described in a file.
The failover configuration file defaults to ``failover.yml``.
-Usage:
+The ``failover.yml`` file might look as follows:
+
+
+failover status
+^^^^^^^^^^^^^^^
.. code-block:: console
- $ tt cartridge failover setup --file STRING
+ $ tt cartridge failover status
-The ``failover.yml`` file might look as follows:
+Get the current failover status.
+
+failover disable
+^^^^^^^^^^^^^^^^
+
+.. code-block:: console
+
+ $ tt cartridge failover disable
+
+Disable failover.
.. code-block:: yaml
@@ -312,6 +327,47 @@ repair
Subcommands
~~~~~~~~~~~
+repair list-topology
+^^^^^^^^^^^^^^^^^^^^
+
+.. code-block:: console
+
+ $ tt cartridge repair list-topology [REPAIR_OPTION ...]
+
+Get a summary of the current cluster topology.
+
+repair remove-instance
+^^^^^^^^^^^^^^^^^^^^^^
+
+.. code-block:: console
+
+ $ tt cartridge repair remove-instance UUID [REPAIR_OPTION ...]
+
+Remove the instance with the specified UUID from the cluster. If the instance isn't found, raise an error.
+
+repair set-advertise-uri
+^^^^^^^^^^^^^^^^^^^^^^^^
+
+.. code-block:: console
+
+ $ tt cartridge repair set-advertise-uri INSTANCE-UUID NEW-URI [REPAIR_OPTION ...]
+
+Change the instance's advertise URI. Raise an error if the instance isn't found or is expelled.
+
+repair set-leader
+^^^^^^^^^^^^^^^^^
+
+.. code-block:: console
+
+ $ tt cartridge repair set-leader REPLICASET-UUID INSTANCE-UUID [REPAIR_OPTION ...]
+
+Set the instance as the leader of the replica set. Raise an error in the following cases:
+
+* There is no replica set or instance with that UUID.
+* The instance doesn't belong to the replica set.
+* The instance has been disabled or expelled.
+
+
.. container:: table
.. list-table::
@@ -407,8 +463,154 @@ replicasets
Subcommands
~~~~~~~~~~~
-.. container:: table
+replicasets setup
+^^^^^^^^^^^^^^^^^
+
+.. code-block:: console
+
+ $ tt cartridge replicasets setup [--file FILEPATH] [--bootstrap-vshard]
+
+Setup replica sets using a file.
+
+Options:
+
+* ``--file``: A file with a replica set configuration. Defaults to ``replicasets.yml``.
+* ``--bootstrap-vshard``: Bootstrap vshard upon setup.
+
+replicasets save
+^^^^^^^^^^^^^^^^
+
+.. code-block:: console
+
+ $ tt cartridge replicasets save [--file FILEPATH]
+
+Save the current replica set configuration to a file.
+
+Options:
+
+* ``--file``: A file to save the configuration to. Defaults to ``replicasets.yml``.
+
+replicasets list
+^^^^^^^^^^^^^^^^
+
+.. code-block:: console
+
+ $ tt cartridge replicasets list [--replicaset STRING]
+
+
+List the current cluster topology.
+Options:
+
+* ``--replicaset STRING``: A replica set name.
+
+
+replicasets join
+^^^^^^^^^^^^^^^^
+
+.. code-block:: console
+
+ $ tt cartridge replicasets join INSTANCE_NAME ... [--replicaset STRING]
+
+Join the instance to a cluster.
+If a replica set with the specified alias isn't found in cluster, it is created.
+Otherwise, instances are joined to an existing replica set.
+
+Options:
+
+* ``--replicaset STRING``: A replica set name.
+
+replicasets list-roles
+^^^^^^^^^^^^^^^^^^^^^^
+
+.. code-block:: console
+
+ $ tt cartridge replicasets list-roles
+
+List the available roles.
+
+replicasets list-vshard-groups
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+.. code-block:: console
+
+ $ tt cartridge replicasets list-vshard-groups
+
+List the available vshard groups.
+
+
+replicasets add-roles
+^^^^^^^^^^^^^^^^^^^^^
+
+.. code-block:: console
+
+ $ tt cartridge replicasets add-roles ROLE_NAME ... [--replicaset STRING] [--vshard-group STRING]
+
+Add roles to the replica set.
+
+Options:
+
+* ``--replicaset STRING``: A replica set name.
+* ``--vshard-group STRING``: A vshard group for ``vshard-storage`` replica sets.
+
+replicasets remove-roles
+^^^^^^^^^^^^^^^^^^^^^^^^
+
+.. code-block:: console
+
+ $ tt cartridge replicasets remove-roles ROLE_NAME ... [--replicaset STRING]
+
+Remove roles from the replica set.
+
+Options:
+
+* ``--replicaset STRING``: A replica set name.
+
+replicasets set-weight
+^^^^^^^^^^^^^^^^^^^^^^
+
+.. code-block:: console
+
+ $ tt cartridge replicasets set-weight WEIGHT [--replicaset STRING]
+
+Specify replica set weight.
+
+Options:
+
+* ``--replicaset STRING``: A replica set name.
+
+replicasets set-failover-priority
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+.. code-block:: console
+
+ $ tt cartridge replicasets set-failover-priority INSTANCE_NAME ... [--replicaset STRING]
+
+Configure replica set failover priority.
+
+Options:
+
+* ``--replicaset STRING``: A replica set name.
+
+replicasets bootstrap-vshard
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+.. code-block:: console
+
+ $ tt cartridge replicasets bootstrap-vshard
+
+Bootstrap vshard.
+
+replicasets expel
+^^^^^^^^^^^^^^^^^
+
+.. code-block:: console
+
+ $ tt cartridge replicasets expel INSTANCE_NAME ...
+
+Expel one or more instances from the cluster.
+
+.. container:: table
.. list-table::
:widths: 25 75
:header-rows: 0
From 66d37d89cbce7bc46f59336b8a13cdafa310d0fc Mon Sep 17 00:00:00 2001
From: Pavel Semyonov
Date: Tue, 3 Oct 2023 13:53:13 +0700
Subject: [PATCH 11/14] fix
---
doc/reference/tooling/tt_cli/cartridge.rst | 290 +--------------------
doc/reference/tooling/tt_cli/pack.rst | 2 +-
2 files changed, 15 insertions(+), 277 deletions(-)
diff --git a/doc/reference/tooling/tt_cli/cartridge.rst b/doc/reference/tooling/tt_cli/cartridge.rst
index 09cf54f57d..946bcfcde6 100644
--- a/doc/reference/tooling/tt_cli/cartridge.rst
+++ b/doc/reference/tooling/tt_cli/cartridge.rst
@@ -63,7 +63,7 @@ Get a list of the available admin functions:
.. code-block:: console
- tt cartridge admin --name APPNAME --list
+ $ tt cartridge admin --name APPNAME --list
• Available admin functions:
@@ -73,7 +73,7 @@ Get help for a specific function:
.. code-block:: console
- tt cartridge admin --name APPNAME probe --help
+ $ tt cartridge admin --name APPNAME probe --help
• Admin function "probe" usage:
@@ -86,7 +86,7 @@ Call a function with an argument:
.. code-block:: console
- tt cartridge admin --name APPNAME probe --uri localhost:3301
+ $ tt cartridge admin --name APPNAME probe --uri localhost:3301
• Probe "localhost:3301": OK
@@ -205,6 +205,15 @@ The failover configuration file defaults to ``failover.yml``.
The ``failover.yml`` file might look as follows:
+.. code-block:: yaml
+
+ mode: stateful
+ state_provider: stateboard
+ stateboard_params:
+ uri: localhost:4401
+ password: passwd
+ failover_timeout: 15
+
failover status
^^^^^^^^^^^^^^^
@@ -223,80 +232,6 @@ failover disable
Disable failover.
-.. code-block:: yaml
-
- mode: stateful
- state_provider: stateboard
- stateboard_params:
- uri: localhost:4401
- password: passwd
- failover_timeout: 15
-
-.. container:: table
-
- .. list-table::
- :widths: 25 75
- :header-rows: 0
-
- * - ``set``
- - Setup failover in the specified mode:
-
- * ``stateful``
- * ``eventual``
- * ``disabled``
-
- Usage:
-
- .. code-block:: console
-
- $ tt cartridge failover set MODE [FAILOVER_SET_OPTION ...]
-
- Options:
-
- * ``--state-provider STRING``: A failover's state provider. Can be ``stateboard`` or ``etcd2``. Used only in the ``stateful`` mode.
- * ``--params STRING``: Failover parameters specified in a JSON-formatted string, for example, ``"{'fencing_timeout': 10', 'fencing_enabled': true}"``.
- * ``--provider-params STRING``: Failover provider parameters specified in a JSON-formatted string, for example, ``"{'lock_delay': 14}"``.
-
- * - ``setup``
- - Setup failover with parameters described in a file.
- The failover configuration file defaults to ``failover.yml``.
-
- Usage:
-
- .. code-block:: console
-
- $ tt cartridge failover setup --file STRING
-
- The ``failover.yml`` file might look as follows:
-
- .. code-block:: yaml
-
- mode: stateful
- state_provider: stateboard
- stateboard_params:
- uri: localhost:4401
- password: passwd
- failover_timeout: 15
-
- * - ``status``
- - Get the current failover status.
-
- Usage:
-
- .. code-block:: console
-
- $ tt cartridge failover status
-
- * - ``disable``
- - Disable failover.
-
- Usage:
-
- .. code-block:: console
-
- $ tt cartridge failover disable
-
-
.. _tt_cartridge_failover_options:
Options
@@ -318,7 +253,7 @@ repair
.. code-block:: console
- tt cartridge repair COMMAND [REPAIR_OPTION ...]
+ $ tt cartridge repair COMMAND [REPAIR_OPTION ...]
``tt cartridge repair`` repairs a running application.
@@ -367,54 +302,6 @@ Set the instance as the leader of the replica set. Raise an error in the followi
* The instance doesn't belong to the replica set.
* The instance has been disabled or expelled.
-
-.. container:: table
-
- .. list-table::
- :widths: 25 75
- :header-rows: 0
-
- * - ``list-topology``
- - Get a summary of the current cluster topology.
-
- Usage:
-
- .. code-block:: console
-
- $ tt cartridge repair list-topology [REPAIR_OPTION ...]
-
- * - ``remove-instance``
- - Remove the instance with the specified UUID from the cluster. If the instance isn't found, raise an error.
-
- Usage:
-
- .. code-block:: console
-
- $ tt cartridge repair remove-instance UUID [REPAIR_OPTION ...]
-
- * - ``set-advertise-uri``
- - Change the instance's advertise URI. Raise an error if the instance isn't found or is expelled.
-
- Usage:
-
- .. code-block:: console
-
- $ tt cartridge repair set-advertise-uri INSTANCE-UUID NEW-URI [REPAIR_OPTION ...]
-
- * - ``set-leader``
- - Set the instance as the leader of the replica set. Raise an error in the following cases:
-
- * There is no replica set or instance with that UUID.
- * The instance doesn't belong to the replica set.
- * The instance has been disabled or expelled.
-
- Usage:
-
- .. code-block:: console
-
- tt cartridge repair set-leader REPLICASET-UUID INSTANCE-UUID [REPAIR_OPTION ...]
-
-
.. _tt_cartridge_repair_options:
Options
@@ -608,153 +495,4 @@ replicasets expel
$ tt cartridge replicasets expel INSTANCE_NAME ...
-Expel one or more instances from the cluster.
-
-.. container:: table
- .. list-table::
- :widths: 25 75
- :header-rows: 0
-
- * - ``setup``
- - Setup replica sets using a file.
-
- Usage:
-
- .. code-block:: console
-
- $ tt cartridge replicasets setup [--file FILEPATH] [--bootstrap-vshard]
-
- Options:
-
- * ``--file``: A file with a replica set configuration. Defaults to ``replicasets.yml``.
- * ``--bootstrap-vshard``: Bootstrap vshard upon setup.
-
- * - ``save``
- - Save the current replica set configuration to a file.
-
- Usage:
-
- .. code-block:: console
-
- $ tt cartridge replicasets save [--file FILEPATH]
-
- Options:
-
- * ``--file``: A file to save the configuration to. Defaults to ``replicasets.yml``.
-
- * - ``list``
- - List the current cluster topology.
-
- Usage:
-
- .. code-block:: console
-
- $ tt cartridge replicasets list [--replicaset STRING]
-
- Options:
-
- * ``--replicaset STRING``: A replica set name.
-
- * - ``join``
- - Join the instance to a cluster.
- If a replica set with the specified alias isn't found in cluster, it is created.
- Otherwise, instances are joined to an existing replica set.
-
- Usage:
-
- .. code-block:: console
-
- $ tt cartridge replicasets join INSTANCE_NAME ... [--replicaset STRING]
-
- Options:
-
- * ``--replicaset STRING``: A replica set name.
-
- * - ``list-roles``
- - List the available roles.
-
- Usage:
-
- .. code-block:: console
-
- $ tt cartridge replicasets list-roles
-
- * - ``list-vshard-groups``
- - List the available vshard groups.
-
- Usage:
-
- .. code-block:: console
-
- $ tt cartridge replicasets list-vshard-groups
-
- * - ``add-roles``
- - Add roles to the replica set.
-
- Usage:
-
- .. code-block:: console
-
- $ tt cartridge replicasets add-roles ROLE_NAME ... [--replicaset STRING] [--vshard-group STRING]
-
- Options:
-
- * ``--replicaset STRING``: A replica set name.
- * ``--vshard-group STRING``: A vshard group for ``vshard-storage`` replica sets.
-
- * - ``remove-roles``
- - Remove roles from the replica set.
-
- Usage:
-
- .. code-block:: console
-
- $ tt cartridge replicasets remove-roles ROLE_NAME ... [--replicaset STRING]
-
- Options:
-
- * ``--replicaset STRING``: A replica set name.
-
- * - ``set-weight``
- - Specify replica set weight.
-
- Usage:
-
- .. code-block:: console
-
- $ tt cartridge replicasets set-weight WEIGHT [--replicaset STRING]
-
- Options:
-
- * ``--replicaset STRING``: A replica set name.
-
- * - ``set-failover-priority``
- - Configure replica set failover priority.
-
- Usage:
-
- .. code-block:: console
-
- $ tt cartridge replicasets set-failover-priority INSTANCE_NAME ... [--replicaset STRING]
-
- Options:
-
- * ``--replicaset STRING``: A replica set name.
-
- * - ``bootstrap-vshard``
- - Bootstrap vshard.
-
- Usage:
-
- .. code-block:: console
-
- $ tt cartridge replicasets bootstrap-vshard
-
- * - ``expel``
- - Expel one or more instances from the cluster.
-
- Usage:
-
- .. code-block:: console
-
- $ tt cartridge replicasets expel INSTANCE_NAME ...
+Expel one or more instances from the cluster.
\ 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 3e9aa13f06..8d1b62b705 100644
--- a/doc/reference/tooling/tt_cli/pack.rst
+++ b/doc/reference/tooling/tt_cli/pack.rst
@@ -17,7 +17,7 @@ The command below creates a DEB package for an application:
.. 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``.
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.
From c01689ee981f4d7b8171b922233026d9a228684c Mon Sep 17 00:00:00 2001
From: Pavel Semyonov
Date: Tue, 3 Oct 2023 14:20:38 +0700
Subject: [PATCH 12/14] Convert H4 to H3 in cartridge.rst
---
doc/reference/tooling/tt_cli/cartridge.rst | 115 +++++++++++++++------
1 file changed, 81 insertions(+), 34 deletions(-)
diff --git a/doc/reference/tooling/tt_cli/cartridge.rst b/doc/reference/tooling/tt_cli/cartridge.rst
index 946bcfcde6..51e28f6a96 100644
--- a/doc/reference/tooling/tt_cli/cartridge.rst
+++ b/doc/reference/tooling/tt_cli/cartridge.rst
@@ -167,14 +167,17 @@ failover
$ tt cartridge failover COMMAND [COMMAND_OPTION ...]
``tt cartridge failover`` manages an application failover.
+The following commands are available:
-.. _tt_cartridge_failover_commands:
+* ``set``
+* ``setup``
+* ``status``
+* ``disable``
-Subcommands
-~~~~~~~~~~~
+.. _tt_cartridge_failover_set:
failover set
-^^^^^^^^^^^^
+~~~~~~~~~~~~
.. code-block:: console
@@ -192,8 +195,10 @@ Options:
* ``--params STRING``: Failover parameters specified in a JSON-formatted string, for example, ``"{'fencing_timeout': 10', 'fencing_enabled': true}"``.
* ``--provider-params STRING``: Failover provider parameters specified in a JSON-formatted string, for example, ``"{'lock_delay': 14}"``.
+.. _tt_cartridge_failover_setup:
+
failover setup
-^^^^^^^^^^^^^^
+~~~~~~~~~~~~~~
.. code-block:: console
@@ -214,8 +219,10 @@ The ``failover.yml`` file might look as follows:
password: passwd
failover_timeout: 15
+.. _tt_cartridge_failover_status:
+
failover status
-^^^^^^^^^^^^^^^
+~~~~~~~~~~~~~~~
.. code-block:: console
@@ -223,8 +230,10 @@ failover status
Get the current failover status.
+.. _tt_cartridge_failover_disable:
+
failover disable
-^^^^^^^^^^^^^^^^
+~~~~~~~~~~~~~~~~
.. code-block:: console
@@ -256,14 +265,17 @@ repair
$ tt cartridge repair COMMAND [REPAIR_OPTION ...]
``tt cartridge repair`` repairs a running application.
+The following commands are available:
-.. _tt_cartridge_repair_commands:
+* ``list-topology``
+* ``remove-instance``
+* ``set-advertise-uri``
+* ``set-leader``
-Subcommands
-~~~~~~~~~~~
+.. _tt_cartridge_repair_list-topology:
repair list-topology
-^^^^^^^^^^^^^^^^^^^^
+~~~~~~~~~~~~~~~~~~~~
.. code-block:: console
@@ -271,8 +283,10 @@ repair list-topology
Get a summary of the current cluster topology.
+.. _tt_cartridge_repair_remove-instance:
+
repair remove-instance
-^^^^^^^^^^^^^^^^^^^^^^
+~~~~~~~~~~~~~~~~~~~~~~
.. code-block:: console
@@ -280,8 +294,10 @@ repair remove-instance
Remove the instance with the specified UUID from the cluster. If the instance isn't found, raise an error.
+.. _tt_cartridge_repair_set-advertise-uri:
+
repair set-advertise-uri
-^^^^^^^^^^^^^^^^^^^^^^^^
+~~~~~~~~~~~~~~~~~~~~~~~~
.. code-block:: console
@@ -289,8 +305,10 @@ repair set-advertise-uri
Change the instance's advertise URI. Raise an error if the instance isn't found or is expelled.
+.. _tt_cartridge_set-leader:
+
repair set-leader
-^^^^^^^^^^^^^^^^^
+~~~~~~~~~~~~~~~~~
.. code-block:: console
@@ -331,8 +349,6 @@ The following options work with any ``repair`` command, except ``list-topology``
Enable instance configuration to reload after the patch.
-
-
.. _tt_cartridge_replicasets:
replicasets
@@ -343,15 +359,25 @@ replicasets
$ tt cartridge replicasets COMMAND [COMMAND_OPTION ...]
``tt cartridge replicasets`` manages an application's replica sets.
-
-
-.. _tt_cartridge_replicasets_commands:
-
-Subcommands
-~~~~~~~~~~~
+The following commands are available:
+
+* ``setup``
+* ``save``
+* ``list``
+* ``join``
+* ``list-roles``
+* ``list-vshard-groups``
+* ``add-roles``
+* ``remove-roles``
+* ``set-weight``
+* ``set-failover-priority``
+* ``bootstrap-vshard``
+* ``expel``
+
+.. _tt_cartridge_replicasets_setup:
replicasets setup
-^^^^^^^^^^^^^^^^^
+~~~~~~~~~~~~~~~~~
.. code-block:: console
@@ -364,8 +390,10 @@ Options:
* ``--file``: A file with a replica set configuration. Defaults to ``replicasets.yml``.
* ``--bootstrap-vshard``: Bootstrap vshard upon setup.
+.. _tt_cartridge_replicasets_save:
+
replicasets save
-^^^^^^^^^^^^^^^^
+~~~~~~~~~~~~~~~~
.. code-block:: console
@@ -377,8 +405,11 @@ Options:
* ``--file``: A file to save the configuration to. Defaults to ``replicasets.yml``.
+
+.. _tt_cartridge_replicasets_list:
+
replicasets list
-^^^^^^^^^^^^^^^^
+~~~~~~~~~~~~~~~~
.. code-block:: console
@@ -391,9 +422,10 @@ Options:
* ``--replicaset STRING``: A replica set name.
+.. _tt_cartridge_replicasets_join:
replicasets join
-^^^^^^^^^^^^^^^^
+~~~~~~~~~~~~~~~~
.. code-block:: console
@@ -407,8 +439,10 @@ Options:
* ``--replicaset STRING``: A replica set name.
+.. _tt_cartridge_replicasets_list-roles:
+
replicasets list-roles
-^^^^^^^^^^^^^^^^^^^^^^
+~~~~~~~~~~~~~~~~~~~~~~
.. code-block:: console
@@ -416,8 +450,10 @@ replicasets list-roles
List the available roles.
+.. _tt_cartridge_replicasets_list-vshard-groups:
+
replicasets list-vshard-groups
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. code-block:: console
@@ -425,9 +461,10 @@ replicasets list-vshard-groups
List the available vshard groups.
+.. _tt_cartridge_replicasets_add-roles:
replicasets add-roles
-^^^^^^^^^^^^^^^^^^^^^
+~~~~~~~~~~~~~~~~~~~~~
.. code-block:: console
@@ -440,8 +477,10 @@ Options:
* ``--replicaset STRING``: A replica set name.
* ``--vshard-group STRING``: A vshard group for ``vshard-storage`` replica sets.
+.. _tt_cartridge_replicasets_remove-roles:
+
replicasets remove-roles
-^^^^^^^^^^^^^^^^^^^^^^^^
+~~~~~~~~~~~~~~~~~~~~~~~~
.. code-block:: console
@@ -453,8 +492,10 @@ Options:
* ``--replicaset STRING``: A replica set name.
+.. _tt_cartridge_replicasets_set-weight:
+
replicasets set-weight
-^^^^^^^^^^^^^^^^^^^^^^
+~~~~~~~~~~~~~~~~~~~~~~
.. code-block:: console
@@ -466,8 +507,10 @@ Options:
* ``--replicaset STRING``: A replica set name.
+.. _tt_cartridge_replicasets_set-failover-priority:
+
replicasets set-failover-priority
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. code-block:: console
@@ -479,8 +522,10 @@ Options:
* ``--replicaset STRING``: A replica set name.
+.. _tt_cartridge_replicasets_bootstrap-vshard:
+
replicasets bootstrap-vshard
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. code-block:: console
@@ -488,8 +533,10 @@ replicasets bootstrap-vshard
Bootstrap vshard.
+.. _tt_cartridge_replicasets_expel:
+
replicasets expel
-^^^^^^^^^^^^^^^^^
+~~~~~~~~~~~~~~~~~
.. code-block:: console
From 451aaea1d3794f18734cc8b076e993e19f7ecdea Mon Sep 17 00:00:00 2001
From: Pavel Semyonov
Date: Tue, 3 Oct 2023 14:58:01 +0700
Subject: [PATCH 13/14] Fix article
---
doc/reference/tooling/tt_cli/cartridge.rst | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/doc/reference/tooling/tt_cli/cartridge.rst b/doc/reference/tooling/tt_cli/cartridge.rst
index 51e28f6a96..101bb07b7d 100644
--- a/doc/reference/tooling/tt_cli/cartridge.rst
+++ b/doc/reference/tooling/tt_cli/cartridge.rst
@@ -415,7 +415,6 @@ replicasets list
$ tt cartridge replicasets list [--replicaset STRING]
-
List the current cluster topology.
Options:
@@ -432,7 +431,7 @@ replicasets join
$ tt cartridge replicasets join INSTANCE_NAME ... [--replicaset STRING]
Join the instance to a cluster.
-If a replica set with the specified alias isn't found in cluster, it is created.
+If a replica set with the specified alias isn't found in the cluster, it is created.
Otherwise, instances are joined to an existing replica set.
Options:
From f8991810943913a281462db20107103d191b8bf5 Mon Sep 17 00:00:00 2001
From: Pavel Semyonov
Date: Tue, 3 Oct 2023 15:41:09 +0700
Subject: [PATCH 14/14] fix
---
doc/reference/tooling/tt_cli/check.rst | 2 +-
doc/reference/tooling/tt_cli/clean.rst | 2 +-
doc/reference/tooling/tt_cli/connect.rst | 2 +-
doc/reference/tooling/tt_cli/coredump.rst | 12 ++++++++++++
doc/reference/tooling/tt_cli/install.rst | 2 +-
doc/reference/tooling/tt_cli/logrotate.rst | 2 +-
doc/reference/tooling/tt_cli/restart.rst | 20 +++++++++++++++++++-
doc/reference/tooling/tt_cli/search.rst | 2 +-
doc/reference/tooling/tt_cli/start.rst | 2 +-
doc/reference/tooling/tt_cli/status.rst | 2 +-
doc/reference/tooling/tt_cli/stop.rst | 2 +-
11 files changed, 40 insertions(+), 10 deletions(-)
diff --git a/doc/reference/tooling/tt_cli/check.rst b/doc/reference/tooling/tt_cli/check.rst
index 9548deb9be..ddbac81583 100644
--- a/doc/reference/tooling/tt_cli/check.rst
+++ b/doc/reference/tooling/tt_cli/check.rst
@@ -5,7 +5,7 @@ Checking an application file
.. code-block:: console
- $ tt check {INSTANCE|APPLICATION[:APP_INSTANCE]}
+ $ tt check {INSTANCE | APPLICATION[:APP_INSTANCE]}
``tt check`` checks the specified Tarantool application or instance for syntax errors.
diff --git a/doc/reference/tooling/tt_cli/clean.rst b/doc/reference/tooling/tt_cli/clean.rst
index 5e350aee28..c35860b26f 100644
--- a/doc/reference/tooling/tt_cli/clean.rst
+++ b/doc/reference/tooling/tt_cli/clean.rst
@@ -5,7 +5,7 @@ Cleaning instance files
.. code-block:: console
- $ tt clean {INSTANCE|APPLICATION[:APP_INSTANCE]} [OPTION ...]
+ $ tt clean {INSTANCE | APPLICATION[:APP_INSTANCE]} [OPTION ...]
``tt clean`` cleans stored files of Tarantool instances: logs, snapshots, and
other files. To avoid accidental deletion of files, ``tt clean`` shows
diff --git a/doc/reference/tooling/tt_cli/connect.rst b/doc/reference/tooling/tt_cli/connect.rst
index 49f11177db..9f842aab76 100644
--- a/doc/reference/tooling/tt_cli/connect.rst
+++ b/doc/reference/tooling/tt_cli/connect.rst
@@ -5,7 +5,7 @@ Connecting to a Tarantool instance
.. code-block:: console
- $ tt connect URI|INSTANCE [OPTION ...]
+ $ tt connect {URI|INSTANCE} [OPTION ...]
``tt connect`` connects to a Tarantool instance by its URI or name specified
diff --git a/doc/reference/tooling/tt_cli/coredump.rst b/doc/reference/tooling/tt_cli/coredump.rst
index 9d229a8dbd..598386c9cb 100644
--- a/doc/reference/tooling/tt_cli/coredump.rst
+++ b/doc/reference/tooling/tt_cli/coredump.rst
@@ -22,6 +22,10 @@ Commands
pack
~~~~
+.. code-block:: console
+
+ $ tt coredump pack COREDUMP_FILE
+
Pack a Tarantool core dump and supporting data into a ``tar.gz`` archive.
It includes:
@@ -35,6 +39,10 @@ Option: a path to a core dump file.
unpack
~~~~~~
+.. code-block:: console
+
+ $ tt coredump unpack ARCHIVE
+
Unpack a Tarantool core dump created with ``tt coredump pack`` into a new directory.
Option: a path to a ``tar.gz`` archive packed by ``tt coredump pack``.
@@ -42,6 +50,10 @@ Option: a path to a ``tar.gz`` archive packed by ``tt coredump pack``.
inspect
~~~~~~~
+.. code-block:: console
+
+ $ tt coredump inspect DIRECTORY
+
Inspect a Tarantool core dump directory with the `GNU debugger `__ (``gdb``)
The directory being inspected must have the same structure as the core dump archive
created by ``tt coredump pack``.
diff --git a/doc/reference/tooling/tt_cli/install.rst b/doc/reference/tooling/tt_cli/install.rst
index ee02575329..e8b2e7e829 100644
--- a/doc/reference/tooling/tt_cli/install.rst
+++ b/doc/reference/tooling/tt_cli/install.rst
@@ -3,7 +3,7 @@
Installing Tarantool software
=============================
-.. code-block:: bash
+.. code-block:: console
$ tt install PROGRAM_NAME [VERSION] [OPTION ...]
diff --git a/doc/reference/tooling/tt_cli/logrotate.rst b/doc/reference/tooling/tt_cli/logrotate.rst
index 3d29e90d01..bfb7a68bf0 100644
--- a/doc/reference/tooling/tt_cli/logrotate.rst
+++ b/doc/reference/tooling/tt_cli/logrotate.rst
@@ -5,7 +5,7 @@ Rotating instance logs
.. code-block:: console
- $ tt logrotate {INSTANCE|APPLICATION[:APP_INSTANCE]}
+ $ tt logrotate {INSTANCE | APPLICATION[:APP_INSTANCE]}
``tt logrotate`` rotates logs of a specified Tarantool instance.
Learn more about :ref:`rotating logs `.
diff --git a/doc/reference/tooling/tt_cli/restart.rst b/doc/reference/tooling/tt_cli/restart.rst
index a3f1e4d8db..8b46b98840 100644
--- a/doc/reference/tooling/tt_cli/restart.rst
+++ b/doc/reference/tooling/tt_cli/restart.rst
@@ -5,7 +5,7 @@ Restarting a Tarantool instance
.. code-block:: console
- $ tt restart INSTANCE [OPTION ...]
+ $ tt restart {INSTANCE | APPLICATION[:APP_INSTANCE]} [OPTION ...]
``tt restart`` restarts the specified running Tarantool instance.
A ``tt restart`` call is equivalent to consecutive calls of
@@ -21,9 +21,27 @@ Options
Examples
--------
+Single instance
+~~~~~~~~~~~~~~~
+
Restart the ``app`` instance with automatic confirmation:
.. code-block:: console
$ tt restart app -y
+Multiple instances
+~~~~~~~~~~~~~~~~~~
+
+* Restart all instances of the application stored in the ``app/`` directory inside
+ ``instances_enabled`` in accordance with the :ref:`instances configuration `:
+
+ .. code-block:: console
+
+ $ tt restart app
+
+* Restart only the ``master`` instance of the application stored in the ``app/`` directory inside ``instances_enabled``:
+
+ .. code-block:: console
+
+ $ tt restart app:master
\ No newline at end of file
diff --git a/doc/reference/tooling/tt_cli/search.rst b/doc/reference/tooling/tt_cli/search.rst
index 933e421540..040cc9e0e7 100644
--- a/doc/reference/tooling/tt_cli/search.rst
+++ b/doc/reference/tooling/tt_cli/search.rst
@@ -3,7 +3,7 @@
Listing available Tarantool versions
====================================
-.. code-block:: bash
+.. code-block:: console
$ tt search PROGRAM_NAME [OPTION ...]
diff --git a/doc/reference/tooling/tt_cli/start.rst b/doc/reference/tooling/tt_cli/start.rst
index f9aadd7ec8..9bae9fe4a4 100644
--- a/doc/reference/tooling/tt_cli/start.rst
+++ b/doc/reference/tooling/tt_cli/start.rst
@@ -5,7 +5,7 @@ Starting a Tarantool instance
.. code-block:: console
- $ tt start {INSTANCE|APPLICATION[:APP_INSTANCE]}
+ $ tt start {INSTANCE | APPLICATION[:APP_INSTANCE]}
``tt start`` starts Tarantool applications.
diff --git a/doc/reference/tooling/tt_cli/status.rst b/doc/reference/tooling/tt_cli/status.rst
index 50bd4b2cd9..cfc35c0499 100644
--- a/doc/reference/tooling/tt_cli/status.rst
+++ b/doc/reference/tooling/tt_cli/status.rst
@@ -5,7 +5,7 @@ Checking instance status
.. code-block:: console
- $ tt status {INSTANCE|APPLICATION[:APP_INSTANCE]}
+ $ tt status {INSTANCE | APPLICATION[:APP_INSTANCE]}
``tt status`` prints the current status of the specified Tarantool instance or
all instances of an application.
diff --git a/doc/reference/tooling/tt_cli/stop.rst b/doc/reference/tooling/tt_cli/stop.rst
index a2f44250c8..ef15754408 100644
--- a/doc/reference/tooling/tt_cli/stop.rst
+++ b/doc/reference/tooling/tt_cli/stop.rst
@@ -5,7 +5,7 @@ Stopping a Tarantool instance
.. code-block:: console
- $ tt stop {INSTANCE|APPLICATION[:APP_INSTANCE]}
+ $ tt stop {INSTANCE | APPLICATION[:APP_INSTANCE]}
``tt stop`` stops the specified running Tarantool instances.