Skip to content

Commit 0d20803

Browse files
committed
Fix
1 parent ba2a9fd commit 0d20803

File tree

5 files changed

+40
-45
lines changed

5 files changed

+40
-45
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Centralized configuration storages
1+
# Centralized migrations with tt
22

33
Sample applications demonstrating how to use the centralized migration mechanism
44
for Tarantool EE clusters via the tt utility. Learn more at [Centralized configuration storages](https://www.tarantool.io/en/doc/latest/platform/https://www.tarantool.io/en/doc/latest/platform/ddl_dml/migrations/).

doc/platform/ddl_dml/migrations/centralized_migrations_tt.rst

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,18 @@ Centralized migrations with tt
88
In this section, you learn to use the centralized migration management mechanism
99
implemented in the Enterprise Edition of the :ref:`tt <tt-cli>` utility.
1010

11-
See also:
12-
13-
- :ref:`tt migrations reference <tt-migrations>` for the full list of command-line options.
14-
- :ref:`tcm_cluster_migrations` to learn about managing migrations from |tcm_full_name|.
11+
The section includes the following tutorials:
1512

1613
.. toctree::
1714
:maxdepth: 1
1815

1916
basic_migrations_tt
2017
upgrade_migrations_tt
2118
extend_migrations_tt
22-
troubleshoot_migrations_tt
19+
troubleshoot_migrations_tt
20+
21+
22+
See also:
23+
24+
- :ref:`tt migrations reference <tt-migrations>` for the full list of command-line options.
25+
- :ref:`tcm_cluster_migrations` to learn about managing migrations from |tcm_full_name|.

doc/platform/ddl_dml/migrations/extend_migrations_tt.rst

Lines changed: 13 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.. _extend_migrations_tt:
22

3-
Centralized migrations with tt
4-
==============================
3+
Extending the cluster
4+
=====================
55

66
**Example on GitHub:** `migrations <https://github.com/tarantool/doc/tree/latest/doc/code_snippets/snippets/migrations>`_
77

@@ -13,7 +13,9 @@ added cluster instances using the centralized migration management mechanism.
1313
Prerequisites
1414
-------------
1515

16-
Before starting this tutorial, complete the :ref:`_basic_migrations_tt` and :ref:`upgrade_migrations_tt`
16+
Before starting this tutorial, complete the :ref:`basic_migrations_tt` and :ref:`upgrade_migrations_tt`.
17+
As a result, you have a sharded Tarantool EE cluster that uses an etcd-based configuration
18+
storage. The cluster has a space with two indexes.
1719

1820
.. _extend_migrations_tt_cluster:
1921

@@ -71,34 +73,20 @@ Apply all stored migrations to the cluster to load the same data schema to the n
7173

7274
.. code-block:: console
7375
74-
$ tt migrations apply http://app_user:config_pass@localhost:2379/myapp \
75-
--tarantool-username=client --tarantool-password=secret
76-
• router-001:
77-
• 000001_create_writes_space.lua: skipped, already applied
78-
• 000002_create_writers_index.lua: skipped, already applied
79-
• 000003_alter_writers_space.lua: skipped, already applied
80-
• storage-001:
81-
• 000001_create_writes_space.lua: skipped, already applied
82-
• 000002_create_writers_index.lua: skipped, already applied
83-
• 000003_alter_writers_space.lua: skipped, already applied
84-
• storage-002:
85-
• 000001_create_writes_space.lua: skipped, already applied
86-
• 000002_create_writers_index.lua: skipped, already applied
87-
• 000003_alter_writers_space.lua: skipped, already applied
88-
• storage-003:
89-
• 000001_create_writes_space.lua: successfully applied
90-
• 000002_create_writers_index.lua: successfully applied
91-
• 000003_alter_writers_space.lua: successfully applied
76+
$ tt migrations apply http://app_user:config_pass@localhost:2379/myapp \
77+
--tarantool-username=client --tarantool-password=secret
78+
--replicaset storage-003
9279
9380
.. note::
9481

95-
You can apply migrations to a specific replica set using the ``--replicaset`` option:
82+
You can also apply migrations without specifying the replica set. All published
83+
migrations are already applied on other replica sets, so ``tt`` skips the
84+
operation on them.
9685

9786
.. code-block:: console
9887
99-
$ tt migrations apply http://app_user:config_pass@localhost:2379/myapp \
100-
--tarantool-username=client --tarantool-password=secret
101-
--replicaset storage-003
88+
$ tt migrations apply http://app_user:config_pass@localhost:2379/myapp \
89+
--tarantool-username=client --tarantool-password=secret
10290
10391
To make sure that the space exists on the new instances, connect to ``storage-003-a``
10492
and check ``box.space.writers``:

doc/platform/ddl_dml/migrations/index.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,6 @@ troubleshooting migration issues. :ref:`troubleshooting_migrations_tt`.
165165
.. toctree::
166166
:maxdepth: 1
167167

168-
space_upgrade
169168
centralized_migrations_tt
170-
troubleshooting_migrations_tt
169+
space_upgrade
170+

doc/platform/ddl_dml/migrations/upgrade_migrations_tt.rst

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Complex migrations with space.upgrade()
66
**Example on GitHub:** `migrations <https://github.com/tarantool/doc/tree/latest/doc/code_snippets/snippets/migrations>`_
77

88
In this tutorial, you learn to write migrations that include data migration using
9-
the ``space.upgrade`` function.
9+
the ``space.upgrade()`` function.
1010

1111
See also:
1212

@@ -18,15 +18,19 @@ See also:
1818
Prerequisites
1919
-------------
2020

21-
Before starting this tutorial, complete the :ref:`_basic_migrations_tt`.
21+
Before starting this tutorial, complete the :ref:`basic_migrations_tt`.
22+
As a result, you have a sharded Tarantool EE cluster that uses an etcd-based configuration
23+
storage. The cluster has a space with two indexes.
2224

2325
.. _upgrade_migrations_tt_write:
2426

2527
Writing a complex migration
2628
---------------------------
2729

28-
Complex migrations require data migration along with schema migration. Insert some
29-
tuples into the space before proceeding to the next steps:
30+
Complex migrations require data migration along with schema migration. Connect to
31+
the router instance and insert some tuples into the space before proceeding to the next steps.
32+
33+
.. code-block:: $ tt connect myapp:router-001
3034

3135
.. code-block:: tarantoolsession
3236
@@ -98,26 +102,26 @@ Publish the new migration to etcd. Migrations that already exist in the storage
98102

99103
.. code-block:: console
100104
101-
$ tt migrations publish http://app_user:config_pass@localhost:2379/myapp
102-
• 000001_create_writes_space.lua: skipped, key "000001_create_writes_space.lua" already exists with the same content
103-
• 000002_create_writers_index.lua: skipped, key "000002_create_writers_index.lua" already exists with the same content
104-
• 000003_alter_writers_space.lua: successfully published to key "000003_alter_writers_space.lua"
105+
$ tt migrations publish http://app_user:config_pass@localhost:2379/myapp \
106+
migrations/scenario/000003_alter_writers_space.lua
105107
106108
.. note::
107109

108-
You can also publish a single migration file by passing a path to it as an argument:
110+
You can also publish all migrations from the default location ``/migrations/scenario``.
111+
All other migrations stored in this directory are already published, so ``tt``
112+
skips them.
109113

110114
.. code-block:: console
111115
112-
$ tt migrations publish http://app_user:config_pass@localhost:2379/myapp \
113-
migrations/scenario/000003_alter_writers_space.lua
116+
$ tt migrations publish http://app_user:config_pass@localhost:2379/myapp
117+
114118
115119
.. _upgrade_migrations_tt_apply:
116120

117121
Applying the migration
118122
----------------------
119123

120-
Apply the migrations:
124+
Apply the published migrations:
121125

122126
.. code-block:: console
123127

0 commit comments

Comments
 (0)