logo
cd ..

containerization and virtualisation

Comments
4 min

containerization and virtualisation

Intro to virtualization & containerization with Docker & Kubernetes: key concepts, benefits, tools, and use cases for modern IT infrastructure.

containerization and virtualisation

Chapter 1

introduction to virtualisation

in the world of tech servers plays the biggest work.

the computer system consits of hardware and software.

we have limitations of physical machines : flexibility, cost .

virtual machines (VM): a simulated computer systme with in another computer, multipe an run on the same machine.

advantages: resource optimization, scalability, isolation and security, platform independence.

thus virtualization is creating a virtual version of a computer resource, and there is two types of it:

full virtualisation which is virtualising the entire computer system which result in VMs

and virtualising a specific component of the computer like the operating system or the storage.(here is where containers come in)

(any technology should be evaluated bfore testing it out, we dont adopt new technlologies by FOMO the fear of missing out)

introduction to containerization

environments in computing is the system that surround an IT application, os hardware and software.

0S_level virtualisation (containerization) is virtualising the operating system, not the hardware and the kernel, virtualised the isolated user spaces (containers).

so it is packaging an application with all what it needs into a container with its own enviremnemt managed by os kernel.

containers offers to the IT application the environment to run, the source code the settings, dependencies and configs.

characteristics: running multiple applications on a single host where each application in its container.

benfits: isolation between application, protability and reproducability, fast start-up times.

containerization and virtualisation

  • software tools for containerizatin :

management : docker

orchestration(coordinating) : kubernetees

  • software for virtualization :

VM

  • use cases of virtualization :

sever consolidation

legacy application

  • use cases of containerization :

microserveice architecture

container orchestration

Chapter 2

containerization with docker

docker is the to-go contaierization tool, open source and large user base, one of the most used and popular.

it has the : building, distributing and running cycles.

docker components:

  • docker desktop(GUI), for managing the containers and the images, there is also a CLI.
  • docker file → buil = docker image (blue print) → run = docker container. (all managed in the docker servers)
  • sharing images in the docker registry called docker hub or other registeries

container orchestration

it is the automated managmenet of multiple components.

the tool used is called orchestrator.

the purpose is managing a large number of cotainers, workingn well efficiently.

declarative programming in container orchestration is defining the desired output instead of describing the steps to reach it.

benifits: (for large applications)

  • easy scaling of containers (traffics in a web app for exmple), adding and removing containers, decreasing computer resources of a specific containers.
  • automation of operations, savnig time and cost
  • better performance of applications

yet it has many benifits but there is some challenging complexity with in the tools.

application of container orchestration:

  • application scaling
  • microservices architetcure
  • automation of piplines

tools

  • swarm mode(docker), kubernetes, nomad and openshift

container orchestration with kubernetes (k8s)

developed by google, and maintanted now by the cloud native computing foudnation

it groups containers into logical units.

operates as a distributed system, its different components are spread into various machines, virtual or physical.

kubernetes architecture component:

  • pods are smallest deployable units(groups containers), serves as the host
  • nodes as smallest hardware unit groupes pods, pods can change location from a node to a node by the control pannnel
  • grouping nodes in a cluster (super machine)

kubernetes is used when dealing with many containers

reading docker files and running containers

docker instructions detail how to build a docker image.

docker commands are commands via CLI sent to the docker daemon to manage docker objects.

format of a dockerfile:

  • a comment starts with #.
  • followed by the instruction, starts by the command in uppercase and followed by the arguments.
  • executed in the order.
  • usually the start with a comment, metadata, FROM instruction and argments.

instruction examples

  • FROM specifies an existing docker image, defines the image we are builing on
  • COPY copies files or folders from source to destination
  • RUN runs a command within a container
  • ENTRYPOINT defines the containers default behaviour, commands to run at initiation, the primary purpose of the container

command exampels

  • Docker build command builds images from a dockerfile, (ie: dockerfile needs to be located in build’s context)
  • Docker run creates and run a docker container from a docker image

Comments

Support

Do you feel like supporting my work? 🙂Buymeacoffee button