UNIX start / stop / restart script for automatic Mongrel cluster management
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.
September 27, 2006 at 7:08 pm
Why not:
gem install mongrel_cluster
mongrel_cluster_ctl restart
instead?
September 27, 2006 at 8:30 pm
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.
September 28, 2006 at 3:45 am
Copy the configs, or define your directories...I'll stick with the older, tried and true, gem updateable method.
September 28, 2006 at 6:26 am
That's why we have options :)
September 28, 2006 at 11:12 am
I have symlinks to mongrel config files in /etc/mongrel_cluster/
mongrel_cluster_ctl uses them to start instances. No scanning, no copying.