Chronicling the trials and tribulations of developing for the modern web.



Bells is Back

Posted by Pat Nakajima on March 24, 2008 in Ruby or Rails.

Remember Capistrano Bells? The Rails plugin I created so long ago, then neglected for so long? Well it’s back. And it has a bunch of new recipes for your deployment pleasure.

Nginx Recipes

You know about Nginx right? That hip new web server all the cool kids are clamoring about? Well now Bells has built-in recipes to make configuring new Nginx virtual hosts a snap:

cap deploy:nginx:configure
How does Bells know where you want your Nginx vhosts stored? Why with the new options added to the Capfile template of course!
set :nginx_sites_available, "/usr/local/nginx/sites-available" 
set :nginx_sites_enabled, "/usr/local/nginx/sites-enabled" 

Those are just the defaults. You can modify them however you wish.

Thin Recipes

Almost as trendy as Nginx is Thin, a new Ruby web server that takes Mongrel’s parser and mashes it up with EventMachine with Rack. It’s quick and simple, especially with Bells’ new Thin recipes.

cap thin:configure
cap thin:start
cap thin:stop
cap thin:restart
I’ve been working on making Bells a bit more app server agnostic, which allows you to use Mongrel or Thin almost interchangeably. Just choose which you want to use like so:
set :app_server, :mongrel # or :thin if you please
Then specify the app server settings:
set :app_servers, 1
set :app_server_port, 7007
set :app_environment, 'production'
set :app_server_address, '127.0.0.1'
set :app_server_conf, "#{shared_path}/config/mongrel_conf.yml" 
I’ve done away with Mongrel specific settings, since Thin and Mongrel’s settings are pretty much the same.

So that’s about it. The project is on GitHub now. You can check out its page, or clone a copy yourself like so:

git clone git://github.com/nakajima/capistrano-bells.git

If you’re running edge Rails, you can even install the plugin directly from GitHub:

script/plugin install git clone git://github.com/nakajima/capistrano-bells.git

If you have any questions/suggestions, hit the wiki.

peoplewhocommented

March 28, 2008

Very informative and complete. And its a joy to see you on git.

ynw

commentsareclosed

Sorry, but comments are closed on this blog after 30 days.