My mail client had buried this thread :( Thanks for the responses! > There are two options: > > - The first one is to work with a single configuration file. In > this case, you'd have to add/remove virtual servers (or > domains) right from there. It isn't a tough task once you get > to know how the configuration file format works, although you'd > need some sort of parsing class. This Python class[1] that > we've written for Cherokee-admin may be useful for you.
thanks, this was the pointer I was looking for wrt how cherokee-admin parses the file! > With that class you can walk trough the whole configuration > tree, cut, move and rename branches, etc. For instance, if you > wanted to remove a virtual server, it'd enough with: > > del(config['vserver!%d']%(num)) > > - The second choice would be to use file inclusions. The server > does support configuration files/directories inclusion, > although its use is discouraged. In this case, you could use: > > include = /path/to/file/or/dir > or > try_include = /path/to/file/or/dir oh, I see it's right there in the documentation, should have researched more. > There is a problem about this, though. Since virtual server are > ordered (they are indexed by an integer value), you'd have to > take care of those values. It seems that the numbering of servers and other sections is rather detrimental in what can be done wrt modular config. I think I arrived just after a major change in the file format, but is the numbering likely to stay for the long-haul? It seems like a format based on stanzas (like INI) or nested tags (like XML) would be much easier to work with, both by humans and by multiple machine agents coordinating (ie cherokee-admin and Aegir). It seems that the numbers are used for ordering of the rules, but order could be determined by order in the conf file (if it were to use nested tags or stanzas). > At this moment, I'd recommend you to use a single file and a > parsing class. I will try it :) > By the way, the delegation of configuration pieces is a topic > currently being discussed. It'd be pretty interesting to hear any > comment on Aegir, so we can make better decisions on this regard. Ideally, it should be possible for applications to package or self-manage conf snippets via config files which don't require any special knowledge about existing rules. Thanks again for the replies! _______________________________________________ Cherokee mailing list [email protected] http://lists.octality.com/listinfo/cherokee
