I don’t think Vert.x on OpenShift could be easier

verxIf you’re here, you already know how cool vert,x is, and you might be discovering how easy OpenShift makes your life.

Getting started with vert.x and OpenShift is so easy that this post isn’t even necessary, but I thought I’d point out some interesting features along the way.

First, create a new vert.x cartridge on OpenShift.

openshift-create-vertx

As of right now, OpenShift only supports vert.x 2.1, but it’s better than nothing. One thing I wonder about is how the autoscaling feature would work in terms of the vert.x event bus, the HA fail over stuff, or related scaling technology:

openshift-scaling

Second, clone the OpenShift repo on your local environment

git-clone-example

Easy.

That’s it. Now start coding

The cartridge comes out of the box with a server.js, which looks a lot like the starter examples on the vert.x site. I only really have two observations on it: First, I have issues with the team’s tab spacing (and js-lint would throw a fit). I’m only OCD about this one topic. However, I particularly like how the team thoughtfully added the ip and port variables and logic.

Because of this forethought, fresh off your git pull you can instantly see your verticle  simply by running vertx run server.js.

deployed-verticle

Cool, huh? Have fun out there.

Leave a Reply

Your email address will not be published. Required fields are marked *