OpenShift vs Cloud Foundry: primer for software development

Advice Mark Newton Sep 30, 2012

VMware's CloudFoundry and Red Hat's OpenShift are two cloud alternatives for developers. What are their advantages?

It’s not always straightforward – it can be a struggle to register correct public and private secure shell (SSH) keys but these are essential because without them the code can’t be uploaded.

Once this has been done however, the developer can get down to work. That’s not to say that everything is easy, the whole process of writing an application to work on the cloud rather than a physical box means the developers have to think of different ways to do things. The virtual nature of the environment means they have to think their way round the way the code works, in particular how it accesses data and stores variables.

It’s not totally foreign, many of these problems are similar to the way any web application works with sessions that expire and variables that may expire with them. The techniques needed to work around these problems are well known and both the systems have lots of on-line documentation to help you avoid the known issues with coding in these environments.

What’s the difference between them? Assuming that they both support the referred coding language then there is not a lot of difference.

OpenShift has a great range of languages along with some ready rolled Open Source products than can be installed with a simple click.

The system offers ‘instant applications’ like Drupal or a ‘web cartridge’ which uses the popular Open Source Git version control system to manage the code. The idea is to push the changed code to the Git repository and then the system will automatically deploy the code and, if necessary, restart the application.

If there’s a need to add extra capabilities to the application then further ‘web cartridges’ like databases or cron services can be added. To manage most of the capabilities of OpenShift , Red Hat provides a command line tool called RHC, but there’s also a more user-friendly then there is a plug-in to the JBoss Developer Studio IDE which gives  a full development environment with code colouring.

With Cloud Foundry, developers can either use VMC to deploy the code to the cloud service or use a a plug-in to STS or Eclipse if they want to use a graphical IDE.

Running  the supplied virtual machine helps in the testing process although again, configuring the security settings was little confusing; however, it is a once only process and the supplied on-line documentation certainly clarified the process. The various different steps involved depending on whether the application requires none, single or multiple services are also well documented on the website.

Apart from the issues mentioned regarding data storage, writing for the cloud is not much different from normal web based development. It is the initial setting up of the application areas and the security that can take a little work, but that is often the case with conventional web-based code. Once the application is deployed on the cloud, then developers can sit back and not worry about such dull things as hard discs failing or server availability, that has just become someone else’s problem.