5 ways developers win with PaaS

Powering your app with open source and OpenShift

Getting Started with OpenShift As a software developer, you are no doubt familiar with the process of abstracting away unnecessary detail in code — imagine if that same principle were applied to application hosting. Say hello to Platform as a Service (PaaS), which enables you to host your applications in the cloud without having to worry about the logistics, leaving you to focus on your code. This post will discuss five ways in which PaaS benefits software developers, using the open source OpenShift PaaS by Red Hat as an example.

No More Tedious Config Tasks

Most of us don’t become developers to do system administration, but when you are running your own infrastructure you end up doing exactly that. A PaaS can take that pain away by handling pesky config and important security updates for you. As a bonus, it makes your sys admin happy too by allowing you to provision your own environment for that killer new app idea you want to tinker with, rather than nagging them for root access on a new VM.

On OpenShift, it goes like this: let’s say you decide you want to test an idea for a Java app, using Tomcat and PostgreSQL (yes, we could argue about the merits of those choices, but work with me here). You can spin that up with a one-line terminal command:

rhc app create myawesomeapp tomcat-7 postgresql-9.2 -s

That -s on the end is telling the platform to make the app auto-scaling, which I will elaborate on later; yes, that’s all it takes. RHC (Red Hat Cloud) is just a Ruby Gem wrapping calls to the OpenShift REST API. You could also use the OpenShift web console or an IDE plugin to do this, or call the API directly if that’s how you roll. The key technologies in play here are just plain old Git and SSH — there’s nothing proprietary.

Once that command has finished running, you will have an SELinux-secured container (we call it a gear) running a Java web app in the cloud, with its own URL and Git repository. You can SSH to this container, set environment variables for it, add cron jobs to perform, make the code build on a CI server, or perform a host of other tasks. All of this is available as a result of that one command; you don’t need to configure anything. Even better, you didn’t work on the config for days only to figure out you’ve done it wrong. If you need to tweak the Tomcat or PostgreSQL config later, of course you can, but out of the box the stack just works.

Speed and Convenience

At this point, you have already saved a lot of precious coding time. You didn’t need to buy a server (physical or virtual) and install an operating system, nor install and configure Java, Tomcat, or PostgreSQL. You didn’t have to configure the server’s firewall, DNS settings for your app, or SSH and source control. You have also saved the future effort of keeping these things up-to-date. Now though, you want to get on to the business of pushing code — how hard is that going to be?

Deployment is triggered by a single command that will be familiar to many devs: git push. Deploying new code to your container is as simple as committing and pushing the changes with the Git version control system. It is quick and easy to repeat as you make incremental improvements to your app. There is also support on the OpenShift platform for working as a team, so you can collaborate with other devs while continuing to use a fast and convenient process built around the tried and true tools of Git and SSH.

Scaling is a Snap

Another huge benefit of PaaS is that you do not need to worry about scalability, as it can be baked into the platform. On OpenShift, when the demand for your scalable application ramps up, the platform will automagically spin up more copies of your app and load balance between them. When the demand decreases, the platform will remove those extra application gears automatically.

You can also choose to manually scale up your application, for example ahead of big sale when you are expecting a large increase in traffic. By default, the scaling activity is based on the number of concurrent connections to your app, but of course this can be changed — the entire OpenShift platform is open source so you can tweak it to your liking, or even use the project to run your own cloud platform.

Increased Efficiency

Another way you win as a developer using this PaaS arrangement is that you only use the resources you really need. If you rack and stack your own servers, you will pay for their capacity regardless of how much of that you are using. On a PaaS, you can choose the size of the container you need (these come with different amounts of memory and storage space), and then simply scale up when demand increases or you need more storage space. Sure, you can also do this with Infrastructure as a Service (IaaS) such as Amazon EC2 or OpenStack — if you want to manage the details of your operating system, then that is probably the better solution for you. However, PaaS gives you the efficiency, and the convenience of having the platform manage things you don’t want to care about.

Polyglot Playground

One final way developers win with PaaS is that it opens up a polyglot playground. Most PaaS solutions support a variety of programming languages and other technologies, and OpenShift is no exception. There is Red Hat-backed support for Java, PHP, Node.js, Python, Ruby and Perl, as well as PostgreSQL, MySQL and MongoDB, but the fun doesn’t stop there. The open source ecosystem around OpenShift is thriving and there have been cartridges (technology components), such as Redis and Vert.x, and QuickStarts (ready-to-go apps), such as WordPress and Django, built for myriad technologies. If it can run on Red Hat Enterprise Linux, which powers OpenShift, then it can likely run on the platform.

This array of choices makes it easy, cheap and low risk to try out new technologies. There is no need to yak shave or bribe your sys admin for a VM. You can experiment all you like, which is one of the best parts of being a developer.

Conclusion

Platform as a Service has a lot to offer for software developers. It can abstract away the configuration details of your operating system, application server, programming language runtime, database and other technologies so you can focus on what you really care about — code. It is fast, convenient, efficient, auto-scaling and opens up new tech stacks for you to explore.

You don’t have to take my word for it — OpenShift has a hosted version of the open-source PaaS that you can try out with three gears for free. To find out more about OpenShift, and get started quickly, visit OpenShift.com and download our new book Getting Started with OpenShift: A Guide for Impatient Beginners.

tags: , , , , , , , , , , , ,