🤖🚫 AI-free content. This post is 100% written by a human, as is everything on my blog. Enjoy!

Some of my chef definitions that help deploy Rails apps

February 26, 2014 in Devops

I DRYed up my Chef deploy scripts and extracted some definitions in to a cookbook: chef-rails-helpers.

With the definitions you can notify Airbrake of your Chef deploys:

after_restart do
  airbrake_deploy_notification "myapp"
end

or set up a Thinking Sphinx daemon complete with an init script:

thinking_sphinx 'blog' do
  app_path '/home/blog/www/blog'
end

or much more.

They’re not super generalized - only designed for Debian/Ubuntu and rely a lot on convention-over-configuration based on my preferences in directory organisation. Which is why I don’t pretend they are for everyone. However, if you learn Chef you can study them, and if you know Chef you can critisize them. I’m happy with both.

By the way, from my experience overgeneralization makes Chef cookbooks hard to understand and to debug. So in many cases it does more harm than good.

Find them in the chef-rails-helpers cookbook on GitHub.

Buy me a coffee Liked the post? Treat me to a coffee