Want to stay on top? Ruby Weekly is a once-weekly e-mail newsletter covering the latest Ruby and Rails news.
     Feed Icon

UNIX start / stop / restart script for automatic Mongrel cluster management

By Peter Cooper / September 27, 2006

Jon Maddox was inspired by Ruby Inside's previous post about init.d startup scripts, and has put together a UNIX init.d script that can start, stop, and restart all of your Rails apps' Mongrel clusters automatically. The benefit of Jon's approach is that unlike with the startup script supplied with Mongrel, you don't need to manually copy in each Mongrel configuration file to make it work. Instead, you tell the script under which folder your apps are hosted, and it looks for your Mongrel cluster configuration files automatically. This is an ideal script if you have multiple Rails apps on a single machine and want to stop and start the entire set at once.

Comments

  1. drift says:

    Why not:

    gem install mongrel_cluster

    mongrel_cluster_ctl restart

    instead?

  2. Peter Cooper says:

    When I was playing with mongrel cluster it still made me have to set up configurations and then manually copy them across someplace. This script detects the applications automatically.

  3. drift says:

    Copy the configs, or define your directories...I'll stick with the older, tried and true, gem updateable method.

  4. Peter Cooper says:

    That's why we have options :)

  5. Rimantas says:

    I have symlinks to mongrel config files in /etc/mongrel_cluster/
    mongrel_cluster_ctl uses them to start instances. No scanning, no copying.

Other Posts to Enjoy

Twitter Mentions