Containers And Container-Orchestration In Azure

Containers and Container-Orchestration usage has become a common phenomenon and a standard practice. In this article, we’ll learn overall about what containers are, their need, and the answers to their widely adopted usage in software industries across the globe. We’ll also learn about Container-Orchestration and all of these features and functionalities provided by Azure.
 
Check out the official website of the summit to register as an attendee or to be a speaker and share your knowledge with the community.
 

Containers

 
Containers can be defined as a unit of software that is executable where the application codes are packaged with the needed dependencies and libraries such that it can be run where ever needed from cloud to on-premises services.
 

Why do we need containers?

 
There are many reasons why containers are important. Some of them are listed below,
  • Machine Agnostic
    There arises numerous occasions when a developed app works on the developer's system but can’t be executed on the client-side system. It needs to work on the client's system as ours too. To make this happen, the foundation on which the app works need to be agnostic of the machine. Containers make this a reality.

  • Every environment looks alike
    With containers, all environments can be made to look the same such that the app on one can be operated on another production system with ease without any complications.

  • Increased velocity
    The speed at which the engineering can be done to build our system and to run across the domain will increase with the use of containers.

  • Run anywhere
    With container technology, we can execute our application across domains and platforms where ever and whenever we need it.
The container can run everywhere,
  • Linux
  • Windows
  • Cloud

Containers VS Virtual Machines

 
Though there are multiple similarities between the two, they are fundamentally different technologies.
 
Docker
 
Docker is a platform that supports to development, ship, and run applications by delivering software in packages that are known as containers.
 

Docker Containers

 
Shared host OS Kernel: They share the host OS kernel which allows multiple apps to operate on the same OS with different sets of containers.
 
Portability
 
It is lightweight and thus portable to use across the domains. The standard formats make containers portable in between container hosts and registry servers.
 
Faster Scalability
 
Docker is highly scalable and also can be scaled faster as per the need of the application. Our app will only take the space required in a way such that, we can only take in a small portion of the container or ramp up to reserve space to scale on the go.
 
Virtual Machines
 
Virtual Machines (VM) as the name suggests, provides a virtual environment within another system that operates as an independent computer system that is hosted and run inside a partition of a computer that can be allocated its own resources from processing power, memory, and storage. It differs from containers due to the following points.
  • Separate OS per instance
    It runs separate OS per instance and multiple OS can’t be run on a stack like in containers.

  • Large Footprint
    These take lots of space and have higher requirements compared to portable and highly compatible containers. These are larger in size for installation to operation.

  • Slower Startup
    Just like Operating System itself, VM takes time to start as it is hosted inside a system and at times be run within multiple layers of VM’s itself, which can give one a notion of inception.
Building Containers
 
All the containers, share the requirements across layers from Layer 1 to Layer N. This gives it a lightweight option even when adding the instances and deploying them. The block diagram shows how all the layers are connected in the containers and share the requirements needed from the base layer 1 and above.
 
Containers And Container-Orchestration In Azure
 

Container Registry

 
Container Registry is a repository for teams to store container images, analyze vulnerabilities and define the access points. A container image is basically a file consisting of multiple layers which are a single instance that can execute applications. All the images in one specific location make it easier to commit, pull and identify images when required for the users. There are basically two types of registries,
  • Public Registries
  • Private Registries
Public registries
 
The public registries are useful for small teams or individuals who want to run the registries as soon as possible. It provides basic abilities and is easy to use. Such as Docker Hub which is Free and Easy.
 
Private Registries
 
Private Registries help maintain a level of security and privacy to enterprise-level needs with advanced support and technical features. It basically allows for efficient and secure storage.
 

Containers in Azure

 
Containers allow easy methods to run batch jobs with barely any added tasks to manage environments or dependencies. Azure provides various ways to integrate containers for our apps.
  • App Service
  • Service Fabric
  • Kubernetes Service
  • Container Instances
  • Batch
Service Fabric
 
It is the old container in Azure. Azure Service Fabric can be described as a distributed system platform that provides the service by which we can easily package, deploy and manage various scalable containers and microservices. It however has a drawback as it only supports .NET Core and Java and not much support for other tech stacks.
 
Containers And Container-Orchestration In Azure
 
Azure Container Instances (ACI)
 
Without the need to having to learn any new tools, teams can now develop apps faster with Azure Container Instance running it in the cloud. The servers don’t need to be managed as the infrastructure is all looked upon by Microsoft itself and provides the additional functionality of increased agility on demand depending upon the workloads and also provides a secure system that runs on the isolated system just like virtual machines without sharing kernel.
 
If you want to know more about Containers in Azure, check out this video by our Microsoft MVP,
 
 
Azure App Service
 
Azure App Service is a platform developed by Microsoft to host websites and provides all the frameworks needed for this goal through cloud computing technologies. Apps from across tech stacks from .NET, Python, PHP, Java can be run in containers within Linux or Windows where web apps can easily be built, deployed, and automatically scaled as per the workload needed. Howsoever, Microservices are complex to be managed here.
 
Containers And Container-Orchestration In Azure
 
Kubernetes
 
Kubernetes provides the service to automate deployment, scale, and manage our containerized applications easily. This open-source container-orchestration software was developed and released by Google in 2014 and currently looked over by Cloud Native Computing Foundation.
 
Azure Kubernetes Service (AKS)
 
Azure Kubernetes Service provided the facility to manage and deploy our containerized application with complete Kubernetes Service. It offers CI/ CD – Integrated Continuous Integration and Continuous Delivery, serverless architecture, and enterprise-level security for our applications. It provides features for Microservices, DevOps, and even support to train Machin Learning Models.
 
Containers And Container-Orchestration In Azure
 
The elements of orchestration,
  • Scheduling
  • Affinity / Anti-affinity
  • Health Monitoring
  • Failover
  • Scaling
  • Networking
  • Service Discovery
  • Coordinated App Upgrades

Conclusion

 
In this article, we learned about Containers and their need and their use across highly efficiently working companies. We learned to differentiate between Virtual Machines and Docker Container and got to know deeper about it. Finally, we learned about the Containers in Azure and about their advantages and disadvantages. We explored about different services Azure has provided for containerization and container orchestration.