OpenShift is a Platform as a Service (PaaS) offering with a layered architecture that includes Docker Cluster and Kubernetes. The latest version of OpenShift V3 (OpenShift 3.10) supports a complete containerised environment.
OpenShift is mainly built on top of Kubernetes and Docker so that container images are supported at the grass root level. Being built on top of Docker helps in the creation of lightweight LXC based containers or container images, and Kubernetes helps in tasks such as orchestration and the management of containers on top of multiple hosts. The traditional monolithic kind of architecture is now broken down into a beautiful microservices-container based architecture. This avoids SPOF (‘single point of failure’ kind of scenarios), apart from helping in isolating and fixing problems easily.
Figure 1 shows how each sub-component is connected together and works towards microservices and the PaaS services of OpenShift.
OpenShift comes in various flavours such as OpenShift Origin, Red Hat OpenShift Online, OpenShift Dedicated, OpenShift Container Platform or OpenShift.io.
OpenShift Origin is a computer software product from Red Hat for container based software deployment and management, and this brings Docker and Kubernetes together as explained earlier.
Advantages of OpenShift
Listed below are some of the advantages of OpenShift:
- Ships faster with shorter application development cycles
- Can be deployed anywhere (on your own data centre, on bare metal and migrated to applications)
- Management of container images is easy (using Kubernetes)
- Allows you to write code, build, run and scale applications at all levels
Red Hat OpenShift Online
Using this, one can quickly build, deploy and scale in the public cloud or on premise. It offers the following:
- On-demand access to OpenShift to manage containerised applications
- Delivered as a hosted service and supported by Red Hat
- One can deploy up to four services for free
Red Hat OpenShift Dedicated
This is professionally managed enterprise-grade Kubernetes. It offers the following features:
- Private, high-availability OpenShift clusters hosted on Amazon Web Services or Google Cloud Platform
- It is delivered as a hosted service and supported by Red Hat
RedHat OpenShift container platform
This is a secure Kubernetes platform for one’s own infrastructure. What it offers is the capability to:
- Build, deploy and manage one’s container based applications consistently across the cloud and on-premise infrastructure
Configuring and installing OpenShift
OpenShift supports many types of configuration and installation methods:
- All-in-one mode (for development purposes only)
- Single master, multiple nodes
- Multiple master and multiple nodes (for production environments)
The deployment can be done on target environments on-premise (on the data centre) or on the cloud by using either of the following methods:
- Traditional methods like using the RPM package
- Using containerised technologies like Docker
Among these options, the all-in-one mode using Minishift is quite popular among those in the user/developer community.
Note: Minishift is a bundle of Kubernetes, etcd and OpenShift, packaged into an ISO image for ease of installation and configuration.
The latest version of Minishift for the respective platform can be downloaded from the GitHub website, https://github.com/minishift/minishift/releases. The screenshot in Figure 2 shows how to configure Minishift on Windows 10 using the VirtualBox environment. Note: Make sure you have Hyper-V support on the latest Windows OS.
OpenShift is one of the popular technologies that provide a common platform for enterprise units to host their applications on the cloud (without the worries about the underlying operating system or platform).This makes it very easy to use, develop and deploy applications on the cloud. A key feature is that it provides managed hardware and network resources for all kinds of development and testing. With OpenShift, PaaS developers have the freedom to design their required environment with specifications of choice (Python, Ruby or any other supported programming language and preferred database, like MongoDB).
OpenShift provides different kinds of service level agreements (SLAs) with various service plans. These are listed below.
Free: This plan is limited to three gears with 1GB space for each.
Bronze: This plan includes three gears and expands up to 16 gears with 1GB space per gear.
Silver: This is like the 16-gear Bronze plan; however, it has a storage capacity of 6GB with no additional cost. Note: These SLAs vary from time to time, based on the different offerings.
OpenShift also offers an on-premise version known as OpenShift Enterprise. In OpenShift, developers have the leverage to design scalable and non-scalable applications, and these designs are implemented using HAproxy servers.
There are multiple features supported by OpenShift. A few of them are:
- Support for multiple languages and databases
- Source code version management
- One-click deployment and multi-environment support
- Standardised developers’ workflow
- Automatic application scaling and responsive Web console
- Supports a rich command line toolset
- Allows remote SSH login to applications
- Has a self-service on-demand application stack
- Continuous integration and release management
- Remote debugging of applications
The various components used in OpenShift
Etcd: This is one of the key components of OpenShift (of Kubernetes, actually) that stores the configuration information, and can be used by each of the nodes in the cluster. This is an HA enabled key-value store and accessible to everyone.
API server: Kubernetes is an API server, which provides all the operations on the cluster using the API. The API server implements an interface, which means that different tools and libraries can communicate with it readily.
Scheduler: This is a key component of the Kubernetes master. It is a service in master, which is responsible for distributing the workload and also for tracking the working load on cluster nodes—placing the workload on resources that are available and accepting it.
Kubelet service: This is a small service in each node, which is responsible for relaying information to and from the control plane service.
Kubernetes proxy service: This is a proxy service that runs on each node and helps in making the services available to the external host.
Image: Kubernetes (Docker) images are the key building blocks of containerised infrastructure.
Project: This can be defined as the renamed version of the domain which was present in the earlier version of OpenShift V2.
Node: A node is a working machine in a Kubernetes cluster, which is also known as a minion for the master.
Pod: A pod is a collection of containers and is used as storage inside a node of a Kubernetes cluster.
The author is a senior architect and has 17+ years of experience in the IT industry. He also has expertise in Docker, virtualisation, cloud computing, AI, ML and OpenStack. He can be contacted at firstname.lastname@example.org.