Skip to content

Instantly share code, notes, and snippets.

@cdmwebs
Created May 24, 2011 16:09
Show Gist options
  • Save cdmwebs/989012 to your computer and use it in GitHub Desktop.
Save cdmwebs/989012 to your computer and use it in GitHub Desktop.
~/src/chef-repo $ knife cookbook site vendor mysql -d
WARNING: No knife configuration file found
Installing mysql to /var/chef/cookbooks
ERROR: The cookbook repo path /var/chef/cookbooks does not exist or is not a directory
~/src/chef-repo $ knife cookbook site install couchdb -o ./cookbooks/
WARNING: No knife configuration file found
Installing couchdb to ./cookbooks/
Checking out the master branch.
Pristine copy branch (chef-vendor-couchdb) exists, switching to it.
Downloading couchdb from the cookbooks site at version 0.14.0 to ./cookbooks/couchdb.tar.gz
Cookbook saved: ./cookbooks/couchdb.tar.gz
Removing pre-existing version.
Uncompressing couchdb version ./cookbooks/.
ERROR: Chef::Exceptions::ShellCommandFailed: Expected process to exit 0, but it exited with 1
---- Begin output of tar zxvf ./cookbooks/couchdb.tar.gz ----
STDOUT:
STDERR: tar: Error opening archive: Failed to open './cookbooks/couchdb.tar.gz': No such file or directory
---- End output of tar zxvf ./cookbooks/couchdb.tar.gz ----
Ran tar zxvf ./cookbooks/couchdb.tar.gz returned 1
~/src/chef-repo $ knife cookbook site install couchdb -o ./
WARNING: No knife configuration file found
Installing couchdb to ./
Checking out the master branch.
Pristine copy branch (chef-vendor-couchdb) exists, switching to it.
Downloading couchdb from the cookbooks site at version 0.14.0 to ./couchdb.tar.gz
Cookbook saved: ./couchdb.tar.gz
Removing pre-existing version.
Uncompressing couchdb version ./.
removing downloaded tarball
1 files updated, committing changes
Creating tag cookbook-site-imported-couchdb-0.14.0
Checking out the master branch.
Updating a3bec38..64eea23
Fast-forward
couchdb/README.md | 61 ++++++++++
couchdb/attributes/default.rb | 22 ++++
couchdb/files/default/couchdb.init | 168 ++++++++++++++++++++++++++++
couchdb/metadata.json | 55 +++++++++
couchdb/metadata.rb | 24 ++++
couchdb/recipes/default.rb | 49 ++++++++
couchdb/recipes/source.rb | 93 +++++++++++++++
couchdb/templates/default/port_couchdb.erb | 2 +
8 files changed, 474 insertions(+), 0 deletions(-)
create mode 100644 couchdb/README.md
create mode 100644 couchdb/attributes/default.rb
create mode 100644 couchdb/files/default/couchdb.init
create mode 100644 couchdb/metadata.json
create mode 100644 couchdb/metadata.rb
create mode 100644 couchdb/recipes/default.rb
create mode 100644 couchdb/recipes/source.rb
create mode 100644 couchdb/templates/default/port_couchdb.erb
Cookbook couchdb version 0.14.0 successfully installed
Installing erlang to ./
Checking out the master branch.
Creating pristine copy branch chef-vendor-erlang
Downloading erlang from the cookbooks site at version 0.8.2 to ./erlang.tar.gz
Cookbook saved: ./erlang.tar.gz
Removing pre-existing version.
Uncompressing erlang version ./.
removing downloaded tarball
1 files updated, committing changes
Creating tag cookbook-site-imported-erlang-0.8.2
Checking out the master branch.
Updating 64eea23..60fd4d6
Fast-forward
erlang/attributes/default.rb | 1 +
erlang/metadata.json | 36 ++++++++++++++++++++++++++++++++++++
erlang/metadata.rb | 11 +++++++++++
erlang/recipes/default.rb | 27 +++++++++++++++++++++++++++
4 files changed, 75 insertions(+), 0 deletions(-)
create mode 100644 erlang/attributes/default.rb
create mode 100644 erlang/metadata.json
create mode 100644 erlang/metadata.rb
create mode 100644 erlang/recipes/default.rb
Cookbook erlang version 0.8.2 successfully installed
@cdmwebs
Copy link
Author

cdmwebs commented May 24, 2011

So the third attempt worked, but that puts the cookbook in the chef-repo/ path, not in chef-repo/cookbooks/ which is where I assume it should land...

@urbanautomaton
Copy link

Commenting here in case someone else googles the same error: you need to configure the cookbook_path for knife. I added the following to $REPO_DIR/.chef/knife.rb:

# .chef/knife.rb
cookbook_path [File.join(File.dirname(__FILE__), "..", "cookbooks")]

@rodriguezsergio
Copy link

^ Thanks for that.

@tblumer3
Copy link

Thank you urbanautomaton!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment