marpaia / chef-golang

Go library to interact with the Chef server API
Other
77 stars 32 forks source link

should be able to pass in cfgfile #15

Open spheromak opened 10 years ago

spheromak commented 10 years ago

Right now this is hardcoded. Should be an option in Connect method. Maybe even build out a config lib and move this out of api?

marpaia commented 10 years ago

@spheromak I'm not sure I understand. The knife.rb acts as your config file, no? I guess it would be neat to be able to specify where your knife.rb is, other that ~/.chef/knife.rb but that doesn't sound like what you mean

spheromak commented 10 years ago

poor wording on my part at 3 am. I do mean that we should be able to pass in the location to a knife.rb. I also mean that we should support not having to have a knife.rb at all.

marpaia commented 10 years ago

interesting. i just worry that it would a little https://xkcd.com/927/ if we added another way that people could describe their chef configurations, on top of what they already know. thoughts?

spheromak commented 10 years ago

my thought is that it's a library not an app, so we should not enforce how you want to connect in the library. I think we should have a chef/config module, but that the api itself shouldn't enforce how you want to use it higher up.

IMO we aren't doing anything bad here. Even in core chef-client they don't do the knife.rb parsing for Chef::Rest. thats not even carried out by Chef::Config. I just want to build that separation here.

marpaia commented 10 years ago

gotcha, nice, thanks for bearing with me :)