Going for the Raspberry Pi

Please note: This article is only available in English.
Now that the Raspberry Pi is available since 18 months it was finally time for me to get one!

This week I realized that parts of my code are too important and valuable to be available just on a disk, without being under source control.

This realization is quite nice, but it was not the case that I did not feel that way before. Instead I always realized the problem of having a very fragmented (or distributed) programming environment consisting of multiple systems with multiple platforms for multiple clients.

Nowadays I solve this problem quite easily: With Visual Studio (of course) and git (of course!). I am a big git supporter since a while, but after Microsoft released a phenomenal Visual Studio plugin, I am an even bigger supporter. Now managing git repositories is fun (who would believe it?)!

With the official and some of my own templates Visual Studio can be used to program anything. From Microcontrollers to Xeon Phi to static webpages. In fact since Visual Studio has Zen coding support (with a the Emmet plugin like for Sublime Text 2), superior LESS integration (automatic transformation, ...), TypeScript and more I feel that Visual Studio is also the most productive IDE for non-.NET applications.

But now comes the hard part: How to centralize everything? One way would be to get a private GitHub account. But that results in a monthly fee and the final control over my source code is in the hand of somebody else (very bad). So what I need is SparkleShare (awesome sharing system that uses Git for source control) for all kinds of files and something like GitHub (but personal) for the real repositories.

The solution is to get a cheap Raspberry Pi computer, connect it to the router and use my webserver as a DNS host. So now I can access my repositories from everywhere and I have a web interface and more.

Overall I bought the following items:

  • A Raspberry Pi (model B with 512 MB RAM)
  • A transparent case for the Pi
  • A µUSB power connector (5V with 1000mA, i.e. 5W)
  • A 16 GB SDHC card for the OS
  • A 32 GB USB stick for the repositories

The whole package was under 100 € (incl. shipping and more). For the OS I picked Raspbian, even though I do not like Debian very much (very old packages + not very handy configuration).

I started by installing the following packages:

  • vim
  • curl
  • node.js
  • npm
  • gitolite
  • gitweb

That's it basically. I wrote some node.js scripts to update the IP of my Pi on my server and to do some access control (beyond standard user / password requirements). I also wrote a script that automatically pushes a full backup of my repositories to a hard disk drive that is plugged in on the router.

Finally I can now say: Everything works smoothly and for the first time I feel that my code is in good hands...

Buying a Raspberry Pi One way to buy the Raspberry Pi online is by using the shop from Farnell electronics. Two links are given in the references.

Created . Last updated .

References

Sharing is caring!