Hello. This is Robert Lageano.
And today, we'll be talking about introduction to containers
. I don't know about you, but I just love a pizza. Who doesn't like pizza? Well, think about
a massive pizza. This massive pizza can be a challenge for us to eat by ourselves. Inste
ad of doing that, we can slice the pizza. And then, we can give each one of these slices t
o someone that we love-- our kids, our spouses, our parents. We can actually do that to
optimize the total amount of pizza we can give to each one of the people that we love.
Well, the pizza analogy can be used to understand the virtual machines. Think about the
massive pizza as being your bare metal server. You don't want to have just one single se
rvice in this bare metal server. That's because these bare metal server may have some o
f the resources underutilized by the service that it's running.
Instead of doing that, we can have the virtual machines. And the virtual machines can hel
p us optimize the amount of resources we have in our bare metal server that's going to b
e reserved for a certain operating system. How about the containers? Well, if the slices o
f pizza are the virtual machines, the containers would be the ingredients of that slice of pi
zza.
How about those people that don't like all the ingredients in a pizza? Well, they can take j
ust the ingredients that they like. Maybe they can put them aside into a container. The co
ntainers will help us do exactly that-- optimize not only our resources but optimize exactly
what we need to run a specific application. Let's get into containers right away.
Let's do a quick review of how we deploy applications in a bare metal server. Well, to de
ploy applications in a bare metal server, first of all, we need some physical infrastructure.
It could be one of our servers into the data center that we want to deploy the applications
. This server will require an operating system.
In this operating system, we have tons of options. It could be a Windows server operatin
g system. It could be a Linux operating system and so on. This infrastructure will need thi
s operating system, but it will also need some libraries as well. Using these libraries, we
are then capable of building the perfect environment to deploy our applications.
Now, these applications could be many things-- a web service application. It could also b
e a mobile app application. It could be many, many other things. Now, this is the standar
d bare metal server, which was fairly common in the '90s. But what's the issue? Rememb
er the pizza analogy? There is a massive issue here. What's the issue? You got resource
s being underutilized.
What's the solution for that? Well, a very clever solution-- the virtual machines. In a virtua
l machine environment, let's remember how things work. We still have our physical infrast
ructure. It could be our physical servers. All these physical servers will be running somet
hing called the hypervisor.
What's the hypervisor? Well, the hypervisor, it's the pizza guy that is able to slice the pizz
a into pieces. These pieces of pizza, which are our virtual machines, are then capable of
running their own operating system. They are capable of running their own applications.
Their own services, and many many others.
But there is a big issue here. We have our different applications. But in order for us to ha
ve these separate applications, we need to have our separate virtual machines. And I'm
going to tell you, creating these virtual machines sometimes can be quite painful. You ne
ed to go through the process of creating the virtual machine instance.
You have to go through the process of obtaining an ISO image, which is usually used to
deploy the operating system. Go through the installation process. It
can be quite painful. But you just want certain applications to be running. Well, there is a
much, much clever solution, which is containerization or the use of containers.
In containerization, we're going to have the same standard infrastructure that is needed.
Obviously, we're going to need our servers. We're going to need some bare metal device
s because, after all, the entire infrastructure is needed. It
can be located somewhere in the data center. Not only we need our physical devices, bu
t we can have an operating system.
But the difference here is this operating system can be running a container management
solution. In this example, we could have an OS docker. This would be capable of managi
ng our containers. What's a container? A container is a pack of all the specific services a
nd applications that we need to make services and applications. We could have bins com
bined, libraries combined. And each one of these bins and libraries will then be responsib
le for a specific application.
So look at that. We can have multiple applications. Each one of these applications will ha
ve their own libraries. And all of these solutions will be managed by a single guy, which i
s going to be our management solution in this example-- our OS running docker.
Containers are similar to virtual machines, but they are lightweight and quickly deployable
. Not only that, but containers shorten the software development life cycle because they r
educe operational costs and also complexity. Let's have a look at an example of how con
tainers can help us reduce complexity.
Imagine that you have a user. This user needs to access certain services into a system.
And these services, they can be quite complex because, most of the time, they are bundl
ed together. So imagine, this user needs to sign up into a service, log in into that service
to access the Home page of that service. These are all building blocks. And most of the ti
me, they are built into the same platform.
Likewise, we could have a payment method which was built with the personal data of the
individual, as well as the Reports tab or page or functionality. Well, this could be quite co
mplex because, all these building blocks, they are somehow related. They are created an
d developed into a specific place.
Now, this could be quite challenging because, these things, they work, and they are relat
ed. Now, containers can actually help us because the containers can help us transform t
his way of doing things into a slightly different way of doing things. We can actually break
this complexity, and we can build the functionalities separate from each other.
Each one of these functionalities can be built into a specific application, into a specific co
ntainer. Well, it's much easier this way to deploy certain services, to troubleshoot certain
services or applications. So containers can be amazing to help us actually reduce the co
mplexity of things and to, basically, look at things as separate building blocks.
We can have sign up, and the sign up process could be related to our personal data. Thi
s personal data can then get back to the way we log in into the systems. That also maps
to the way that we display the homepage. Now, these services, now, these applications, t
hey are built separately. And our sign up process can be related to the way that we proc
ess the payments. The Home page can be related to the way that we display the reports.
Another remarkable characteristic of the containers is that the containers they have a sm
all disk size requirement. But they also have a low overhead. Why is that? Because cont
ainers usually run on top of a base operating system, running an orchestrator like Docker
or Kubernetes. The thing about the containers is that they share the same kernel betwee
n different containers.
So container number 1 in this example, container number 2, they are both built under the
same base operating system. This operating system has a kernel. This kernel is shared b
etween these containers. These containers will then require much less disk space compa
red to a virtual machine deployment.
Look at this example and pay attention that we, basically, have different containers. Each
one of these containers will have different libraries, different bins, different requirements.
These containers will also have a namespace. And the namespace of each one of these
containers can be accessed using an API. What is going to access these APIs? What is
capable of interacting with these containers?
A container management tool. And this container management tool will allow us to mana
ge each one of the containers, allowing us to give specific libraries, take specific libraries
from a container, in other words, separate the components of the operating system of the
kernel that we want to have implemented into that specific namespace or container. I hop
e you enjoyed this video. Thanks for watching.