Add support for templates in tt config.
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 113
- Forks
- 18
- Avg merge
- 4d 11h
- Merged PRs (30d)
- 23
Description
To support more flexible environment configuration and convenient tarantool 3.0 integration, it would be nice to support templates in tt config file. Examples, local:
tt:
app:
run_dir: "var/run/{{ instance_name }}"
log_dir: "var/log/{{ instance_name }}"
wal_dir: "var/lib/{{ instance_name }}"
memtx_dir: "var/lib/{{ instance_name }}"
vinyl_dir: "var/lib/{{ instance_name }}"
Pid file location will be <instances_enabled>/app/var/run/master/tarantool.control
Global (absolute paths):
tt:
app:
run_dir: "/var/run/tarantool/{{ app_name}}/{{ instance_name }}"
log_dir: "/var/log/tarantool{{ app_name}}/{{ instance_name }}"
wal_dir: "/var/lib/tarantool/{{ app_name}}/{{ instance_name }}"
memtx_dir: "/var/lib/tarantool/{{ app_name}}/{{ instance_name }}"
vinyl_dir: "/var/lib/tarantool/{{ app_name}}/{{ instance_name }}"
Pid file location will be "/var/run/tarantool/app/master/tarantool.control"
After adding the templates support, all the logic for appending app/instance name suffixes to paths must be removed.
Tarantoolctl layout can be represented by the following paths:
tt:
app:
run_dir: "var/run/"
log_dir: "var/log/"
wal_dir: "var/lib/{{ instance_name }}"
memtx_dir: "var/lib/{{ instance_name }}"
vinyl_dir: "var/lib/{{ instance_name }}"
cartridge sub-command code must be updated to support instances navigation with updated layout. Currently it accepts a run dir path and makes an assumption about the file tree structure in this directory. tt cartridge sub-commands must be able to work with any layout specified by a user in tt.yaml config.
Contributor guide
No contributing guide indexed for this repository
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
Start by tracing tt.yaml path configuration and the tt cartridge sub-command code that navigates instances from a run directory. Compare the local, global, and Tarantoolctl layouts described in the issue. Done means templates work for the listed paths and cartridge sub-commands work with any user-specified layout.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100