Fighting Review Board

02 Jan 2009

We’ve been talking a
bit about code reviews at work, I do a bit of this now by reading commit emails,
and have been wondering if there was an easier solution. To that end, I started
looking around for software that could help us out.

I ended up beating on Review Board for about six
hours before getting it installed. Now that it’s running it looks pretty nice. I
think we’ll end up doing more post-commits then pre-commits but hopefully it’ll
fit into our workflow.

Anyway, I though I’d put up a quick post on what I needed to do it get it
running. The
docs
do a good job of getting the base install done. So give that a gander but come
back here before you start running rb-site install.

We need to setup our MySQL database before running the rb-site. I did this
by initializing a reviewboard MySQL database with a reviewboard user. I
then granted all priviledges by executing:

Once rb-site install is run you’ll need to configure your webserver. In my
case I ended up using Apache with FastCGI. When I tried to use the mod_python
option the webserver would get a Segmentation Violation and terminate. Not so
good.

The provided Apache FastCGI configuration script didn’t work for me and I ended
up using the following.

The first parameter to FastCGIExternalServer needs to be the full path to
reviewboard.fcgi as if it existed in your DocumentRoot. Nothing else
seemed to work for me.

Note, if you’re using VirtualHosts you’ll also need to make sure the
NamedVirtualHost option is enabled in your httpd.conf file (or whatever
your main Apache config file is named).

Now, this will run, but it won’t work. The reason it won’t work is that it needs
an external server to send the FastCGI requests too. You can run this server by
executing: rb-site manage /var/www/reviews/ runfcgi method=threaded port=3033
host=127.0.0.1 protocol=fcgi. You’ll notice the host and port match up to
those specified in the Apache config file.

I ended up creating a simple shell script to handle starting and stopping the
rb-site server.

With that I was able to login and start playing with Review Board. I ended up
doing a bit of extra work to disable registration (which is kind of nasty as I
had to edit the base HTML templates and urls.py) but everything seems to be
working well now.