Deployment options for RoR class

I'm setting up a linux server to host RoR apps written by students for their project. The students will (obviously) not have root access to the server. The students all have windows systems for development.

There are two issues: 1) should I have them use mongrel or mongrel_cluster?
  2) should I have them use capistrano, or should they just copy their stuff up to the server?

For #1, my impression is that mongrel_cluster really wants to be run as root. My plan is for the students to each run mongrel_rails on an assigned port. Apache will be configured to proxy to that port. If the machine is rebooted, the students will have to restart mongrel. Not ideal, but I think this is reasonable, unless anyone has a better idea. If they really need more than one mongrel, I can always assign 2 or 3 ports to each student, and they can manually start mongrel on each of them.

For #2, I need more information to make a decision:
   a) how hard is it to install a subversion client on windows? (I personally try to use *nix as much as possible) I really want to avoid having to debug problems on the student's machines. If this is anything other than trivially simple, I'm not sure I want to do this for the class.

   b) I assume that each student would also need to install the capistrano gem on their machine?

   c) If I make it past a & b, it seems that capistrano wants to use mongrel_cluster, not just mongrel. Is this right?

So, I'm leaning towards just having them sftp their stuff up to the server and restarting mongrel_rails.

I appreciate any comments.

I’m not sure if you’re restricted in IDE, but Eclipse has a fantastic subversion plugin that you could use, and with RadRails and RDT, has syntax highlight and quite a bit of other goodies for Ruby/Rails development work.

Can’t help you out on the mongrel_cluster and mongrel_rails, although from what I understand, mongrel cluster basically reads a config file and just starts a bunch of mongrels for you… there’s not really that much more to the cluster version. I would think if your students have access to be able to start/stop a mongrel, they should be able to also start/stop a cluster? Dunno, never tested this, just off the top of my head.

FWIW, mongrel (and thus mongrel_cluster) will run as any user you
want. You do, of course, have to run on a non-privileged port, as is
always the case with non-root users.

J.

David Williams wrote:

Rick Schumeyer wrote:

For #2, I need more information to make a decision:
   a) how hard is it to install a subversion client on windows? (I
personally try to use *nix as much as possible) I really want to avoid
having to debug problems on the student's machines. If this is anything
other than trivially simple, I'm not sure I want to do this for the class.
    
Hi, Rick.

I found installing TortoiseSVN (http://tortoisesvn.net/) onto my XP machine very, very simple. It's also very, very easy to use, for checking out a fresh working copy of the repository, updating, committing, displaying diffs...

>From the website:
"It is implemented as a Windows shell extension, which makes it integrate seamlessly into the Windows explorer. Since it's not an integration for a specific IDE you can use it with whatever development tools you like."
  
I also recommend that if you do use TortoiseSVN, do look at the guide that comes with TrtoiseSVN - I think it explains how to get around with SVN quite well.. and makes some things quite obvious. :slight_smile:

Cheers
Mohit.

Rick Schumeyer schrieb:

I'm setting up a linux server to host RoR apps written by students for
their project. The students will (obviously) not have root access to
the server. The students all have windows systems for development.

There are two issues:
  1) should I have them use mongrel or mongrel_cluster?

I would use mongrel, no cluster, the clustering is for adding
performance (scaling) for dev purposes I never use more than one mongrel

  2) should I have them use capistrano, or should they just copy their
stuff up to the server?

Capistrano is a great tool, but you'll need to spend a day for everyone
to setup their deploy.rb recipes. Likely they'll all be identical with
some config lines differ per user.

The best part, IMHO, of Capistrano is that it lets you release your web
app in versions.

For #1, my impression is that mongrel_cluster really wants to be run as
root.

nonsense, I run mongrel and cluster as non-root as a rule

My plan is for the students to each run mongrel_rails on an

assigned port. Apache will be configured to proxy to that port.

That could be tedious, I would just have them run the mongrels with
their local user accounts. Of course, you'll need to assign ports.

  If the

machine is rebooted, the students will have to restart mongrel.

yes, unless you do some configing to have mongrel(s) start on boot

  Not

ideal, but I think this is reasonable, unless anyone has a better idea.
If they really need more than one mongrel, I can always assign 2 or 3
ports to each student, and they can manually start mongrel on each of them.

For #2, I need more information to make a decision:
   a) how hard is it to install a subversion client on windows? (I
personally try to use *nix as much as possible) I really want to avoid
having to debug problems on the student's machines. If this is anything
other than trivially simple, I'm not sure I want to do this for the class.

don't use svn

   b) I assume that each student would also need to install the
capistrano gem on their machine?

yes, capistrano must be installed on the dev machine, not on target

   c) If I make it past a & b, it seems that capistrano wants to use
mongrel_cluster, not just mongrel. Is this right?

no, you write your own deploy.rb recipe, thus you write your own server
restart method

So, I'm leaning towards just having them sftp their stuff up to the
server and restarting mongrel_rails.

ftp might be simpler,

or what we do is use Samba to share the local dirs to the users, then
people develop on their windows machines but the files they work on are
on the linux dev box. Thus only 1 install of Rails/MySQL etc, they run
their own mongrels via shell connections. We also use Easy-Eclipse.

I appreciate any comments.

>

good luck

andy koch