<?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>Death of a Gremmie &#187; trac</title>
	<atom:link href="http://deathofagremmie.com/tag/trac/feed/" rel="self" type="application/rss+xml" />
	<link>http://deathofagremmie.com</link>
	<description>by Brian Neal</description>
	<lastBuildDate>Wed, 14 Jul 2010 02:31:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Infrastructure: Trac &amp; Subversion</title>
		<link>http://deathofagremmie.com/2009/04/06/infrastructure-trac-subversion/</link>
		<comments>http://deathofagremmie.com/2009/04/06/infrastructure-trac-subversion/#comments</comments>
		<pubDate>Mon, 06 Apr 2009 17:43:43 +0000</pubDate>
		<dc:creator>gremmie</dc:creator>
				<category><![CDATA[SG101 2.0]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[mod_wsgi]]></category>
		<category><![CDATA[svn]]></category>
		<category><![CDATA[trac]]></category>

		<guid isPermaLink="false">http://deathofagremmie.com/?p=220</guid>
		<description><![CDATA[I&#8217;ve been wanting to get some kind of issue tracker up and running for some time now. Trac seems like a great choice. We&#8217;ve used it where I work, and the Django project uses it. I even managed to install it on Windows at work. Still, I was kind of dreading trying to get it [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been wanting to get some kind of issue tracker up and running for some time now. <a href="http://trac.edgewall.org/">Trac</a> seems like a great choice. We&#8217;ve used it where I work, and the <a href="http://code.djangoproject.com">Django project</a> uses it. I even managed to install it on Windows at work. Still, I was kind of dreading trying to get it working on the dedicated server I rent. I finally gathered the strength and tackled this problem this weekend, and it went far easier than I imagined.</p>
<h2>Subversion</h2>
<p>First of all, I decided I might as well upgrade my <a href="http://subversion.tigris.org/">Subversion</a> (SVN) server while I am at it. I see that Subversion 1.6 is out now. However, reading the fine print, I noticed that they seemed to have changed their Python bindings in 1.6, and I wasn&#8217;t sure if Trac is compatible with this. So without doing any further research I decided to just run the last stable version before that, 1.5.6.</p>
<p>My dedicated server is running Fedora Core 6, which isn&#8217;t maintained anymore, so there is no way to my knowledge of getting a binary package for these recent builds of SVN. I need to build from source. I had done this once before, and I even took detailed notes (which I had forgot about). Building from source is fairly easy, but there is one gotcha on the AMD64 server I run, you need to invoke the configure script with an &#8211;enable-shared switch. Luckily I wrote this down from the first time I did this. Getting the required dependencies for the source build isn&#8217;t too hard. The Subversion folks helpfully package some of the less readily available dependencies, so it is just a matter of grabbing them and untarring them on top of the unpacked source tarball.</p>
<p>Since I wanted to integrate Trac with my Subversion repository, I needed to ensure I built the Python Subversion bindings. I used <a href="http://en.wikipedia.org/wiki/Yellow_dog_Updater,_Modified">Yum</a>, the package manager that comes with Fedora, to make sure I had <a href="http://www.swig.org/">SWIG</a> installed before I ran configure to build SVN. Then it is a simple matter of building the Python SWIG bindings after Subversion proper is built. This is explained very well in the Subversion documentation.</p>
<p>This seemed to go well, although I had a minor heart attack when Apache crashed the first time I tried to restart it with the new SVN in place. Another restart and it was fine. Hmmm. In short order I had upgraded my existing repository and things seemed to be working fine.</p>
<h2>A New Subdomain</h2>
<p>I then created a new subdomain to host my issue tracker. I rely on the Plesk control panel to do this lifting for me. It came installed with the server, and I rely on it heavily to configure Apache, the mail server, etc. I&#8217;m not a hard core server admin, so this is a big help. Although I can see the day when the training wheels can come off as I become more familiar with Linux and these tools. I can sort of see what Plesk is doing by examining the config files it creates and it doesn&#8217;t appear to be rocket science. Still, it is a big time saver for me.</p>
<h2>Trac</h2>
<p>To get Trac installed requires getting all the dependencies in place first. In most cases, I was was able to use Yum to get most of the dependencies in binary form from the Fedora repository. Despite the fact that Fedora Core 6 is pretty old, the version numbers of the dependencies in the repository were still compatible with the newest version of Trac. The one notable exception was the template engine Trac uses, <a href="http://genshi.edgewall.org/">Genshi</a>. In this case a simple &#8220;easy_install Genshi&#8221; did the trick. Nice.</p>
<p>I might have been able to easy_install Trac, but the docs say that this only works for Python 2.5 and 2.6. I&#8217;m still running 2.4 on the dedicated server. Upgrading my OS is definitely on the long term to-do list, but I must take baby-steps for now. But it was a simple matter of grabbing the Trac tarball, untarring it, and doing the usual &#8220;python setup.py install&#8221;. It went flawlessly.</p>
<p>Now luckily I had setup Trac at work before, so I already knew what to do. I ran the command-line Trac admin tool to create a project and tied it to my new Subversion repository. Trac comes with a development server, and I ran that after configuring the project. I could then point my browser at my server and see my new Trac project for the first time! Things are cooking at this point.</p>
<h2>Mod_WSGI</h2>
<p>Of course I can&#8217;t use the development server for real work. So the next step was to get Apache to serve my Trac project. I once again chose <a href="http://www.modwsgi.org/">mod_wsgi</a> as the deployment method, after just recently converting The Madeira site from mod_python to mod_wsgi. The mod_wsgi documentation is excellent, and a wiki page covers <a href="http://code.google.com/p/modwsgi/wiki/IntegrationWithTrac">integrating Trac and mod_wsgi in great detail</a>. After studying the docs for a short while I had the magic Apache configuration down. I restarted Apache, and once again I was amazed that things were working on the first try. I had been pretty lucky so far. (In fact the most trouble I had that day was trying to change the logo on the Trac site!)</p>
<h2>At Last&#8230;</h2>
<p>I was now ready to configure my Trac project and get my new Subversion repository loaded. I had an existing Subversion repository that I was doing all my work in. However I had checked in some settings files that contained database password information. Shortly after realizing this I just locked the whole repository down. Since then, I have learned the Django settings.py and local_settings.py trick, and have placed the sensitive information in the local_settings.py file (which is not controlled in SVN). Now I can have a public read-only repository again.</p>
<p>So here it is, ready for beta testing: <a href="http://code.surfguitar101.com">http://code.surfguitar101.com</a>. Now there isn&#8217;t anything stopping me; I have to do the real work of deploying a beta version of SG101 2.0 for testing and feedback.</p>
]]></content:encoded>
			<wfw:commentRss>http://deathofagremmie.com/2009/04/06/infrastructure-trac-subversion/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
