From d08d29d3b21692a0e29695d4df1c435b3044ff3b Mon Sep 17 00:00:00 2001
From: Pavel Semyonov
Date: Thu, 31 Oct 2024 17:28:50 +0700
Subject: [PATCH 1/3] Add TCM dev mode, slab stats, tt console
---
doc/tooling/tcm/index.rst | 1 +
.../tcm_cluster_state.rst | 16 +++--
doc/tooling/tcm/tcm_dev_mode.rst | 70 +++++++++++++++++++
doc/tooling/tcm/tcm_ui_overview.rst | 3 +-
4 files changed, 84 insertions(+), 6 deletions(-)
create mode 100644 doc/tooling/tcm/tcm_dev_mode.rst
diff --git a/doc/tooling/tcm/index.rst b/doc/tooling/tcm/index.rst
index 38a002890..1251bf6bf 100644
--- a/doc/tooling/tcm/index.rst
+++ b/doc/tooling/tcm/index.rst
@@ -44,5 +44,6 @@ to read data. LDAP authorization is supported as well.
tcm_audit_log
tcm_configuration
tcm_backend_store
+ tcm_dev_mode
tcm_configuration_reference
Releases
diff --git a/doc/tooling/tcm/tcm_cluster_management/tcm_cluster_state.rst b/doc/tooling/tcm/tcm_cluster_management/tcm_cluster_state.rst
index 3d04a689a..5216a5c7b 100644
--- a/doc/tooling/tcm/tcm_cluster_management/tcm_cluster_state.rst
+++ b/doc/tooling/tcm/tcm_cluster_management/tcm_cluster_state.rst
@@ -99,14 +99,20 @@ To view the detailed information about an instance or connect to it, click the c
row in the instances list or a vertex of the graph. On the instance page, you can
find:
-* its configuration overview
+* the instance configuration overview
* current state (with warning and error messages if any)
* the detailed Tarantool information returned by the instance introspection functions
from :ref:`box.info `, :ref:`box.stat `,
- and other built-in modules.
-
-Additionally, on the instance details page there is a terminal in which you can execute
-arbitrary Lua code on the instance.
+ and other built-in modules
+* memory usage by the :ref:`slab allocator `
+* instance users and roles
+* stored functions
+* instance metrics
+
+The page also provides Lua and SQL terminals to execute built-in functions
+and requests on the instance. You can choose between two Lua terminals: the
+:ref:`tt interactive console ` with code completion and highlighting or
+the default :ref:`Tarantool console `.
.. _tcm_cluster_state_urls:
diff --git a/doc/tooling/tcm/tcm_dev_mode.rst b/doc/tooling/tcm/tcm_dev_mode.rst
new file mode 100644
index 000000000..a5a65d4bb
--- /dev/null
+++ b/doc/tooling/tcm/tcm_dev_mode.rst
@@ -0,0 +1,70 @@
+.. _tcm_dev_mode:
+
+Development mode
+================
+
+.. include:: index.rst
+ :start-after: ee_note_tcm_start
+ :end-before: ee_note_tcm_end
+
+|tcm_full_name| provides a special mode aimed to use during the development.
+This mode enables capabilities that can be useful in development or testing enviroments,
+such as:
+
+*
+
+.. _tcm_dev_mode_enable:
+
+Enabling development mode
+-------------------------
+
+You can enable |tcm| development mode in different ways: in its web interface,
+in the configuration file, using an environment variable, or using a command-line option.
+
+.. _tcm_dev_mode_enable_web:
+
+Web interface
+~~~~~~~~~~~~~
+
+To enable development mode on the running |tcm| instance, use its :ref:`web interface `:
+
+#. Open user settings: click **Settings** under the user name in the header.
+#. Go to the **About** tab.
+#. Click the toggle button beside **tcm/mode**.
+
+.. _tcm_dev_mode_enable_config:
+
+Configuration file
+~~~~~~~~~~~~~~~~~~
+
+To start |tcm| in the development mode, specify the ``mode: development`` option
+in its :ref:`configuration file `:
+
+.. code-block:: yaml
+
+ mode: development
+
+.. _tcm_dev_mode_enable_cli:
+
+Command-line option
+~~~~~~~~~~~~~~~~~~~
+
+To start |tcm| in the development mode, specify the ``--mode=development`` command-line option:
+
+.. code-block:: console
+
+ $ tcm --mode=development
+
+
+.. _tcm_dev_mode_enable_env:
+
+Environment variable
+~~~~~~~~~~~~~~~~~~~~
+
+To make new |tcm| instances start in the development mode, set the ``TCM_MODE``
+environment variable to ``development``:
+
+.. code-block:: console
+
+ $ export TCM_MODE=development
+ $ tcm
\ No newline at end of file
diff --git a/doc/tooling/tcm/tcm_ui_overview.rst b/doc/tooling/tcm/tcm_ui_overview.rst
index 3c2234d40..1ba7884a7 100644
--- a/doc/tooling/tcm/tcm_ui_overview.rst
+++ b/doc/tooling/tcm/tcm_ui_overview.rst
@@ -72,10 +72,11 @@ Page visibility
---------------
This overview describes most |tcm| pages. The exact set of pages and controls available
-to a particular are determined by the user's :ref:`permissions `.
+to a particular user is determined by the user's :ref:`permissions `.
Some features, such as data schema editing, are available only in the **development** mode.
You can switch to it in the :ref:`user settings ` of the **Default Admin** user.
+To learn more about the development mode, see :ref:`tcm_dev_mode`.
.. _tcm_ui_groups:
From 913ad5424369437e3843fc2c1b16aba970335c66 Mon Sep 17 00:00:00 2001
From: Pavel Semyonov
Date: Fri, 1 Nov 2024 12:32:34 +0700
Subject: [PATCH 2/3] Add TCM dev mode, slab stats, tt console
---
doc/tooling/tcm/tcm_dev_mode.rst | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/doc/tooling/tcm/tcm_dev_mode.rst b/doc/tooling/tcm/tcm_dev_mode.rst
index a5a65d4bb..7d279a385 100644
--- a/doc/tooling/tcm/tcm_dev_mode.rst
+++ b/doc/tooling/tcm/tcm_dev_mode.rst
@@ -8,10 +8,8 @@ Development mode
:end-before: ee_note_tcm_end
|tcm_full_name| provides a special mode aimed to use during the development.
-This mode enables capabilities that can be useful in development or testing enviroments,
-such as:
-
-*
+This mode extends the web interface with capabilities that can help in development
+or testing environments, such as starting and stopping instances or instance promotion.
.. _tcm_dev_mode_enable:
@@ -42,6 +40,7 @@ in its :ref:`configuration file `:
.. code-block:: yaml
+ # tcm_config.yaml
mode: development
.. _tcm_dev_mode_enable_cli:
@@ -61,8 +60,8 @@ To start |tcm| in the development mode, specify the ``--mode=development`` comma
Environment variable
~~~~~~~~~~~~~~~~~~~~
-To make new |tcm| instances start in the development mode, set the ``TCM_MODE``
-environment variable to ``development``:
+To make new |tcm| instances start in the development mode by default, set the
+``TCM_MODE`` environment variable to ``development``:
.. code-block:: console
From 6c2bfa25fca1f7cd1beed99969feb94e98d14e10 Mon Sep 17 00:00:00 2001
From: Pavel Semyonov
Date: Tue, 5 Nov 2024 15:48:44 +0700
Subject: [PATCH 3/3] Update doc/tooling/tcm/tcm_dev_mode.rst
Co-authored-by: Kseniia Antonova <73473519+xuniq@users.noreply.github.com>
---
doc/tooling/tcm/tcm_dev_mode.rst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/tooling/tcm/tcm_dev_mode.rst b/doc/tooling/tcm/tcm_dev_mode.rst
index 7d279a385..f870f7d99 100644
--- a/doc/tooling/tcm/tcm_dev_mode.rst
+++ b/doc/tooling/tcm/tcm_dev_mode.rst
@@ -66,4 +66,4 @@ To make new |tcm| instances start in the development mode by default, set the
.. code-block:: console
$ export TCM_MODE=development
- $ tcm
\ No newline at end of file
+ $ tcm