Open mtai opened 14 years ago
When you use tronfig, would you have to know what configuration file you want to edit in advance, would it present them all (with some kind of delimiter), or would you just have edit the config files directly and send trond a SIGHUP?
I would think that tronfig
would edit the main file as usual, but tronfig reload
would combine and upload all the config files that validate.
#include
sounds like the saner option, especially if it supported globs so you could update/add config files without changing the main file.
e.g.
# tron_config.yaml
include_job_configs:
- /blah/job_configs/*
# job_configs/ad_jobs.yaml
- &myJob...
- &myJob2...
If you have trond
accept multiple config files then tronfig
has to know where they live, and the line to launch trond
will grow just like the current config file length grows.
Right now we have this giant monolithic tron_config.yaml that will only get larger over time. THis is akin to having a "main" function that's 1000's of lines. In order to make tronfigs more managable, it'd be great if we had someway to either "include" other tronfig files OR tell trond that we want to load up multiple tronfigs.
Approach 1 - Updating tron_config.yaml with some "include" directive
"#include advertising_jobs.yaml"
"#include gearman_jobs.yaml"
Approach 2 - Starting trond with multiple yaml files"
"trond tron_config.yaml advertising_jobs.yaml gearman_jobs.yaml