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.
[jdoe@chef-work001 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.
[jdoe@chef-work001 chef-repo]$ tree cookbooks/
cookbooks/
`-- README.md
0 directories, 1 file
[jdoe@chef-work001 chef-repo]$
I see no indications of errors or warnings anywhere.
I only see INFO messages with 'chef-server-ctl tail’
Pointers please?
-lun
"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 lunixer@gmail.com 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.
[jdoe@chef-work001 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.
[jdoe@chef-work001 chef-repo]$ tree cookbooks/
cookbooks/
`-- README.md
0 directories, 1 file
[jdoe@chef-work001 chef-repo]$
I see no indications of errors or warnings anywhere.
I only see INFO messages with 'chef-server-ctl tail'
Pointers please?
-lun
Problem solved.
REFERENCE:
centos, chef, cookbook
Added cookbook_path to knife.rb.
But upload was erroring out.
[jdoe@chef-work001 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.
[jdoe@chef-work001 ]$ 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.
[jdoe@chef-work001 chef-repo]$ sudo knife cookbook upload testcook1
Uploading testcook1 [0.1.0]
Uploaded 1 cookbook.
[jdoe@chef-work001 chef-repo]$ sudo knife cookbook list
testcook1 0.1.0
Thanks!
-lun
On Thu, May 16, 2013 at 12:37 PM, Adam Leff adam@leff.co 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 lunixer@gmail.com 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.
[jdoe@chef-work001 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.
[jdoe@chef-work001 chef-repo]$ tree cookbooks/
cookbooks/
`-- README.md
0 directories, 1 file
[jdoe@chef-work001 chef-repo]$
I see no indications of errors or warnings anywhere.
I only see INFO messages with 'chef-server-ctl tail'
Pointers please?
-lun