[chef] Re: Re: My first chef cookbook


Chronological Thread 
  • From: Pablo Kang < >
  • To:
  • Subject: [chef] Re: Re: My first chef cookbook
  • Date: Tue, 29 Jun 2010 07:26:31 -0700
  • 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 :content-type; b=ApmKliIRGtV1y4iv9vZCWD6Gic68NCHDr7NmRunsj6IPhmu+hLCl9P8VIUXf+vAmfp b0iFgYJ2LeiiAX5rPWn88EhFX+Hoq4H2XkvEiSs45wD9TMxMcBSTAOmC83BNczrlngnG EEOBWD2yKvSuxGdFIvdyAo8QK9WVJJfa85YYU=

Hi Ringo,

Someone replied on the post with the same comment. I completely missed that resource! I'll be sure to update the blog later today. Thanks for the pointer!

pablo 

On Mon, Jun 28, 2010 at 11:46 PM, Ringo De Smet < "> > wrote:
Pablo,

On 29 June 2010 01:46, Pablo Kang < "> > wrote:
> Wrote a blog post on my experience writing my first cookbook. It takes a
> step by step approach. Thought it might be useful for folks just getting
> their feet wet like I am.
> http://blazingcloud.net/2010/06/28/our-first-chef-cookbook/

As another user of Chef, I suggest an improvement to your cookbook.
Your openfire default recipe contains this snippet:

execute "wget" do
 tarball_url = "http://www.igniterealtime.org/downloadServlet?filename=openfire/#{tarball}"
 cwd "/tmp"
 command "wget #{tarball_url}"
 creates "/tmp/#{tarball}"
 action :run
end

Retrieving a remote file is better done by the "remote_file" (1) resource:

remote_file "/tmp/#{tarball}" do
 source "http://www.igniterealtime.org/downloadServlet?filename=openfire/#{tarball}"
 mode "0644"
 checksum "08da002l" # A SHA256 (or portion thereof) of the file.
end

(1) http://wiki.opscode.com/display/chef/Resources#Resources-RemoteFile

Cheers,

Ringo




Archive powered by MHonArc 2.6.16.

§