Skip to content

tt cluster publish can publish a new instance configuration #4241

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Tracked by #4223
TarantoolBot opened this issue May 27, 2024 · 0 comments · Fixed by #4330
Closed
Tracked by #4223

tt cluster publish can publish a new instance configuration #4241

TarantoolBot opened this issue May 27, 2024 · 0 comments · Fixed by #4330
Assignees
Labels

Comments

@TarantoolBot
Copy link
Collaborator

TarantoolBot commented May 27, 2024

Product: tt CLI
Since: 2.3.0
Root document: https://www.tarantool.io/en/doc/latest/reference/tooling/tt_cli/cluster/
SME: @ askalt

Details

This patchs adds an ability to publish a new instance configuration with tt cluster publish.
Prior this patch this command returns an error if the instance is not found in the config.

Now, to create a new instance configuration, a replicaset name with --replicaset can be specified,
and, if it's not enough, a group name with --group.

For example:

$ tt cluster show http://localhost:2379/foo
/foo/config/all
credentials:
  users:
    guest:
      roles:
        - super
groups:
  group-001:
    replicasets:
      replicaset-001:
        instances:
          instance-001:
            iproto:
              listen:
                - uri: localhost:3301
          instance-002:
            iproto:
              listen: {}

$ tt cluster publish http://localhost:2379/foo?name=instance-003 inst.yml
   ⨯ failed to create an instance "instance-003" configuration: replicaset name is not specified

$ tt cluster publish --replicaset replicaset-001  http://localhost:2379/foo?name=instance-003 inst.yml

$ tt cluster show http://localhost:2379/foo
credentials:
  users:
    guest:
      roles:
        - super
groups:
  group-001:
    replicasets:
      replicaset-001:
        instances:
          instance-001:
            iproto:
              listen:
                - uri: localhost:3301
          instance-002:
            iproto:
              listen: {}
          instance-003:
            database:
              mode: rw

Part of #316
Requested by @askalt in tarantool/tt@efe95f1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants