[chef] Question about the application cookbook


Chronological Thread 
  • From: Ash Berlin < >
  • To:
  • Subject: [chef] Question about the application cookbook
  • Date: Wed, 8 Sep 2010 20:58:12 +0100

So I'm converting my hand rolled deployment resource to use the application 
cookbook, and I've got a question about it. Or rather I'd like to point out 
that the rails and unicorn recipes are inconsistent in how they deal with 
attributes.

The rails recipe does this:

  node[:apps][app['id']][node.app_environment][:run_migrations]

The unicorn one on the other hand does

  node.default[:unicorn][:worker_timeout] = 60
  node.default[:unicorn][:preload_app] = false
  node.default[:unicorn][:worker_processes] = [node[:cpu][:total].to_i * 4, 
8].min
  ...

Now the unicorn config is node global and doesn't let you tweak things based 
on the app. Should it?

  node.default[:apps][app['id']][:unicorn][:worker_timeout] = 60
  ...

Thoughts?

-ash


Archive powered by MHonArc 2.6.16.

§