Playing with OpenShift

Openshift is a Platform As A Service offering from RedHat, and has been there for a while now. It never really came up in my radar for some reason. Fortunately I took a dive into it last week and have really liked the whole service so far.

I chose the free accounts of course, since I’m the only one who visits my own site and I really don’t need to scale to the point where I’ll need the premium offerings. The free plan comes with three small ‘gears’, which is a container that comes with 512 MB RAM and 1 Gig of space. Into this, one can slot a cartridge.. which is basically a stack for a Programming language like Perl, or a DB like MySQL.

sandbox

I’ve kicked off with just one gear for now: I’ve wanted to try out Perl Dancer and this was just the opportunity I was looking for. There were straightforward instructions in the OpenShift docs, and I had an application deployed and ready in just a few minutes post-signup.

I spent another hour or so figuring out how Dancer did it’s magic, and have made trivial modifications in the router, views and templates to understand things better. I have a PerlBrew setup locally. Together with cpanm, I can install stuff on my laptop that is in sync with what is deployed on OpenShift’s cloud.

Here then is my first foray into web application development. I don’t expect the content or the layout to stay the same for long. Currently I have used Zen::Koans to print a random koan each time a particular page is queried.