mongrel_cluster provides management tools for running Mongrel behind a reverse-proxy/load balancer. It is an extraction from Rails Machine, a deployment service and Ruby library that simplifies Rails application deployment. This release fixes bugs and adds a Capistrano task library.
Changes:
-changed pid file format to include port
-only write configuration options that are explicitly specified or required.
-removed some validation rules and delegate to mongrel_rails.
-added Capistrano task library.
Please rerun mongrel_rails cluster::configure to ensure smooth operation.
Capistrano Recipe
Add to config/deploy.rb:
require 'mongrel_cluster/recipes'
Example usage:
cap -a configure_mongrel_cluster
Variables
mongrel_servers: Number of Mongrel servers to start.
mongrel_port: Starting port to bind to.
mongrel_address: Address to bind to.
mongrel_environment: Rails environment to run as.
mongrel_config: Path to config file.
use_sudo: Whether or not tasks that can use sudo, ought to use sudo. Capistrano defaults to true.
Tasks (performed on :app role)
configure_mongrel_cluster: Configure the cluster with variables. Uses sudo if use_sudo is true.
start_mongrel_cluster: Start Mongrel processes on the app server. Uses sudo if use_sudo is true.
stop_mongrel_cluster: Stop the Mongrel processes on the app server. Uses sudo if use_sudo is true.
restart_mongrel_cluster: Restart the Mongrel processes on the app server. Uses sudo if use_sudo is true.
restart: Calls restart_mongrel_cluster to allow Mongrel to be used with the standard Capistrano deploy task.
spinner: Calls start_mongrel_cluster to allow Mongrel to be used with the standard Capistrano cold_deploy task.
Good luck and let me know how it works for ya!
micro theme by seaofclouds, and powered with Mephisto
3 Comments
Leave a Comment