Getting started with OpenShift 4.2
Things learnt on Day-1 of Red Hat OpenShift (DO-280) instructor led training by Vimal Daga.
Scenario: In today's container world, where we have started using Docker and Kubernetes to create and orchestrate the containers, we still require an additional tool which could monitor these containers and make sure the resources like RAM, CPU and the Network bandwidth are utilized effectively. At times, when the number of clients hitting the web servers increase if we have such metrics in place then it would be easier to manage.
Dawn of OpenShift
Getting the metrics and managing the resources using an additional tool will have challenges like learning the new tool, configuring it to existing server, licensing it, etc...
OpenShift - The One Stop Solution
OpenShift is a product developed by RedHat which includes features like,
- Launching containers
- Collecting metrics
- Monitoring the network resources
- Generate graphs and export them to pdf format etc..
- Security
- High Availability
How does OpenShift achieve this..?
OpenShift uses an abstraction layer on top of tools (which create containers) like docker or Podman. By doing this the need for learning the underlying technology of containers gets disconnected and going forward, even if there is a new technology to create containers, we can still continue to use the programs built on top of this abstraction layer.
OpenShift has many features which make it eligible to include in DevOps tool set. But does OpenShift fit in DevOps Infinity Loop..?
Diagram here of classical devops tool.
OpenShift has the capability to download the code , build, test and deploy and monitor. Its features make it good fit in the classical Devops Infinity Loop.
OpenShift or Jenkins...????
OpenShift is more powerful and works seamlessly with the containers with its internal support of container engine. In addition to this OpenShift give the CI-CD support.
Jenkins on other hand does not have the facility to handle the containers or docker and cant extract the inbuilt matrix.
Journey from Docker to Podman
When containers are created using docker they internally use a service or a program called Runc which is created by the kernel developers. Using command docker ps we can get these details.
If due to some reason Docker service gets interrupted, then all the running containers created using these docker service crash immediately which is not ideal in enterprise systems.
One more way to access the Runc without using any service ( technically service less or deamon less) is the Podman. Podman is the program which can access the Runc without a service.
As podman directly interacts with Runc directly and there is no service in between, it is faster and more secure than docker.
Even if the Podman program gets interrupted, the containers will continue to run as there is no dependency of Podman with containers thus eliminating the Single point of failure SPOF in docker.
Installation of Podman
Two ways to install podman.
way-1: Connect to your Linux OS and run below command in terminal.
yum install podman
way-2:
yum module install container-tools
Podman commands are very similar to docker commands
podman ps
To pull images from docker hub command for podman is
podman pull mysql