Hi, I am developer I want to make my life easier to prepare production envs
using Chef. I tryied to instantiate it and do some configuration, but I am
stuck. I am training a server and client scenario. I installed server and
client, they are talking together. The created client node is visible through
WebUI and I can check its attributes.
The problem is related with uploading new cookbook to chef-server. Actually,
follow the tutorial which I have found somewhere, I tried to upload ubuntu
cookbook taken from chef repository using command ‘knife cookbook site vendor
ubuntu’.
Command produces expected result in my console, creates cookbook and commit
changes into local git repo.
When I try to upload the cookbook to chef-server-webui (using knife on
chef-server) by this command: ‘knife cookbook upload ubuntu’ I get following
output:
***@chef:~/src/gitosis/chef-repo#
knife cookbook upload ubuntu
INFO: ubuntu
INFO: Running syntax check on ubuntu
INFO: No change in checksum of
/root/src/gitosis/chef-repo/cookbooks/ubuntu/recipes/default.rb
INFO: No change in checksum of
/root/src/gitosis/chef-repo/cookbooks/ubuntu/metadata.rb
INFO: No change in checksum of
/root/src/gitosis/chef-repo/cookbooks/ubuntu/attributes/default.rb
INFO: No change in checksum of
/root/src/gitosis/chef-repo/cookbooks/ubuntu/templates/default/sources.list.erb
INFO: Copying from /root/src/gitosis/chef-repo/cookbooks/ubuntu to
/tmp/chef-ubuntu-build20110217-6018-gsloan-0
INFO: Generating metadata for ubuntu
INFO: Generating from
/tmp/chef-ubuntu-build20110217-6018-gsloan-0/ubuntu/metadata.rb
INFO: Generated
/tmp/chef-ubuntu-build20110217-6018-gsloan-0/ubuntu/metadata.json
INFO: Creating tarball at /tmp/chef-ubuntu20110217-6018-1hp0sqk-0.tar.gz
WARN: HTTP Request Returned 404 Not Found: Cannot find a cookbook named ubuntu
INFO: Upload complete!
when I turned on ‘-l debug’ option, the output is following:
***@chef:~/src/gitosis/chef-repo#
knife cookbook upload ubuntu -l debug
DEBUG: Uploading cookbooks from
INFO: ubuntu
INFO: Running syntax check on ubuntu
INFO: No change in checksum of
/root/src/gitosis/chef-repo/cookbooks/ubuntu/recipes/default.rb
INFO: No change in checksum of
/root/src/gitosis/chef-repo/cookbooks/ubuntu/metadata.rb
INFO: No change in checksum of
/root/src/gitosis/chef-repo/cookbooks/ubuntu/attributes/default.rb
INFO: No change in checksum of
/root/src/gitosis/chef-repo/cookbooks/ubuntu/templates/default/sources.list.erb
DEBUG: Staging at /tmp/chef-ubuntu-build20110217-6061-md9p8v-0
INFO: Copying from /root/src/gitosis/chef-repo/cookbooks/ubuntu to
/tmp/chef-ubuntu-build20110217-6061-md9p8v-0
INFO: Generating metadata for ubuntu
INFO: Generating from
/tmp/chef-ubuntu-build20110217-6061-md9p8v-0/ubuntu/metadata.rb
INFO: Generated
/tmp/chef-ubuntu-build20110217-6061-md9p8v-0/ubuntu/metadata.json
INFO: Creating tarball at /tmp/chef-ubuntu20110217-6061-h5xlew-0.tar.gz
DEBUG: Executing tar -C /tmp/chef-ubuntu-build20110217-6061-md9p8v-0 -cvzf
/tmp/chef-ubuntu20110217-6061-h5xlew-0.tar.gz ./ubuntu
DEBUG: ---- Begin output of tar -C
/tmp/chef-ubuntu-build20110217-6061-md9p8v-0
-cvzf /tmp/chef-ubuntu20110217-6061-h5xlew-0.tar.gz ./ubuntu ----
DEBUG: STDOUT: ./ubuntu/
./ubuntu/recipes/ ./ubuntu/recipes/default.rb ./ubuntu/metadata.rb
./ubuntu/templates/ ./ubuntu/templates/default/
./ubuntu/templates/default/sources.list.erb ./ubuntu/attributes/
./ubuntu/attributes/default.rb ./ubuntu/metadata.json DEBUG: STDERR:
DEBUG: ---- End output of tar -C /tmp/chef-ubuntu-build20110217-6061-md9p8v-0
-cvzf /tmp/chef-ubuntu20110217-6061-h5xlew-0.tar.gz ./ubuntu ----
DEBUG: Ran tar -C /tmp/chef-ubuntu-build20110217-6061-md9p8v-0 -cvzf
/tmp/chef-ubuntu20110217-6061-h5xlew-0.tar.gz ./ubuntu returned 0
DEBUG: Signing the request as root
DEBUG: Sending HTTP Request via GET to localhost:4000/cookbooks/ubuntu
WARN: HTTP Request Returned 404 Not Found: Cannot find a cookbook named ubuntu
DEBUG: Signing: method: post, path: /cookbooks, file: #<File:0xb6f1e3b4>,
User-id: root, Timestamp: 2011-02-17T16:41:50Z
INFO: Upload complete!
DEBUG: Removing local tarball at /tmp/chef-ubuntu20110217-6061-h5xlew-0.tar.gz
DEBUG: Removing local staging directory at
/tmp/chef-ubuntu-build20110217-6061-md9p8v-0
rake install, produces following output:
***@chef:~/src/gitosis/chef-repo#
rake install
(in /root/src/gitosis/chef-repo) ** Updating your repository git pull
You asked me to pull without telling me which branch you
want to merge with, and ‘branch.master.merge’ in
your configuration file does not tell me, either. Please
specify which branch you want to use on the command line and
try again (e.g. 'git pull ').
See git-pull(1) for details.
If you often merge with the same branch, you may want to
use something like the following in your configuration file:
[branch “master”]
remote =
merge =
[remote “”]
url =
fetch =
See git-config(1) for details.
rake aborted!
Command failed with status (1): [git pull…]
(See full trace by running task with --trace)
Can someone help me? I spent two days on browsing internet for help or if
someone had similar problem - without result.
Thanks in advance.
with reagrds, Kamil Kuliberda
btw.
I am using Ubuntu 10.10 on VMware, for server env and client env. Following
are
version list of installed packages:
Package: chef-server
Version: 0.8.16-4
Package: chef-server-webui
Version: 0.8.16-4
Package: chef-server-api
Version: 0.8.16-4
Package: chef
Version: 0.8.16-4
Package: chef-solr
Version: 0.8.16-4
Package: libchef-ruby1.8
Version: 0.8.16-4