[chef] Re: Re: My first chef cookbook


Chronological Thread 
  • From: Mike Bailey < >
  • To:
  • Subject: [chef] Re: Re: My first chef cookbook
  • Date: Tue, 29 Jun 2010 17:08:07 +1000

That's a neat improvement.

Is there a resource that can go further (ie. configure, compile and install)?

- Mike



On Tue, Jun 29, 2010 at 4: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.

§