OpenShift: The Fast and Friendly Platform-as-a-Service
OpenShift is a next-generation container based, secure and scalable platform for rapid application development. Let’s first understand the way it works, and then use it to build a simple application.
OpenShift is a Platform-as-a-Service by Red Hat, which provides a quicker way to develop, deploy, monitor and scale applications in a secure and on-demand cloud. OpenShift has been built with only one goal, which is “To quickly build an application and make your clients happy.” By using OpenShift, developers can focus on the core logic of an application rather than configuring and maintaining it.
OpenShift became famous after v2.0. Currently, it runs on v3.0, which is the next-gen PaaS that uses Docker containers and Kubernetes. In the next section, we will look more closely at all these terms. OpenShift v3.0 is different from OpenShift v2.0, so we will not go deep into v2.0 but focus more on v3.0.
Let’s study some of the basic terms before trying to understand the OpenShift stack.
Virtual machines vs containers: Virtual machines contain all the binaries, libraries and application code along with the guest OS, which will be in GBs.
Containers contain the application and related dependencies. They share the same kernel with other containers, and every container runs as an isolated process in user space on the host OS.
By comparing virtual machines and containers, we can get more clarity on how containers differ from virtual machines.
Docker: A Docker container is a piece of code in a file system which contains everything needed to run it, such as libraries, application code and system tools. Basically, it provides everything that can be installed on a server. The advantage of using Docker containers is that they can run anywhere, in any cloud, and with any infrastructure.
Kubernetes: This is a tool/system that is used for automating containerised applications, and its functions include deployment, scaling, load balancing and management.
OpenShift stack
Figure 1 demonstrates the new OpenShift stack for v3.0. OpenShift v3 is built on RHEL 7, which has more capabilities compared to RHEL 6. Also, it is a part of the Atomic project, which was launched to enhance
Linux host capabilities and optimised container based application environments.
Red Hat is contributing to a project called libcontainer, which provides standard APIs for defining containers like network interfaces, namespaces, cGroups, etc. So OpenShift uses Docker libcontainer, which is lightweight and provides isolation through OpenShift gear, which is the main focus of developers. OpenShift v3 cartridge enables customers to leverage any application component packaged as a Docker image, which also enables users to share and access container images globally (in the market place). xPaaS services in OpenShift provide capabilities like JBOSS portfolio, SQL or NoSQL databases, cache, log managements, monitoring tools, message brokers and many more functionalities.