Here I'll explain you some basic concepts related to containers and docker.
If you look at the above diagram. you will get the basic understanding about the infrastructure requirements for Virtual machine setups. Don't get it ? Let me explain you.
Virtual Machines: As per the above diagram it shows where each virtual machine has its own guest operating system which runs on top of the hosting infrastructure operating system. Hypervisor is the software used for creating virtual machines. Extra operating system per VM setup is obviously requires more space and load on Infrastructure. VM provides the hardware level process isolation where each applications run independently on virtual machines.
Container: Containers provide a lightweight and isolated runtime environment that encapsulates all the necessary components and dependencies required to run the applications. They uses host Operating system and does not need a separate OS. Containers provide OS level process isolation to runs the application independently.
With containerization, Sitecore 10 allows you to package the entire application, including the Sitecore CMS, databases, and any custom code or modules, into a single container image.
Sitecore 10 provides official Docker images for different components, such as the Sitecore Experience Platform (XP), Sitecore Experience Database (xDB), Sitecore Identity Server, and others. These images can be customized and extended to meet specific requirements.
Benefits of containerization:
lightweight - They are compact in size and only include required dependancies. Like veirtual mchianes containers do not have their own operating system and uses less resources then virtual machines.
portable - Containers bundle all dependancies and runtime, which need to run your application within any environment. With containerization you can develop your application in dev environment and then move it to on-promise or cloud environment.
scalable - Containers are lightweight and easy to maintain using containers orchastrator. you can create containers based on the existing images with ease. because of compact in size. you can create new containers and scale environment easily.
Security - Isolation introduced by containers also provides an additional layer of security. Using that isolation process application runs in thier own self-contained environment. Which means, even if one containers security is compromised. It does not effact other containers within same host.
Developer's Freindly - container's are devlopers freindly becuase applications built using containerization approach runs same on everywhere you host the application. It reduces the chances where your applications works well in one environment but not in other environment. Using CI/CD pipeline you can automate the containers build process. which lets your developers to more focused on delivering the new features and responding to customer needs.
Ease of management - Using a container orchestration platform like kubernet, you can automate the installation, management, and scaling of containerized workloads and services. You can ease management tasks through container orchestration like rolling out new app versions, scaling containerized apps or providing monitoring, logging and debugging functions.
Here's the comparison between VM's and Container's
|
|
Virtual Machine
|
Docker Container
|
|
Isolation
|
Hardware-level process isolation
|
OS level process isolation
|
|
Runs on
|
Each VM has a separate OS
|
Each container can share OS
|
|
Boot-Time
|
Boots in minutes
|
Boots in seconds
|
|
Space requirement
|
VMs are of few GBs
|
Containers are lightweight (KBs/MBs)
|
|
Moving
|
VMs can move to new host easily
|
Containers are destroyed and re-created rather than moving
|
|
Creation
|
Creating VM takes a relatively longer time
|
Containers can be created in seconds
|
|
Usage
|
As VM's has its own OS on top of guest OS. They need more resource usage
|
By sharing the common OS container's need less resource usage
|
Docker: Docker is the open-source software, which is used to run software development, software testing, software deployment etc. on containers in an isolated, lightweight, and virtualized environment.
There are few more terms related to Containers you'll be interested to know.
Docker Image: Its a standalone and executable software package. which comes with code, runtime dependencies, libraries and databases all packaged together. so It can freely run anywhere without any dependency. It also serves as the base for containers.
Docker File: Its a text file which contains instructions to build a docker image. This file is used by Docker CLI build command to create the images.
Orchestrator: Its a platform for containerized applications. which help us to manage and scale the applications. It also provides the features like load balancing, automatic scaling and service discovery.
Container Engine: The container engine provides the runtime to execute and mange containers. It provides the necessary infrastructure to build run and mange containers.
Let me know your feedbacks.
Hope you enjoyed it !! 😊
Comments
Post a Comment