From duelin.markers at gmail.com Wed Jan 2 15:13:45 2008 From: duelin.markers at gmail.com (John D. Hume) Date: Wed, 2 Jan 2008 15:13:45 -0500 Subject: [Rubyworks-users] capistrano recipes ... rubyworks_deployer? Message-ID: We're looking to set up a fresh Capistrano deployment for a single app running on the RubyWorks stack (i.e., the simplest possible RubyWorks deployment). We've gone through the archives from this list looking for links to recipes and haven't found any. In fact all we've got is the pretty reasonable tip to make /usr/rails a symlink to /current. http://rubyforge.org/pipermail/rubyworks-users/2007-August/000047.html Did we miss anything? Anyway, for the time being we're piecing it together ourselves. Googling for "rubyworks capistrano" also turned up a rails plugin in the RubyWorks svn trunk that seems to support remote installation of the stack itself and presumably also deploying the Rails application in which it's installed. http://rubyworks.rubyforge.org/svn/trunk/rubyworks_deployer/ There hasn't been any discussion of that on the list. What's the story on this plugin? Is it usable? Thanks. -hume. From aslak.hellesoy at gmail.com Wed Jan 2 18:15:53 2008 From: aslak.hellesoy at gmail.com (aslak hellesoy) Date: Thu, 3 Jan 2008 00:15:53 +0100 Subject: [Rubyworks-users] why runit? Message-ID: <8d961d900801021515g791fd861pc532075abbf5ca64@mail.gmail.com> Hi, I'm digging into the RubyWorks stack and learning about monit and runit. From what I understand, monit is capable of starting and stopping processes and services, so I'm wondering: Why is runit used to start services when monit can also do it? Aslak From aslak.hellesoy at gmail.com Thu Jan 3 05:09:43 2008 From: aslak.hellesoy at gmail.com (aslak hellesoy) Date: Thu, 3 Jan 2008 11:09:43 +0100 Subject: [Rubyworks-users] why runit? In-Reply-To: <8d961d900801021515g791fd861pc532075abbf5ca64@mail.gmail.com> References: <8d961d900801021515g791fd861pc532075abbf5ca64@mail.gmail.com> Message-ID: <8d961d900801030209h6f080ae6pade6acf8ca44a2fb@mail.gmail.com> On Jan 3, 2008 12:15 AM, aslak hellesoy wrote: > Hi, > > I'm digging into the RubyWorks stack and learning about monit and > runit. From what I understand, monit is capable of starting and > stopping processes and services, so I'm wondering: > > Why is runit used to start services when monit can also do it? > Just to clarify: It seems to me that mongrels can be kept alive with: monit -> mongrel_cluster Rubyworks is doing (as far as I can tell): monit -> runit -> mongrel_cluster Why is this? I also came over a year old blog post that describes monit and mongrel_cluster without any runit: http://software.pmade.com/blogs/ramblings/2006/12/27/mongrel-cluster-and-monit Aslak > Aslak > From alexey.verkhovsky at gmail.com Thu Jan 3 07:28:39 2008 From: alexey.verkhovsky at gmail.com (Alexey Verkhovsky) Date: Thu, 3 Jan 2008 05:28:39 -0700 Subject: [Rubyworks-users] why runit? In-Reply-To: <3945c4270801030427y50254b43m41885e89e0945167@mail.gmail.com> References: <8d961d900801021515g791fd861pc532075abbf5ca64@mail.gmail.com> <8d961d900801030209h6f080ae6pade6acf8ca44a2fb@mail.gmail.com> <3945c4270801030427y50254b43m41885e89e0945167@mail.gmail.com> Message-ID: <3945c4270801030428i7b382830s12c00bcd3f975cb6@mail.gmail.com> On Jan 3, 2008 3:09 AM, aslak hellesoy wrote: > I'm digging into the RubyWorks stack and learning about monit and Hey, Aslak, > runit. From what I understand, monit is capable of starting and stopping processes and services Monit is capable of executing commands to start and stop things. Expectating those commands to create processes as proper *nix daemons. Mongrel had a bunch of small but annoying problems with this aspect (google for "mongrel pid" for a sample), and runit relatively neatly gets around those problems. "Relatively neatly" because this solution does create some duplication and complexity. And no, mongrel_cluster is not part of the picture at all. mongrel_cluster's function is performed by runit. -- Alexey Verkhovsky CruiseControl.rb [http://cruisecontrolrb.thoughtworks.com] RubyWorks [http://rubyworks.thoughtworks.com] From gigix1980 at gmail.com Thu Jan 3 07:33:38 2008 From: gigix1980 at gmail.com (Jeff Xiong) Date: Thu, 3 Jan 2008 20:33:38 +0800 Subject: [Rubyworks-users] why runit? In-Reply-To: <8d961d900801030209h6f080ae6pade6acf8ca44a2fb@mail.gmail.com> References: <8d961d900801021515g791fd861pc532075abbf5ca64@mail.gmail.com> <8d961d900801030209h6f080ae6pade6acf8ca44a2fb@mail.gmail.com> Message-ID: <20fd9dc50801030433y3e324493rf84d033c1f0242e4@mail.gmail.com> Monit starts mongrel and haproxy processes in daemon mode. That means you have to manage all those PID files, otherwise you may get some zombie PID files and cannot restart mongrel/haproxy any more. That's why we added runit: it starts those processes as its sub-processes and doesn't need any PID file. So we just use monit to "monitor" mongrel/haproxy processes, and use runit to "run it". It sounds reasonable, doesn't it? On Jan 3, 2008 6:09 PM, aslak hellesoy wrote: > On Jan 3, 2008 12:15 AM, aslak hellesoy wrote: > > Hi, > > > > I'm digging into the RubyWorks stack and learning about monit and > > runit. From what I understand, monit is capable of starting and > > stopping processes and services, so I'm wondering: > > > > Why is runit used to start services when monit can also do it? > > > > Just to clarify: It seems to me that mongrels can be kept alive with: > monit -> mongrel_cluster > > Rubyworks is doing (as far as I can tell): > monit -> runit -> mongrel_cluster > > Why is this? I also came over a year old blog post that describes > monit and mongrel_cluster without any runit: > http://software.pmade.com/blogs/ramblings/2006/12/27/mongrel-cluster-and-monit > > Aslak > > > > Aslak > > > _______________________________________________ > Rubyworks-users mailing list > Rubyworks-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rubyworks-users > -- Jeff Xiong Software Journeyman - http://gigix.thoughtworkers.org Open Source Contributor - http://stomperl.googlecode.com/ Technical Evangelist - http://www.infoq.com/cn/ From aslak.hellesoy at gmail.com Thu Jan 3 08:25:17 2008 From: aslak.hellesoy at gmail.com (aslak hellesoy) Date: Thu, 3 Jan 2008 14:25:17 +0100 Subject: [Rubyworks-users] why runit? In-Reply-To: <20fd9dc50801030433y3e324493rf84d033c1f0242e4@mail.gmail.com> References: <8d961d900801021515g791fd861pc532075abbf5ca64@mail.gmail.com> <8d961d900801030209h6f080ae6pade6acf8ca44a2fb@mail.gmail.com> <20fd9dc50801030433y3e324493rf84d033c1f0242e4@mail.gmail.com> Message-ID: <8d961d900801030525k1b751a75rec87148cee79da09@mail.gmail.com> On Jan 3, 2008 1:33 PM, Jeff Xiong wrote: > Monit starts mongrel and haproxy processes in daemon mode. That means > you have to manage all those PID files, otherwise you may get some > zombie PID files and cannot restart mongrel/haproxy any more. That's > why we added runit: it starts those processes as its sub-processes and > doesn't need any PID file. > > So we just use monit to "monitor" mongrel/haproxy processes, and use > runit to "run it". It sounds reasonable, doesn't it? > (Reposting - you should set the REPLY-TO header for this list to rubyworks-users at rubyforge.org) Jeff, Alex, I thought it was the daemon/pid issue - just wasn't sure. Thanks for clarifying this. I've set up a clean ubuntu/rubyworks box at our intranet where we plan to host a dozen or so Rails apps with very low traffic. I'm thinking haproxy is not needed and one mongrel per app is probably enough. I'm going to use monit/runit (and vlad) to get these apps running. I'll probably make some vlad (Rake) plugins that will: * Generate and upload a new runit config for a mongrel * Generate and upload a new monit config for a mongrel * Generate and upload a new Apache config that will set up proxying via a virtual host * Plus a standard way to redeploy applications and restart them with monit Is this something that you'd be interested in including in the stack if I donate it? Aslak > > On Jan 3, 2008 6:09 PM, aslak hellesoy wrote: > > On Jan 3, 2008 12:15 AM, aslak hellesoy wrote: > > > Hi, > > > > > > I'm digging into the RubyWorks stack and learning about monit and > > > runit. From what I understand, monit is capable of starting and > > > stopping processes and services, so I'm wondering: > > > > > > Why is runit used to start services when monit can also do it? > > > > > > > Just to clarify: It seems to me that mongrels can be kept alive with: > > monit -> mongrel_cluster > > > > Rubyworks is doing (as far as I can tell): > > monit -> runit -> mongrel_cluster > > > > Why is this? I also came over a year old blog post that describes > > monit and mongrel_cluster without any runit: > > http://software.pmade.com/blogs/ramblings/2006/12/27/mongrel-cluster-and-monit > > > > Aslak > > > > > > > Aslak > > > > > > _______________________________________________ > > Rubyworks-users mailing list > > Rubyworks-users at rubyforge.org > > http://rubyforge.org/mailman/listinfo/rubyworks-users > > > > > > -- > Jeff Xiong > Software Journeyman - http://gigix.thoughtworkers.org > Open Source Contributor - http://stomperl.googlecode.com/ > Technical Evangelist - http://www.infoq.com/cn/ > _______________________________________________ > Rubyworks-users mailing list > Rubyworks-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rubyworks-users > From andy at adveho.net Thu Jan 3 08:51:36 2008 From: andy at adveho.net (Andy Goundry) Date: Thu, 3 Jan 2008 13:51:36 +0000 Subject: [Rubyworks-users] why runit? In-Reply-To: <8d961d900801030525k1b751a75rec87148cee79da09@mail.gmail.com> References: <8d961d900801021515g791fd861pc532075abbf5ca64@mail.gmail.com> <8d961d900801030209h6f080ae6pade6acf8ca44a2fb@mail.gmail.com> <20fd9dc50801030433y3e324493rf84d033c1f0242e4@mail.gmail.com> <8d961d900801030525k1b751a75rec87148cee79da09@mail.gmail.com> Message-ID: <656150BB-2129-46F2-B438-4FC8261DDA0C@adveho.net> Could Capistrano add anything to the mix here? I haven't used Rubyworks in anger yet, but capistrano is very customisable so could possibly handle your custom rollout and remote system management tasks. Andy On 3 Jan 2008, at 13:25, "aslak hellesoy" wrote: > On Jan 3, 2008 1:33 PM, Jeff Xiong wrote: >> Monit starts mongrel and haproxy processes in daemon mode. That means >> you have to manage all those PID files, otherwise you may get some >> zombie PID files and cannot restart mongrel/haproxy any more. That's >> why we added runit: it starts those processes as its sub-processes >> and >> doesn't need any PID file. >> >> So we just use monit to "monitor" mongrel/haproxy processes, and use >> runit to "run it". It sounds reasonable, doesn't it? >> > > (Reposting - you should set the REPLY-TO header for this list to > rubyworks-users at rubyforge.org) > > Jeff, Alex, > > I thought it was the daemon/pid issue - just wasn't sure. Thanks for > clarifying this. > > I've set up a clean ubuntu/rubyworks box at our intranet where we plan > to host a dozen or so Rails apps with very low traffic. > I'm thinking haproxy is not needed and one mongrel per app is > probably enough. > > I'm going to use monit/runit (and vlad) to get these apps running. > > I'll probably make some vlad (Rake) plugins that will: > > * Generate and upload a new runit config for a mongrel > * Generate and upload a new monit config for a mongrel > * Generate and upload a new Apache config that will set up proxying > via a virtual host > * Plus a standard way to redeploy applications and restart them with > monit > > Is this something that you'd be interested in including in the stack > if I donate it? > > Aslak > >> >> On Jan 3, 2008 6:09 PM, aslak hellesoy >> wrote: >>> On Jan 3, 2008 12:15 AM, aslak hellesoy >>> wrote: >>>> Hi, >>>> >>>> I'm digging into the RubyWorks stack and learning about monit and >>>> runit. From what I understand, monit is capable of starting and >>>> stopping processes and services, so I'm wondering: >>>> >>>> Why is runit used to start services when monit can also do it? >>>> >>> >>> Just to clarify: It seems to me that mongrels can be kept alive >>> with: >>> monit -> mongrel_cluster >>> >>> Rubyworks is doing (as far as I can tell): >>> monit -> runit -> mongrel_cluster >>> >>> Why is this? I also came over a year old blog post that describes >>> monit and mongrel_cluster without any runit: >>> http://software.pmade.com/blogs/ramblings/2006/12/27/mongrel-cluster-and-monit >>> >>> Aslak >>> >>> >>>> Aslak >>>> >> >>> _______________________________________________ >>> Rubyworks-users mailing list >>> Rubyworks-users at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/rubyworks-users >>> >> >> >> >> -- >> Jeff Xiong >> Software Journeyman - http://gigix.thoughtworkers.org >> Open Source Contributor - http://stomperl.googlecode.com/ >> Technical Evangelist - http://www.infoq.com/cn/ >> _______________________________________________ >> Rubyworks-users mailing list >> Rubyworks-users at rubyforge.org >> http://rubyforge.org/mailman/listinfo/rubyworks-users >> > _______________________________________________ > Rubyworks-users mailing list > Rubyworks-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rubyworks-users From gigix1980 at gmail.com Thu Jan 3 09:06:08 2008 From: gigix1980 at gmail.com (Jeff Xiong) Date: Thu, 3 Jan 2008 22:06:08 +0800 Subject: [Rubyworks-users] why runit? In-Reply-To: <8d961d900801030525k1b751a75rec87148cee79da09@mail.gmail.com> References: <8d961d900801021515g791fd861pc532075abbf5ca64@mail.gmail.com> <8d961d900801030209h6f080ae6pade6acf8ca44a2fb@mail.gmail.com> <20fd9dc50801030433y3e324493rf84d033c1f0242e4@mail.gmail.com> <8d961d900801030525k1b751a75rec87148cee79da09@mail.gmail.com> Message-ID: <20fd9dc50801030606o5003277r83aaeda33aa0e526@mail.gmail.com> Alexey, I remember that we talked about something like "Cap-like installation" (forgive my poor memory if I'm wrong) a few months ago. How's it going now? Aslak's idea sounds pretty cool to me. On Jan 3, 2008 9:25 PM, aslak hellesoy wrote: > On Jan 3, 2008 1:33 PM, Jeff Xiong wrote: > > Monit starts mongrel and haproxy processes in daemon mode. That means > > you have to manage all those PID files, otherwise you may get some > > zombie PID files and cannot restart mongrel/haproxy any more. That's > > why we added runit: it starts those processes as its sub-processes and > > doesn't need any PID file. > > > > So we just use monit to "monitor" mongrel/haproxy processes, and use > > runit to "run it". It sounds reasonable, doesn't it? > > > > (Reposting - you should set the REPLY-TO header for this list to > rubyworks-users at rubyforge.org) > > Jeff, Alex, > > I thought it was the daemon/pid issue - just wasn't sure. Thanks for > clarifying this. > > I've set up a clean ubuntu/rubyworks box at our intranet where we plan > to host a dozen or so Rails apps with very low traffic. > I'm thinking haproxy is not needed and one mongrel per app is probably enough. > > I'm going to use monit/runit (and vlad) to get these apps running. > > I'll probably make some vlad (Rake) plugins that will: > > * Generate and upload a new runit config for a mongrel > * Generate and upload a new monit config for a mongrel > * Generate and upload a new Apache config that will set up proxying > via a virtual host > * Plus a standard way to redeploy applications and restart them with monit > > Is this something that you'd be interested in including in the stack > if I donate it? > > Aslak > > > > > > On Jan 3, 2008 6:09 PM, aslak hellesoy wrote: > > > On Jan 3, 2008 12:15 AM, aslak hellesoy wrote: > > > > Hi, > > > > > > > > I'm digging into the RubyWorks stack and learning about monit and > > > > runit. From what I understand, monit is capable of starting and > > > > stopping processes and services, so I'm wondering: > > > > > > > > Why is runit used to start services when monit can also do it? > > > > > > > > > > Just to clarify: It seems to me that mongrels can be kept alive with: > > > monit -> mongrel_cluster > > > > > > Rubyworks is doing (as far as I can tell): > > > monit -> runit -> mongrel_cluster > > > > > > Why is this? I also came over a year old blog post that describes > > > monit and mongrel_cluster without any runit: > > > http://software.pmade.com/blogs/ramblings/2006/12/27/mongrel-cluster-and-monit > > > > > > Aslak > > > > > > > > > > Aslak > > > > > > > > > _______________________________________________ > > > Rubyworks-users mailing list > > > Rubyworks-users at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/rubyworks-users > > > > > > > > > > > -- > > Jeff Xiong > > Software Journeyman - http://gigix.thoughtworkers.org > > Open Source Contributor - http://stomperl.googlecode.com/ > > Technical Evangelist - http://www.infoq.com/cn/ > > _______________________________________________ > > Rubyworks-users mailing list > > Rubyworks-users at rubyforge.org > > http://rubyforge.org/mailman/listinfo/rubyworks-users > > > _______________________________________________ > Rubyworks-users mailing list > Rubyworks-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rubyworks-users > -- Jeff Xiong Software Journeyman - http://gigix.thoughtworkers.org Open Source Contributor - http://stomperl.googlecode.com/ Technical Evangelist - http://www.infoq.com/cn/ From aslak.hellesoy at gmail.com Thu Jan 3 10:12:13 2008 From: aslak.hellesoy at gmail.com (aslak hellesoy) Date: Thu, 3 Jan 2008 16:12:13 +0100 Subject: [Rubyworks-users] why runit? In-Reply-To: <20fd9dc50801030606o5003277r83aaeda33aa0e526@mail.gmail.com> References: <8d961d900801021515g791fd861pc532075abbf5ca64@mail.gmail.com> <8d961d900801030209h6f080ae6pade6acf8ca44a2fb@mail.gmail.com> <20fd9dc50801030433y3e324493rf84d033c1f0242e4@mail.gmail.com> <8d961d900801030525k1b751a75rec87148cee79da09@mail.gmail.com> <20fd9dc50801030606o5003277r83aaeda33aa0e526@mail.gmail.com> Message-ID: <8d961d900801030712i7b85dc27r5f6aa46029c17a4a@mail.gmail.com> On Jan 3, 2008 3:06 PM, Jeff Xiong wrote: > Alexey, I remember that we talked about something like "Cap-like > installation" (forgive my poor memory if I'm wrong) a few months ago. > How's it going now? Aslak's idea sounds pretty cool to me. > Thanks :-) Here is what I'm thinking: I'd love for all of the rubyworks configuration for an app to live under RAILS_ROOT/config/deploy, checked into the SCM. There should be an easy way to generate them too. config/deploy/apache.conf # virtual host goes here config/deploy/monit.conf config/deploy/haproxy.conf config/deploy/mongrel_[port-port+n].conf config/deploy/service/mongrel_[port-port+n]/run # runit starter scripts Logs would go in the standard Rails app log directory. The config/deploy/monit.conf file would be included in /etc/monit/monitrc The runit starter scripts could be symlinked to /var/service unless there is a simpler way to run them where they are Finally each app could live under /var/www/rails/[appname] I'd try to keep things decoupled from Rails as much as possible. So I'm planning to create something that can generate these files (probably based on rubigen), as well as a vlad plugin that will make it easy to deploy and restart a RubyWorks app based on this configuration. Someone else can do the cap equivalent :-) WDYT? This is more like the "client/admin" side of RubyWorks, and maybe doesn't belong in RubyWorks proper. Should I set up a separate project for it? Aslak > > On Jan 3, 2008 9:25 PM, aslak hellesoy wrote: > > On Jan 3, 2008 1:33 PM, Jeff Xiong wrote: > > > Monit starts mongrel and haproxy processes in daemon mode. That means > > > you have to manage all those PID files, otherwise you may get some > > > zombie PID files and cannot restart mongrel/haproxy any more. That's > > > why we added runit: it starts those processes as its sub-processes and > > > doesn't need any PID file. > > > > > > So we just use monit to "monitor" mongrel/haproxy processes, and use > > > runit to "run it". It sounds reasonable, doesn't it? > > > > > > > (Reposting - you should set the REPLY-TO header for this list to > > rubyworks-users at rubyforge.org) > > > > Jeff, Alex, > > > > I thought it was the daemon/pid issue - just wasn't sure. Thanks for > > clarifying this. > > > > I've set up a clean ubuntu/rubyworks box at our intranet where we plan > > to host a dozen or so Rails apps with very low traffic. > > I'm thinking haproxy is not needed and one mongrel per app is probably enough. > > > > I'm going to use monit/runit (and vlad) to get these apps running. > > > > I'll probably make some vlad (Rake) plugins that will: > > > > * Generate and upload a new runit config for a mongrel > > * Generate and upload a new monit config for a mongrel > > * Generate and upload a new Apache config that will set up proxying > > via a virtual host > > * Plus a standard way to redeploy applications and restart them with monit > > > > Is this something that you'd be interested in including in the stack > > if I donate it? > > > > Aslak > > > > > > > > > > On Jan 3, 2008 6:09 PM, aslak hellesoy wrote: > > > > On Jan 3, 2008 12:15 AM, aslak hellesoy wrote: > > > > > Hi, > > > > > > > > > > I'm digging into the RubyWorks stack and learning about monit and > > > > > runit. From what I understand, monit is capable of starting and > > > > > stopping processes and services, so I'm wondering: > > > > > > > > > > Why is runit used to start services when monit can also do it? > > > > > > > > > > > > > Just to clarify: It seems to me that mongrels can be kept alive with: > > > > monit -> mongrel_cluster > > > > > > > > Rubyworks is doing (as far as I can tell): > > > > monit -> runit -> mongrel_cluster > > > > > > > > Why is this? I also came over a year old blog post that describes > > > > monit and mongrel_cluster without any runit: > > > > http://software.pmade.com/blogs/ramblings/2006/12/27/mongrel-cluster-and-monit > > > > > > > > Aslak > > > > > > > > > > > > > Aslak > > > > > > > > > > > > _______________________________________________ > > > > Rubyworks-users mailing list > > > > Rubyworks-users at rubyforge.org > > > > http://rubyforge.org/mailman/listinfo/rubyworks-users > > > > > > > > > > > > > > > > -- > > > Jeff Xiong > > > Software Journeyman - http://gigix.thoughtworkers.org > > > Open Source Contributor - http://stomperl.googlecode.com/ > > > Technical Evangelist - http://www.infoq.com/cn/ > > > _______________________________________________ > > > Rubyworks-users mailing list > > > Rubyworks-users at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/rubyworks-users > > > > > _______________________________________________ > > Rubyworks-users mailing list > > Rubyworks-users at rubyforge.org > > http://rubyforge.org/mailman/listinfo/rubyworks-users > > > > > > -- > Jeff Xiong > Software Journeyman - http://gigix.thoughtworkers.org > Open Source Contributor - http://stomperl.googlecode.com/ > Technical Evangelist - http://www.infoq.com/cn/ > _______________________________________________ > Rubyworks-users mailing list > Rubyworks-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rubyworks-users > From alexey.verkhovsky at gmail.com Thu Jan 3 11:01:18 2008 From: alexey.verkhovsky at gmail.com (Alexey Verkhovsky) Date: Thu, 3 Jan 2008 09:01:18 -0700 Subject: [Rubyworks-users] why runit? In-Reply-To: <3945c4270801030800x5833698eje6f199ecdaf778f0@mail.gmail.com> References: <8d961d900801021515g791fd861pc532075abbf5ca64@mail.gmail.com> <8d961d900801030209h6f080ae6pade6acf8ca44a2fb@mail.gmail.com> <20fd9dc50801030433y3e324493rf84d033c1f0242e4@mail.gmail.com> <8d961d900801030525k1b751a75rec87148cee79da09@mail.gmail.com> <20fd9dc50801030606o5003277r83aaeda33aa0e526@mail.gmail.com> <8d961d900801030712i7b85dc27r5f6aa46029c17a4a@mail.gmail.com> <3945c4270801030800x5833698eje6f199ecdaf778f0@mail.gmail.com> Message-ID: <3945c4270801030801l1152d7b3t5ba98a844585fbfc@mail.gmail.com> On Jan 3, 2008 8:12 AM, aslak hellesoy wrote: > Here is what I'm thinking: I'd love for all of the rubyworks > configuration for an app to live under RAILS_ROOT/config/deploy, > checked into the SCM. There should be an easy way to generate them too. There is definitely lack of flexibility in the cluster configuration, which begs to be addressed. I haven't given much thought to the details of it yet, but what you propose (generating config files from some higher-level configuration data, and placing them under ./config/deploy) is along the lines of what I was thinking about. Two questions: 1. Can we do that, but still keep the default case simple? 2. How to handle upgrades of the rubyworks package? Say, if there is a change that requires re-generating config. > This is more like the "client/admin" side of RubyWorks, and maybe > doesn't belong in RubyWorks proper. Should I set up a separate project for it? I hope not! :) > each app could live under /var/www/rails/[appname] >From a practical point of view, /var/www is static content in many default Apache setups. From a theoretical one, /var is not where application code is supposed to go as per FHS [http://www.pathname.com/fhs/]. Hence the original choice of /usr/rails. Nothing wrong with /usr/rails/[appname] (other than backwards compatibility issues, maybe). -- Alexey Verkhovsky CruiseControl.rb [http://cruisecontrolrb.thoughtworks.com] RubyWorks [http://rubyworks.thoughtworks.com] From alexey.verkhovsky at gmail.com Thu Jan 3 11:36:31 2008 From: alexey.verkhovsky at gmail.com (Alexey Verkhovsky) Date: Thu, 3 Jan 2008 09:36:31 -0700 Subject: [Rubyworks-users] capistrano recipes ... rubyworks_deployer? In-Reply-To: References: Message-ID: <3945c4270801030836o598f6b94r157a1956b3d3407e@mail.gmail.com> On Jan 2, 2008 1:13 PM, John D. Hume wrote: > Did we miss anything? Not that I know of. :) I've done Cap deployment a couple of times, but we haven't generalized it yet. > What's the story on [ruyworks-deployer] plugin [in rubyworks trunk]? Is it usable? Probably not. However, rubyworks_deployer/recipes/rubyworks.rb is a good starting point for your own Cap recipe. -- Alexey Verkhovsky CruiseControl.rb [http://cruisecontrolrb.thoughtworks.com] RubyWorks [http://rubyworks.thoughtworks.com] From rubyworks at mlecza.newnetco.com Thu Jan 3 13:14:14 2008 From: rubyworks at mlecza.newnetco.com (homerlex) Date: Thu, 3 Jan 2008 13:14:14 -0500 Subject: [Rubyworks-users] Service Folder Creation Message-ID: <200801031814.m03IELta028182@smtp.amsnet.net> Hello, Just started playing around with the RubyWorks Production Stack and I have a question about the folders in /var/service It looks like mongrel_300x folders were created (perhaps during the install). What if I want to add more mongrels? Do I need to manually created more of these service folders (and edit the run script) or is there something that is supposed to generate these folders for me? I tried adding a few more mongrels and unless I manually create these, I can't get them to start up. Thanks in advance. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rubyworks-users/attachments/20080103/c5ef773a/attachment.html From alexey.verkhovsky at gmail.com Thu Jan 3 14:55:05 2008 From: alexey.verkhovsky at gmail.com (Alexey Verkhovsky) Date: Thu, 3 Jan 2008 12:55:05 -0700 Subject: [Rubyworks-users] Service Folder Creation In-Reply-To: <200801031814.m03IELta028182@smtp.amsnet.net> References: <200801031814.m03IELta028182@smtp.amsnet.net> Message-ID: <3945c4270801031155t27c8a4b9x2139db4442ef46d@mail.gmail.com> On Jan 3, 2008 11:14 AM, homerlex wrote: > It looks like mongrel_300x folders were created (perhaps during the > install). What if I want to add more mongrels? Do I need to manually > created more of these service folders (and edit the run script) Yes. And edit Monit and HAProxy configurations. > or is there something that is supposed to generate these folders for me? As we discussed in another thread today, there should be, but there isn't. -- Alexey Verkhovsky CruiseControl.rb [http://cruisecontrolrb.thoughtworks.com] RubyWorks [http://rubyworks.thoughtworks.com] From CWathing at thoughtworks.com Thu Jan 3 17:00:41 2008 From: CWathing at thoughtworks.com (Chad Wathington) Date: Thu, 3 Jan 2008 16:00:41 -0600 Subject: [Rubyworks-users] Chad Wathington is out of the office. Message-ID: I will be out of the office starting 01/01/2008 and will not return until 01/11/2008. I will check e-mail and voicemail throughout the day. From mail at tsfsc.com Fri Jan 4 05:34:44 2008 From: mail at tsfsc.com (J.F.Sebastian) Date: Fri, 4 Jan 2008 02:34:44 -0800 (PST) Subject: [Rubyworks-users] step-by-step instructions for rubyworks setup (and radiant on top) Message-ID: <52173.91.11.235.154.1199442884.squirrel@webmail.tsfsc.com> Hello everybody, because I have to setup rubyworks installations again and again, I made a step-by-step instruction list for setting up debian, mysql and rubyworks (in a vmware) and how to install radiant on top of this. I hope you like it: Installation of debian, mysql and rubyworks (in a vmware) http://www.tsfsc.com/blog/?p=6 Installation of radiant on top http://www.tsfsc.com/blog/?p=6 Best regards, J.F. p.s. feel free to comment and suggest improvements. From aslak.hellesoy at gmail.com Fri Jan 4 11:54:29 2008 From: aslak.hellesoy at gmail.com (aslak hellesoy) Date: Fri, 4 Jan 2008 17:54:29 +0100 Subject: [Rubyworks-users] why runit? In-Reply-To: <3945c4270801030801l1152d7b3t5ba98a844585fbfc@mail.gmail.com> References: <8d961d900801021515g791fd861pc532075abbf5ca64@mail.gmail.com> <8d961d900801030209h6f080ae6pade6acf8ca44a2fb@mail.gmail.com> <20fd9dc50801030433y3e324493rf84d033c1f0242e4@mail.gmail.com> <8d961d900801030525k1b751a75rec87148cee79da09@mail.gmail.com> <20fd9dc50801030606o5003277r83aaeda33aa0e526@mail.gmail.com> <8d961d900801030712i7b85dc27r5f6aa46029c17a4a@mail.gmail.com> <3945c4270801030800x5833698eje6f199ecdaf778f0@mail.gmail.com> <3945c4270801030801l1152d7b3t5ba98a844585fbfc@mail.gmail.com> Message-ID: <8d961d900801040854q644165d7ua8b2eda35ce25c6a@mail.gmail.com> On Jan 3, 2008 5:01 PM, Alexey Verkhovsky wrote: > > On Jan 3, 2008 8:12 AM, aslak hellesoy wrote: > > Here is what I'm thinking: I'd love for all of the rubyworks > > configuration for an app to live under RAILS_ROOT/config/deploy, > > checked into the SCM. There should be an easy way to generate them too. > > There is definitely lack of flexibility in the cluster configuration, > which begs to be addressed. > > I haven't given much thought to the details of it yet, but what you > propose (generating config files from some higher-level configuration > data, and placing them under ./config/deploy) is along the lines of > what I was thinking about. > > Two questions: > 1. Can we do that, but still keep the default case simple? > 2. How to handle upgrades of the rubyworks package? Say, if there is a > change that requires re-generating config. > > > This is more like the "client/admin" side of RubyWorks, and maybe > > doesn't belong in RubyWorks proper. Should I set up a separate project for it? > > I hope not! :) > > > each app could live under /var/www/rails/[appname] > > >From a practical point of view, /var/www is static content in many > default Apache setups. From a theoretical one, /var is not where > application code is supposed to go as per FHS > [http://www.pathname.com/fhs/]. Hence the original choice of > /usr/rails. Nothing wrong with /usr/rails/[appname] (other than > backwards compatibility issues, maybe). > Shouldn't it be /usr/local/webapps/[appname] then? http://www.pathname.com/fhs/pub/fhs-2.3.html#THEUSRHIERARCHY Aslak (please fix the reply-to header to go to this list) > -- > > Alexey Verkhovsky > CruiseControl.rb [http://cruisecontrolrb.thoughtworks.com] > RubyWorks [http://rubyworks.thoughtworks.com] > > _______________________________________________ > Rubyworks-users mailing list > Rubyworks-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rubyworks-users > From ian.w.white at gmail.com Fri Jan 4 12:13:36 2008 From: ian.w.white at gmail.com (Ian White) Date: Fri, 4 Jan 2008 17:13:36 +0000 Subject: [Rubyworks-users] why runit? In-Reply-To: <8d961d900801040854q644165d7ua8b2eda35ce25c6a@mail.gmail.com> References: <8d961d900801021515g791fd861pc532075abbf5ca64@mail.gmail.com> <8d961d900801030209h6f080ae6pade6acf8ca44a2fb@mail.gmail.com> <20fd9dc50801030433y3e324493rf84d033c1f0242e4@mail.gmail.com> <8d961d900801030525k1b751a75rec87148cee79da09@mail.gmail.com> <20fd9dc50801030606o5003277r83aaeda33aa0e526@mail.gmail.com> <8d961d900801030712i7b85dc27r5f6aa46029c17a4a@mail.gmail.com> <3945c4270801030800x5833698eje6f199ecdaf778f0@mail.gmail.com> <3945c4270801030801l1152d7b3t5ba98a844585fbfc@mail.gmail.com> <8d961d900801040854q644165d7ua8b2eda35ce25c6a@mail.gmail.com> Message-ID: As far as I am aware /usr shouldn't have app specific data. Distros can (have license to) blow away stuff in /usr without asking questions. (from the page you just mentioned) "Any information that is host-specific or varies with time is stored elsewhere." /srv is what I use for this stuff, so what about /srv/webapps/[APPNAME] It is also recommended in the document Aslak mentioned "/srv contains site-specific data which is served by this system" on one of my machines: /srv/svn /srv/mephisto /srv/trac /srv/lighttpd When I want to do a backup of all server related stuff it's /srv I grab. Just my ?0.02 Cheers, Ian -- Argument from Design--We build web applications Western House 239 Western Road Sheffield S10 1LE UK Mobile: +44 (0)797 4678409 | Office: +44 (0)114 2667712 | From aslak.hellesoy at gmail.com Fri Jan 4 13:17:52 2008 From: aslak.hellesoy at gmail.com (aslak hellesoy) Date: Fri, 4 Jan 2008 19:17:52 +0100 Subject: [Rubyworks-users] why runit? In-Reply-To: <3945c4270801030800x5833698eje6f199ecdaf778f0@mail.gmail.com> References: <8d961d900801021515g791fd861pc532075abbf5ca64@mail.gmail.com> <8d961d900801030209h6f080ae6pade6acf8ca44a2fb@mail.gmail.com> <20fd9dc50801030433y3e324493rf84d033c1f0242e4@mail.gmail.com> <8d961d900801030525k1b751a75rec87148cee79da09@mail.gmail.com> <20fd9dc50801030606o5003277r83aaeda33aa0e526@mail.gmail.com> <8d961d900801030712i7b85dc27r5f6aa46029c17a4a@mail.gmail.com> <3945c4270801030800x5833698eje6f199ecdaf778f0@mail.gmail.com> Message-ID: <8d961d900801041017n2927e7e9w9acc2c33a80358bc@mail.gmail.com> On Jan 3, 2008 5:00 PM, Alexey Verkhovsky wrote: > On Jan 3, 2008 8:12 AM, aslak hellesoy wrote: > > Here is what I'm thinking: I'd love for all of the rubyworks > > configuration for an app to live under RAILS_ROOT/config/deploy, > > checked into the SCM. There should be an easy way to generate them too. > > There is definitely lack of flexibility in the cluster configuration, > which begs to be addressed. > > I haven't given much thought to the details of it yet, but what you > propose (generating config files from some higher-level configuration > data, and placing them under ./config/deploy) is along the lines of > what I was thinking about. > > Two questions: > 1. Can we do that, but still keep the default case simple? What is the default case? > 2. How to handle upgrades of the rubyworks package? Say, if there is a > change that requires re-generating config. > I'm not sure yet. Please take a look at what I have done so far: https://boss.bekk.no/repos/projects/rubyworks_app/ It's currently undocumented - I'm only playing with the generator (based on rubigen). Quick intro svn co https://boss.bekk.no/repos/projects/rubyworks_app/rubyworks_app cd rubyworks_app rake install_gem # you may have to install some gems for this to work cd [your_rails_app] rubyworks_app --haproxy-port 3010 --ports [3011, 3012, 3013] Then look at the generated files under config/deploy (I haven't done haproxy.conf yet - nor apache.conf) The next step is to generate the vlad/cap file that will let you say: rake deploy or cap deploy and have everything updated on the server, create symlinks and bounce monit (and maybe apache) I may donate this stuff to RubyWorks when it matures a little. Feedback is welcome. Aslak > > This is more like the "client/admin" side of RubyWorks, and maybe > > doesn't belong in RubyWorks proper. Should I set up a separate project for it? > > I hope not! :) > > > each app could live under /var/www/rails/[appname] > > From a practical point of view, /var/www is static content in many > default Apache setups. From a theoretical one, /var is not where > application code is supposed to go as per FHS > [http://www.pathname.com/fhs/]. Hence the original choice of > /usr/rails. Nothing wrong with /usr/rails/[appname] (other than > backwards compatibility issues, maybe). > > -- > > Alexey Verkhovsky > CruiseControl.rb [http://cruisecontrolrb.thoughtworks.com] > RubyWorks [http://rubyworks.thoughtworks.com] > From alexey.verkhovsky at gmail.com Fri Jan 4 13:26:52 2008 From: alexey.verkhovsky at gmail.com (Alexey Verkhovsky) Date: Fri, 4 Jan 2008 11:26:52 -0700 Subject: [Rubyworks-users] why runit? In-Reply-To: <8d961d900801041017n2927e7e9w9acc2c33a80358bc@mail.gmail.com> References: <8d961d900801021515g791fd861pc532075abbf5ca64@mail.gmail.com> <8d961d900801030209h6f080ae6pade6acf8ca44a2fb@mail.gmail.com> <20fd9dc50801030433y3e324493rf84d033c1f0242e4@mail.gmail.com> <8d961d900801030525k1b751a75rec87148cee79da09@mail.gmail.com> <20fd9dc50801030606o5003277r83aaeda33aa0e526@mail.gmail.com> <8d961d900801030712i7b85dc27r5f6aa46029c17a4a@mail.gmail.com> <3945c4270801030800x5833698eje6f199ecdaf778f0@mail.gmail.com> <8d961d900801041017n2927e7e9w9acc2c33a80358bc@mail.gmail.com> Message-ID: <3945c4270801041026t62c84bd5w47f7913271ce63d@mail.gmail.com> On Jan 4, 2008 11:17 AM, aslak hellesoy wrote: > > 1. Can we do that, but still keep the default case simple? > What is the default case? Single, low volume app on a dedicated [virtual] server. Basically, where you are OK with the defaults and don't care to reconfigure anything. > I'm not sure yet. Please take a look at what I have done so far: Will do. -- Alexey Verkhovsky CruiseControl.rb [http://cruisecontrolrb.thoughtworks.com] RubyWorks [http://rubyworks.thoughtworks.com] From bigbet at 126.com Fri Jan 4 19:29:27 2008 From: bigbet at 126.com (bigbet) Date: Sat, 5 Jan 2008 08:29:27 +0800 Subject: [Rubyworks-users] fffffffff Message-ID: <200801050829267967170@126.com> bigbet 2008-01-05 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rubyworks-users/attachments/20080105/8f571130/attachment.html From rubyworks at mlecza.newnetco.com Wed Jan 9 09:41:20 2008 From: rubyworks at mlecza.newnetco.com (homerlex) Date: Wed, 9 Jan 2008 09:41:20 -0500 Subject: [Rubyworks-users] Why is ruby mysql driver being used? Message-ID: <200801091441.m09EfQg5007020@smtp.amsnet.net> I installed the Production Stack on Centos 5. I was having some perf problems with my queries on this server - also getting sporadic "Lost Connection" errors. I put a debug in the mysql_adapter to see the version of the driver that was being used and it shows 4.0-ruby-0.2.6-plus-changes. Obviously it using the ruby mysql driver instead of the mysql gem. Anyone have an idea why this is? When I do a gem list -local I do see the mysql 2.7 gem installed. To verify that it wasn't just something with my custom rails app, I also dupliated using the default rails app that Production Stack installs (by creating a controller that references a Model class. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rubyworks-users/attachments/20080109/83d3d45e/attachment.html From alexey.verkhovsky at gmail.com Wed Jan 9 09:53:22 2008 From: alexey.verkhovsky at gmail.com (Alexey Verkhovsky) Date: Wed, 9 Jan 2008 07:53:22 -0700 Subject: [Rubyworks-users] Why is ruby mysql driver being used? In-Reply-To: <200801091441.m09EfQg5007020@smtp.amsnet.net> References: <200801091441.m09EfQg5007020@smtp.amsnet.net> Message-ID: <3945c4270801090653n2521cd9cq435f113fa6f7d6eb@mail.gmail.com> On Jan 9, 2008 7:41 AM, homerlex wrote: > I put a debug in the mysql_adapter to see the version of the driver that was > being used and it shows 4.0-ruby-0.2.6-plus-changes. Obviously it using the > ruby mysql driver instead of the mysql gem. What happens if you open IRB and put the following two lines in it: require 'rubygems' require 'mysql' -- Alexey Verkhovsky CruiseControl.rb [http://cruisecontrolrb.thoughtworks.com] RubyWorks [http://rubyworks.thoughtworks.com] From rubyworks at mlecza.newnetco.com Wed Jan 9 10:24:43 2008 From: rubyworks at mlecza.newnetco.com (homerlex) Date: Wed, 9 Jan 2008 10:24:43 -0500 Subject: [Rubyworks-users] Using a custom GEM PATH in Production Stack Message-ID: <200801091524.m09FOe98008248@smtp.amsnet.net> What is the recommended way to have my Rails app use a custom Gem Path? My server may eventually have several different applications and they will need to use different gems. Regards -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rubyworks-users/attachments/20080109/fab89c7b/attachment-0001.html From duelin.markers at gmail.com Wed Jan 9 22:55:48 2008 From: duelin.markers at gmail.com (John D. Hume) Date: Wed, 9 Jan 2008 22:55:48 -0500 Subject: [Rubyworks-users] Using a custom GEM PATH in Production Stack In-Reply-To: <200801091524.m09FOe98008248@smtp.amsnet.net> References: <200801091524.m09FOe98008248@smtp.amsnet.net> Message-ID: Personally I'd recommend (wherever possible) unpacking gems into the vendor directory of the app that uses them, even if there's only going to be one application on your server. Anything you can do to reduce your app's dependency on a special environment and move closer to just-checkout-and-it-works is a good thing. -hume On Jan 9, 2008 10:24 AM, homerlex wrote: > > > > > > > What is the recommended way to have my Rails app use a custom Gem Path? > > > > My server may eventually have several different applications and they will > need to use different gems. > > > > Regards > > > _______________________________________________ > Rubyworks-users mailing list > Rubyworks-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rubyworks-users > > From alexey.verkhovsky at gmail.com Fri Jan 11 11:23:00 2008 From: alexey.verkhovsky at gmail.com (Alexey Verkhovsky) Date: Fri, 11 Jan 2008 09:23:00 -0700 Subject: [Rubyworks-users] Using a custom GEM PATH in Production Stack In-Reply-To: References: <200801091524.m09FOe98008248@smtp.amsnet.net> Message-ID: <3945c4270801110823i3ae9734bw1bd1d9d64e434172@mail.gmail.com> On Jan 9, 2008 8:55 PM, John D. Hume wrote: > Personally I'd recommend (wherever possible) unpacking gems into the > vendor directory of the app +1 on "vendor everything" recommendation. -- Alexey Verkhovsky CruiseControl.rb [http://cruisecontrolrb.thoughtworks.com] RubyWorks [http://rubyworks.thoughtworks.com] From zhcchz at gmail.com Wed Jan 16 05:02:21 2008 From: zhcchz at gmail.com (Chris Stevenson) Date: Wed, 16 Jan 2008 18:02:21 +0800 Subject: [Rubyworks-users] Installing on Ubuntu 7.10 Message-ID: <64766f910801160202o150c1264h6ac69c6133ef2c88@mail.gmail.com> I managed to install on Ubuntu 7.10 today, and it worked fine except for one small issue. When the rails application is installed the log files have the wrong permissions. If I start the application from the command prompt I get an error saying that the log file cannot be written to, and that it should be chmod 0666. If I do this then everything works: chmod 0666 log chmod 0666 log/* chris