OpenShift Setup Options

Objective of this article is to make you understand what are different ways there to setup OpenShift. Prior to that we need to understand what different options are available to configure OpenShift. In the current article explained about All in One setup and other are not explaining because of no environment support.

  1. All in one is a kind of development environment setup where we can install Master and child nodes in a single machine. This is not supported or suggested for Production environment.
  2. Single Master & multiple Nodes: There is only one Master setup which needs to serve multiple child nodes across different clusters. Suggested to use higher to develop and below production environment.
  3. Multiple Master & multiple Nodes: There are multiple nodes configured to serve multiple child nodes across different clusters. This is highly recommended to use in Production environment.
Types of OpenShift Setups

OpenShift can be installed on Premises or hosted on Public / Private cloud. There are 2 different ways exists to setup OpenShift.

  1. Package Manager (RPM)
  2. Containerized (Docker)

Note: Containerized tools are recommended to use than RPM because RPM is traditional way of setting up OpenShift.

All – in – One:

As explained in OpenShift architecture, OpenShift uses Kubernetes as underlying environment and etcd is the heart of the OpenShift and OpenShift components all together are packed into single image name called MiniShift. MiniShift provides the single node open cluster so setup & getting started with OpenShift is easy. MiniShift complete bundle packaged into ISO image and is available to download from online through MiniShift CLI command.

Minishift all in one

Once the MiniShift command issued, it will download OpenShift the image of openshift/origin from Docker Hub to deploy the Core components. This image will download further required images from docker hub such as Docker Registry, Router, Web Console.

Note: As of now I don’t have the supported environment to practice about other two types like Single master with multiple child nodes and Multiple masters and multi child node configuration.

Kindly go through the below link and setup the oracle virtual box prior to proceeding further articles.

Note: Just setup the virtual box and make it up and running, no need to download any images and run them. Minishift will automatically pulls the image and start while we issue start command. For further understanding of minishift setup with virtual box, use below link.

OpenShift Architecture

Objective of this article to share high level architecture of Red Hat OpenShift. OpenShift uses Kubernetes as basic infrastructure which is Kubernetes built on top of the Docker.

This is to recollect about Kubernetes and how we use to manage applications. As we already learn in previous articles that any application can be deployed in Kubernetes as Docker Containers. In general, Containers are created on top of the Docker images. Docker images comes from different sources depending on our configuration like cloud, docker registry (Docker hub), repository or etc. Services are used to expose the applications other services or external world in Kubernetes.

OpenShift comes with web console which can be accessible by developers to browse and manage applications. OpenShift web console can be accessed only users who are authorized with OpenShift authentication. OpenShift also comes with built-in integration to manage source code. The source code repository has integrated to built-in CI/CD integration to build docker images and deploy into docker registry.

The etcd (“/etc distributed”) is the heart of the OpenShift to store various containers information in Key-Value pairs. As shown in the above image, the content which is present right side of etcd is specific to Kubernetes where the left side information points few among the many add-ons in OpenShift.

What is etcd?

Etcd stands for “/etc distributed”. It is meant to be a highly reliable configuration mechanism that provides a uniform view across a cluster of machines.

What is Master Node?

Master Node Architecture

As shown in the above image, Kubernetes Clusters are configured with multiple nodes where multiple Docker Images are hosted. These nodes are managed by one or more master nodes who hosts the API data server. For example, etcd data server and Schedulers.

Architectural differences:

Red Hat provides, and periodically updates, a comprehensive Reference Architecture document specific to deploying Red Hat OpenShift Container Platform on the most popular Cloud Infrastructure Providers:

  • Red Hat OpenStack Platform
  • Amazon Web Services (AWS)
  • Microsoft Azure public cloud
  • Google Cloud Platform (GCP)
  • VMware vSphere
  • Red Hat Virtualization (RHV)

Link to discover more on your own. https://blog.openshift.com/openshift-container-platform-reference-architecture-implementation-guides/

Introduction to Container Orchestration technology (K8s)

Kubernetes (K8s)

Kubernetes also known as K8s was developed by Google based on maintaining their application container in production. Kubernetes is now opensource and one of the best container orchestration technology. We need to understand about the Container and Orchestration to understand about Kubernetes.

Container + Orchestration = Kubernetes

What is Container?

A Container is a standard unit of software packages up code and all its dependencies, so the application runs quickly and reliably from one computing environment to another. Docker is the container based, industry best software. Docker container is lightweight, standalone, executable package of software that includes everything needed to run an application such as code, runtime, system tools, system libraries and settings.

Docker Containerized Applications

Container images become containers at runtime and in the case of Docker containers, image become container when they run on Docker Engine. Docker container that runs on Docker Engine,

  1. Standard: Docker created the industry standards for Containers, so they could be portable anywhere.
  2. Lightweight: Containers share the machine OS system kernel, so does not require OS per application.
  3. Secure: Docker provides the strongest default isolation capabilities in the industry and applications are safer in containers.

What is Docker Engine?

Docker Engine is the industry’s actual container runtime that runs on various Linux and Windows Server Operating system. Docker engine enables containerized applications to run anywhere consistently on any infrastructure. This reduces the dependency hell for developer and operation teams.

Docker Engine

Why do we need Docker Containers?

As shown in the below diagram, there could be the dependencies between applications and its underlying software which is using to run. There could be many chances of raising problems with infrastructural and dependencies issues.

Dependency without Docker support

That’s where docker helps us to containerize each and every application into individual containers. Each individual container contains its dependent code, dependencies, system configurations, etc. So, they run any where.

Dependency with Docker support

If you observed the difference between above two images, image without Docker shown the common library and dependencies which is shared across multiple applications. Image with Docker will clearly shows that each individual docker container contains it’s libraries and Dependencies. So, with docker there is not chance of getting the problems related to libraries and dependencies and there is no chance of saying it works in my machine.

What is Container Orchestration?

Automatically managing and scaling (increasing or decreasing) container instances dynamically based on the load is called as Container Orchestration.

Container Orchestration Overview Diagram

Container Orchestration Technologies:

Kubernetes is one of the most popular Docker Container Orchestration technologies.

  1. Docker Swarm is from Docker and its easy to setup and start but not up to the mark to support large scale applications.
  2. Kubernetes is from Google and it is bit difficult to setup but supports lot of options to customize and support deployments. Kubernetes project is one of the top ranked project in GitHub.
  3. MESOS is from Apache and is bit difficult to setup but supports many advanced features.
Container Orchestration Technologies