Skip to content

Commit 4a06933

Browse files
authored
Add TCM dev mode, slab stats, tt console (#4618)
Resolves #3902 #4251 #4252
1 parent 55e6c89 commit 4a06933

File tree

4 files changed

+83
-6
lines changed

4 files changed

+83
-6
lines changed

doc/tooling/tcm/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,6 @@ to read data. LDAP authorization is supported as well.
4444
tcm_audit_log
4545
tcm_configuration
4646
tcm_backend_store
47+
tcm_dev_mode
4748
tcm_configuration_reference
4849
Releases <tcm_releases/index>

doc/tooling/tcm/tcm_cluster_management/tcm_cluster_state.rst

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,14 +99,20 @@ To view the detailed information about an instance or connect to it, click the c
9999
row in the instances list or a vertex of the graph. On the instance page, you can
100100
find:
101101

102-
* its configuration overview
102+
* the instance configuration overview
103103
* current state (with warning and error messages if any)
104104
* the detailed Tarantool information returned by the instance introspection functions
105105
from :ref:`box.info <box_introspection-box_info>`, :ref:`box.stat <box_introspection-box_stat>`,
106-
and other built-in modules.
107-
108-
Additionally, on the instance details page there is a terminal in which you can execute
109-
arbitrary Lua code on the instance.
106+
and other built-in modules
107+
* memory usage by the :ref:`slab allocator <memtx-memory>`
108+
* instance users and roles
109+
* stored functions
110+
* instance metrics
111+
112+
The page also provides Lua and SQL terminals to execute built-in functions
113+
and requests on the instance. You can choose between two Lua terminals: the
114+
:ref:`tt interactive console <tt-interactive-console>` with code completion and highlighting or
115+
the default :ref:`Tarantool console <interactive_console>`.
110116

111117
.. _tcm_cluster_state_urls:
112118

doc/tooling/tcm/tcm_dev_mode.rst

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
.. _tcm_dev_mode:
2+
3+
Development mode
4+
================
5+
6+
.. include:: index.rst
7+
:start-after: ee_note_tcm_start
8+
:end-before: ee_note_tcm_end
9+
10+
|tcm_full_name| provides a special mode aimed to use during the development.
11+
This mode extends the web interface with capabilities that can help in development
12+
or testing environments, such as starting and stopping instances or instance promotion.
13+
14+
.. _tcm_dev_mode_enable:
15+
16+
Enabling development mode
17+
-------------------------
18+
19+
You can enable |tcm| development mode in different ways: in its web interface,
20+
in the configuration file, using an environment variable, or using a command-line option.
21+
22+
.. _tcm_dev_mode_enable_web:
23+
24+
Web interface
25+
~~~~~~~~~~~~~
26+
27+
To enable development mode on the running |tcm| instance, use its :ref:`web interface <tcm_ui_overview>`:
28+
29+
#. Open user settings: click **Settings** under the user name in the header.
30+
#. Go to the **About** tab.
31+
#. Click the toggle button beside **tcm/mode**.
32+
33+
.. _tcm_dev_mode_enable_config:
34+
35+
Configuration file
36+
~~~~~~~~~~~~~~~~~~
37+
38+
To start |tcm| in the development mode, specify the ``mode: development`` option
39+
in its :ref:`configuration file <tcm_configuration>`:
40+
41+
.. code-block:: yaml
42+
43+
# tcm_config.yaml
44+
mode: development
45+
46+
.. _tcm_dev_mode_enable_cli:
47+
48+
Command-line option
49+
~~~~~~~~~~~~~~~~~~~
50+
51+
To start |tcm| in the development mode, specify the ``--mode=development`` command-line option:
52+
53+
.. code-block:: console
54+
55+
$ tcm --mode=development
56+
57+
58+
.. _tcm_dev_mode_enable_env:
59+
60+
Environment variable
61+
~~~~~~~~~~~~~~~~~~~~
62+
63+
To make new |tcm| instances start in the development mode by default, set the
64+
``TCM_MODE`` environment variable to ``development``:
65+
66+
.. code-block:: console
67+
68+
$ export TCM_MODE=development
69+
$ tcm

doc/tooling/tcm/tcm_ui_overview.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,11 @@ Page visibility
7272
---------------
7373

7474
This overview describes most |tcm| pages. The exact set of pages and controls available
75-
to a particular are determined by the user's :ref:`permissions <tcm_access_control_permissions>`.
75+
to a particular user is determined by the user's :ref:`permissions <tcm_access_control_permissions>`.
7676

7777
Some features, such as data schema editing, are available only in the **development** mode.
7878
You can switch to it in the :ref:`user settings <tcm_ui_user_settings>` of the **Default Admin** user.
79+
To learn more about the development mode, see :ref:`tcm_dev_mode`.
7980

8081
.. _tcm_ui_groups:
8182

0 commit comments

Comments
 (0)