I'm trying to use berks upload
to send some cookbooks (and dependencies) up to my chef-server, but berkshelf needs to know where my chef-server is located at...and how to get into it.
Berkshelf will run with a default configuration unless you explicitly generate one. By default, Berkshelf uses the values found in your Knife configuration (if you have one).
Where exactly is it looking for my knife.rb
?
Currently, it resides at ~/chef-repo/.chef/knife.rb
which is not in my path or anything. Should it be? or should I have it located somewhere else?
also for the record, my cookbook are not stored inside my ~/chef-repo
directory. They are in ~/cookbooks
.... perhaps they "should" be inside my chef repo?
You should keep your Berksfile inside your chef-repo, and do uploads from there, and by default Berkshelf will locate your knife.rb
in .chef/knife.rb
(relative to your location).
In fact you do not need to have cookbooks in chef-repo, you can reference them in Berksfile from another location on filesystem (or web). Puting cookbooks outside your chef-repo will make you harder to setup chef workstation on another machine, but it can work.
Berksfile is pure Ruby, and because of that you have the ability to write Ruby code that will be evaluated at runtime, so you can include basically anything. Check this article for some examples.