Charles Brian Quinn
2006-Aug-18 17:43 UTC
[Mongrel] New automated Capistrano setup for Apache2.1+ and mongrel_cluster
Hi mongrel users! I just posted a bad-ass capistrano file that automates *everything* for setting up an apache2+mod_proxy_balancer and mongrel+mongrel_cluster -- including apache2 setups. It''s based off Coda Hale''s guide and all Bradley''s work at fluxura and RailsMachine (thanks Coda and Bradley!). It''s, well, bad-ass, if I must say so myself. My favorite part: (0..mongrel_servers-1).each { |server| apache2_rails_conf += " BalancerMember http://127.0.0.1:#{mongrel_start_port + server}\n" } It''s on our newest Slingshot Hosting image, but you can download it here: http://www.slingshothosting.com/files/apache2_2_mongrel_deploy.rb Deployment just got a whole lot easier. And, is about to get even easier: http://cleanair.highgroove.com/articles/2006/08/18/heartbeat-sneak-preview -- Charles Brian Quinn self-promotion: www.seebq.com highgroove studios: www.highgroove.com slingshot hosting: www.slingshothosting.com -- Charles Brian Quinn self-promotion: www.seebq.com highgroove studios: www.highgroove.com slingshot hosting: www.slingshothosting.com
Thomas Reynolds
2006-Aug-18 18:42 UTC
[Mongrel] New automated Capistrano setup for Apache2.1+ and mongrel_cluster
Oh my fucking god, you have made my life so much better. Tweaking .conf files was starting to drive me mad. -Thomas Reynolds On 8/18/06, Charles Brian Quinn <me at seebq.com> wrote:> > Hi mongrel users! > > I just posted a bad-ass capistrano file that automates *everything* > for setting up an apache2+mod_proxy_balancer and > mongrel+mongrel_cluster -- including apache2 setups. It''s based off > Coda Hale''s guide and all Bradley''s work at fluxura and RailsMachine > (thanks Coda and Bradley!). > > It''s, well, bad-ass, if I must say so myself. My favorite part: > > (0..mongrel_servers-1).each { |server| > apache2_rails_conf += " BalancerMember > http://127.0.0.1:#{mongrel_start_port + server}\n" > } > > It''s on our newest Slingshot Hosting image, but you can download it here: > > http://www.slingshothosting.com/files/apache2_2_mongrel_deploy.rb > > Deployment just got a whole lot easier. > > And, is about to get even easier: > > http://cleanair.highgroove.com/articles/2006/08/18/heartbeat-sneak-preview > > -- > Charles Brian Quinn > self-promotion: www.seebq.com > highgroove studios: www.highgroove.com > slingshot hosting: www.slingshothosting.com > > > -- > Charles Brian Quinn > self-promotion: www.seebq.com > highgroove studios: www.highgroove.com > slingshot hosting: www.slingshothosting.com > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060818/100b1ef5/attachment.html
Zed Shaw
2006-Aug-18 19:59 UTC
[Mongrel] New automated Capistrano setup for Apache2.1+ and mongrel_cluster
On Fri, 2006-08-18 at 13:43 -0400, Charles Brian Quinn wrote:> Hi mongrel users! > > I just posted a bad-ass capistrano file that automates *everything* > for setting up an apache2+mod_proxy_balancer and > mongrel+mongrel_cluster -- including apache2 setups. It''s based off > Coda Hale''s guide and all Bradley''s work at fluxura and RailsMachine > (thanks Coda and Bradley!).Cool, did you make sure it runs with the latest pre-release? That''s coming down as the official release very soon, as soon as I route out or rule out a bug. The main change for your stuff is that it''s better to specify the log and pid file paths as absolute paths just to make sure they get set right. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support?
Charles Brian Quinn
2006-Aug-19 04:51 UTC
[Mongrel] New automated Capistrano setup for Apache2.1+ and mongrel_cluster
On 8/18/06, Zed Shaw <zedshaw at zedshaw.com> wrote:> Cool, did you make sure it runs with the latest pre-release? That''s > coming down as the official release very soon, as soon as I route out or > rule out a bug. The main change for your stuff is that it''s better to > specify the log and pid file paths as absolute paths just to make sure > they get set right.I just updated my script, and made it work with the new mongrel pre-release. It has options to specify the prefix as a capistrano setting. It''s totally improved and tried and tested to be able to run multiple mongrel_clusters on multiple vhosts simultaneously (and takes care of all ports). Some things to note that I forgot to mention last time: You''ll need to have a line in your apache2 that says: Include /etc/rails/*.conf to pickup all the conf files for the multiple mongrel_clusters you''re running You''ll also want to have the line: NameVirtualHost *:80 to be able to serve up all your different named virtualhost servers for each app. Also one more thing, I put the amazingly feature-barren proxy-balancer manager on mongrel_start_port + 81, which ends up being 8081, so another cluster on 8100 would put it on port 8181. Just FYI. It could be configurable one day too, though. Newest version is here again: http://www.slingshothosting.com/files/apache2_2_mongrel_deploy.rb p.s. Zed I sent you some Apache2 best practices documents for the mongrel site. Did you receive them? Should I post the webgen files on rubyforge, or just submit a patch to current mongrel svn? p.p.s. a crazy mongrel: http://www.flickr.com/photos/cassi007/211404555/ -- Charles Brian Quinn self-promotion: www.seebq.com highgroove studios: www.highgroove.com slingshot hosting: www.slingshothosting.com