Run Geek

Mind of Bernie

How To Setup SVN And Trac With A Virtual Appliance


Source Control is a important tool for EVERY Software Developer. Jeff at CodingHorror puts it best.

Source control is the very bedrock of software development. Without some sort of version control system in place, you can’t reasonably call yourself a software engineer.

Its even part of Joel Test: 12 Steps to Better Code.
So I’m not going to try and convince you to use Source Control. Instead I’m going to show you how easy it is to set one up, you have no excuses not to use it. I previously talked about VMware Player and Virtual Appliances (VA), and were going to build off that. The repository of choice is SubVersion (SVN).

Step 0: Make sure you have the free VMware Player installed or another Virtualization software. (Parallels, Xen Open Source, etc..)

Step 1: Head over to JumpBox and download Trac/Subversion appliance. Its a 115MB download, but its the complete package. This Virtual Appliance does not only have source contorl, but also provides a Ticket Tracking System and a Wiki for your documentation.

It looks like JumpBox is starting to setup a Subscription Fee to download their VA’s. I was still able to download the Free Version. If your not able to download it, leave a comment and I will post a mirror.

Step 2: After you download the zip file. Extract it to your hard drive. This is your virtual computer. (If you want to backup your system, just burn a copy onto a CD/DVD disc, AWESOME!)

Step 3: Open VMware Player and navigate to the folder where you extracted the files. Select “JumpBox.vmx“. And your system will boot. It will use DHCP to aquire an IP address. You will manage your repository through a website.

After your VM boots you should get a screen like this.

First Boot

Step 4: Open a web browser and type in the “Management Page” url in the address bar.
(In this case its https://192.168.1.110:3000/)

Inital Setup

These are pretty simple configuration options. Just make sure to remember your password!

Step 5: Visit the application page! (In this case its http://192.168.1.110 and you don’t need the ’s’ in http)

Trac Wiki

On the Wiki you can see the location of the SVN repository. I would suggestion creating a new Account with a better name then Admin. So when you check-in files the repository has your name and not Admin as the author.

To Add Users you will first need to login by clicking the red login link on the top right hand side of this page. You will login in as the user admin and the password you used when configuring your JumpBox. Once you are logged in as the administrator new users can be added by clicking on the Trac Admin link (it will appear on the top right once you log in) then the Users link. These users will have access to both Trac and the Subversion repository. Many other settings can be changed through the Trac Admin link.

A popular SVN client is TortoiseSVN. Its a shell extension to windows. This means you get new menus when you right click.

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.
Another advantage of this shell integration is that not only web or software developers can use it but all the people who don’t have the development tools installed, for example translators, doc writers, …

I program with Eclipse so I also use a plug-in called Subclipse.

Subclipse is an Eclipse Team Provider plug-in providing support for Subversion within the Eclipse IDE.

That should be enough to get you setup with your very own software repository. Congratulations, you can reasonably call yourself a software engineer! However, there is still much to learn about version control.

Link-a-tron: Post is getting long, so I’ll put some quick links.

Subversion Homepage
Secure SVN Repository using svn+ssh
Google’s Free Online Open Source Repository (Great for sharing, but must select Open Source License to release under)
SourceForge (Another free hosting to Open Source projects)