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

Abiltiy to set configuration flags via environment variables #32

Closed
rmb938 opened this issue Jul 13, 2018 · 6 comments
Closed

Abiltiy to set configuration flags via environment variables #32

rmb938 opened this issue Jul 13, 2018 · 6 comments

Comments

@rmb938
Copy link
Contributor

rmb938 commented Jul 13, 2018

When deploying gaia it would be nice to be able to set the configuration flags via environment variables.

For ease of development it may be useful to use a cli/configuration system like https://github.com/spf13/viper or https://github.com/alecthomas/kingpin

@michelvocks
Copy link
Member

We also need to have a look at the configuration in general. I think we will get more configuration parameters in the future and passing in parameters will be unmanageable. 💀

Not quite sure but do you know what other big open source projects use?

@rmb938
Copy link
Contributor Author

rmb938 commented Jul 13, 2018

I typically see viper being used in other projects, it can do cli flags, env vars and config files.

I don't know if having tons of cli flags is a bad thing though. Just look at docker and kubernetes, mostly everyone is fine with having tons of flags.

@Skarlso
Copy link
Member

Skarlso commented Jul 21, 2018

So there is even a better option for going with the least impact on Gaia.

https://github.com/namsral/flag

This literally works right now if you change "flag" to this in the import section.

Once that's done you can add files and environment property options like a breeze without changing too much. What say you?

Granted it has not been maintained for a while now. :/ And the guy disappeared but we can fork a copy for gaia and maintain it if needed for ourselves.

This is just a suggestion though.

@michelvocks
Copy link
Member

This looks actually really good. It's simple and self-explained. I think we can just use it and when we need to do modifications we fork it. What do you think @Skarlso ?

@Skarlso
Copy link
Member

Skarlso commented Aug 26, 2018

@rmb938 Implemented. Hopefully that fits the desired need, without also having a major impact code wise.

@rmb938
Copy link
Contributor Author

rmb938 commented Sep 1, 2018

Yup looks good. Thanks :D

@rmb938 rmb938 closed this as completed Sep 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants