litestream icon indicating copy to clipboard operation
litestream copied to clipboard

Config URL to externalize config

Open wsargent opened this issue 2 years ago • 4 comments

It would be nice to have a config option to load configuration from a remote location, i.e.

litestream --config https://localhost:8080/litestream/this-instance restore

This would be useful in situations where litestream is used in environments where a configuration may not be set up, such as Dockerfiles, or the configuration may be changed externally, i.e. managed by a URL given in AWS SSM parameter store.

Bonus points if it handles different protocols i.e. sftp or ssh.

wsargent avatar Apr 07 '22 04:04 wsargent

Thanks for posting the issues, @wsargent. I'll assign it to the v0.4.1 milestone for now. The client code already exists in Litestream so it's mostly a matter of wiring it up. I need to think about the implications of it as well though a bit more. Do you have more info on your specific use case?

benbjohnson avatar Apr 08 '22 19:04 benbjohnson

Sure -- I'm using litestream to provide application logs from various docker containers, and I want to be able to manage the config externally rather than copy in a config file to each docker image or have to set up an external volume. Example PoC here https://github.com/tersesystems/dynamic-debug-logging

wsargent avatar Apr 12 '22 16:04 wsargent

In order to support more protocols (and not take on that support burden in litestream itself), perhaps litestream instead allows for its configuration to be passed in via STDIN?

curl -s https://localhost:8080/litestream/this-instance | litestream --config-stdin restore

Just an idea 😄

akoutmos avatar Apr 17 '22 23:04 akoutmos

@benbjohnson Is there any appetite to add this feature still?

alapidas avatar Oct 27 '22 01:10 alapidas