What do these fields mean, and what should I put there for my app?
cartridge:
cluster_cookie: ""
replication_connect_quorum: 1
cartridge.srv-1:
workdir: dev/3301
advertise_uri: localhost:3301
http_port: 8081
------ stripped ------
cartridge-stateboard:
workdir: ./dev/stateboard
password: qwerty
listen: 4401
Cartridge has 2 types of configuration:
What you have here in instances.yml
file is the per-instance configuration. You'd want to use it for parameters that differ instance-by-instance. For example, listen ports, or the amount of memory a specific instance will get.
You can also see that the top-level section in the instances.yml contains app name and instance name separated by a dot. This is how an instance decides which part of this configuration to load. It will search itself in the top-level section and only load the relevant piece (in your example it's cartridge.srv-1
). There is also a way to specify configuration for all instances of an app. In this case, omit the instance name (like cartridge
in your example). Then, every instance of the app named cartridge
will load those parameters as well.
As to what parameters can be specified, there are 3 types:
memtx_memory
or wal_mode
are supported. You can pass them with their original name.http_port
or advertise_uri
. You can find the list here.