[chef] Re: Re: cookbooks not created


Chronological Thread 
  • From: Lunixer < >
  • To:
  • Subject: [chef] Re: Re: cookbooks not created
  • Date: Thu, 16 May 2013 13:11:41 -0700

Problem solved.

REFERENCE:  http://serverfault.com/questions/476426/chef-knife-upload-cookbook-method-not-allowed

Added cookbook_path to knife.rb.
But upload was erroring out.

chef-repo]$ sudo knife cookbook upload testcook1
Uploading testcook1    [0.1.0]
ERROR: Method Not Allowed
Response:

To solve the above error, edited the knife.rb file and replaced http with https
as suggested in the referenced link above.

]$ cat /home/jdoe/chef-repo/.chef/knife.rb
log_level                :info
log_location             STDOUT
node_name                'jdoe'
client_key               '/home/jdoe/.chef/jdoe.pem'
validation_client_name   'chef-validator'
validation_key           '/home/jdoe/chef-repo/.chef/chef-validator.pem'
chef_server_url          'https://server.example.com'
syntax_check_cache_path  '/home/jdoe/.chef/syntax_check_cache'
cookbook_path             '/home/jdoe/chef-repo/cookbooks'

The problem was solved.

chef-repo]$ sudo knife cookbook upload testcook1
Uploading testcook1    [0.1.0]
Uploaded 1 cookbook.

chef-repo]$ sudo knife cookbook list
testcook1   0.1.0

Thanks!
-lun


On Thu, May 16, 2013 at 12:37 PM, Adam Leff < " target="_blank"> > wrote:
"knife cookbook create" is a local operation, so you won't see anything in your chef-server logs until you actually "knife cookbook upload" that cookbook.

knife should create the cookbook in the first entry in your knife.rb's cookbook_path.  Have you checked in that directory?

~Adam


On Thu, May 16, 2013 at 3:34 PM, Lunixer < " target="_blank"> > wrote:
Preliminary information:
- using Open Source Chef
- server and workstation are CentOS 6.4 VMs
- running the _default environment

I tried to create a new cookbook, but nothing results in the cookbooks directory.

chef-repo]$ sudo knife cookbook create testcook1
** Creating cookbook testcook1
** Creating README for cookbook: testcook1
** Creating CHANGELOG for cookbook: testcook1
** Creating metadata for cookbook: testcook1

The create action produces nothing.

chef-repo]$ tree cookbooks/
cookbooks/
`-- README.md

0 directories, 1 file
chef-repo]$

I see no indications of errors or warnings anywhere.
I only see INFO messages with 'chef-server-ctl tail'
Pointers please?

-lun





Archive powered by MHonArc 2.6.16.

§