Last Updated: February 25, 2016
· icflorescu

Run new versions of Node.js / MongoDB on OpenShift PaaS

If you're a web developer playing around or doing serious work with OpenShift - the open PaaS by RedHat, you were probably a bit annoyed to realize that on their platform Node.js and MongoDB are still stuck at v0.10.5 and 2.4.x (at least for the moment).

OpenShift by RedHat

Both technologies are still cutting-edge. The entire Node.js ecosystem is evolving at a quick pace and developers are usually keen to keep up with that pace, and OpenShift should know that. Also everybody is thrilled by the new features that came with MongoDB 2.6.x, like multi-language full-text search enabled by default and lots of aggregation framework enhancements.

While Heroku gives you the latest Node.js version and MongoLab is switching to 2.6.x by default in a few days, the standard OpenShift cartridges seldom get updates.

Well, the good news is that the OpenShift cartridge mechanism is actually incredibly powerful and flexible. You can do almost everything with it. The problem is that not every web developer out there is a bash ninja (I'm far from being one), but I did my best and managed to come up with these two:

The Node.js cartridge is configured to update to the latest Node.js version automatically (by looking at on each deployment. Unfortunately I couldn't come up with a similar auto-update strategy for MongoDB, so for now you'll get v2.6.5 (I'm open to accepting pull-requests, though :-).

Both cartridges are far from being perfect and definitely not production-ready, but until OpenShift comes up with a solution, feel free to try them, have a look at the source code on GitHub (or better yet, contribute with a pull-requests).