Extend API for managing various settings

Mads Kiilerich mads at kiilerich.com
Wed Sep 9 19:33:03 UTC 2015


On 09/09/2015 09:00 PM, Robert Rauch wrote:
> Hi,
>
> In order to make Kallithea more easily configurable via automation tools
> (like Puppet), it would be really helpful if I could manage various
> settings, which are stored in the database backend and normally
> configured via the webinterface, via the API.
>
> For example, LDAP configuration is a classic realm of configuration
> management from my point of view, but there is no easy way to configure
> this in Kallithea in an automatic way.

Agreed!

But also, config settings (which currently not are per repo) are very 
fundamental things. They might thus not be the best candidates for 
exposing on a web service API. It could also easily end up in a chicken 
and egg problem - especially when it gets to the initial user and 
authentication configuration.

An alternative idea could thus perhaps be to do something like tweaking 
paster setup-app/setup-db so it also could be used without zapping the 
database and extend it to also be able to set more than just the initial 
user credentials.

The chicken-and-egg problem could also be handled by implementing the 
API you suggest and giving kallithea-api a mode where it access the 
controllers and database directly in the process (assuming it is passed 
the right .ini file and has the right permissions to database and 
filesystems) instead of calling a web service.

/Mads


More information about the kallithea-general mailing list