Skip to content
Snippets Groups Projects
Commit f059973d authored by Alexander Turenko's avatar Alexander Turenko Committed by Alexander Turenko
Browse files

config: support replicaset/group name templates

See the documentation request below for details about the feature.

The template variables are substituted in three different places.

* On deducing configuration of the current instance from the cluster
  configuration.
* On calculation of URIs of replicaset peers to form
  `box.cfg({replication = <...>})` value.
* On calculation of URIs of all cluster members for generation of
  `vshard.{router,storage}.cfg()` configuration.

That's why we need a lot of testing code around this small feature.

Part of #8862

@TarantoolBot document
Title: config: support {{ replicaset_name }} and {{ group_name }}

The declarative configuration supports `{{ instance_name }}` template
variable from the beginning.

Now, two more ones were added: `{{ replicaset_name }}` and
`{{ group_name }}`.

All the template variables are set according to the
instance/replicaset/group topology from the given configuration.

Example:

NO_WRAP
```yaml
console:
  socket: '{{ group_name }}/{{ replicaset_name }}/{{ instance_name }}.admin'

groups:
  g:
    replicasets:
      r:
        instances:
          i: {}
```
NO_WRAP

The admin console will be at `g/r/i.admin` for instance `i`.
parent 8c9e099b
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment