I recently started programming web apps, because I feel that they are a very interesting thing to add to my toolbelt. One can do quite a lot with them and in contrast to traditional software, can be made available to a huge pool of people with a minimum of setup and no dependency hell. Also there exist excellent tools for designing user interfaces, which makes it much more painless than traditional GUI programming.

Although I got hosting for this blog on a friends server, and he could probably provide me with every technology required, I didn't want to bother him with installing all the different servers and web frameworks that are there for you to choose, especially in this initial experimentation phase.

Another friend mentioned Google App Engine, which is a so called Platform-as-a-Service (PaaS), which means that the platform provider provides you with a platform containing everything you need to get started, i.e. a runtime environment for various languages, different web frameworks, databases. This model suits me very well, because I like programming much better than installing stuff and administration tasks, and a PaaS takes care of most of the latter. Also usually there is a free tier that offers you a limited amount of resources for free, which is perfect for experimentation.

Because I want to avoid Google and Amazon for philosophical reasons (as far as I can assess, technically their offers are very solid), I looked for alternatives. From these, OpenShift struck me as particularly well suited for my purposes.

In the free tier, you get 3 small gears (the OpenShift unit of computational resources) with 512 MByte of memory and 1 GByte storage each, which is pretty good for experimenting. You can compose your platform by combining a primary cartridge, which offers a language runtime, with add-on cartridges that add databases, task queues or other useful services. There is a respectable selection of cartridges.

One of the really nice aspects is that OpenShift integrates nicely into my way of working. They offer a command line tool, that allows to setup your gears and cartridges from the commandline. And the app itself is managed as a git repo. You develop in a repository on your local machine with all the advantages that version control gives you, and to deploy to your gear, you just git push.

The environment on the gear is slightly different than your development environment on your local machine, for example the directory where your repository lives is distinct from the directory where you can persistenly store data, so you have to be careful to not make such assumptions. Instead you use the environment variables for these paths. Environment variables are also offered by primary and add-on cartridges for things like database connection details, which allows to keep quite a lot of such configuration in the source without having to store sensitive information in the repo.

Overall I am very happy with OpenShift, however there are a few things that are not so good. OpenShift exists since 2011, but it has evolved a lot since then. This means that you have to pay attention to the date of blog posts, forum threads and other resources, because things might have changed a lot since then. On the other hand, there is good documentation available for OpenShift Origin (the code underlying OpenShift, which you can use to run your own PaaS infrastructure).

There were a also few cartridges (or quick starts) that I would have liked to have (e.g. weblate). I tried, but I couldn't get it to work.

For my purposes, OpenShift is a excellent tool that integrates very well with my workflow. It allows me to focus on the development of web apps and not so much on administrative tasks. As a plus it is built on common open source technologies, so in principle it should be not too difficult to move an app from OpenShift to its own server if necessary.