How ‘RedHat OpenShift’ added more values and features to Containerization

Kratarth Paliwal
13 min readMar 2, 2021

--

Era of Containerization

According to a recent study by 451 Research, the adoption of application containers will grow by 40% annually through 2020. Containers are facilitating rapid and agile development like never before. But questions still persist on container basics, namely:

  • How do they differ from virtual machines?
  • If containers are, by their nature, transitory and disposable, how can you use them alongside persistent storage?
  • How do they complement existing virtualization and orchestration solutions?

What Are Virtual Machines (VMs)?

Historically, as server processing power and capacity increased, bare metal applications weren’t able to exploit the new abundance in resources. Thus, VMs were born, designed by running software on top of physical servers to emulate a particular hardware system. A hypervisor, or a virtual machine monitor, is software, firmware, or hardware that creates and runs VMs. It’s what sits between the hardware and the virtual machine and is necessary to virtualize the server.

Within each virtual machine runs a unique guest operating system. VMs with different operating systems can run on the same physical server — a UNIX VM can sit alongside a Linux VM, and so on. Each VM has its own binaries, libraries, and applications that it services, and the VM may be many gigabytes in size.

VMs vs Containers

Server virtualization provided a variety of benefits, one of the biggest being the ability to consolidate applications onto a single system. Gone were the days of a single application running on a single server. Virtualization ushered in cost savings through reduced footprint, faster server provisioning, and improved disaster recovery (DR), because the DR site hardware no longer had to mirror the primary data center.

Development also benefited from this physical consolidation because greater utilization on larger, faster servers freed up subsequently unused servers to be repurposed for QA, development, or lab gear.

But this approach has had its drawbacks. Each VM includes a separate operating system image, which adds overhead in memory and storage footprint. As it turns out, this issue adds complexity to all stages of a software development lifecycle — from development and test to production and disaster recovery. This approach also severely limits the portability of applications between public clouds, private clouds, and traditional data centers.

In more practical terms, imagine you have 3 physical servers with individual dedicated purposes. One is a mail server, another is a web server, and the last one runs internal legacy applications. Each server is being used at about 30% capacity — just a fraction of their running potential. But since the legacy apps remain important to your internal operations, you have to keep them and the third server that hosts them, right?

Traditionally, yes. It was often easier and more reliable to run individual tasks on individual servers: 1 server, 1 operating system, 1 task. It wasn’t easy to give 1 server multiple brains. But with virtualization, you can split the mail server into 2 unique ones that can handle independent tasks so the legacy apps can be migrated. It’s the same hardware, you’re just using more of it more efficiently.

Keeping security in mind, you could split the first server again so it could handle another task — increasing its use from 30%, to 60%, to 90%. Once you do that, the now empty servers could be reused for other tasks or retired altogether to reduce cooling and maintenance costs.

What Are Containers?

Operating system (OS) virtualization has grown in popularity over the last decade to enable software to run predictably and well when moved from one server environment to another. But containers provide a way to run these isolated systems on a single server or host OS.

Containers sit on top of a physical server and its host OS — for example, Linux or Windows. Each container shares the host OS kernel and, usually, the binaries and libraries, too. Shared components are read-only. Containers are thus exceptionally “light” — they are only megabytes in size and take just seconds to start, versus gigabytes and minutes for a VM.

Containers also reduce management overhead. Because they share a common operating system, only a single operating system needs care and feeding for bug fixes, patches, and so on. This concept is similar to what we experience with hypervisor hosts: fewer management points but slightly higher fault domain. In short, containers are lighter weight and more portable than VMs.

Containerization is the process of packaging an application along with its required libraries, frameworks, and configuration files together so that it can be run in various computing environments efficiently. In simpler terms, containerization is the encapsulation of an application and its required environment.

It has lately been gaining lots of traction as it overcomes the challenges that stem from running virtual machines. A virtual machine emulates an entire operating system inside the host operating system and requires a fixed percentage of hardware allocation that goes into running all the processes of an operating system. And this, therefore, leads to unnecessary wastage of computing resources due to large overhead.

Also, setting up a virtual machine takes time, and so does the process of setting up a particular application in each and every virtual machine. This results in a significant amount of time and effort being taken up in just setting up the environment. Containerization, popularized by the open-source project ‘Docker’, circumvents these problems and provides increased portability by packaging all the required dependencies in a portable image file along with the software.

Let us dive deeper into containerization, its benefits, how it works, ways of choosing the tool for containerization and how it trumps the usage of virtual machines (VMs).

CONTAINERIZATION — IMPLEMENTING DEVOPS

Let’s find out why containers are slowly becoming an integral part of the standard DevOps architecture.

Docker has popularized the concept of containerization. Applications in Docker containers have the capability of being able to run on multiple operating systems and cloud environments such as Amazon ECS and many more. Hence, there is no technology or vendor lock-in.

Let us understand the need for implementing DevOps with containerization.

Initially, software development, testing, deployment, and the supervising required were undertaken one after another in phases, where completion of one phase would lead to the beginning of another.

DevOps and Docker image management technologies, like AWS ECR, have made it easy for software developers to perform IT operations, share software, and collaborate with each other, and enhance productivity. Apart from encouraging developers to work together, they are successful in eliminating the conflict of different work environments that affected the application previously. To put it simply, containers, being dynamic in nature, allow IT professionals to build, test, and deploy pipelines without any complexities while, at the same time, bridging the gap between infrastructure and operating system distributions, which sums up the DevOps culture.

Software developers are benefited by containers in the following ways:

  • The environment of the container can be changed for better production deployment.
  • Quick startup and easy access to operating system resources.
  • Provides enough space for more than one application to fit in a machine, unlike traditional systems.
  • It provides agility to DevOps, which can help in switching between multiple frameworks easily.
  • Helps in running working processes more efficiently.

BENEFITS OF USING CONTAINERS

A number of companies are opting for containerization for the various number of benefits it entails. Here’s a list of advantages you will enjoy by using containerization technology:

1. DevOps-friendly

Containerization packages the application along with its environmental dependencies, which ensures that an application developed in one environment works in another. This helps developers and testers work collaboratively on the application, which is exactly what DevOps culture is all about.

2. Multiple Cloud Platform

Containers can be run on multiple cloud platforms like GCS, Amazon ECS (Elastic Container Service), Amazon DevOps Server.

3. Portable in Nature

Containers offer easy portability. A container image can be deployed to a new system easily, which can then be shared in the form of a file.

4. Faster Scalability

As environments are packaged into isolated containers, they can be scaled up faster, which is extremely helpful for a distributed application.

5. No Separate OS Needed

In the VM system, the bare-metal server has a different host OS from the VM. On the contrary, in containers, the Docker image can utilize the kernel of the host OS of the bare-metal physical server. Therefore, containers are comparatively more work-efficient than VMs.

6. Maximum Utilization of Resources

Containerization makes maximum utilization of computing resources like memory and CPU, and utilize far fewer resources than VMs.

7. Fast-Spinning of Apps

With the quick spinning of apps, the delivery takes place in less time, making the platform convenient for performing more development of systems. The machine does not need to restart to change resources.

With the help of automated scaling of containers, CPU usage and machine memory optimization can be done taking the current load into consideration. And unlike the scaling of Virtual Machines, the machine does not need to be restarted to modify the resource limit.

8. Simplified Security Updates

As containers provide process isolation, maintaining the security of applications becomes a lot more convenient to handle.

9. Value for Money

Containerization is advantageous in terms of supporting multiple containers on a singular infrastructure. So, despite investing in tools, CPU, memory, and storage, it is still a cost-effective solution for many enterprises.

A complete DevOps workflow, with containers implemented, can be advantageous for the software development team in the following ways:

  • Offers automation of tests in every little step to detect errors, so there are fewer chances of defects in the end product.
  • Faster and more convenient delivery of features and changes.
  • Nature of the software is more user-friendly than VM-based solutions.
  • Reliable and changeable environment.
  • Promotes collaboration and transparency among the team members.
  • Cost-efficient in nature.
  • Ensures proper utilization of resources and limits wastage.

What is RedHat OpenShift??

Red Hat OpenShift is a Kubernetes distribution focused on developer experience and application security that’s platform agnostic. OpenShift helps you develop and deploy applications to one or more hosts. These can be public facing web applications, or backend applications, including micro services or databases. Applications can be implemented in any programming language you choose. The only requirement is that the application can run within a container.

In terms of cloud service computing models, OpenShift implements the functionality of both a Platform as a Service (PaaS) and a Container as a Service (CaaS). Using OpenShift as a CaaS, you can bring a pre-existing container image built to the OpenShift Container Initiative (OCI) Image Specification (image-spec) and deploy it.

The PaaS capabilities of OpenShift build on top of the ability to deploy a container image, by providing a way for you to build in OpenShift your own container image direct from your application source code and have it deployed.

The application source code can include a Dockerfile with instructions to build a container image. Or, you can use a Source-to-Image (S2I) builder, which takes your application source code and converts it into a container image for you, without you needing to know how to write instructions for building a container image.

With its foundation in Kubernetes, OpenShift Container Platform incorporates the same technology that serves as the engine for massive telecommunications, streaming video, gaming, banking, and other applications. Its implementation in open Red Hat technologies lets you extend your containerized applications beyond a single cloud to on-premise and multi-cloud environments.

About Kubernetes

Although container images and the containers that run from them are the primary building blocks for modern application development, to run them at scale requires a reliable and flexible distribution system. Kubernetes is the defacto standard for orchestrating containers.

Kubernetes is an open source container orchestration engine for automating deployment, scaling, and management of containerized applications. The general concept of Kubernetes is fairly simple:

  • Start with one or more worker nodes to run the container workloads.
  • Manage the deployment of those workloads from one or more master nodes.
  • Wrap containers in a deployment unit called a pod. Using pods provides extra metadata with the container and offers the ability to group several containers in a single deployment entity.
  • Create special kinds of assets. For example, services are represented by a set of pods and a policy that defines how they are accessed. This policy allows containers to connect to the services that they need even if they do not have the specific IP addresses for the services. Replication controllers are another special asset that indicates how many pod replicas are required to run at a time. You can use this capability to automatically scale your application to adapt to its current demand.

In only a few years, Kubernetes has seen massive cloud and on-premise adoption. The open source development model allows many people to extend Kubernetes by implementing different technologies for components such as networking, storage, and authentication.

OpenShift Container Platform overview

OpenShift Container Platform provides enterprise-ready enhancements to Kubernetes, including the following enhancements:

  • Hybrid cloud deployments. You can deploy OpenShift Container Platform clusters to variety of public cloud platforms or in your data center.
  • Integrated Red Hat technology. Major components in OpenShift Container Platform come from Red Hat Enterprise Linux (RHEL) and related Red Hat technologies. OpenShift Container Platform benefits from the intense testing and certification initiatives for Red Hat’s enterprise quality software.
  • Open source development model. Development is completed in the open, and the source code is available from public software repositories. This open collaboration fosters rapid innovation and development.

Although Kubernetes excels at managing your applications, it does not specify or manage platform-level requirements or deployment processes. Powerful and flexible platform management tools and processes are important benefits that OpenShift Container Platform 4.7 offers. The following sections describe some unique features and benefits of OpenShift Container Platform.

Self-service, on-demand application stacks

Develop your apps with the language and tools you want. Red Hat OpenShift includes pre-created quick start application templates that allow you to build and deploy your favorite application languages, frameworks, and databases with one click — Java, Node.js, .NET, Ruby, Python, PHP and more.

Red Hat OpenShift 4 offers even more advantages for developers, including:

Docker container and runtime packaging

Built around a standardized container model powered by Red Hat application programming interfaces (APIs) for the Docker format, applications created on Red Hat OpenShift can easily run anywhere that supports Docker-formatted containers.

Code and push

Develop container-based applications in the cloud or locally using the Red Hat CodeReady Containers, or OpenShift command line tools to create a fully-functioning OpenShift instance on your local machine. Then, deploy your work to any OpenShift cluster.

Deploying to OpenShift is as easy as clicking a button or entering a git push command. OpenShift is designed to reduce or eliminate many of the systems administration headaches related to building and deploying containerized applications. OpenShift also allows you to fully control the deployment lifecycle.

Streamline the delivery process

Standardizing workflows, supporting multiple environments, enabling continuous integration, and managing builds — OpenShift gives you tools for the complete development lifecycle.

Kubernetes Vs. OpenShift

Both Kubernetes and OpenShift feature robust and scalable architecture that enables rapid and large-scale application development, deployment, and management. They both run on the Apache License 2.0. But that’s just about where the similarities end. Here are just a few of the many ways OpenShift and Kubernetes differ.

Deployment

Kubernetes offers more flexibility as an open-source framework and can be installed on almost any platform — like Microsoft Azure and AWS — as well as any Linux distribution, including Ubuntu and Debian. OpenShift, on the other hand, requires Red Hat’s proprietary Red Hat Enterprise Linux Atomic Host (RHELAH), Fedora, or CentOS. This narrows options for many businesses, especially if they’re not already using these platforms.

Security

OpenShift has stricter security policies. For instance, it is forbidden to run a container as root. It also offers a secure-by-default option to enhance security. Kubernetes doesn’t come with built-in authentication or authorization capabilities, so developers must create bearer tokens and other authentication procedures manually.

Support

Kubernetes has a large active community of developers who continuously collaborate on refining the platform. It also offers support for multiple frameworks and languages. OpenShift has a much smaller support community that is limited primarily to Red Hat developers.

Releases and Updates

Kubernetes has an average of four releases each year, while OpenShift trails with around three. Similarly, Kubernetes supports several concurrent and simultaneous updates, while OpenShift DeploymentConfig does not.

Networking

Kubernetes lacks a networking solution but lets users employ third-party network plug-ins. OpenShift, on the other hand, has its out-of-the-box networking solution called Open vSwitch, which comes with three native plug-ins.

Templates

Kubernetes offers Helm templates that are easy to use and provide a generous amount of flexibility. OpenShift templates are nowhere near as flexible or user-friendly.

Container Image Management

OpenShift lets developers use Image Streams to manage container images, while Kubernetes doesn’t offer container image management features.

Kubernetes Vs. OpenShift: The Verdict

Both Kubernetes and OpenShift are popular container management systems, and each has its unique features and benefits. While Kubernetes helps automate application deployment, scaling, and operations, OpenShift is the container platform that works with Kubernetes to help applications run more efficiently.

--

--

No responses yet