From 378e95fcdb24d8ed939b2c47af33e42982ae6a98 Mon Sep 17 00:00:00 2001 From: Pavel Semyonov Date: Sat, 2 Nov 2024 15:22:57 +0700 Subject: [PATCH 1/3] Add tt 2.5 features: stop confirmation, extended status, incomplete install version --- doc/admin/server_introspection.rst | 2 -- doc/getting_started/getting_started_db.rst | 4 ++-- doc/getting_started/getting_started_tcm.rst | 8 ++++---- .../replication_tutorials/repl_bootstrap.rst | 14 +++++++------- .../repl_bootstrap_auto.rst | 8 ++++---- .../repl_bootstrap_master_master.rst | 6 +++--- doc/tooling/tt_cli/install.rst | 11 +++++++++-- doc/tooling/tt_cli/start_stop_instance.rst | 17 ++++++++--------- doc/tooling/tt_cli/status.rst | 17 ++++++++++++----- doc/tooling/tt_cli/stop.rst | 18 +++++++++++++++++- 10 files changed, 66 insertions(+), 39 deletions(-) diff --git a/doc/admin/server_introspection.rst b/doc/admin/server_introspection.rst index 7d3b49626..b74f853fc 100644 --- a/doc/admin/server_introspection.rst +++ b/doc/admin/server_introspection.rst @@ -79,8 +79,6 @@ To check the instance status, run: .. code-block:: console $ tt status my_app - INSTANCE STATUS PID MODE - my_app RUNNING 67172 RW $ # - OR - diff --git a/doc/getting_started/getting_started_db.rst b/doc/getting_started/getting_started_db.rst index af1155948..a062d3c4f 100644 --- a/doc/getting_started/getting_started_db.rst +++ b/doc/getting_started/getting_started_db.rst @@ -76,8 +76,8 @@ Starting an instance .. code-block:: console $ tt status create_db - INSTANCE STATUS PID MODE - create_db:instance001 RUNNING 54560 RW + INSTANCE STATUS PID MODE CONFIG BOX UPSTREAM + create_db:instance001 RUNNING 8685 RW ready running -- #. Connect to the instance with :ref:`tt connect `: diff --git a/doc/getting_started/getting_started_tcm.rst b/doc/getting_started/getting_started_tcm.rst index bab7154a2..be3408e0f 100644 --- a/doc/getting_started/getting_started_tcm.rst +++ b/doc/getting_started/getting_started_tcm.rst @@ -253,10 +253,10 @@ To deploy a local cluster based on the configuration from etcd: .. code-block:: console $ tt status cluster - INSTANCE STATUS PID MODE - cluster:instance-001 RUNNING 2058 RW - cluster:instance-002 RUNNING 2059 RO - cluster:instance-003 RUNNING 2060 RO + INSTANCE STATUS PID MODE CONFIG BOX UPSTREAM + cluster:instance-001 RUNNING 8747 RW ready running -- + cluster:instance-002 RUNNING 8748 RO ready running -- + cluster:instance-003 RUNNING 8749 RO ready running -- .. _getting_started_tcm_manage: diff --git a/doc/platform/replication/replication_tutorials/repl_bootstrap.rst b/doc/platform/replication/replication_tutorials/repl_bootstrap.rst index 06f8816d5..d3dde0254 100644 --- a/doc/platform/replication/replication_tutorials/repl_bootstrap.rst +++ b/doc/platform/replication/replication_tutorials/repl_bootstrap.rst @@ -137,9 +137,9 @@ Starting instances .. code-block:: console $ tt status manual_leader - INSTANCE STATUS PID MODE - manual_leader:instance001 RUNNING 15272 RW - manual_leader:instance002 RUNNING 15273 RO + INSTANCE STATUS PID MODE CONFIG BOX UPSTREAM + manual_leader:instance001 RUNNING 8841 RW ready running -- + manual_leader:instance002 RUNNING 8842 RO ready running -- .. _replication-master_replica_status: @@ -292,10 +292,10 @@ Starting an instance .. code-block:: console $ tt status manual_leader - INSTANCE STATUS PID MODE - manual_leader:instance001 RUNNING 15272 RW - manual_leader:instance002 RUNNING 15273 RO - manual_leader:instance003 RUNNING 15551 RO + INSTANCE STATUS PID MODE CONFIG BOX UPSTREAM + manual_leader:instance001 RUNNING 8841 RW ready running -- + manual_leader:instance002 RUNNING 8842 RO ready running -- + manual_leader:instance003 RUNNING 8856 RO ready running -- .. _replication-add_instances-reload-config: diff --git a/doc/platform/replication/replication_tutorials/repl_bootstrap_auto.rst b/doc/platform/replication/replication_tutorials/repl_bootstrap_auto.rst index 6902520b3..11dcba54f 100644 --- a/doc/platform/replication/replication_tutorials/repl_bootstrap_auto.rst +++ b/doc/platform/replication/replication_tutorials/repl_bootstrap_auto.rst @@ -135,10 +135,10 @@ Starting instances .. code-block:: console $ tt status auto_leader - INSTANCE STATUS PID MODE - auto_leader:instance001 RUNNING 24768 RO - auto_leader:instance002 RUNNING 24769 RW - auto_leader:instance003 RUNNING 24767 RO + INSTANCE STATUS PID MODE CONFIG BOX UPSTREAM + auto_leader:instance001 RUNNING 9170 RO ready running -- + auto_leader:instance002 RUNNING 9171 RO ready running -- + auto_leader:instance003 RUNNING 9172 RW ready running -- diff --git a/doc/platform/replication/replication_tutorials/repl_bootstrap_master_master.rst b/doc/platform/replication/replication_tutorials/repl_bootstrap_master_master.rst index 199b59f06..f369cc368 100644 --- a/doc/platform/replication/replication_tutorials/repl_bootstrap_master_master.rst +++ b/doc/platform/replication/replication_tutorials/repl_bootstrap_master_master.rst @@ -141,9 +141,9 @@ Starting instances .. code-block:: console $ tt status master_master - INSTANCE STATUS PID MODE - master_master:instance001 RUNNING 30818 RW - master_master:instance002 RUNNING 30819 RW + INSTANCE STATUS PID MODE CONFIG BOX UPSTREAM + master_master:instance001 RUNNING 9263 RW ready running -- + master_master:instance002 RUNNING 9264 RW ready running -- .. _replication-master-master-check-status: diff --git a/doc/tooling/tt_cli/install.rst b/doc/tooling/tt_cli/install.rst index ca5a58c30..1c97713fb 100644 --- a/doc/tooling/tt_cli/install.rst +++ b/doc/tooling/tt_cli/install.rst @@ -62,8 +62,9 @@ Details ------- When called without an explicitly specified version, ``tt install`` installs the -latest available version. To check versions available for installation, use -:doc:`tt search `. +latest available version. If the version is specified in the incomplete format ``.``, +the command installs the latest available patch version in the series. +To check versions available for installation, use :doc:`tt search `. By default, available versions of Tarantool Community Edition and ``tt`` are taken from their git repositories. Their installation includes building from sources, which requires some tools and @@ -144,6 +145,12 @@ Example $ tt install tarantool +* Install the latest available patch version of Tarantool CE 3.2 release series: + + .. code-block:: console + + $ tt install tarantool 3.2 + * Install Tarantool 2.11.1 from the local repository: .. code-block:: console diff --git a/doc/tooling/tt_cli/start_stop_instance.rst b/doc/tooling/tt_cli/start_stop_instance.rst index e91966b62..a9ee6b370 100644 --- a/doc/tooling/tt_cli/start_stop_instance.rst +++ b/doc/tooling/tt_cli/start_stop_instance.rst @@ -73,21 +73,20 @@ To check the status of instances, execute :ref:`tt status `: .. code-block:: console $ tt status sharded_cluster_crud - INSTANCE STATUS PID MODE - sharded_cluster_crud:storage-a-001 RUNNING 2023 RW - sharded_cluster_crud:storage-a-002 RUNNING 2026 RO - sharded_cluster_crud:storage-b-001 RUNNING 2020 RW - sharded_cluster_crud:storage-b-002 RUNNING 2021 RO - sharded_cluster_crud:router-a-001 RUNNING 2022 RW + INSTANCE STATUS PID MODE CONFIG BOX UPSTREAM + sharded_cluster_crud:router-a-001 RUNNING 8382 RW ready running -- + sharded_cluster_crud:storage-a-001 RUNNING 8386 RW ready running -- + sharded_cluster_crud:storage-a-002 RUNNING 8390 RO ready running -- + sharded_cluster_crud:storage-b-001 RUNNING 8379 RW ready running -- + sharded_cluster_crud:storage-b-002 RUNNING 8380 RO ready running -- To check the status of a specific instance, you need to specify its name: .. code-block:: console $ tt status sharded_cluster_crud:storage-a-001 - INSTANCE STATUS PID MODE - sharded_cluster_crud:storage-a-001 RUNNING 2023 RW - + INSTANCE STATUS PID MODE CONFIG BOX UPSTREAM + sharded_cluster_crud:storage-a-001 RUNNING 8386 RW ready running -- .. _admin-start_stop_instance_connect: diff --git a/doc/tooling/tt_cli/status.rst b/doc/tooling/tt_cli/status.rst index 426c6ee82..6d73dd24e 100644 --- a/doc/tooling/tt_cli/status.rst +++ b/doc/tooling/tt_cli/status.rst @@ -5,15 +5,18 @@ Checking instance status .. code-block:: console - $ tt status [APPLICATION[:APP_INSTANCE]] [-p|--pretty] + $ tt status [APPLICATION[:APP_INSTANCE]] [OPTION ...] ``tt status`` prints the information about Tarantool applications and instances in the current environment. This includes: -- Application and instance names -- Instance statuses: running or not -- PIDs -- Instance modes: read-write or read-only +- ``INSTANCE`` -- application and instance names +- ``STATUS`` -- instance status: running, not running, or terminated with an error +- ``PID`` -- process IDs +- ``MODE`` -- instance modes: read-write or read-only +- ``CONFIG`` -- the instances' states in regard to configuration for Tarantool 3.0 or later (see :ref:`config.info() `) +- ``BOX`` -- the instances' :ref:`box.info() ` statuses +- ``UPSTREAM`` -- the instances' :ref:`box.info.replication[*].upstream ` statuses When called without arguments, prints the status of all enabled applications in the current environment. @@ -41,6 +44,10 @@ Examples Options ------- +.. option:: -d, --details + + Print detailed alerts. + .. option:: -p, --pretty Print the status as a pretty-formatted table. \ No newline at end of file diff --git a/doc/tooling/tt_cli/stop.rst b/doc/tooling/tt_cli/stop.rst index cd6505757..8edefabed 100644 --- a/doc/tooling/tt_cli/stop.rst +++ b/doc/tooling/tt_cli/stop.rst @@ -8,7 +8,9 @@ Stopping a Tarantool instance $ tt stop [APPLICATION[:APP_INSTANCE]] ``tt stop`` stops the specified running Tarantool applications or instances. -When called without arguments, stops all running applications in the current environment. +Before stopping the instances, the command prompts the user for confirmation. + +When called without arguments, ``tt stop`` stops all running applications in the current environment. See also: :ref:`tt-start`, :ref:`tt-restart`, :ref:`tt-status`. @@ -21,9 +23,23 @@ Examples $ tt stop app + +* Stop all instances of the ``app`` application without confirmation: + + .. code-block:: console + + $ tt stop app -y + * Stop the ``replica`` instance of the ``app`` application: .. code-block:: console $ tt stop app:replica + +Options +------- + +.. option:: -y, --yes + + Stop instances without confirmation. \ No newline at end of file From 6cc3996b04311d479b80aa7303376281c1d77fc0 Mon Sep 17 00:00:00 2001 From: Pavel Semyonov Date: Tue, 5 Nov 2024 15:45:37 +0700 Subject: [PATCH 2/3] Replace :doc: link with :ref: --- doc/tooling/tt_cli/install.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/tooling/tt_cli/install.rst b/doc/tooling/tt_cli/install.rst index 1c97713fb..6acdbfb1b 100644 --- a/doc/tooling/tt_cli/install.rst +++ b/doc/tooling/tt_cli/install.rst @@ -24,7 +24,7 @@ or ``tt``. The possible values of ``PROGRAM_NAME`` are: Additionally, ``tt install`` can build open source programs ``tarantool`` and ``tt`` from a specific commit or a pull request on their GitHub repositories. -To uninstall a Tarantool or ``tt`` version, use :doc:`tt uninstall `. +To uninstall a Tarantool or ``tt`` version, use :ref:`tt uninstall `. Options ------- @@ -64,7 +64,7 @@ Details When called without an explicitly specified version, ``tt install`` installs the latest available version. If the version is specified in the incomplete format ``.``, the command installs the latest available patch version in the series. -To check versions available for installation, use :doc:`tt search `. +To check versions available for installation, use :ref:`tt search `. By default, available versions of Tarantool Community Edition and ``tt`` are taken from their git repositories. Their installation includes building from sources, which requires some tools and @@ -179,4 +179,4 @@ Example .. code-block:: console - $ tt install tarantool-dev ~/src/tarantool/build \ No newline at end of file + $ tt install tarantool-dev ~/src/tarantool/build From ab00c0ad368282a742792d6b183c07e63eacdd90 Mon Sep 17 00:00:00 2001 From: Pavel Semyonov Date: Tue, 5 Nov 2024 15:46:35 +0700 Subject: [PATCH 3/3] Fix indent --- doc/getting_started/getting_started_tcm.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/getting_started/getting_started_tcm.rst b/doc/getting_started/getting_started_tcm.rst index be3408e0f..4d7b12485 100644 --- a/doc/getting_started/getting_started_tcm.rst +++ b/doc/getting_started/getting_started_tcm.rst @@ -253,7 +253,7 @@ To deploy a local cluster based on the configuration from etcd: .. code-block:: console $ tt status cluster - INSTANCE STATUS PID MODE CONFIG BOX UPSTREAM + INSTANCE STATUS PID MODE CONFIG BOX UPSTREAM cluster:instance-001 RUNNING 8747 RW ready running -- cluster:instance-002 RUNNING 8748 RO ready running -- cluster:instance-003 RUNNING 8749 RO ready running --