You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/how-to/vshard_quick.rst
+23-13Lines changed: 23 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -43,17 +43,17 @@ In this tutorial, the application layout is prepared manually:
43
43
44
44
1. Create a tt environment in the current directory by executing the :ref:`tt init <tt-init>` command.
45
45
46
-
2. Inside the ``instances.enabled`` directory of the created tt environment, create the ``sharded_cluster`` directory.
46
+
2. Inside the empty ``instances.enabled`` directory of the created tt environment, create the ``sharded_cluster`` directory.
47
47
48
48
3. Inside ``instances.enabled/sharded_cluster``, create the following files:
49
49
50
50
- ``instances.yml`` specifies instances to run in the current environment.
51
-
- The ``config.yaml`` file is intended to store the cluster's :ref:`configuration <configuration_overview>`.
52
-
- ``storage.lua`` is intended to store code specific for :ref:`storages <vshard-architecture-storage>`.
53
-
- ``router.lua`` is intended to store code specific for a :ref:`router <vshard-architecture-router>`.
54
-
- ``sharded_cluster-scm-1.rockspec`` includes external dependencies required by the application.
51
+
- ``config.yaml`` specifies the cluster's :ref:`configuration <configuration_overview>`.
52
+
- ``storage.lua`` contains code specific for :ref:`storages <vshard-architecture-storage>`.
53
+
- ``router.lua`` contains code specific for a :ref:`router <vshard-architecture-router>`.
54
+
- ``sharded_cluster-scm-1.rockspec`` specifies external dependencies required by the application.
55
55
56
-
The next :ref:`vshard-quick-start-developing-app` section shows how to configure the cluster and write code specific for a router and storages.
56
+
The next :ref:`vshard-quick-start-developing-app` section shows how to configure the cluster and write code for routing read and write requests to different storages.
57
57
58
58
59
59
.. _vshard-quick-start-developing-app:
@@ -100,10 +100,12 @@ In this section, two users with the specified passwords are created:
100
100
* The ``replicator`` user with the ``replication`` role.
101
101
* The ``storage`` user with the ``sharding`` role.
102
102
103
+
These users are intended to maintain replication and sharding in the cluster.
104
+
103
105
.. WARNING::
104
106
105
-
It is recommended to load passwords from safe storage such as external files or environment variables.
106
-
You can learn how to do this from :ref:`configuration_credentials_loading_secrets`.
107
+
It is not recommended to store passwords as plain text in a YAML configuration.
108
+
Learn how to load passwords from safe storage such as external files or environment variables from :ref:`configuration_credentials_loading_secrets`.
107
109
108
110
109
111
@@ -132,7 +134,7 @@ In this section, the following options are configured:
132
134
Step 3: Configuring bucket count
133
135
********************************
134
136
135
-
Specify the total number of buckets in a sharded cluster using the ``sharding.bucket_count`` option:
137
+
Specify the total number of :ref:`buckets<vshard-vbuckets>` in a sharded cluster using the ``sharding.bucket_count`` option:
@@ -327,7 +329,7 @@ To install dependencies, you need to :ref:`build the application <vshard-quick-s
327
329
Building the application
328
330
------------------------
329
331
330
-
In the terminal, open a directory where the :ref:`tt environment is created<vshard-quick-start-creating-app>`.
332
+
In the terminal, open the :ref:`tt environment directory<vshard-quick-start-creating-app>`.
331
333
Then, execute the ``tt build`` command:
332
334
333
335
.. code-block:: console
@@ -368,7 +370,7 @@ To start all instances in the cluster, execute the ``tt start`` command:
368
370
Bootstrapping a cluster
369
371
~~~~~~~~~~~~~~~~~~~~~~~
370
372
371
-
To bootstrap the cluster, follow the steps below:
373
+
After starting instances, you need to bootstrap the cluster as follows:
372
374
373
375
1. Connect to the router instance using ``tt connect``:
374
376
@@ -437,6 +439,14 @@ To check the cluster's status, execute :ref:`vshard.router.info() <router_api-in
437
439
alerts: []
438
440
...
439
441
442
+
The output includes the following sections:
443
+
444
+
* ``replicasets``: contains information about storages and their availability.
445
+
* ``bucket``: displays the total number of read-write and read-only buckets that are currently available for this router.
446
+
* ``status``: the number from 0 to 3 that indicates whether are any issues with the cluster.
447
+
0 means that there are no issues.
448
+
* ``alerts``: might describe the exact issues related to bootstrapping a cluster, for example, connection issues, failover events, or unidentified buckets.
0 commit comments