If this was in the docs, I''ve missed it. How can I have multiple mongrel clusters on a server? All the documentation that I am seeing seems to assume that I am only running one cluster.
On Jul 5, 2006, at 4:59 PM, Bryan Liles wrote:> If this was in the docs, I''ve missed it. How can I have multiple > mongrel clusters on a server? All the documentation that I am seeing > seems to assume that I am only running one cluster.For different applications? You just run the "mongrel_rails cluster::configure" command in the root of each rails application and then edit config/ mongrel_cluster.yml to start at different port numbers, and make sure that the number of processes doesn''t overlap any of the ranges. - Jason
On Jul 5, 2006, at 8:40 PM, Jason A. Hoffman wrote:> On Jul 5, 2006, at 4:59 PM, Bryan Liles wrote: > >> If this was in the docs, I''ve missed it. How can I have multiple >> mongrel clusters on a server? All the documentation that I am seeing >> seems to assume that I am only running one cluster. > > For different applications? > > You just run the "mongrel_rails cluster::configure" command in the > root of each rails application and then edit config/ > mongrel_cluster.yml to start at different port numbers, and make sure > that the number of processes doesn''t overlap any of the ranges.I understand that part. I''m more interesting the apache proxy balancer integration.
On Jul 5, 2006, at 5:45 PM, Bryan Liles wrote:> On Jul 5, 2006, at 8:40 PM, Jason A. Hoffman wrote: >> On Jul 5, 2006, at 4:59 PM, Bryan Liles wrote: >> >>> If this was in the docs, I''ve missed it. How can I have multiple >>> mongrel clusters on a server? All the documentation that I am >>> seeing >>> seems to assume that I am only running one cluster. >> >> For different applications? >> >> You just run the "mongrel_rails cluster::configure" command in the >> root of each rails application and then edit config/ >> mongrel_cluster.yml to start at different port numbers, and make sure >> that the number of processes doesn''t overlap any of the ranges. > > I understand that part. I''m more interesting the apache proxy > balancer integration.Everything with mod_proxy and mod_proxy_balancer can be in virtual hosts. We tend to define them in a directory (as single files so they can be managed and distributed from one location). So in a simple setup, you would define multiple proxy balancers like <Proxy balancer://joyent-mongrel> BalancerMember http://10.7.108.15:8000 BalancerMember http://10.7.108.15:8001 BalancerMember http://10.7.108.15:8002 BalancerMember http://10.7.108.15:8003 BalancerMember http://10.7.108.15:8004 BalancerMember http://10.7.108.15:8005 BalancerMember http://10.7.108.15:8006 BalancerMember http://10.7.108.15:8007 BalancerMember http://10.7.108.15:8008 BalancerMember http://10.7.108.15:8009 </Proxy> <Proxy balancer://koz-mongrel> BalancerMember http://10.7.108.15:9000 BalancerMember http://10.7.108.15:9001 BalancerMember http://10.7.108.15:9002 BalancerMember http://10.7.108.15:9003 BalancerMember http://10.7.108.15:9004 BalancerMember http://10.7.108.15:9005 BalancerMember http://10.7.108.15:9006 BalancerMember http://10.7.108.15:9007 BalancerMember http://10.7.108.15:9008 BalancerMember http://10.7.108.15:9009 </Proxy> And then have different virtual hosts point to different balancers. <VirtualHost 207.7.107.15:8080> ServerName connector1.joyent.com ProxyPass /logs ! ProxyPass /icons ! ProxyPass /images ! ProxyPass /stylesheets ! ProxyPass /javascripts ! ProxyPass / balancer://joyent-mongrel/ ProxyPreserveHost On </VirtualHost> <VirtualHost 207.7.107.15:8080> ServerName connector2.joyent.com ProxyPass /logs ! ProxyPass /icons ! ProxyPass /images ! ProxyPass /stylesheets ! ProxyPass /javascripts ! ProxyPass / balancer://zonekoz-mongrel/ ProxyPreserveHost On </VirtualHost>
On Jul 5, 2006, at 7:59 PM, Bryan Liles wrote:> If this was in the docs, I''ve missed it. How can I have multiple > mongrel clusters on a server? All the documentation that I am seeing > seems to assume that I am only running one cluster.Hi Bryan: Take a look at the railsmachine gem. It will create Apache vhost configurations for you via Capistrano. I''m working on better doc, but this should get you going. Note: These instructions assume CentOS/RedHat with Apache 2.2, mongrel_cluster, and MySQL installed. You may need to adjust for your server environment. 1. Create a directory to hold the Apache conf for each application. For example: sudo mkdir /etc/httpd/conf/apps/ 2. Add includes for a default virtual host and additional vhosts to your Apache conf: sudo vi /etc/httpd/conf/httpd.conf Append the following: NameVirtualHost *:80 Include conf/default.conf Include conf/apps/*.conf 3. Create a mongrel_cluster configuration dir: mkdir /etc/mongrel_cluster 4. Install railsmachine and Capistrano gems on your development box: sudo gem install railsmachine --include-dependencies 5. Check out deployment instructions and modify any paths for your system in config/deploy.rb: https://support.railsmachine.com/index.php?pg=kb.page&id=12 Hope this helps! Dig around in the gem source to see how to modify the process for your needs. Good luck, Bradley Taylor ------ Rails Optimized Hosting ~ VPS and Dedicated Servers Simplified Deployment ~ Services and Software http://railsmachine.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060705/d80c8630/attachment-0001.html
Isn''t that gem for railsmachine users only? On 7/5/06, Bradley Taylor <bradley at railsmachine.com> wrote:> > > On Jul 5, 2006, at 7:59 PM, Bryan Liles wrote: > > If this was in the docs, I''ve missed it. How can I have multiple > mongrel clusters on a server? All the documentation that I am seeing > seems to assume that I am only running one cluster. > > Hi Bryan: > > Take a look at the railsmachine gem. It will create Apache vhost > configurations for you via Capistrano. I''m working on better doc, but this > should get you going. > > Note: These instructions assume CentOS/RedHat with Apache 2.2, > mongrel_cluster, and MySQL installed. You may need to adjust for your server > environment. > > 1. Create a directory to hold the Apache conf for each application. For > example: > sudo mkdir /etc/httpd/conf/apps/ > > 2. Add includes for a default virtual host and additional vhosts to your > Apache conf: > sudo vi /etc/httpd/conf/httpd.conf > > Append the following: > > NameVirtualHost *:80 > Include conf/default.conf > Include conf/apps/*.conf > > 3. Create a mongrel_cluster configuration dir: > mkdir /etc/mongrel_cluster > > 4. Install railsmachine and Capistrano gems on your development box: > sudo gem install railsmachine --include-dependencies > > 5. Check out deployment instructions and modify any paths for your system in > config/deploy.rb: > https://support.railsmachine.com/index.php?pg=kb.page&id=12 > > Hope this helps! Dig around in the gem source to see how to modify the > process for your needs. > > Good luck, > Bradley Taylor > > ------ > Rails Optimized Hosting ~ VPS and Dedicated Servers > Simplified Deployment ~ Services and Software > http://railsmachine.com > > > > > > > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > >-- Cheers, Kevin
On Jul 5, 2006, at 9:38 PM, Kevin Williams wrote:> Isn''t that gem for railsmachine users only?No, the gem is open source licensed and available from Ruby Forge. In theory, you can use it with any server or host. However, you might need to tweak the deploy.rb variables to match your paths, etc. When configuring multiple clusters, be sure to change the apache_proxy_port variable for each app in its ''config/deploy.rb''. Please let me know how it works for you. Thanks, Bradley Taylor ------ Rails Optimized Hosting ~ VPS and Dedicated Servers Simplified Deployment ~ Services and Software http://railsmachine.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060705/6431e534/attachment.html
Interesting. I knew it was available to everyone, but I didn''t really expect it to work for anyone other than railsmachine users. If there were a ''textdrive'' or a ''rimuhosting'' gem, I would also expect them to be specific to their respective environments as well. Maybe it''s just me. :) I will give it a shot. I''m trying to determine whether to host myself at home on an old box (Arch Linux) or go with the vpsland account I just opened (Ubuntu 6.06). (Sorry - I looked at RailsMachine but I need something really cheap but above shared hosting - we''ll see if I get what I pay for.) It sounds like this is just the functionality I need because I''m having trouble manually getting Apache 2.2 + Mongrel + Capistrano + svn all in sync on my home server. On 7/5/06, Bradley Taylor <bradley at railsmachine.com> wrote:> > > On Jul 5, 2006, at 9:38 PM, Kevin Williams wrote: > > Isn''t that gem for railsmachine users only? > > No, the gem is open source licensed and available from Ruby Forge. In > theory, you can use it with any server or host. However, you might need to > tweak the deploy.rb variables to match your paths, etc. > > When configuring multiple clusters, be sure to change the apache_proxy_port > variable for each app in its ''config/deploy.rb''. > > Please let me know how it works for you. > > Thanks, > > Bradley Taylor > > > ------ > Rails Optimized Hosting ~ VPS and Dedicated Servers > Simplified Deployment ~ Services and Software > http://railsmachine.com > > > > > > > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > >-- Cheers, Kevin