Introduction
DevOps is made of Dev+Ops. Application is developed, tested and then sent to Production.
Suppose while the testing application does not work properly. So does that mean the application is not developed correctly? Can be cannot be.
Other reasons for the application to not work:
- Dependencies missing or not matching (tools, software)
- Version mismatch of the software, development kits
- Different OS requirements
Solution
Combining the Versions of the software, Dependencies, OS needed to run that application along with the application.
This can be done by making images of Virtual Machines using Hypervisor and sharing them with different teams to test and put the application in Production.
What is a Hypervisor?
A hypervisor, also known as a virtual machine monitor or VMM, is software that creates and runs virtual machines (VMs). A hypervisor allows one host computer to support multiple guest VMs by virtually sharing its resources, such as memory and processing.
But the problem with Virtual Machines is that they will utilize resources of the Root machine and create an individual OS for every machine that is created by Hypervisor which is not a good practice considering the case when computing power needed exceeds the available power, storage, memory.
Also, the resources needed for the VM has to be reserved beforehand. E.g. 8 GB ram in the Root System, 4GB is needed for a VM and it will be reserved. Suppose another VM needs to be created with 6 GB ram.
Is the creation possible? No as only 4 GB ram is available from the root machine.
Docker Engine comes to rescue here!
- Docker Engine is a tool that provides you with virtualization.
- It is an advanced Version of virtualization.
- It is More of like a Hypervisor.
- Instead of the Virtual Machines Docker creates Containers.
- Containers are lightweight units of software that packages up code and all its dependencies so the application runs quickly and reliably in different computing environments.
- Containers are portable.
- Containers have Faster boot time than Virtual Machines
What's the difference between Virtual Machine & Container?
The main difference is how OS is used by Containers & VM's.
Containers do not create any OS of their own. They directly utilize the root OS resources as per needs and return the resources when the container is stopped.
Now if we are running a 4GB ram container and need 8GB for another the first one can be dynamically stopped. This way the resources utilization is better and more organized.
The below Architecture diagram will bring more clarity.
The dependencies needed for the application are also stored in the container which is extracted from the Docker hub.
Dockerhub is a cloud-based repository in which Docker users and partners create, test, store and distribute container images.
The simplicity of this engine can be understood from this- If you need ubuntu environment to run your application, just use the below command
docker run ubuntu
Docker will get the image of Ubuntu from the docker hub and run it in your container.
Create your docker image with all the software dependencies and other requirements, share the image with testers and production engineers and you are ready to go. The best thing is no blames between the dev and ops team!
Thanks for Reading!
Follow me and let's connect on Twitter or Linkedin if you liked this article.