Working with replicasets | Tarantool
Документация на русском языке
поддерживается сообществом

Working with replicasets

$ tt replicaset COMMAND {APPLICATION[:APP_INSTANCE] | URI} [OPTIONS ...]
# or
$ tt rs COMMAND {APPLICATION[:APP_INSTANCE] | URI} [OPTIONS ...]

tt replicaset (or tt rs) manages a Tarantool replica set.

COMMAND is one of the following:

$ tt replicaset status {APPLICATION[:APP_INSTANCE] | URI} [OPTIONS ...]
# or
$ tt rs status  {APPLICATION[:APP_INSTANCE] | URI} [OPTIONS ...]

tt replicaset status (tt rs status) shows the current status of a replica set.

To view the status of all replica sets of an application in the current tt environment, run tt replicaset status with the application name:

$ tt replicaset status myapp

To view the status of a single replica set of an application, run tt replicaset status with a name or a URI of an instance from this replica set:

$ tt replicaset status myapp:storage-001-a

For a replica outside the current tt environment, specify its URI and access credentials:

$ tt replicaset status 192.168.10.10:3301 -u myuser -p p4$$w0rD

Learn about other ways to provide user credentials in Authentication.

Use one of the following ways to pass the credentials of a Tarantool user when connecting to the instance:

  • The -u (--username) and -p (--password) options:

    $ tt replicaset status 192.168.10.10:3301 -u myuser -p p4$$w0rD
    
  • The connection string:

    $ tt replicaset status myuser:p4$$w0rD@192.168.10.10:3301
    
  • Environment variables TT_CLI_USERNAME and TT_CLI_PASSWORD:

    $ export TT_CLI_USERNAME=myuser
    $ export TT_CLI_PASSWORD=p4$$w0rD
    $ tt replicaset status 192.168.10.10:3301
    

You can specify the orchestrator to use for the application using the following options:

  • --config for applications that use YAML cluster configuration (Tarantool 3.x or later).
  • --cartridge for Cartridge applications (Tarantool 2.x).
  • --custom for any other orchestrators used on Tarantool 2.x clusters.
$ tt replicaset status myapp --config
$ tt replicaset status my-cartridge-app --cartridge

If an actual orchestrator that the application uses does not match the specified option, an error is raised.

--cartridge

Force the Cartridge orchestrator for Tarantool 2.x clusters.

--config

Force the YAML configuration orchestrator for Tarantool 3.0 or later clusters.

--custom

Force a custom orchestrator for Tarantool 2.x clusters.

-u USERNAME, --username USERNAME

A Tarantool user for connecting to the instance.

-p PASSWORD, --password PASSWORD

The user’s password.

--sslcertfile FILEPATH

The path to an SSL certificate file for encrypted connections.

--sslkeyfile FILEPATH

The path to a private SSL key file for encrypted connections.

--sslcafile FILEPATH

The path to a trusted certificate authorities (CA) file for encrypted connections.

--sslciphers STRING

The list of SSL cipher suites used for encrypted connections, separated by colons (:).

tt replicaset promote (tt rs promote) promotes an instance.

tt replicaset demote (tt rs demote) demotes an instance.

Нашли ответ на свой вопрос?
Обратная связь