[chef] Re: knife.rb cookbook_path with Berkshelf


Chronological Thread 
  • From: Ranjib Dey < >
  • To:
  • Subject: [chef] Re: knife.rb cookbook_path with Berkshelf
  • Date: Wed, 21 Aug 2013 12:02:46 -0700

berkshelf stores the cookbooks in a directory which has their version . So sudo cookbook will be stored as sudo-1.0.0. This wont work with chef, as it expects a directory named sudo. You need to invoke berkshelf install --path <some dir> and use <some dir>  as your cookbook_path.

Also, you might not need any other entries in cookbook_path as berks can manage local repos as well, and berks install will pull them  (as long as you version bump religiously). Other wise, use multiple entries, with your own cookbook dir in the beginning (to give it higher precedence in search path)


On Wed, Aug 21, 2013 at 11:53 AM, Mark H. Nichols < " target="_blank"> > wrote:
All - 

I'm trying to add my Berkshelf cookbooks location to the cookbook_path in knife.rb without much success.

Here's what I have:

cookbook_path ["/Users/mhn/.berkshelf/cookbooks", "#{current_dir}/../cookbooks"]

When I try to run 

knife cookbook upload ome_jboss 

for example, I get an error saying that cookbook one_jboss could not be found in my cookbook path. ome_jboss does exist at /Users/mhn/.berkshelf/cookbooks. I've tried putting the Berkshelf path specification first and last in the array, and I've tried it just by itself there, all with the same result.

Thanks,
Mark
--
mark nichols | (t|a.n) @zanshin | (w) zanshin.net | (gpg key) 53445200







Archive powered by MHonArc 2.6.16.

§