Saturday 27 October 2012

Raspberry Pi as a Subversion Server

This is an old post, preserved for reference.
The products and services mentioned within are no longer available.

We hit an issue with a client I was doing work for that required a subversion source control server. Up until that point, I'd been working at home using svn on my ubuntu server for source control. When this work was moved into their office, I transferred the repository from that server to the machine I was working. There was no suitable server available at their office and at that point I was the only developer working on the code.

Now they've taken on a graduate developer to also work on the code and it's not really practical to rely on the server on my dev machine. There is a NAS available, but although it looked at one point that it should be able to run subversion, the minimal linux firmware on there was sufficiently broken to stop us installing subversion.

So we were looking at taking the drives from the NAS and building up a linux server. Then a bit of lateral thinking led to the idea of using the raspberry pi as a server. The pi was setup with the latest version of raspian with the memory split as 240 MB / 16 MB as it is running headless.

CIFS was used to mount a folder on the NAS to hold the repositories and subversion setup. The pi only needed a LAN cable and some power. The repositories were migrated from the dev machine to the new shared Raspberry Pi SVN server and away it went.


So, I've finally found a use for a raspberry pi. I had lots of ideas when I originally ordered them on release day earlier in the year, and several more whilst I waited for them. However, when I finally received the original 256 MB model B Raspberry Pi boards, I was a bit disappointed. There were a few practical issues, like the lack of mounting holes and the connectors sticking out on all sides and the USB connector not being level with the LAN magjack. There are ways around those (see mounting details inside a ZX81 here), but the main issues were the low memory size and the lack of hardware mpeg decoding. And finally, the early recommended distributions were a bit flaky.

Now, things are a bit different. The model B is shipping with 512MB, and some mounting holes. Raspian is looking a bit better and there are options for licensing the mpeg decoder. So with a new one on order, hopefully some of the original ideas might now be possible. Watch this space!