27 January 2013

Using a raspi as a switch

Everybody is asking me why the heck I got a raspi. I proudly show it to all my family and friends and they all say:
 "What's this? What's this for?"
(I do not have the energy to explain them what a gopher server is, and why everbody should have, at least, one.)
I imagine that everyone has a different use for their raspis. I am having so much fun playing with it since I received it that I should write a post every single day. But unfortunately I do not have the time to do it :-(
Today I have yet found a new use for it, perhaps one of the best uses I could think of, even though I didn't have that idea in mind when I bought it.
I have a network server that I only use occasionally. I turn it on when I get home if I need it, but I always turn it off at night. One of the reasons to get my raspi was the possibility of having a machine connected 24/7 and also reachable through the internet, for example, using a smart phone.
Today, I was away from home with my netbook (eeepc 701) and I needed to start a build on my server. I thought it would be excellent if I could start the build before getting home and this way the first test would be done by the time I arrived home. Well, suddenly I got the idea:
I often turn the server on using 'wakeonlan', I have got several aliases to mount devices on my network and do other similar things. So using ssh from my eeepc I logged on to my shell account at sdf-eu, from there I connected to my raspi and installed the wakeonlan package (I didn't have it installed there yet) but I had my.shell_aliases in my $HOME. From there I turned on the server and opened a shell to start the build. When I got home the first build had failed and stopped, but it saved me a lot of time because when I arrived I could start another build right away.
I know that the idea is not the state of the art. Many IT guys do most of their work jumping from one server into the other all day long but I'm happy to have come up with such a nice trick: Using the raspi to turn on and off other machines in my network remotely. From now on my raspi will be one server to rule them all.