Skip to content

Commit d5cf730

Browse files
committed
Roles: update per TW review
1 parent 86bee5e commit d5cf730

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

doc/concepts/configuration.rst

+5-2
Original file line numberDiff line numberDiff line change
@@ -184,17 +184,20 @@ Enabling and configuring roles
184184
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
185185

186186
An application role is a Lua module that implements specific functions or logic.
187-
You can enable or turn off a particular role for certain instances in a configuration without restarting these instances.
187+
You can turn on or off a particular role for certain instances in a configuration without restarting these instances.
188188

189+
There can be built-in Tarantool roles, roles provided by third-party Lua modules, or custom roles that are developed as a part of a cluster application.
189190
This section describes how to enable and configure roles.
190191
To learn how to develop custom roles, see :ref:`application_roles`.
191192

193+
194+
192195
.. _configuration_application_roles_enable:
193196

194197
Enabling a role
195198
***************
196199

197-
To enable or turn off a role for a specific instance or a set of instances, use the :ref:`roles <configuration_reference_roles>` configuration option.
200+
To turn on or off a role for a specific instance or a set of instances, use the :ref:`roles <configuration_reference_roles>` configuration option.
198201
The example below shows how to enable the ``roles.crud-router`` role provided by the `CRUD <https://github.com/tarantool/crud>`__ module using the :ref:`roles <configuration_reference_roles>` option:
199202

200203
.. literalinclude:: /code_snippets/snippets/sharding/instances.enabled/sharded_cluster_crud/config.yaml

doc/how-to/app/app_roles.rst

+9-4
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ Application roles
44
=================
55

66
An application role is a Lua module that implements specific functions or logic.
7-
You can enable or turn off a particular role for certain instances in a :ref:`configuration <configuration>` without restarting these instances.
7+
You can turn on or off a particular role for certain instances in a :ref:`configuration <configuration>` without restarting these instances.
88
A role is run when a configuration is loaded or reloaded.
99

1010
Roles can be divided into the following groups:
1111

12-
- Roles provided by Tarantool.
12+
- Tarantool's built-in roles.
1313
For example, the ``config.storage`` role can be used to make a Tarantool replica set act as a :ref:`configuration storage <centralized_configuration_storage_set_up_tarantool>`.
1414
- Roles provided by third-party Lua modules.
1515
For example, the `CRUD <https://github.com/tarantool/crud>`__ module provides the ``roles.crud-storage`` and ``roles.crud-router`` roles that enable CRUD operations in a sharded cluster.
@@ -94,7 +94,7 @@ Validating a role configuration
9494
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
9595

9696
To validate a role's configuration, you need to define the :ref:`validate([cfg]) <roles_api_reference_validate>` function.
97-
The ``cfg`` argument allows you to get access to the provided :ref:`role's configuration <roles_create_custom_role_config>` and check its validity.
97+
The ``cfg`` argument provides access to the :ref:`role's configuration <roles_create_custom_role_config>` and check its validity.
9898

9999
In the example below, the ``validate()`` function is used to validate the ``greeting`` configuration value:
100100

@@ -277,14 +277,19 @@ Executing functions for dependent roles
277277
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
278278

279279
For roles that :ref:`depend <roles_create_custom_role_dependencies>` on each other, their ``validate()``, ``apply()``, and ``stop()`` functions are executed taking into account the dependencies.
280-
Suppose, there are two independent roles (``role1``, ``role2``) and three roles that depend on each other as follows:
280+
Suppose, there are three independent and two dependent roles:
281281

282282
.. code-block:: none
283283
284+
role1
285+
role2
284286
role3
285287
└─── role4
286288
└─── role5
287289
290+
- ``role1``, ``role2``, and ``role5`` are independent roles.
291+
- ``role3`` depends on ``role4``, ``role4`` depends on ``role5``.
292+
288293
The roles are enabled in a configuration as follows:
289294

290295
.. code-block:: yaml

0 commit comments

Comments
 (0)