@@ -18,7 +18,8 @@ Managing replica sets
18
18
* :ref: `demote <tt-replicaset-demote >`
19
19
* :ref: `expel <tt-replicaset-expel >`
20
20
* :ref: `vshard <tt-replicaset-vshard >`
21
-
21
+ * :ref: `bootstrap <tt-replicaset-bootstrap >`
22
+ * :ref: `rebootstrap <tt-replicaset-rebootstrap >`
22
23
23
24
.. _tt-replicaset-status :
24
25
@@ -29,11 +30,10 @@ status
29
30
30
31
$ tt replicaset status {APPLICATION[:APP_INSTANCE] | URI} [OPTIONS ...]
31
32
# or
32
- $ tt rs status {APPLICATION[:APP_INSTANCE] | URI} [OPTIONS ...]
33
+ $ tt rs status {APPLICATION[:APP_INSTANCE] | URI} [OPTIONS ...]
33
34
34
35
``tt replicaset status `` (``tt rs status ``) shows the current status of a replica set.
35
36
36
-
37
37
.. _tt-replicaset-status-application :
38
38
39
39
Displaying status of all replica sets
@@ -66,7 +66,6 @@ For a replica outside the current ``tt`` environment, specify its URI and access
66
66
67
67
Learn about other ways to provide user credentials in :ref: `tt-replicaset-authentication `.
68
68
69
-
70
69
.. _tt-replicaset-promote :
71
70
72
71
promote
@@ -305,6 +304,93 @@ To bootstrap ``vshard`` in a Cartridge cluster:
305
304
306
305
$ tt replicaset vshard bootstrap my-cartridge-app --cartridge
307
306
307
+ .. _tt-replicaset-bootstrap :
308
+
309
+ bootstrap
310
+ ---------
311
+
312
+ .. include :: _includes/cartridge_deprecation_note.rst
313
+
314
+ .. code-block :: console
315
+
316
+ $ tt replicaset bootstrap APPLICATION[:APP_INSTANCE] [OPTIONS ...]
317
+ # or
318
+ $ tt rs bootstrap APPLICATION[:APP_INSTANCE] [OPTIONS ...]
319
+
320
+ ``tt replicaset bootstrap `` (``tt rs bootstrap ``) bootstraps a Cartridge cluster or
321
+ an instance. The command works within the current ``tt `` environment and uses
322
+ application and instance names.
323
+
324
+ .. note ::
325
+
326
+ ``tt replicasets bootstrap `` effectively duplicates two other commands:
327
+
328
+ - When called with an application name: :ref: `tt cartridge replicasets setup <tt_cartridge_replicasets_setup >`
329
+ - When called with an instance name: :ref: `tt cartridge replicasets join <tt_cartridge_replicasets_join >`
330
+
331
+ .. _tt-replicaset-bootstrap-cluster :
332
+
333
+ Bootstrapping a Cartridge cluster
334
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
335
+
336
+ To bootstrap the ``cartridge_app `` application using its default replica sets file
337
+ ``replicasets.yml ``:
338
+
339
+ .. code-block :: console
340
+
341
+ $ tt replicaset bootstrap cartridge_app
342
+
343
+ To use another file with replica set configuration, provide a path to it in the ``--file `` option:
344
+
345
+ .. code-block :: console
346
+
347
+ $ tt replicaset bootstrap cartridge_app --file replicasets1.yml
348
+
349
+ To additionally bootstrap vshard after the cluster bootstrap, add ``--bootstrap-vshard ``:
350
+
351
+ .. code-block :: console
352
+
353
+ $ tt replicaset bootstrap --bootstrap-vshard cartridge_app
354
+
355
+
356
+ .. _tt-replicaset-bootstrap-instance :
357
+
358
+ Bootstrapping an instance
359
+ ~~~~~~~~~~~~~~~~~~~~~~~~~
360
+
361
+ When called with the instance name, ``tt replicaset bootstrap `` joins the
362
+ instance to the replica set specified in the ``--replicaset `` option:
363
+
364
+ .. code-block :: console
365
+
366
+ $ tt replicaset bootstrap --replicaset replicaset cartridge_app:instance1
367
+
368
+ .. _tt-replicaset-rebootstrap :
369
+
370
+ rebootstrap
371
+ -----------
372
+
373
+ .. code-block :: console
374
+
375
+ $ tt replicaset rebootstrap APPLICATION:APP_INSTANCE [-y | --yes]
376
+ # or
377
+ $ tt rs rebootstrap APPLICATION:APP_INSTANCE [-y | --yes]
378
+
379
+ ``tt replicaset rebootstrap `` (``tt rs rebootstrap ``) rebootstraps an instance:
380
+ stops it, removes instance artifacts, starts it again.
381
+
382
+ To rebootstrap the ``storage-001 `` instance of the ``myapp `` application:
383
+
384
+ .. code-block :: console
385
+
386
+ $ tt replicaset rebootstrap myapp:storage-001
387
+
388
+ To automatically confirm reboostrap, add the ``-y ``/``--yes `` option:
389
+
390
+ .. code-block :: console
391
+
392
+ $ tt replicaset rebootstrap myapp:storage-001 -y
393
+
308
394
.. _tt-replicaset-orchestrator :
309
395
310
396
Selecting the application orchestrator manually
@@ -358,6 +444,12 @@ connecting to the instance by its URI:
358
444
Options
359
445
-------
360
446
447
+ .. option :: --bootstrap-vshard
448
+
449
+ **Applicable to: ** ``bootstrap ``
450
+
451
+ Additionally bootstrap vshard when bootstrapping a Cartridge application.
452
+
361
453
.. option :: --cartridge
362
454
363
455
Force the Cartridge orchestrator for Tarantool 2.x clusters.
@@ -370,12 +462,29 @@ Options
370
462
371
463
Force a custom orchestrator for Tarantool 2.x clusters.
372
464
465
+ .. option :: --file FILE
466
+
467
+ **Applicable to: ** ``bootstrap ``
468
+
469
+ A file with Cartridge replica sets configuration. Default: ``instances.yml ``
470
+ in the application directory.
471
+
472
+ See also: :ref: `tt-replicaset-bootstrap-cluster `
473
+
373
474
.. option :: -f , --force
374
475
375
476
**Applicable to: ** ``promote ``, ``demote ``
376
477
377
478
Skip promotion or demotion if the specified instance is not running in the same environment.
378
479
480
+ .. option :: --replicaset REPLICASET
481
+
482
+ **Applicable to: ** ``bootstrap ``
483
+
484
+ A replica set name for instance bootstrapping.
485
+
486
+ See also: :ref: `tt-replicaset-bootstrap-instance `
487
+
379
488
.. option :: -u USERNAME , --username USERNAME
380
489
381
490
A Tarantool user for connecting to the instance using a URI.
@@ -402,9 +511,15 @@ Options
402
511
403
512
.. option :: --timeout
404
513
405
- **Applicable to: ** ``promote ``, ``demote ``, ``expel ``, ``vshard ``
514
+ **Applicable to: ** ``promote ``, ``demote ``, ``expel ``, ``vshard ``, `` bootstrap ``
406
515
407
516
The timeout for completing the operation, in seconds. Default:
408
517
409
518
- ``3 `` for ``promote ``, ``demote ``, ``expel ``
410
- - ``10 `` for ``vshard ``
519
+ - ``10 `` for ``vshard `` and ``bootstrap ``
520
+
521
+ .. option :: -y , --yes
522
+
523
+ **Applicable to: ** ``rebootstrap ``
524
+
525
+ Automatically confirm rebootstrap.
0 commit comments