pygeoapi icon indicating copy to clipboard operation
pygeoapi copied to clipboard

Dynamic configuration update (for dynamic service registration)

Open geotom opened this issue 2 years ago • 6 comments

Dynamic configuration (without server restart)

I would love to work with pyGeoAPI as a dynamic service registry. This means a hot reloading of the service configuration file to allow registration and unregistration of services. This could also benefit other services of pyGeoAPI and allow for dynamic setups where pyGeoAPI works as outbound interface with a custom internal orchestrator tool which supports to register / unregister services.

I do not think we need an internal API for this. It would be enough to be able to alter the configuration by custom code and call a configuration reload on pyGeoAPI. Right now, I have to manipulate the configuration and restart the full pyGeoAPI.

Thanks for considering this (if it is not already possible)

geotom avatar Dec 06 '23 13:12 geotom

+1. Note that we are working on this as part of #1137 in support #756, #728 if you would like track progress.

tomkralidis avatar Dec 19 '23 11:12 tomkralidis

That sounds really great @tomkralidis! UI part for me is less important, but the ability to update parts of the configuration dynamically and the server dynamically responding to the updates would be a killer feature. Thanks for hinting the issue tickets

geotom avatar Dec 19 '23 13:12 geotom

Following the discussion in the tickets, I would also recommend making the UI/Login a separate package, but the hotloading of config changes part of pygeoapi a core feature. This leaves anyone implementing a service based on pygeoserver their own alternative way to "change" the configuration... with or without UI or login.

Is it still planned to make gunicorn watch the configuration file for changes and reload on file modifications?

geotom avatar Dec 19 '23 13:12 geotom

That is an option however it is gunicorn specific (note: you can don this now by updating the gunicorn startup). Perhaps a watcher in pygeoapi proper would be the most generic approach.

tomkralidis avatar Dec 19 '23 13:12 tomkralidis

Yes, see #1443.

tomkralidis avatar Dec 19 '23 19:12 tomkralidis

This Issue has been inactive for 90 days. As per RFC4, in order to manage maintenance burden, it will be automatically closed in 7 days.

github-actions[bot] avatar Mar 24 '24 03:03 github-actions[bot]

As per RFC4, this Issue has been closed due to there being no activity for more than 90 days.

github-actions[bot] avatar Mar 31 '24 03:03 github-actions[bot]