Do you desire a career in cloud computing? Would you like to know how the cloud works?
Well, if so, this video is for you.
My name is Michael Gibbs, and I've been working in technology for over 25 years. Today,
we're going to be talking about containers. When you're dealing with a cloud computing environment,
you're dealing with basically two computing platforms. One is virtualization, and the
other is containers. In the video we produced last week, we set up a virtualized server,
we installed the hypervisor, and then set up some virtual machines. Well, today we're going to talk
about the other side of the virtualization coin, and that's actually containers.
See, in the last video, when we set up virtualization, we installed the hypervisor,
and then for each virtual machine we created, we installed their own operating system,
which means that every virtual machine is just like a computer with its own operating system.
This is fantastic, because you can take a server and chop it up into multiple smaller servers,
getting a much better return on your investment. Oh, by the way,
virtualization is the key enabling technology for cloud computing. But what about that
other virtualization thing called the container? Well, that's what we're going to be doing today.
A container is like a virtual machine in some ways in that it creates a logically
separated environment. As you can see in this graphic we placed here,
each logically separated environment does not need to have its own operating system.
When you compare a virtual machine, which is a separate computer inside your system,
versus a container, which is a logically separated entity inside of an operating
system, you could see how it would be more efficient, because in a virtual machine,
you have to install the operating system, then you install the application and all its dependencies.
Now, in a container, you're basically using parts of the operating system, and all you're
doing is adding some dependencies, and you're actually adding an application, and that's it.
Containers are really fast, they are really lightweight,
and they take up very limited resources. A server, they could basically handle 20 computer instances,
may be able to do five times more when it comes to containers.
So, realize containers are a way of the future, not that virtual machines are going anywhere,
because virtual machines are still useful because they are complete separate entities, and sometimes
you need that. But when you can use a container, you can get a lot of performance enhancement.
Now, something to remember about containers is when you're building a container,
they are actually using underlying components of the operating system. So, if you have a Macintosh,
your container is going to be Apple type software. If you have a window system... well, actually,
before we go there, if you have a Linux system, it's going to run on Linux containers. If you're
running Windows, a container would obviously run Windows, but there's this new concept of
the Windows subsystem for Linux, which enables you to install an Linux kernel on a windows machine.
On a Windows machine, you actually can run both Windows analytics containers because you have both
operating systems installed. Should you install the Windows subsystem for Linux? Now we're going
to install some containers and we're going to set them up and show you how they work in action.
Now, at this point, we're in our Ubuntu system. I've opened a terminal window,
and we're ready to install Docker. Now, it's my recommendation that you have your plan
completely built before you start working on your containers. For me, that means I like to
read through the documentation, I like to write down my commands, and I like to make
sure that absolutely everything is prepared so installation can be simple and effective.
Okay. As I previously mentioned, we've built a plan based upon the Docker
documentation. Always refer to the manufacturer's documentation, because configuration commands
can change over time. But with anything else, the better your plan is, the more likely you'll
be successful in your deployment, so we built our plan based upon the manufacturer's documentation.
The first thing that we're going to do is we're going to prepare our system by updating the
packages to make sure we have the most up-to-date packages. My associate, Nathan, is going to
take this and he's going to paste it into the terminal, and he's going to update the system.
Now, as soon as this occurs, we're going to basically install the libraries for Docker.
Now, what we need to do is we need to put the Docker official
GPG key, and we're going to set that up.
At this point, we're going to install the Docker engine. First part of that is, again,
updating all the packages of your system, because we've just added some packages
and we want to make sure they're updated. Then this is the part of the Docker engine.
Now, at this point, after we've installed the engine, we want to verify that Docker
is correctly installed. We're going to just run a simple script to test it.
Okay, great. It's installed, it's starting.
Now, at this point, what we're going to do is we're going to start checking our containers
and then setting them up. Now that we've done this, and whenever you get a permission denied,
just like we did here, chances are we forgot to add the pseudo command in the beginning.
Remember permissions, you may need root permissions or pseudo per user,
or pseudo protect permissions. At this point, we're going to install a Mongo database container.
Now, the next step is actually installing a container. Now,
we're going to use a Mongo database in the form of a container here. The first thing
we're going to do is we're actually going to pull a Docker container from Mongo database.
Now, at this point, realistically, we're just going to be dealing with the Docker image.
Now we're going to create a location for our Mongo database, a directory.
At this point, really, it's all about just launching the container.
That's it. Now, at this point, we're going to type real quick T-O-P
in the command line, and we're going to do that real quick so you can see how lightweight
this container actually is and how little impact it actually has on CPU performance.
We can see that we're running this container. We can see that the CPU's are basically operating at
0.2%, 0.3%. In the previous video where we set up two virtual machines and we used 13% of the CPU's,
we're now running a database in a container and effectively using nothing. That 0.2% is
including the host operating system as well as the containers. You can see these containers are
really lightweight. Now we're going to control C out of the top, and then we're going to go back
so you can see some additional containers. We're going to press control C right now, and then we'll
walk through certain container commands so you can actually look through certain things in the shell.
You can see the containers running, you can see the port that it's running on,
so you got a really good idea of what's actually going on with your container here.
We can see we've got some logs that are showing what's going on
on the database and that it's up and running and listening.
It's only been running for a few seconds, so you can verify that everything's up,
and that's it. That was just a matter of really launching everything.
That's all it takes to realistically set up a container. You can see it's simple,
it's lightweight, it's easy to install, and there you've got a container. You
can see how much lighter it is than virtualization, which has a heavy overhead.
I hope you've enjoyed this presentation on containers. Let me tell you about some
free offerings at our organization that we do to help the cloud architect community. Every Monday
and Thursday, we have a free two hour webinar. During this webinar, we talk to you about what it
takes to get cloud hired. We talk about things that hiring managers desire, how to leverage
your past experience in your life, and how to develop the competencies and the things that
will get you hired. It's free, we run it twice a week. The link is in the description below.
We have a free AWS certified solution architect associate e-book. It is literally everything you
need to pass the exam, and it's completely free. The link is in the description below.
We also offer free AWS certified solution architect mentoring. We do this every Monday.
We invite you to a call, you can bring us any questions you have related to the AWS certified
solution architect associate exam, any areas that you're challenged, any places you'd like
clarification, or just any help in general, and during that time, we offer free mentoring,
so bring your questions to us and we will do anything we can to help you pass the exam.
You don't need to be one of our students. You can be one of somebody else's students. We don't care.
We just love teaching cloud computing. We also love teaching AWS. So, come and welcome on
our free AWS mentoring calls every Monday. I'd like to thank you all for watching this video,
and I look forward to seeing you in another video next week. Take care.