Home > Cloud > Turnkey Grails

Turnkey Grails

When I discovered Turnkey Linux, which I think is awesome, an light bulb came on about how virtual machines can be extremely useful for me.  In my work, I may switch frequently from one activity to another.  Each of these activities require a different software tool set.  In the past I would accommodate this by installing all the different tools I need onto my desktop at work.  Then, if I wanted to do some work on my home laptop, I’d find myself reinstalling the same set of tools.  Obviously this isn’t the most effective way to work.

I have never spent much time working with virtual machines because I really thought they were most useful to vendor or pre-sales guys who need to demo a complete stack of technologies without having to install them at a given site.

But something clicked – some say the penny dropped – when I saw Turnkey.  If you’ve not seen their website, have a look.  I think the idea of pre-packaging a set of technology tools into a single image which you can just download and boot under a virtualisation solution like Vmware or VirtualBox is brilliant.  But it made me realize that I should use the technique for my work.  I could setup virtual machines with the appropriate toolset for a given task and be able to host in on my PC at work or my Mac at home and not worry about polluting my home environment with a bunch of tools for work and vice versa.

Sorry if this is so obvious, but for me it’s been a bit of a revelation.

Why Grails?

First question you may ask is why do I need a Grails Virtual Appliance?   I need a Grails appliance because I am starting to work on a project performance tuning a complex Trading and Risk Management System.  The system is java based and has a logging framework that can be configured to log response times of key internal functions.  This data could be very useful in analysing and identifying performance bottlenecks.  Problem is these logs are written to text files and are pretty difficult to use without being parsed, correlated and graphed.

The system is best described as Event Driven and Multi-tiered.  There is a core server and numerous Engines which perform tasks in response to events generated by other parts of the system.

I need a technology that can quickly present reports or graphs, drill down, etc.. I don’t want to build it in Java, but there is so much java in the project, groovy looks best because it’s dynamic and script like.  Grails because I want quick set of web pages, but don’t want to do much development.  The main point is not develop a website, but to make detail diagnostic data available quickly so I can get on with the real job.

The Grails Virtual Appliance

To create a new virtual appliance, I thought first I’d pick a base appliance from Turnkey and add whatever I needed.  I basically need the following:

  • Data base – I need a data base into which the diagnostic logging data is to be written and read by the grails app for display and analysis;
  • java jdk – of course this is pretty essentail;
  • java servlet engine – I couldn’t figure out if Grails comes with one embedded or you have to deploy.  My favourite is Jetty of course.

Maybe that’s it.  Let’s try it and see.

Picking Turnkey Virtual Appliance

There are a number to choose from, but none have exactly what I need.  Here’s the choices:

  • Use the core and do it all myself;
  • Use the Tomcat and add MySQL;
  • Use the MySQL and add Java

To either of these I need to add Groovy and Grails.  Just counting the packages I’d have to add, I’ll start with Tomcat since it’s already got java, tomcat and apache on it.  I can just add MySQL, Groovy and Grails.

Grooy and Grails

This should be very straight forward, just download grails install and set a couple of environment variables.  From what I’ve read, the Groovy jar is included in Grails.  Too easy.  I’ll update the post shortly with how it goes.

Categories: Cloud Tags: , ,
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: