jkeiser / knife-essentials

Knife commands to treat the Chef server like a filesystem
Apache License 2.0
81 stars 26 forks source link

Support Site Specific Cookbooks #72

Closed numbata closed 11 years ago

numbata commented 11 years ago

This path would be useful for developers, who puts site-cookbooks in different directory than common cookbooks directory. refs. Chef/Cookbooks-SiteSpecificCookbooks

jkeiser commented 11 years ago

Hmm. I think this patch will expand any directory named cookbooks, not just the top-level (which could lead to infinite recursion). I love the idea, though! I'll see if I can get something like this into Chef 11 (knife upload will be a core command).

jkeiser commented 11 years ago

FYI, I have a new version of this in the works that solves this problem and a few others that have been bugging me (we don't presently let you keep your cookbooks separate from the rest of your chef repo).

jkeiser commented 11 years ago

I have merged this patch to master along with the other changes. It now supports multiple cookbook paths, as well as chef_repo_dir, data_bag_dir, role_dir, etc. Would you mind giving it a spin to see if it works for your case before I release a gem?

jkeiser commented 11 years ago

Er, that would be chef_repo_path, data_bag_path, role_path, etc.--not _dir :)

numbata commented 11 years ago

Hi. Great job! :)

lib/chef/knife/dependencies_essentials.rb trying to require two non exists file: require 'chef/chef_fs/knife' require 'chef/chef_fs/file_system'

they moved under lib/chef_fs

jkeiser commented 11 years ago

Doh! I've been running against Chef 11, which has a version of these commands in it, so didn't notice that :) Thanks tons for the patch and verification, I've checked in a fix for that too, and after one more bug I'll package this sucker up.