<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>thecrumb.com &#187; reviewboard</title>
	<atom:link href="http://thecrumb.com/tag/reviewboard/feed/" rel="self" type="application/rss+xml" />
	<link>http://thecrumb.com</link>
	<description>developer &#124; thinker &#124; tinkerer</description>
	<lastBuildDate>Sat, 04 Feb 2012 01:28:22 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Alternate VirtualBox Port Forwarding Method</title>
		<link>http://thecrumb.com/2009/12/08/alternate-virtualbox-port-forwarding-method/</link>
		<comments>http://thecrumb.com/2009/12/08/alternate-virtualbox-port-forwarding-method/#comments</comments>
		<pubDate>Tue, 08 Dec 2009 16:24:47 +0000</pubDate>
		<dc:creator>Jim Priest</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[reviewboard]]></category>
		<category><![CDATA[virtualbox]]></category>

		<guid isPermaLink="false">http://www.thecrumb.com/?p=1004</guid>
		<description><![CDATA[In my Review Board installation on Virtual Box I gave an example of how you could access your guest OS from the host system using port forwarding. In that example you could access an application (Review Board) running on Apache. &#8230; <a href="http://thecrumb.com/2009/12/08/alternate-virtualbox-port-forwarding-method/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>In my <a href="http://www.thecrumb.com/2009/07/03/review-board-code-reviews-made-easy-installation/">Review Board installation on Virtual Box</a> I gave an example of how you could access your guest OS from the host system using port forwarding. In that example you could access an application (Review Board) running on Apache.</p>
<p>In those instructions you had to enter a series of commands in at the command line. I&#8217;ve since discovered an easier way to do this.<br />
<span id="more-1004"></span><br />
Virtual Box provides you with a configuration file which you can modify&#8230;</p>
<p>On Windows XP this file is located in your home directory and is hidden:</p>
<pre class="brush: plain; title: ; notranslate">
C:\Documents and Settings\priestj\.VirtualBox\VirtualBox
</pre>
<p>Make sure Virtual Box is shut down and open that file with a text editor.</p>
<p>It&#8217;s an XML file and near the top you should see a ExtraData tag.  For my Review Board example you would simply add the following lines (adjust your port numbers accordingly):</p>
<pre class="brush: xml; title: ; notranslate">
</pre>
<p>This also assumes you are using the PCnet network adaptor in Virtual Box. If not &#8211; adjust the &#8216;/pcnet/&#8217; above.</p>
<p>Save the file and restart Review Board and you should be set!</p>
]]></content:encoded>
			<wfw:commentRss>http://thecrumb.com/2009/12/08/alternate-virtualbox-port-forwarding-method/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Review Board: Code Reviews Made Easy (Installation)</title>
		<link>http://thecrumb.com/2009/07/03/review-board-code-reviews-made-easy-installation/</link>
		<comments>http://thecrumb.com/2009/07/03/review-board-code-reviews-made-easy-installation/#comments</comments>
		<pubDate>Sat, 04 Jul 2009 02:49:34 +0000</pubDate>
		<dc:creator>Jim Priest</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[code review]]></category>
		<category><![CDATA[reviewboard]]></category>

		<guid isPermaLink="false">http://www.thecrumb.com/?p=858</guid>
		<description><![CDATA[We&#8217;ve been talking a lot about improving our code at work and code reviews have come up several times, and we&#8217;ve even had a few informal code review but they always seem a bit tedious. I dug around a bit &#8230; <a href="http://thecrumb.com/2009/07/03/review-board-code-reviews-made-easy-installation/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>We&#8217;ve been talking a lot about improving our code at work and code reviews have come up several times, and we&#8217;ve even had a few informal code review but they always seem a bit tedious. I dug around a bit looking at online tools too help and discovered Review Board:</p>
<blockquote><p>Review Board is a powerful web-based code review tool that offers developers an easy way to handle code reviews. It scales well from small projects to large companies and offers a variety of tools to take much of the stress and time out of the code review process.</p></blockquote>
<p>What I liked about Review Board was it&#8217;s integration with version control (in our case SVN, but many others are supported) which allows for reviews of small bits of code, pre-commit.</p>
<p>The work flow goes something like:</p>
<ol>
<li>Make a change to your local source tree.</li>
<li>Create a review request for your new change.</li>
<li>Publish the review request and wait for your reviewers to see it.</li>
<li>Wait for feedback from the reviewers.</li>
<li>If the reviewers approve of your changes:
<ol>
<li>Submit your change to the repository.</li>
<li>Close the review request.</li>
</ol>
</li>
<li>If the reviewers have requested changes:
<ol>
<li>Update the code in your tree and generate a new diff.</li>
<li>Upload the new diff, specify the changes in the Change Description box, and publish.</li>
</ol>
</li>
<li>Rinse and repeat the review cycle.</li>
</ol>
<p>So pull up a chair, get comfortable and lets install Review Board&#8230;</p>
<p><span id="more-858"></span>Review Board is built using Python which I&#8217;ve never tinkered with.  My initial attempt was to install it directly on my clunker WinXP box at work but that quickly spiraled into a mess and I promptly gave up. After a few posts on the Review Board mailing list I decided to instead install Review Board on Linux running on a VM.  It was a bit of trial and error but I eventually got things working.</p>
<p>The official <a title="installation instructions" href="http://www.review-board.org/docs/manual/dev/admin/installation/linux/">installation instructions are available on the Review Board site</a> but I found a few areas where they were incomplete.  One of the biggest issues I had was finding finding a suitable version of my VM tool (VirtualBox), Linux (Ubuntu) and Review Board that would all play nicely together. Here&#8217;s what I ended up with:</p>
<ul>
<li>ReviewBoard 1.0</li>
<li>VirtualBox: 2.2.4</li>
<li>Host PC:  Windows XP</li>
<li>Guest OS: Ubuntu 8.10 Server</li>
<li>Python: 2.5</li>
<li>MySQL:  5.x</li>
<li>Web Server: Apache2</li>
</ul>
<p>First I downloaded and installed VirtualBox.  I originally had downloaded VirtualBox 3.0 and Ubuntu 9.10, but had issues getting those running together and installing Review Board. Lots of errors!  Think there may be some issues with the recently released VirtualBox 3.</p>
<p>VirtualBox 2.2.4 however installed fine, as did Ubuntu Server 8.10.  I did a standard install, then manually installed the following with apt-get:</p>
<blockquote><p><em>apache2  python2.5 build-essential python-dev python-setuptools patch memcached libmemcache-dev mysql</em></p></blockquote>
<p>The first real issue I had was installing <em>cmemcache</em>. The installation instructions on the Review Board site were incorrect but after a bit of Googling I found &#8220;<a title="cmemcache" href="http://leavingcorporate.com/2008/05/04/installing-cmemcache-on-ubuntu/">Installing cmemcache on Ubuntu</a>&#8220;  which worked:</p>
<pre class="brush: bash; title: ; notranslate">
wget http://gijsbert.org/downloads/cmemcache/cmemcache-0.91.tar.bz2

tar -xvf cmemcache-0.95.tar.bz2
cd cmemcache-0.95
sudo python setup.py install
</pre>
<p>This would not install at all on Ubuntu 9.10 for me &#8211; but on 8.10 I didn&#8217;t have any issues.</p>
<p>Next I setup mySQL &#8211; you must have a database setup before doing the ReviewBoard install!</p>
<pre class="brush: bash; title: ; notranslate">
mysql -u root -p
(enter password)
create database reviewboard;
GRANT ALL on reviewboard.* TO reviewboard@localhost IDENTIFIED BY 'password'
</pre>
<p>Since I wanted this to be accessible to everyone on our team I next had to figure out how to allow access to the VM from outside &#8211; turns out this is fairly easy with VirtualBox with a bit of port forwarding.  Make sure your VM is NOT running and enter this into a Windows command line (my VM is named &#8220;reviewboard&#8221;):</p>
<pre class="brush: plain; title: ; notranslate">
VBoxManage setextradata reviewboard &quot;VBoxInternal/Devices/pcnet/0/LUN#0/Config/apache/HostPort&quot; 80
VBoxManage setextradata reviewboard &quot;VBoxInternal/Devices/pcnet/0/LUN#0/Config/apache/GuestPort&quot; 80
VBoxManage setextradata reviewboard &quot;VBoxInternal/Devices/pcnet/0/LUN#0/Config/apache/Protocol&quot; TCP
</pre>
<p><strong>Note</strong>:  <em>the VM name is case sensitive! After I had set this up I went back and tweaked my VM name and suddenly everything stopped working.</em></p>
<p>Adjust your ports accordingly. I didn&#8217;t have anything else running on this machine so I used the standard port 80.</p>
<p>Restart your VirtualBox and you should be able to open a browser on the Windows host and hit http://localhost and get the standard &#8220;It Works!&#8221; Apache screen.</p>
<p>Now we can proceed with the Review Board install &#8211; this is fairly easy:</p>
<pre class="brush: bash; title: ; notranslate">
$ easy_install ReviewBoard
</pre>
<p>This should chug along and complete without errors.  If anything goes wrong  doublecheck you installed everything mentioned above.</p>
<p>Next connect things to mySQL:</p>
<pre class="brush: bash; title: ; notranslate">
$ apt-get install python-mysqldb
</pre>
<p>The installation instructions at this point mention installing source control <span style="text-decoration: line-through">but I skipped this step as I already have an existing SVN repository setup elsewhere.</span></p>
<p>Update: Turns out you DO need to install the source control bits.   When I started adjusting the settings  I added a link to our repository but when I went to create a &#8220;New Review Request&#8221; I got an error.  Someone on the mailing list had the same issue and mentioned installing the Python SVN module. Doh!</p>
<pre class="brush: bash; title: ; notranslate">
$ apt-get install subversion python-svn
</pre>
<p>I&#8217;m not sure if you actually need Subversion installed as well if you are going to connect to another repository but for now I&#8217;ll install and will update this post if I find out it is not needed.</p>
<p>They also discuss installing PyLucene for searching but I skipped this step as well.  The installation instructions mention &#8220;It can be complicated to install, and requires a working Java installation&#8221;.</p>
<p>This is the basic Review Board install but before you can do anything you need to configure a &#8216;site&#8217;.</p>
<p>This is relatively straight forward as well. First decide where you want your site to live.  I decided to keep it simple and put it into a directory called &#8220;reviewboard&#8221;</p>
<pre class="brush: bash; title: ; notranslate">
$ rb-site install /var/www/reviewboard
</pre>
<p>Next you will be asked a series of questions which for the most part you can select the default.</p>
<p>When this completes you will have a new directory in /var/www called reviewboard.  Next you need to set some permissions. The official instructions recommend:</p>
<pre class="brush: bash; title: ; notranslate">
$ chown -R www-data /var/www/reviewboard/htdocs/media/uploaded
</pre>
<p>I cheated and just did:</p>
<pre class="brush: bash; title: ; notranslate">
$ chmod 777 /var/www/reviewboard
</pre>
<p>You do NOT want to do this on any system that is publicly accessible!!!</p>
<p>The final step is to configure Apache. They provide you with some sample conf files. I did the following:</p>
<pre class="brush: bash; title: ; notranslate">
$ cd /etc/apache2/sites-available
$ cp /var/www/reviewboard/conf/apache-modpython.conf reviewboard.conf
$ cd ../sites-enabled
$ ln -s ../sites-available/reviewboard.conf .
</pre>
<p>This copies the conf file and links to the proper Apache directories.</p>
<p>By default there is already a &#8216;default&#8217; or &#8217;000-default&#8217; file in sites-enabled.  Go ahead and delete this to save yourself some headaches.</p>
<p>At this point you &#8216;should&#8217; be able to hit http://localhost/reviewboard and get something.  My site worked but I had no images or CSS, just vanilla HTML.</p>
<p>I had to make one final tweak to get things working.  Open /etc/apache2/sites-enabled/reviewboard.conf and modify the location and alias paths to include reviewboard:</p>
<p>Original:</p>
<pre class="brush: plain; title: ; notranslate">

SetHandler None

SetHandler None
</pre>
<p>Modified:</p>
<pre class="brush: plain; title: ; notranslate">

SetHandler None

SetHandler None
</pre>
<p>Original:</p>
<pre class="brush: plain; title: ; notranslate">
Alias /media /usr/share/reviewboard/htdocs/media
Alias /errordocs /usr/share/reviewboard/htdocs/errordocs
</pre>
<p>Modified:</p>
<pre class="brush: plain; title: ; notranslate">
Alias /reviewboard/media /usr/share/reviewboard/htdocs/media
Alias /reviewboard/errordocs /usr/share/reviewboard/htdocs/errordocs
</pre>
<p>Restart Apache and you should have a working Review Board installation!</p>
<p>Next up &#8211; logging in, configuration and using Review Board.</p>
<div style="overflow: hidden;width: 1px;height: 1px">
<pre>$ apt-get install subversion python-svn</pre>
</div>
<p>Update:  Christian Hammond posted on the Review Board mailing list that the Apache tweaks I had to do have been fixed in the latest release.</p>
]]></content:encoded>
			<wfw:commentRss>http://thecrumb.com/2009/07/03/review-board-code-reviews-made-easy-installation/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

