Add an alternative CLI example for setting up Cartridge topology
Nobody has claimed this yet.
- Dominant language
- CSS
- Stars
- 15
- Forks
- 49
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 3
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review the Cartridge topology getting-started tutorial and the matching examples repository linked in the issue, then identify the page and example locations for the new CLI path. Add the Cartridge API bootstrap snippets, documentation links, and an explanation of the resulting logs; verify the commands and examples are consistent with the existing UI workflow.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua, shell
- Domain
- cli, documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- Half a day
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100