Friday, 27 March 2009

Teamcity, Ubuntu and Code Inspections

I have just been setting up a new Team City instance on Ubuntu and hit a bizarre issue with the code inspections runner. The code inspections runner fails complaining it can't find a JDK and saying I should set JAVA_HOME. However JAVA_HOME is set, and it points to a JDK. For some reason I can't quite work out it is reverting to the JRE.
Even more oddly I have a build agent on Suse and it works fine, so it must be something about the ubuntu java packages.

The solution (which is a very hacky) is to link tools.jar into the lib folder of the JRE.
  • /usr/lib/jvm/java-6-sun/jre/lib# ln -s ../../lib/tools.jar ./
This then fixes the issue.

Saturday, 7 March 2009

Tunnelling SSH over a SOCKS proxy

I have a problem with accessing some servers we have that are behind both a VPN and a SSH jump off box. I can access them but it means SSHing to the jump off box and then SSHing from there. This is a pain for copying files, running multiple windows (yes I do know what screen is but I like multiple windows).

I have in the past solved this by setting up SSH port forwarding to the box I want to get to. However that get tedious when you want to talk to lots of boxes. So I thought - why can I use the socks5 proxy feature of SSH. In theory using the socks 5 proxy feature I can open one SSH session to the jump off box with a dynamic proxy and then configure all my other connections to go via the proxy. This will save me having to do individual port forwarding.

The easiest way to configure this is via an ssh config file (type man ssh_config for details). You need to add two sections

Host YOUR_JUMPOFF_SERVER
DynamicForward localhost:3128

Host *.YOUR_INTERNAL_SERVERS
ProxyCommand /usr/bin/nc -x localhost:3128 %h %p

Once this is done simple ssh to your jumpoff server and then you can 'directly' ssh to the servers behind it.

Tapestry vs Python the results

As mentioned in my previous post we had a bit of a Python vs Tapestry competition. The results are now in and I thought some comments may be in order.

The high level result was the Python application won the vote (by a nose). It still won if we excluded the anonymous votes (there was some vote rigging :( ). 

The more interesting part is speculating why
  • The tapestry team said they spent far more time than the python team, but also delivered far more. They had working bebo, facebook and twitter
  • It was really unfortunate the two teams didn't spend the same amount of time. This was due to circumstances out of my control but it kind of invalidates the experiment.
  • The tapestry team reported initially they spent 34 person days, but when they saw the other team only spent 8 they revised that to 16. I am of two minds if this is fair - as they said originally they counted elasped time, whereas the python team counted working time. It is definitely fair to say they had at least twice the time.
  • The development team building the tapestry application is mostly happy with the framework
  • The team building the python application had more trouble with the framework
  • I think the design choice of Moody Face to have a splash screen (as opposed to letting you in directly) put a lot of people off it.
It wasn't a clear win for either option. Which in my mind suggests Java (with tapestry 5)has made leaps and bounds towards becomming a competitive framework.