Strider-CD / strider

Open Source Continuous Integration & Deployment Server
http://strider-cd.github.io/
4.59k stars 432 forks source link

Change config method to be through a YAML file instead of ENV #592

Closed kfatehi closed 9 years ago

kfatehi commented 9 years ago

How do you guys feel about eliminating the whole "configuration through the environment" thing and replace it with a YAML-style approach... e.g. one where we default to a search for /etc/strider/strider.yml or a -c <path to config yaml file> option at the command line.

bitwit commented 9 years ago

Personally I think both approaches have their pros and cons and it almost seems like the ideal would be to support both, maybe by simply disabling/reducing the config options if a yaml file exists somehow?

I think that in-app configuration is nice for playing around and tweaking. Strider has been an awesome CD learning tool for our organization and I think we like a little UI still. But yaml config is great when you know what you want and are possibly a little more advanced in your requirements and as we get our 3rd/4th project online I'm starting to see how a drop-in yaml config would be nice.

logankoester commented 9 years ago

I think Strider should stick with ENV. Strider is typically deployed in environments like Docker, Heroku, etc which expect you to use environment variables to configure your application.

There are many tools available that you can use to manage your environment, such as foreman and dotenv. Maybe something like this can help if you're finding Strider inconvenient to configure locally.

Multiple competing configuration mechanisms is no good. The goal of such a feature - making the project easy to configure - would be undermined by the complex and contradictory documentation - especially for new users. A number of new edge cases would also be introduced, so we're looking at more bugs and more LOC for them to hide in.

With regards to YAML in general, it feels like a Railsism. The spec is absurdly complex and therefore implementation quality varies dramatically. Some serious security issues have been the result.

YAML does have some really cool features, but they come at too high of a cost. I get the sense that the world is trending toward ENV and JSON, but if not, then at least it is idiomatic in Node.

kfatehi commented 9 years ago

thanks for your comments guys.

i have to agree regarding Docker and Heroku perpetuating the ENV style.

I suppose that the PaaS or platform that is deploying strider can expose a UI to ENV configuration instead of Strider doing this or resorting to a file style.

bitwit commented 9 years ago

Yeah @logankoester, well put.

niallo commented 9 years ago

I know it's not documented anywhere and that's my fault. But Strider config is extremely flexible already because it uses the rc module.

It already supports both JSON and INI file configuration, for example:

https://github.com/dominictarr/rc

knownasilya commented 9 years ago

Why not go with node-config, which allows for some nice configuration with the ability to override with ENVs.