OpenShift offers a vibrant Platform as a Service (PaaS) facility, which enables developers to focus more on the core logic of the application rather than the platform and configuration details of the dependencies. The support for a wide spectrum of programming languages, databases, etc, has made OpenShift a prime choice in the PaaS arena.
Cloud computing has truly transformed the working style of not only the IT industry but also of most online users. For example, today cloud storage has become indispensable for many of us. PaaS facilitates application developers to focus on the core logic; all other platform and environment related issues are handled by the service providers. PaaS is focused on software developers.
Welcome to the world of PaaS
The world of PaaS is loaded with various choices. The selection of a specific PaaS tool depends on various parameters like support for various programming languages, databases, etc. Some of the PaaS options are listed below:
- Engine Yard
- Google App Engine
Though each one of the above mentioned PaaS tools has its own advantages, OpenShift is a multiple award winner. For the complete list of awards it has won, visit https://www.openshift.com/awards. These awards, along with its support for various technologies, make OpenShift a very valued member of the PaaS world.
OpenShift is available in three different modes as illustrated in Figure 1.
- OpenShift Online: This is the online version of OpenShift. It is Red Hats public cloud application development and hosting platform.
- OpenShift Enterprise: This is a private PaaS. It allows enterprises to develop applications in a quick and efficient manner.
- OpenShift Origin: This is a community PaaS. Its open source nature allows modifications as per the needs of an enterprise.
OpenShift Origin is the upstream project for the OpenShift Online and OpenShift Enterprise versions.
Evolution of OpenShift
The evolution of OpenShift is illustrated in Figure 2.
- May 2011: The initial release of OpenShift PaaS was made at a developer preview at OpenShift.com.
- November 2012: OpenShift Enterprise version 1.0 was released.
- June 2013: OpenShift Online was released. The fully supported public version of the PaaS was released.
- August 2014: OpenShift 3 was announced, which was based on Docker and Kubernetes.
- The official home page of OpenShift indicates the scheduled release of Origin M5 in 2015.
Setting up OpenShift
OpenShift can be tried in various modes, as listed below:
- The online version of OpenShift doesnt require any setting up. You should sign up for the service at https://www.openshift.com/app/account/new. Once the account is created, you can enter into the online interface to build your first application.
- OpenShift Origin can be installed locally in a system. To do this, a prebuilt image should be downloaded from https://mirror.openshift.com/pub/origin-server/release/4/images/openshift-origin.tgz. The image can be tried with VirtualBox or VMware. There is an alternate method of installation using Puppet, the detailed configuration guide for which is at http://docs.openshift.org/origin-m4/oo_deployment_guide_puppet.html.
- If you prefer to install OpenShift Origin in your network, the instructions at https://mirror.openshift.com/pub/origin-server/release/4/images/openshift-origin.tgz should be followed. The command used is:
(For the Origin version)
sh <(curl -s https://install.openshift.com/)
(For the Enterprise version)
sh <(curl -s https://install.openshift.com/ose)
The various parameter settings for the above installation are clearly given in the official documentation.
OpenShift Origin: The technologies
One of the important advantages of using OpenShift Origin is its ability to support a wider spectrum of technologies covering various programming languages, databases, etc. Some of these are listed below:
- Java (support for JBoss: Enterprise Application Server, Application Server and Enterprise Web Server)
With respect to databases, the following are supported:
Apart from the above, OpenShift Origin has support for continuous integration with Jenkins Server and Jenkins Client. Cron, which enables us to run command line programs at regular intervals, is also supported.
To become familiar with OpenShift, you need to understand the terminology associated with it. Lets look at a few important terms associated with OpenShift.
Gears: The server containers along with their associated resources are called gears. They enable you to run your applications. There are three types of gears, as listed below:
- Small gears, which have 512MB of RAM
- Medium gears have 1GB of RAM
- Large gears have 2GB of RAM
The disk space provided with all these gears is 1GB in the default mode.
Cartridges: To make the gears usable for specific purposes, OpenShift requires you to add the components. These pluggable entities are known as cartridges. Each gear can have a number of cartridges. At the same time, a single cartridge can run on more than one gear. Cartridges are of two types as shown in Figure 3.
Standalone cartridges: These are for programming languages or application servers.
Embedded cartridges: This type of cartridge is used to enhance the applications. These cartridges alone cant be used to build applications.
The OpenShift stack
The recent release of OpenShift has an improved stack as shown in Figure 4. This stack now includes Docker, Kubernetes and Project Atomic.
Docker: This is an open source tool. Docker packages the applications and the related dependencies as containers. It consists of an engine, and a lightweight runtime and packaging tool. For further information on Docker, visit https://www.docker.com/whatisdocker/. Stating it simply, Docker facilitates the creation of portable, self-sufficient application containers.
Kubernetes: This is an open source orchestration system. It can be used with Docker containers. Kubernetes is lightweight, portable and extensible. For detailed information on Kubernetes, visit http://kubernetes.io/. A cluster of Linux containers can be managed as a single system using Kubernetes.
Project Atomic: This is for deploying and managing Docker containers. Project Atomic is getting more popular in recent times due to its powerful features. Further information on Project Atomic is available at http://www.projectatomic.io/.
Covering every aspect of OpenShift is beyond the scope of a single article. For developers who want to get into the details of OpenShift, there is an excellent open book available at the official site: Getting Started with OpenShift: A Guide for Impatient Beginners. The book can be downloaded from https://www.openshift.com/promotions/ebook/thanks.
The open source nature of OpenShift Origin is its greatest advantage, allowing users to customise the PaaS according to the specific needs of an organisation. Its improved stack containing technologies make OpenShift a superb choice in the PaaS arena.