- From: Adam Jacob <
>
- To:
- Subject: [chef] Re: Re: How can we upload cookbooks from the command lines?
- Date: Tue, 12 Jan 2010 11:45:50 -0800
Ideally, though, you'll create yourself a user key:
knife configure --initial
(which will create you a key using the webui key)
You'll be prompted for the path to your chef-repo directory (which
should just be your local copy). Once htat's done, you can just:
knife cookbook upload apache2
And you'll be good to go.
Adam
On Tue, Jan 12, 2010 at 10:45 AM, Bryan McLellan
<
>
wrote:
>
On Tue, Jan 12, 2010 at 7:02 AM, Dikang Gu
>
<
>
>
wrote:
>
> As per subject. for chef 0.8, using the knife.
>
>
http://wiki.opscode.com/display/chef/Knife#Knife-CookbookCommands
>
>
So something like:
>
>
sudo /var/lib/gems/1.8/bin/knife cookbook upload apache2 -u
>
chef-webui -k /etc/chef/webui.pem -o cookbooks
>
>
# sudo -> because I'm using the webui key which has restrictive
>
permissions because I haven't created an user key yet
>
# /var/lib/gems/1.8/bin/knife -> path to knife since I'm using debian
>
rubygems
>
# cookbook -> subcommand
>
# upload -> option
>
# apache2 -> name of cookbook
>
# -u chef-webui -> user to authenticate as
>
# -k /etc/chef/webui.pem -> users secret key
>
# -o cookbooks -> path to folder where I have the cookbooks on my
>
filesystem I want to upload.
>
--
Opscode, Inc.
Adam Jacob, CTO
T: (206) 508-7449 E:
Archive powered by MHonArc 2.6.16.