Showing posts with label virtualization. Show all posts
Showing posts with label virtualization. Show all posts

Container Optimized OS | Photon OS | Docker Engine Pre-Installed | How to Install and configure

 What is Container Optimized OS

A Container Optimized OS is a lightweight, minimalistic operating system designed specifically to run containerized applications efficiently. Any operating system which is pre-installed or equipped with Container Runtime Environment just like Docker is called Container optimized OS. Some Simple Examples are 

  • Photon-OS (You can Download)
  • Microsoft Windows 10 Pro and onwards
  • Google Container-Optimized OS (COS)
  • Bottlerocket (by AWS)

The only thing you need is to just turn on the feature of OS and you are good to go with that feature utilization. Just like you can turn on Docker in Microsoft Windows 10 through Programs and features and you can use. Similarly, Photon-OS is a flavored Linux owned by VMware which is already equipped with Docker runtime.

About Photon-OS

So lets talk about Photon OS which is actually the base-line for all VMware Appliances. Its a flavored Linux (Open Source and is named as project photon OS) owned by VMware and now is used in all the appliances used or offered by VMware Some I can mention down below 

  1. vCenter Server Appliance
  2. VMware Aria Family
  3. NSX
  4. VCF
  5. VMware Horizon
  6. Workspace Once Access (VMware Identity Manager)

VMware openly welcomes open-source contribution to this OS that you can see here

You can also mention some other appliances (in the comments below) which I forgot to mention. With the help of Photon-OS it lowered the cost of Licensing for VMware product line which was because of OS licenses 

Current version of Photon OS is now available as Photon OS 5. This open source minimalistic Linux OS from VMware is available to download and is used for Containerized Application, vSphere ESXi optimized VMs and Cloud native platform optimized Applications. You can access its documentation for Installation and Administration.

Benefits and Features

Photon OS v5 is now available to Download and having different capabilities. It is available for different environment like Google Cloud, AWS, Azure and vSphere. Some of the capabilities I am mentioning down here

  • It supports ARM64 for the linux ESX kernel Flavor most suiatable for vSphere 8 and NSX in combination to DPU (Data Processing Unit)
  • It allows Live Patching, which means if you update the OS with patches that directly affect Kernel and require to restart the OS then No need to restart the OS but Kernel updates can be done. (Ref: Github What's New in Photon-OS 5)
  • Administrators can seamlessly perform tasks like configuring multiple routes and addresses section, configuring Wire Guard and SRIOV.
Moreover, Photon-OS 5 is available for different environments and flavors depending on your needs and requirements
  • Linux – the generic kernel flavor  (Main OS Flavor)
  • Linux-ESX – linux kernel tuned for VMware Hypervisor and used by CRX and POD VMs 
  • Linux-secure – Security-hardened kernel for deployments on Edge  
  • Linux-rt – linux kernel tuned for Low latency uses cases and used by Telco VRAN appliances, including optimizations, stability enhancements, and Intel Sapphire Rapids CPU support.  

Microsoft Windows Environments 


Microsoft Windows versions those support Docker Desktop are as below which means you need to install docker just like any application feature available "Programs and Features"

  • Microsoft Windows 10 Professional
  • Microsoft Windows 11 Professional Or Enterprise Editions

Whereas "Home" and "Education" edition only support Linux containers not windows for more information you can visit here and can download manually "Docker for Desktop". 

Moreover, Microsoft Server Edition doesn't support Docker for Desktop such as

  • Microsoft Windows Server 2019
  • Microsoft Windows Server 2022

For more information on Docker for Desktop I have already written a lot and got some hands-on demonstration available at my YouTube Channel. Below is my blogpost you can directly access

Deploying Docker Runtime on top of Microsoft Windows OS or you can watch Demonstration 

Do join me and Subscribe here to have more useful information and do share your comments here. Your comments are valuable asset to me 


Installing Docker (Engine) | (CRT) | Container Run-Time | Docker Desktop

 To my dear Readers! Greetings!!

Now, we are in a position to understand containerization in a better way. Keeping this concept of containerization, lets start our first installation of container Engine. At first, you need to download docker desktop which is available online and can easily be downloaded. 

Basic Understanding (High-level overview)

At this point we shall download it for Windows 10. And, by the way there is a difference in Docker Engine and docker desktop. 

Docker desktop is a complete package (including Docker Engine, Docker CLI client, Docker Compose, Notary, Kubernetes, and Credential Helper) as you can see above in picture. 

You can download and install in your relevant OS environment (Mac / Windows). Its architecture is pretty straight forward and easily understandable. Docker Desktop for two different environments available. It is going to cater both kind of container apps (meant to) run on Linux or Microsoft Windows. It is available in two flavors 

1. Docker Desktop on Mac

2. Docker Desktop on Windows

Whereas, Docker Engine can be installed on Linux flavors like Centos, Debian, Fedora etc.

Before you Install Docker Desktop

  • Download docker desktop of your choice and be sure for environment requirements including OS and H/W both.
  • In my case, I'm downloading docker desktop for windows.

  • Windows 10 64-bit: Pro, Enterprise, or Education (Build 17134 or higher).
    • Hyper-V and Containers Windows features must be enabled.
    • The following hardware prerequisites are required to successfully run Client Hyper-V on Windows 10:
    • 64 bit processor with Second Level Address Translation (SLAT)
    • 4GB system RAM
    • BIOS-level hardware virtualization support must be enabled in the BIOS settings. For more information, see Virtualization and other troubleshooting for docker configurations.

    High level Installation Steps

    1. Double-click Docker Desktop Installer.exe to run the installer.

    2. If you haven’t already downloaded the installer (Docker Desktop Installer.exe), you can get it from Docker Hub. It typically downloads to your Downloads folder, or you can run it from the recent downloads bar at the bottom of your web browser.

    3. When prompted, ensure the Enable Hyper-V Windows Features or the Install required Windows components for WSL 2 option is selected on the Configuration page.
    Note: Follow the instructions on the installation wizard to authorize the installer and proceed with the install.

    When the installation is successful, click Close to complete the installation process.

    Important: 
    If your admin account is different to your user account, you must add the user to the docker-users group. Run Computer Management as an administrator and navigate to Local Users and Groups > Groups > docker-users. Right-click to add the user to the group. Log out and log back in for the changes to take effect.

          Starting up Docker Desktop 

          Docker Desktop does not start automatically after installation. To start Docker Desktop, search for Docker, and select Docker Desktop in the search results if your windows environment just as you can see in the picture below


          You only need to check whale icon right after initialization of your Docker Desktop as you can see in picture below




          And, if it stays in the status bar after you just verified there then it means docker desktop service is running on the system properly and you have complete the installation process of docker desktop on your Microsoft Windows OS and docker desktop launches onboarding tutorial. 

          The tutorial includes a simple exercise to build an example Docker image, run it as a container, push and save the image to Docker Hub as shown below


          And two thumbs up(๐Ÿ‘๐Ÿ‘) , you have successfully installed docker desktop on Microsoft Windows.

          Stay tuned for next Session ... "Container Optimized OS.."

          Go back to previous post




          What is Docker and Understanding its Architecture

           Hello my dear readers , Greetings & welcome back!

          Understanding Docker (Continued...)

          Docker is an open source for building environment for applications to package with their relevant dependencies and to run independently regardless of the environment (Operating system).

          It is written in GO programming language which uses several feature of linux kernal to use various features. Docker uses a technology called namespaces to provide the isolated workspace called the container.

          Docker uses containerization technology to run application without OS installation in that container. It packages only applications and application dependencies in a container to run on top of any OS without pre-configuration of Hardware like CPU and Memory unlike in VMs we usually do.

          What is a container?

          A container is a runnable instance of an Application derived/deployed from an image stored in image repository. You can move, build or rebuild, modify or delete a container or application inside the container. 

          Containers are actually light weight application instances which run on top of OS and actually share same OS for hardware utilization required by applications.


          What is Container Host?

          So, a container is a loosely coupled workload isolated from an other Application running on the same Operating system and that operating system whether installed in side a VM or on a physical computer system is known as container host. In the case of Docker, This is known as Docker Host as shown in the figure below 

          What is Image repository?

          An image repository is actually a place for storing different applications templates we can use to deploy in a container with deployment instructions. In the case of Docker, this repository is known as Docker Registry.

          Mostly, an image is based on some other customizations which may require to run application on some specific environment requirements. For example, an image may be built on top of Ubuntu OS with Apache web server and an application running on top of that web server be installed with some dependencies which may require to be deployed along with application in a container.

          These settings for applications to be deployed in a container are written in a declarative language to instruct Docker to deploy application. This declarative statements are normally written in a language which could be YAML or JSON.



          Docker Architecture High-level 

          Basically, it is divided into three parts
          1. Client (Docker)
          2. Docker-Host (dockerd / Docker Daemon)
          3. Docker-Registry


          1. Client (Docker)

          when any user or administrator tries to connect to docker host it always uses docker client to communicate with container which is running in a docker host. In this way, a client process talks to docker host (dockerd) through which it communicates with container / application running inside the container. The client uses docker API to communicate with dockerd for container management. Example, docker run which communicates with docker host to initiate docker management environment.

          2. What is Dockerd (Docker Host)?

          The docker daemon (i.e. dockerd) recieves commands from client and runs or manages containers, images / image repositories, networks and volumes. A docker daemon can communicate with other daemons to manage services.

          3. Docker Registry?

          It stores docker images for applications to build / deploy in a container. Example is docker hub is a public docker image registry. Anyone can use this public repository and docker by default is going to look into this registry for images but you can have your private or own image registries as well.

          When docker pull or docker run is being used then container images from repository are being utilized to be used as source of application delivery.

          What is docker image?

          Docker image is actually a read only template (of applications for Specific or generic OS based environments) you prepare to push in the repository for later use and deployment of applications in a container.

          Usually, an image is based on another image, with some additional customization. For example, you may build an image which is based on the Ubuntu OS etc. To build your own image, you create a Dockerfile with a simple syntax for defining the steps needed to create the image and run it. 

          Below is the complete high level picture for understanding docker containerization using basic docker architecture what explained above.



          Stay tuned ...๐Ÿ˜‰

          Coming up next "Installing Docker"

          Go back to the previous topic
           
          About the author , TwitterLinkedin


          Contributors:
          Shumail Ahmed (Colleague) 













          What is Containerization and how is it different from virtualization - Part 2

            Continuing the same discussion of rebuilding a VM from the point it got stuck or destroyed. It always require sometimes to follow below steps

          1. Re-install OS
          2. Configure OS
          3. Install Application
          4. Configure its dependencies
          which may take more time to restore the services. In this connection, we always focus on services high availability which involves more hardware resources dedicatedly available to provide service High availability as shown in below picture for an understanding

          So, in-order to utilize hardware efficiently for a muti-instance of an application which is an important point to focus on, including manageability, lets discuss this topic with the concept of containerization.

          Lets conclude the discussion which leading us to think about containers...

          1. Easy Management of workload (VMs = OS + APP)
          2. Efficient resource utilization (CPU, Memory, Storage, Network)
          3. Improved service re-instantiation (No need to re-install OS if App corrupted)
          4. Zero chances of Application configurational Issues in-case of App re-build and Config

          above four points are not the only points, we are going focus on containerization. That's the starting point to discuss this technology in more details.

          In a nutshell, if we compare virtualization and containerization then 
          • In virtualization, we consolidate Hardware to efficiently utilize it by distributing Hardware resources amongst the consumers (e.g. VMs / workload)
          • In containerization, we consolidate OS kernel (which runs on top of H/W) to efficiently distribute resources running under the same OS to the workload (e.g. Applications).
          Below picture shows a high level difference in between both of the technologies

          NOW, being on clear note, i am going to mention some product names to get this concept very clear for my valuable readers with examples in my blogs. Those products are VMware vSphere, Docker, Kubernetes (K8s), vCenter Server Appliance, Microsoft Windows and Linux.

          Containerization 

          In this concept of containerization, I am going to choose "DOCKER" as an example to explain containerization. Just like VMs which provide isolation to OS to run independently without any conflict with any-other OS running on the same Hardware, containers provide isolation for an Application to run independently without any conflict with any other application to run on the same OS and hardware. So, hyper-visors provide this level of isolation to VMs to run independently similarly Container-runtime (CRT) provide level of isolation to APPs to run independently. Though there are so many containerization software available out there in the market and "DOCKER" is one of them. If we define "Docker" then below is the definition 

          "Docker is an open platform for developing, shipping, and running applications. Docker enables you to separate your applications from your infrastructure so you can deliver software quickly".

          Understanding DOCKER (High-level Overview)


          Stay Tuned ... ๐Ÿ˜Š

          Go back to Previous Post

           About the author , TwitterLinkedin












          What is Containerization and how is it different from virtualization - Part1

          What is a Container?

          Hi everyone, I have initiated an effort for my blog readers to understand containerization architecture. In this detailed series of posts, I'll try to focus on simplicity of the concept with clear picture of understanding. 

          So, let's start this discussion with some common questions๐Ÿ˜Š

          What is Container or containerization?

          The concept behind this fascinating buzz word is the same we usually interact within our daily routine life. So, lets discuss this concept first ... 

          As with the meanings of the word "Container", it is obvious that there is "an environment which provide all necessary requirements for a software package to run without any conflict with other software using the same operating system resources".

          So, we breakdown an application into smaller (Sub-set of) services which are known as Microservices. Now, what is microservices? Microservices is an architectural style that structures an application as a collection of services that are. Highly maintainable and testable. Loosely coupled. Independently deployable. Organized around business capabilities.

          Need for Resource Isolation

          If I explain containerization in simple words as i am trying to portray then below diagram is really helpful in understanding this concept. Lets talk about a simple computer system you operate in your daily routine life in the form of a Desktop / Laptop. This computer system has got two major things running inside as software

          1. OS (Operating System)
          2. Application
          Operating system occupies all the hardware resources of that computer system (as you can see in above picture) through a set of software known as drivers and on top of Operating System (OS) there runs an application system for a particular purpose or activity.

          For example, Microsoft word is an application we can use for documentation, Excel we usually use for Accountancy or calculous. But hey wait, Tell me one thing, Can i install Microsoft Office 2020/2019 on the same computer system where Microsoft office 2013 already installed (in parallel) ? and the answer would be a big "NO" because both of the applications though from the same vendor but require separate physical environment as provided by single computer system.

          Now, question is who is providing a separate environment for this application? and the answer is Computer system (e.g. Laptop or Desktop) and resources are provided to application from OS installed or running in that computer system.

          Evolution of the Virtualization

          But in most of the individual computer systems more than 60% of the hardware resources (like CPU, Memory, Storage, Network bandwidth etc) are not utilized by the Application and left untouched throughout the lifecycle of hardware which realized (around 20 years back). And this was the time when Server Consolidation came into picture and many organization started thinking about this gray area to be addressed 

          In this ERA of Server consolidation, one physical computer system can entertain multiple operating systems running on top of it with hardware resource abstraction in an isolated fashion. So each of the operating system has got an isolated environment run by a system to produce hardware abstraction layer for all of the running OSs which is called Hyper-visor.

          These hyper-visors provided a layer of isolation for every OS to utilize hardware resources as per allocation model and this containerized approach for an Operating system is known as Virtual Machine.

          What is Hyper-visor?

          Is a piece of software just like operating system who occupies all of the physical hardware and produces hardware abstraction (i.e. CPU, Memory, Storage, Network) to the virtual machine as VM resources. Without going into details that how many types of hyper-visors are just for your information at a high level overview, there are generally two types of hyper-visors

          1. Bare Metal Hyper-visors (Type-1) We are talking about this ๐Ÿ˜Š




          2. Hosted Hyper-visors (Type-2)

          What is Virtual Machine?

          A virtual machine is a software representation of a physical computer system. Made up of numerous files and folders managed by Hyper-visor. This idea of resource efficient utilization has made a remarkable change in Business and IT industry and a new dimension has just been opened up for IT technology.

          The Turning Point

          But the problem faced by IT industry at VM level when we need to maintain huge number of virtual machines with the same OS/APP posture. In this context, we need to focus on more robustness and efficacy for application lifecycle. Below points are so important to look ahead for containerization needs and requirements

          1. If any application require high availability how much RPO (Recovery Point Objective) we can achieve / reduce and same for RTO (Recovery Time Objective)
          2. For a VM to rebuild we need to 
            1. Install OS 
            2. configure OS as per App Requirement
            3. Install App
            4. Configure App as per Business needs
          Above points needed a consideration for reasons to reduce man effort and increase Application reliability. 

          Click Here for next part

           About the author , TwitterLinkedin

          Troubleshooting Minikube Installation in Microsoft Windows Environment

          Troubleshooting Minikube first Installation in MS Windows Environment

          This Document is created to help you out in troubleshooting common hurdles while installing minikube in your hosted virtual environment. So, during installation of minikube if you face any problem which is not letting you deploy your Kubernetes architecture in the form of minikube then cross check below steps.

          • When you download minikube, add minikube.exe to c:\Minikube or any location you can mention in the system variable later on
          • Configure system variables with the name of Minikube presenting its path with name you call in CLI including Kubectl tool location as well as shown in the fig below

          1)     



          Above Picture show paths I have configured in my environment for accessing minikube / K8s running in a VM.


          Note: This may be required when you are using Kubectl tool from your laptop or desktop to access minikube setup from within vmware workstation.

          Now, verify that hyper v is running inside guest OS (i.e. Windows 8 VM)
          Alternatively, you can also run hyperv from powershell using this command below. Make sure you’re logged in as an administrator:


          and use below powershell command to enable Hyper-V

          Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All

          You can read more about enabling hyperv here

          Second Scenario or Situation

          If during deployment of minikube, VM doesn’t start or raises any error for incomplete deployment.

          • Go to virtual switch manager

          • Create a New Virtual Network switch (Internal)
          • Call the switch "Minikube"
          • Go to Control Panel\Network and Internet\Network and Sharing Center

          • Go to your vEthernet status (will be on the right side underneath “Access type:” Internet, in the “Connections:” list

          • Go into properties, and then the sharing tab. Check that “Allow other network users to connect through the conputer’s Internet connection” and select “vEthernet (Minikube)” from the list.

          After configuring above settings, open up elevated command prompt and the punch in below command

          Run:

          .\minikube.exe start --kubernetes-version="v1.8.0" --vm-driver="hyperv" --memory=1024 --hyperv-virtual-switch="Minikube" --v=7 --alsologtostderr

          And check once again :) 

          For detailed Installation Guide you can visit my YouTube Video





           About the author , TwitterLinkedin

          Container Optimized OS | Photon OS | Docker Engine Pre-Installed | How to Install and configure

           What is Container Optimized OS A Container Optimized OS is a lightweight, minimalistic operating system designed specifically to run contai...