On 06/17/2013 02:51 PM, Alan Cabrera wrote:

On Jun 17, 2013, at 9:45 AM, Sam Ruby <ru...@intertwingly.net> wrote:

Resending...

---------- Forwarded message ----------
From: Sam Ruby <ru...@intertwingly.net>
Date: Sun, Jun 16, 2013 at 4:30 PM
Subject: Re: panopticon: installing whimsy on CentOS
To: labs@labs.apache.org


On Sun, Jun 16, 2013 at 1:58 PM, Alan Cabrera <l...@toolazydogs.com> wrote:
I'm using rvm.  Seems to be the equivalent of virtualenvs of python.

I installed ruby 1.9.3, rails, wunderbar.

rvm is fine.

Then I set up whimsey according to 
infrastructure/trunk/projects/whimsy/README.openldap.  I'm able to get 
individual rb files to execute, e.g. committers.rb.

Now, how do I wire this thing up to Apache httpd?

If your goal is to get a single file to execute, configure Apache
httpd to run cgi by adding "+ExecCGI" to the Options line for the
desired directory, and "AddHandler cgi-script .cgi".  Restart apache,
then install the specific script that you are interested in by running
it passing an --install=<directory> option.

For example:

  ruby committer.cgi --install=/var/www

However, that script itself will rely on libraries being installed to
/var/tools and a few member only svn directories being checked out,
which leads to what I would recommend instead.

https://svn.apache.org/repos/infra/infrastructure/trunk/projects/whimsy/vagrant/README

This will set up everything you need to run committer.cgi in a VM.  I
already have most things cached on my machine, so recreating the
entire VM from scratch can be done in as little a two minutes and a
few seconds.  Without those caches, it will undoubtedly take longer,
but won't take terribly long and is automated.

Presumably those instructions could be adapted for CentOS.  The actual
recipes can be found here:

https://svn.apache.org/repos/infra/infrastructure/trunk/projects/whimsy/vagrant/cookbooks/whimsy/recipes/

Admittedly not as readable as prose instructions, but should give you
an idea of what steps to take, and I can help interpret the intent of
the chef scripts if you get stuck.

That seems like a lot of work to just set up a web site.  All I want to do is 
to setup a web site so that I know that the patches I want to submit will work 
correctly.  Working on a file by file basis seems a bit too restrictive, but if 
that's what I gotta do then I'll do it.  :)

I am serious, creating a VM is two minutes of automated processing for me. I can take it up and down and destroy and recreate at will.

But if you don't want to go the VM route and want to check out multiple cgi applications at one into your web directory, feel free to do so. Check out https://svn.apache.org/repos/infra/infrastructure/trunk/projects/whimsy/www into someplace in your Apache DocumentRoot directory and make sure that /usr/bin/ruby1.9.1 is symlinked to your version of ruby (or in the case of rvm, your wrapper, i.e., something like ~/.rvm/wrappers/ruby-1.9.3-p429/ruby).

Regards,
Alan

- Sam Ruby


---------------------------------------------------------------------
To unsubscribe, e-mail: labs-unsubscr...@labs.apache.org
For additional commands, e-mail: labs-h...@labs.apache.org

Reply via email to