# Cookbooks not created

**URL:** <https://discourse.chef.io/t/cookbooks-not-created/3963>\
**Category:** Chef Infra (archive)\
**Created:** [May 16, 2013, 7:34pm UTC](https://discourse.chef.io/t/cookbooks-not-created/3963 "2013-05-16T19:34:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lunixer](https://avatars.discourse-cdn.com/v4/letter/l/6f9a4e/32.png) [@Lunixer](https://discourse.chef.io/u/Lunixer)\
**Post date:** [May 16, 2013, 7:34pm UTC](https://discourse.chef.io/t/cookbooks-not-created/3963/1 "2013-05-16T19:34:02Z")

</div>

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](http://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

---

<div class="post-metadata">

**Author:** ![adamleff](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/adamleff/32/1097_2.png) [@adamleff](https://discourse.chef.io/u/adamleff)\
**Post date:** [May 16, 2013, 7:37pm UTC](https://discourse.chef.io/t/cookbooks-not-created/3963/2 "2013-05-16T19:37:24Z")

</div>

"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](mailto: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

---

<div class="post-metadata">

**Author:** ![Lunixer](https://avatars.discourse-cdn.com/v4/letter/l/6f9a4e/32.png) [@Lunixer](https://discourse.chef.io/u/Lunixer)\
**Post date:** [May 16, 2013, 8:11pm UTC](https://discourse.chef.io/t/cookbooks-not-created/3963/3 "2013-05-16T20:11:41Z")

</div>

Problem solved.

REFERENCE:

> <https://serverfault.com/questions/476426/chef-knife-upload-cookbook-method-not-allowed>

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](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](mailto: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](mailto: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
