- From: AJ Christensen <
>
- To:
- Subject: [chef] Re: RE: Re: Chef-Cookbook creation
- Date: Mon, 14 Mar 2011 11:15:40 -0400
http://www.ruby-doc.org/core/classes/File.html#M000022
On 14 March 2011 10:24, WEINHAPL Andreas
<
>
wrote:
>
I think there is an easier way to solve this issue:
>
Knife.rb (won't work)
>
cookbook_path [ '~/chef-repo/cookbooks', '~/chef-repo/site-cookbooks' ]
>
>
Knife.rb (works really good)
>
cookbook_path [ '/home/xxx/chef-repo/cookbooks',
>
'/home/chef-repo/site-cookbooks' ]
>
>
I just use the absolute path for the cookbook..
>
>
Many thanks for your help :) But please explain your method.
>
>
Regards
>
Andreas
>
>
-----Original Message-----
>
From: AJ Christensen
>
[mailto:
>
Sent: Montag, 14. März 2011 14:56
>
To:
>
>
Subject: [chef] Re: Chef-Cookbook creation
>
>
On 14 March 2011 09:44, WEINHAPL Andreas
>
<
>
>
wrote:
>
> Hi all,
>
>
>
>
>
>
>
> I have just a little question about knife?! At the installation of the
>
> server you have to configure knife with “knife configure –I” You will
>
> locate
>
> the different *.pem files aso. After that you are able to create a new
>
> cookbook with:
>
>
>
> “ knife cookbook create test04”
>
>
>
> ** Creating cookbook test04
>
>
>
> ** Creating README for cookbook: test04
>
>
>
> ** Creating metadata for cookbook: test04
>
>
>
>
>
>
>
> After playing with GIT and the root user I will get this if I try to
>
> create
>
> a new cookbook:
>
>
>
> ** Creating cookbook vendor
>
>
>
> /usr/lib/ruby/1.8/chef/knife/cookbook_create.rb:90:in `initialize': No
>
> such
>
> file or directory - ~/chef-repo/cookbooks/vendor/recipes/default.rb
>
> (Errno::ENOENT)
>
>
Use File.expand_path("~/some/shit") to expand the tilde to your home
>
directory.
>
>
Regards,
>
>
AJ
>
>
>
>
> from /usr/lib/ruby/1.8/chef/knife/cookbook_create.rb:90:in `open'
>
>
>
> from /usr/lib/ruby/1.8/chef/knife/cookbook_create.rb:90:in
>
> `create_cookbook'
>
>
>
> from /usr/lib/ruby/1.8/chef/knife/cookbook_create.rb:74:in `run'
>
>
>
> from /usr/lib/ruby/1.8/chef/knife.rb:127:in `run'
>
>
>
> from /usr/lib/ruby/1.8/chef/application/knife.rb:121:in `run'
>
>
>
> from /usr/bin/knife:25
>
>
>
>
>
>
>
> Can anybody help me with this problem?! I did a reconfigure of the knife
>
> but
>
> without success!!
>
>
>
>
>
>
>
> Knife.rb is thath:
>
>
>
> “
>
>
>
> log_level :info
>
>
>
> log_location STDOUT
>
>
>
> node_name 'xxx'
>
>
>
> client_key '/home/xxx/chef-repo/.chef/thales.pem'
>
>
>
> validation_client_name 'chef-validator'
>
>
>
> validation_key '/etc/chef/validation.pem'
>
>
>
> chef_server_url 'http://serverxx.domain:4000'
>
>
>
> cache_type 'BasicFile'
>
>
>
> cache_options( :path => '/home/xxx/chef-repo/.chef/checksums' )
>
>
>
> cookbook_path [ '~/chef-repo/cookbooks', '~/chef-repo/site-cookbooks' ]
>
>
>
> “
>
>
>
>
>
>
>
>
>
>
>
> Regards
>
>
>
> Andreas
>
Archive powered by MHonArc 2.6.16.