-
Notifications
You must be signed in to change notification settings - Fork 43
Open
Labels
cartridge[project] Commit to Tarantool Cartridge[project] Commit to Tarantool CartridgeexampleProblem with a code example.Problem with a code example.tutorial[area] Related to Tutorials[area] Related to Tutorials
Description
Only one way of configuring Cartridge topology is described in the tutorials at the moment -- via UI (see https://www.tarantool.io/en/doc/2.5/getting_started/getting_started_cartridge/ and all examples in the https://github.com/tarantool/examples contain the same).
An alternative way of applying topology configuration must be present, via Cartridge API (with the corresponding links to the documentation). Currently, there are no snippets of doing the bootstrap from CLI anywhere.
Example of a snippet which may be added to the getting started page:
$ tarantoolctl connect 'admin:testdb-cluster-cookie@localhost:3301'
connected to localhost:3301
localhost:3301> cartridge = require'cartridge' ---
...
localhost:3301> replicasets = { > {
> alias = 'app-router',
> roles = {'vshard-router'},
> join_servers = {{uri = 'localhost:3301'}},
> },
> {
> alias = 's1-storage',
> roles = {'vshard-storage', 'metrics'},
> join_servers = {{uri = 'localhost:3302'},{uri = 'localhost:3303'}},
> },
> {
> alias = 's2-storage',
> roles = {'vshard-storage', 'metrics'},
> join_servers = {{uri = 'localhost:3304'},{uri = 'localhost:3305'}},
> }}
---
...
localhost:3301> cartridge.admin_edit_topology({replicasets = replicasets})
---
- error: Peer closed
...
Here the user will have to connect again and do the following:
$ tarantoolctl connect 'admin:testdb-cluster-cookie@localhost:3301'
connected to localhost:3301
localhost:3301> cartridge = require'cartridge' ---
...
localhost:3301> cartridge.admin_bootstrap_vshard()
---
- true
...
Also, it would be very nice to explain what the user sees in the logs after executing these commands.
Kasen, dokshina, opomuc, vrogach2020 and rosikdokshinadokshina and Kasendokshina and Kasendokshina
Metadata
Metadata
Assignees
Labels
cartridge[project] Commit to Tarantool Cartridge[project] Commit to Tarantool CartridgeexampleProblem with a code example.Problem with a code example.tutorial[area] Related to Tutorials[area] Related to Tutorials
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
[-]Add an alternative CLI example for setting up Cartridge topology[/-][+][2pt] Add an alternative CLI example for setting up Cartridge topology[/+]Kasen commentedon Apr 9, 2021
I suggest adding examples about each thing this function does. Such as the example of how to bootstrap cluster from scratch, how to add a server to a replicaset, etc.
[-][2pt] Add an alternative CLI example for setting up Cartridge topology[/-][+]Add an alternative CLI example for setting up Cartridge topology[/+]