Skip to content

Add TCM clusters doc #3925

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 2 commits into from
Dec 15, 2023
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
6 changes: 6 additions & 0 deletions doc/reference/tooling/tcm/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,15 @@
Tarantool Cluster Manager
=========================

.. ee_note_tcm_start

.. admonition:: Enterprise Edition
:class: fact

|tcm_full_name| is a part of the `Enterprise Edition <https://www.tarantool.io/compare/>`_.

.. ee_note_tcm_end

|tcm_full_name| (|tcm|) is a web-based visual tool for configuring, managing, and
monitoring Tarantool EE clusters. It provides a GUI for working with clusters
and individual instances, from monitoring their state to executing commands interactively
Expand All @@ -31,6 +35,8 @@ to read data. LDAP authorization is supported as well.
.. toctree::
:maxdepth: 1

tcm_connect_clusters
tcm_cluster_config
tcm_access_control
tcm_audit_log
tcm_configuration
Expand Down
7 changes: 3 additions & 4 deletions doc/reference/tooling/tcm/tcm_access_control.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
Access control
==============

.. admonition:: Enterprise Edition
:class: fact

|tcm_full_name| is a part of the `Enterprise Edition <https://www.tarantool.io/compare/>`_.
.. include:: index.rst
:start-after: ee_note_tcm_start
:end-before: ee_note_tcm_end

|tcm_full_name| features a role-based access control system. It enables flexible
management of access to |tcm| functions, connected clusters, and stored data.
Expand Down
7 changes: 3 additions & 4 deletions doc/reference/tooling/tcm/tcm_audit_log.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
Audit log
=========

.. admonition:: Enterprise Edition
:class: fact

|tcm_full_name| is a part of the `Enterprise Edition <https://www.tarantool.io/compare/>`_.
.. include:: index.rst
:start-after: ee_note_tcm_start
:end-before: ee_note_tcm_end

|tcm_full_name| provides the audit logging functionality for tracking user activity
and security-related events, such as:
Expand Down
85 changes: 85 additions & 0 deletions doc/reference/tooling/tcm/tcm_cluster_config.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
.. _tcm_configuring_clusters:

Configuring clusters
====================

.. include:: index.rst
:start-after: ee_note_tcm_start
:end-before: ee_note_tcm_end

|tcm_full_name| features a built-in text editor for Tarantool EE cluster configurations.

When you :ref:`connect a cluster <tcm_connect_cluster>` to |tcm|, it gains access
to the cluster's centralized configuration storage: an etcd or a Tarantool cluster.
|tcm| has both read and write access to the cluster configuration. This enables
the configuration editor to work in two ways:

* If a configuration already exists, the editor shows its current state.
* When you change the configuration in the editor and apply changes, they
are sent to the configuration storage.

To learn how to write Tarantool cluster configurations, see :ref:`configuration`.

.. _tcm_configuring_clusters_manage:

Managing a cluster's configuration
----------------------------------

The configuration editor is available on the **Cluster** > **Configuration** page.

To start managing a cluster's configuration, select this cluster in the **Cluster**
drop-down and go to the **Configuration** page.

A cluster configuration in |tcm| can consist of one or multiple YAML files.
When there are multiple files, they are all considered parts of a single cluster
configuration. You can use this for structuring big cluster configurations.
All files that form the configuration of a cluster are listed on the left side
of the **Cluster configuration** page.

To add a cluster configuration file, click the plus icon (**+**) below the page title.

To open a configuration file in the editor, click its name in the file list.

To delete a cluster configuration file, click the **Delete** button beside the filename.

To download a cluster configuration file, click the **Download** button beside the filename.

.. warning::

All configuration changes are discarded when you leave the **Cluster configuration** page.
:ref:`Save <tcm_configuring_clusters_save>` the configuration if you want to continue
editing it later or :ref:`apply <tcm_configuring_clusters_apply>` it
to start using it on the cluster.

.. _tcm_configuring_clusters_save:

Saving a configuration draft
----------------------------

|tcm| can store configurations drafts. If you want to leave an unfinished configuration
and return to it later, save it in |tcm|. Saving applies to whole cluster configurations:
it records the edits of all files, file additions, and file deletions.

To save a cluster configuration draft after editing, click **Save** in the **Cluster configuration** page.

All unsaved changes are discarded when you leave the **Cluster configuration** page.

If you have a saved configuration draft, you can reset the changes for each of its
files individually. A reset returns the file into the state that is currently used
by a cluster (that is, saved in the configuration storage). If you reset a newly
added file, it is deleted.

To reset a saved configuration file, click the **Reset** button beside the filename.


.. _tcm_configuring_clusters_apply:

Applying a configuration
------------------------

When you finish editing a configuration and it's ready to use, apply the updated
configuration to the cluster. To apply a cluster configuration, click **Apply**
on the **Cluster configuration** page. This sends the new configuration to the cluster
configuration storage, and it comes into effect upon the cluster configuration reload.


5 changes: 5 additions & 0 deletions doc/reference/tooling/tcm/tcm_configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
Configuration
=============


.. include:: index.rst
:start-after: ee_note_tcm_start
:end-before: ee_note_tcm_end

.. TODO: write specific configuration tutorials for http, security, logging, and so on. (https://github.com/tarantool/doc/issues/3545)

This topic describes how to configure |tcm_full_name|. For the complete
Expand Down
4 changes: 4 additions & 0 deletions doc/reference/tooling/tcm/tcm_configuration_reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
Configuration reference
=======================

.. include:: index.rst
:start-after: ee_note_tcm_start
:end-before: ee_note_tcm_end

This topic describes :ref:`configuration parameters <tcm_configuration>` of |tcm_full_name|.

There are the following groups of |tcm| configuration parameters:
Expand Down
163 changes: 163 additions & 0 deletions doc/reference/tooling/tcm/tcm_connect_clusters.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
.. _tcm_connect_clusters:

Сonnecting clusters
===================

.. include:: index.rst
:start-after: ee_note_tcm_start
:end-before: ee_note_tcm_end

|tcm_full_name| works with clusters that:

* run on Tarantool EE 3.0 or later
* use :ref:`centralized configuration <configuration>` stored in etcd or another Tarantool cluster.

A single |tcm| installation can have multiple connected clusters. A connection to
|tcm| doesn't affect the cluster's functioning. You can connect clusters to |tcm|
and disconnect them on the fly.

There are two ways to add a cluster to |tcm|:

- Connect an existing cluster.
- Add a new cluster and :ref:`write its configuration <tcm_cluster_config>` from scratch in the |tcm| web UI.

In both cases, you need to deploy Tarantool and start the cluster instances using
the :ref:`tt-cli` or another suitable way.

.. _tcm_connect_clusters_parameters:

Connection parameters
---------------------

When connecting a cluster to |tcm|, you need to provide two sets of connection parameters:
for the cluster instances and for the centralized configuration storage.

Configuration storage connection
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The cluster configuration can be stored in either an :ref:`etcd <configuration_etcd>`
cluster or a separate Tarantool-based storage. In both cases, the following connection
parameters are required:

* A key prefix used to identify the cluster in the configuration storage.
A prefix must be unique for each cluster in storage.
* URIs of all instances of the configuration storage.
* The credentials for accessing the configuration storage: an `etcd user <https://etcd.io/docs/v3.5/op-guide/authentication/rbac/>`__
or a :ref:`Tarantool user <authentication>`.

Additionally, if SSL or TLS encryption is enabled for the configuration storage,
provide the corresponding encryption configuration: keys, certificates, and other
parameters. For the complete list of parameters, consult the `etcd documentation <https://etcd.io/docs/v3.5/op-guide/configuration/#security>`__
or Tarantool :ref:`enterprise-iproto-encryption`.

Cluster connection
~~~~~~~~~~~~~~~~~~

For interaction with the cluster instances, |tcm| needs the following access parameters:

* A :ref:`Tarantool user <authentication>` that exists in the cluster and their password.
|tcm| connects to the cluster on behalf of this user.
* An :ref:`SSL configuration <enterprise-iproto-encryption>` if the traffic encryption
is enabled on the cluster.

Managing connected clusters
---------------------------

Administrators can add new clusters, edit, and remove existing ones from |tcm|.

Connected clusters are listed on the **Clusters** page.

.. _tcm_connect_clusters_connect_preconf:

Connecting a pre-configured cluster
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

If you already have a cluster and want to connect it to |tcm|,
follow these steps:

#. Go to **Clusters** and click **Add**.
#. Fill in the general cluster information:

* Specify an arbitrary name.
* Optionally, provide a description and select a color to mark this cluster in |tcm|.
* Optionally, enter the URLs of additional services for the cluster. For example,
a Grafana dashboard that monitors the cluster metrics, or a syslog server
for viewing the cluster logs. |tcm| provides quick access to these URLs on
the cluster **Stateboard** page.

3. Provide the details of the cluster configuration storage:

* Storage type: **etcd** or **tarantool**.
* The **Prefix** specified in the cluster configuration.
* The URIs of the configuration storage instances.
* The credentials for accessing the configuration storage.
* The SSL/TLS parameters if the connection encryption is enabled on the storage.

4. Provide the credentials for accessing the cluster: a Tarantool user's name, their password,
and SSL parameters in case :ref:`traffic encryption <enterprise-iproto-encryption>`
is enabled on the cluster.

.. _tcm_connect_clusters_connect_new:

Adding a new cluster
~~~~~~~~~~~~~~~~~~~~

If you don't have a cluster yet, you can add one in |tcm| and write its configuration
from scratch using the :ref:`built-in configuration editor <tcm_configuring_clusters>`.

.. important::

When adding a new cluster, you need to have a storage for its configuration up
and running so that |tcm| can connect to it. Cluster instances can be deployed later.

To add a new cluster:

#. Go to **Clusters** and click **Add**.
#. Fill in the general cluster information:

* Specify an arbitrary name.
* Optionally, provide a description and select a color to mark this cluster in |tcm|.
* Optionally, enter the URLs of additional services for the cluster. For example,
a Grafana dashboard that monitors the cluster metrics, or a syslog server
for viewing the cluster logs. |tcm| provides quick access to these URLs on
the cluster **Stateboard** page.

#. Select the type of the cluster configuration storage: **etcd** or **tarantool**.
#. Define a unique **Prefix** for identifying this cluster in the configuration storage.
#. Provide the connection details for the cluster configuration storage:

* The URIs of configuration storage instances.
* The credentials for accessing the configuration storage.
* The SSL/TLS parameters if the connection encryption is enabled on the storage.

#. Provide the cluster credentials: a username, a password, and SSL parameters in
case :ref:`traffic encryption <enterprise-iproto-encryption>` is enabled on
the cluster.

Once you add the cluster:

* Set up the cluster configuration using the |tcm| :ref:`configuration editor <tcm_configuring_clusters>`.
* Deploy Tarantool on the cluster nodes using the :ref:`tt-cli` or other suitable tools.
* Start the cluster using the :ref:`tt-cli` or other suitable tools.

.. _tcm_connect_clusters_edit:

Editing a connected cluster
~~~~~~~~~~~~~~~~~~~~~~~~~~~

To edit a connected cluster, go to **Clusters** and click **Edit** in the **Actions**
menu of the corresponding table row.

.. _tcm_connect_clusters_disconnect:

Disconnecting a cluster
~~~~~~~~~~~~~~~~~~~~~~~

To disconnect a cluster from |tcm|, go to **Clusters** and click **Disconnect**
in the **Actions** menu of the corresponding table row.

.. note::

Disconnecting a cluster does not affect its functioning. The only
thing that changes is that it's no longer shown in |tcm|.
You can connect this cluster again at any time.