A plugable Plastic SCM serverYesterday I got a SheevaPlug development kit and the first idea that came to my mind was “hey, let’s put a Plastic server here!” I’m involved in a small robotics project at the university (I’m an associate professor in Computer Science, although robotics is not my area) and we’re evaluating different alternatives to use as the robot brain. But yes, before moving some engines I wanted to check if it was possible to set it up as a Plastic server.
The look and feel
Well, I just took a few pictures of the “pluggable computer” today, close to my BlackBerry so you can see how small it is.
First thing is to go and plug the “thing”. Then it is supposed to start up and get an IP address from your router. That’s what I did, then went to my router configuration and checked that a new box was online!
Then I followed the instructions here to connect using ssh and log in. Cool!
Follow the instructions step by step, all of them, including the one related to the time and date settings because otherwise you’ll end up in trouble when installing packages. It takes just a few seconds to go through all the commands. (I didn’t set the date at the beginning and jumped into mono installation and… ouch! Didn’t work!)
Again, really simple and well documented here. It’s an old 2.0 Mono (so I will try to come up with a newer 2.8 in the coming days, but just stayed with this one for the initial tests).
$ apt-get install mono-2.0-devel
And then don’t forget to install the following one too (otherwise you won’t have remoting and Plastic won’t work!)
$ apt-get install libmono-system-runtime2.0-cil
I just copied the Plastic SCM server binaries into /root/plastic/server and then run:
$ mono plasticd.exe –console
But… it didn’t work!
First thing I hit was that the SQLite libraries installed by default on the box were not ok to work with the Mono wrapper.
Ok, first things first. Here’s my db.conf to use a SQLite backend:
First I got the package and then installed gcc and make
$ apt-get install wget
$ apt-get install gcc
$ apt-get install make
$ wget http://184.108.40.206/sqlite-autoconf-3070400.tar.gz
Then I built the sources with the following flags:
$ CFLAGS=-DSQLITE_ENABLE_COLUMN_METADATA=1 ./configure && make
Then I just added the .libs path inside the SQLite src dir to the LD_LIBRARY_PATH (hey! I know it is not clean but I’m just doing a quick test!)
Starting up Plastic
$ LD_LIBRARY_PATH=/root/sqlite/sqlite-autoconf-3070400/.libs:/usr/lib:/root/plastic/server: mono plasticd.exe --console
And it … started up!
But then I connected from another machine and got a beautiful zlib related error. Why? Because Plastic wasn’t correctly loading zlib, so I did the following “fix” (from the server’s path):
$ ln -s /usr/lib/libz.so.1 libz.so
And then I restarted and everything worked!
Well, I really love the idea of the “pluggable Plastic SCM server”. I’m using this one as a “spare mirror server” where I automatically push my changes from my laptop on checkin. The “plug” doesn’t have a lot of “disk space” (flash) but an external card can be plugged in or even an external hard drive. Or, even better, I’ll give it a try connecting the Plastic SCM server on it to an external MySQL database… Cool, isn’t it? I mean, for $99 you can have a really cheap mirror server (unless you’re a team with 100 developers or more but, hey!, then don’t be so cheap and buy a real backup!! :P)