Skip to content

Add TCM dev mode, slab stats, tt console #4618

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Nov 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/tooling/tcm/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <tcm_releases/index>
16 changes: 11 additions & 5 deletions doc/tooling/tcm/tcm_cluster_management/tcm_cluster_state.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <box_introspection-box_info>`, :ref:`box.stat <box_introspection-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 <memtx-memory>`
* 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 <tt-interactive-console>` with code completion and highlighting or
the default :ref:`Tarantool console <interactive_console>`.

.. _tcm_cluster_state_urls:

Expand Down
69 changes: 69 additions & 0 deletions doc/tooling/tcm/tcm_dev_mode.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
.. _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 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:

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 <tcm_ui_overview>`:

#. 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 <tcm_configuration>`:

.. code-block:: yaml

# tcm_config.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 by default, set the
``TCM_MODE`` environment variable to ``development``:

.. code-block:: console

$ export TCM_MODE=development
$ tcm
3 changes: 2 additions & 1 deletion doc/tooling/tcm/tcm_ui_overview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <tcm_access_control_permissions>`.
to a particular user is determined by the user's :ref:`permissions <tcm_access_control_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 <tcm_ui_user_settings>` of the **Default Admin** user.
To learn more about the development mode, see :ref:`tcm_dev_mode`.

.. _tcm_ui_groups:

Expand Down
Loading