Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make it possible to configure the server #3

Open
mjpieters opened this issue Nov 9, 2020 · 6 comments
Open

Make it possible to configure the server #3

mjpieters opened this issue Nov 9, 2020 · 6 comments
Labels
help wanted Extra attention is needed

Comments

@mjpieters
Copy link

Can the redis.server service please look for a redis.conf file, perhaps in $SNAP_COMMON/etc/?

All the bettir if the default configuration file for the Redis version packaged were to be copied there on install.

@yossigo
Copy link
Member

yossigo commented Nov 11, 2020

Hi @mjpieters, thanks for reaching out!

There have been some voices in the past indicating that snap provides a more standard configuration interface which may be leveraged. Unfortunately, I'm not familiar with snap and don't currently have the bandwidth to look into that - but any help with that will be appreciated.

@mjpieters
Copy link
Author

I've noticed and switched to a PPA providing newer Redis versions instead.

However, if you are looking for an example, https://github.com/markshuttle/redis-snap uses $SNAP_COMMON directly, and https://snapcraft.io/docs/snap-layouts documents how you could just use /etc/redis/redis.conf directly in a snap.

@yossigo yossigo added the help wanted Extra attention is needed label Nov 23, 2020
@JonasKruckenberg
Copy link
Contributor

Yeah I've looked into the configure hook exposed to snaps and I think it'd be mad to use the interface exposed by snap craft since you'd need to check each setting individually. This works alright when you only expose 4 settings but redis has 150 configuration keys, so yeah I don't know.
Maybe just expose the File @yossigo ?

@yossigo
Copy link
Member

yossigo commented Dec 27, 2020

@JonasKruckenberg What would be the de-facto standard way for snap services to handle that? I would assume they'd just have a config file in a well known location, isn't that the case?

@JonasKruckenberg
Copy link
Contributor

JonasKruckenberg commented Dec 27, 2020

Well since the default configuration is so poorly supported most snap I've come across opted to use "out of band configuration" via some other method. This is mostly via settings in their app because most snaps are visual and users don't wanna mess with config files.
But for the sake of sanity and ease of use I think going the config file route @mjpieters suggested is best 👍🏻

@JonasKruckenberg
Copy link
Contributor

This'd also allow admin to copy paste their existing config files which would be a nice feature too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants