[chef] Re: Re: knife - upload cookbook from local repo to chef-server-webui doesn't work


Chronological Thread 
  • From: Kamil Kuliberda < >
  • To:
  • Cc: Daniel DeLeo < >
  • Subject: [chef] Re: Re: knife - upload cookbook from local repo to chef-server-webui doesn't work
  • Date: Fri, 18 Feb 2011 11:40:25 -0500
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=bKjWlB2X5jME8Hic6DribObxx/tqvCPaF5KHj1hLGN7KvJnmVc3xDTQednVzKwyG8z V5qzHuOcGnkp1LMpyYiN3m+eF5M5p+3IKktut5FDUylCrYmscBt3JEWC/CjoJQ857hcp 4zDN80ewd3MG27GPG1/Eo+KGyFk3E2Gz7hUO8=



2011/2/18 Daniel DeLeo < "> >
On Friday, February 18, 2011 at 8:18 AM, Kamil wrote:
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:
:~/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:

:~/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:

:~/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 = <nickname>
merge = <remote-ref>

[remote "<nickname>"]
url = "<url>fetch = <refspec>

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
You need to be uploading cookbooks to the API server (on port 4000 by default) and not the Web UI server.

Also, if you're just getting started and have no attachment to version 0.8 of Chef, I'd recommend starting with 0.9.12, which is the latest release. You can install it from apt.opscode.com.

HTH,
-- 
Dan DeLeo

 


Thanks, for the reply.
Sorry, my bad, I shouldn't say WebUI. Of course I did configuration to use API server, look on logs, there is information that command has invoked an uploading on API server (4000)

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 

--
regards, Kamil



Archive powered by MHonArc 2.6.16.

§