LAURENCE MORONEY: Welcome to the Googleplex.
This is an incredible place with lots of great stuff being
worked on every single day.
Before I worked here, I always wondered
what it would be like to come to the Googleplex,
meet up with a Googler, and have coffee with them
and just chat about what they do, how they do it,
and why they do it, and today we're going to do exactly that.
Welcome to "Coffee with a Googler."
I'm Laurence Moroney, and today I'm
going to be chatting with Brian Dorsey, who's a Developer
Advocate on our Cloud team.
And we're going to be talking a lot about containers.
And if anybody's been in any way associated with web or cloud
or anything for about the last 18 months,
containers are this red-hot topic.
And what's all the fuss?
Can you tell us all about it?
BRIAN DORSEY: Absolutely.
I think it's definitely about-- fundamentally
about developer efficiency and operations efficiency.
LAURENCE MORONEY: OK.
BRIAN DORSEY: And there are a whole bunch
of technical things, like the packaging and distribution
of the stuff that gets us there, but really it's
just about letting you spend more
time on building your stuff rather than trying
to keep it happy.
LAURENCE MORONEY: And like the two-minute elevator
pitch, what is a container?
What's all the fuss?
BRIAN DORSEY: So it's implemented on a Linux kernel
and with file system stuff, a set of APIs
that when used together, it makes
a nice little encapsulation for your software.
So you've got a file system and actually process rights
carved up in a little box, and so you
can make sure that your machine, your software,
always runs the same way.
You've probably had the experience of,
"works on my machine," right?
LAURENCE MORONEY: Yeah, oh yeah.
BRIAN DORSEY: And doesn't--
LAURENCE MORONEY: It doesn't work on somebody else's, yes.
BRIAN DORSEY: So at some level, that's
one of the key things you're solving here,
is that since you have the exact same file
system, every time you run it, it
works the same way everywhere.
LAURENCE MORONEY: OK.
BRIAN DORSEY: And then with the process level stuff,
you also get really nice controls
of how much of the processor-- whose processor it can use.
LAURENCE MORONEY: OK.
BRIAN DORSEY: So you can keep it-- you know,
if you've got some Brian code running,
you can keep it from going a little crazy.
LAURENCE MORONEY: Brian code.
BRIAN DORSEY: Yeah.
That's a code word for maybe a little bit rushed.
LAURENCE MORONEY: Sounds good.
Now, it sounds like when we start
talking about templatizing, operating systems, and all
this kind of thing that's for big enterprises
to be able to use, but that's not really the case, right?
BRIAN DORSEY: So this stuff is useful at all levels
and, in fact, the big push 18 months to two years ago,
these APIs have been around Linux for a long time,
but Docker, the company, wrapped it up very nicely
in a nice UI, made it very easy to use,
and their focus was very much on the developer experience.
LAURENCE MORONEY: OK.
BRIAN DORSEY: So regardless of how big
the eventual end production size is,
it helps you as a developer run your stuff more cleanly, help
you collaborate with other developers,
help you collaborate with the test folks,
so when you hand off something, they
get to test the exact same thing,
and then that same thing goes into production,
working the same way.
LAURENCE MORONEY: Now at Google we
have this Kubernetes software?
BRIAN DORSEY: Yeah.
LAURENCE MORONEY: What is that all about?
BRIAN DORSEY: So that comes out of-- you know,
Google's been running containers internally
for a very long time, and you may
have heard that the initial kernel API work was actually
pushed into Linux kernel, starting
from [INAUDIBLE] to Google.
LAURENCE MORONEY: Right.
BRIAN DORSEY: So we've got a bunch of experience doing that,
but it's all built up internally,
and it's all connected to our system,
so the Kubernetes Project is an open source project
to bring those same patterns out into the whole world.
So we've got-- it's open source, it's up on GitHub.
It runs on a wide variety of places.
So you can run Kubernetes on Compute Engine
and on Google Cloud, but you can also run it on AWS.
You can run it on your own computers.
You can run it all over the place.
And I haven't really said what it is.
So once you have these units of a container,
so I've got my one process, and it runs really well.
What happens when I want a thousand
of those cooperating with dozens of some other process
and hundreds of some other process, and all of a sudden
I've got this-- these are all running on hundreds of hosts,
maybe.
So this is a big example.
LAURENCE MORONEY: Right.
BRIAN DORSEY: How do you keep track of it all?
And so Kubernetes really helps with that.
That's its core mission, using these templates
you talked about and things.
But then, as an individual developer,
if you just are trying to make a copy of production
that's small enough that you can actually get it to run,
but it still needs a front end, a database, cache,
various pieces.
You can spin up just one of each, small ones,
and have the whole thing up and working the same way.
LAURENCE MORONEY: Are there any good examples
of that that are out there, maybe somebody has documented?
BRIAN DORSEY: Yeah.
A little leading.
But we might be thinking of the same thing.
One of the other Developer Advocates, Julia Ferraioli,
wrote a really nice post on-- a series of posts
on using Docker and Kubernetes to actually run
a "Minecraft" server.
LAURENCE MORONEY: OK.
BRIAN DORSEY: And "Minecraft" is this just amazing
block-oriented, virtual world thing
with lots and lots of plug-ins.
So one of the things that's challenging
is how do you make sure that your "Minecraft" world is safe
when you start experimenting with different plug-ins,
and you want it to roll forward new versions and back,
and then you want it to stay running all the time,
because you don't want to-- like all software,
you don't want to be paged in the middle of the night
because your "Minecraft" server's down.
LAURENCE MORONEY: Right, and also, from my understanding,
if you want to build a "Minecraft" server,
you're not just getting Linux and MySQL and maybe Apache.
There's all these other things that you need to install--
BRIAN DORSEY: Yeah.
LAURENCE MORONEY: --and then encapsulate that
and able to clone that because of containers.
BRIAN DORSEY: Yeah.
So they've got official Docker images of all the stuff
"Minecraft" needs to run--
LAURENCE MORONEY: Right.
BRIAN DORSEY: --and then you can light that up and go,
and then Kubernetes gives you the management
of that and networking.
And one way to think about it, I guess,
is kind of like if you're familiar with process
runners like systemd, you get something
like systemd but spread across a bunch of machines.
LAURENCE MORONEY: I see.
BRIAN DORSEY: So you're like, I want
to make sure 10 copies of this are always running no matter
what.
LAURENCE MORONEY: Right.
BRIAN DORSEY: And you just hand it off
and then the system actually keeps that happening.
So instead of just-- you kind of follow a to-do list maybe,
but at the end you just hope it keeps working.
In the Kubernetes world, you say,
I want 10 of these running always--
LAURENCE MORONEY: OK.
BRIAN DORSEY: --and if anything happens with any of those,
Kubernetes will go and then start a new one somewhere else,
you know, if a whole host goes away.
LAURENCE MORONEY: OK.
So in summary, it's almost like the Docker
and the containers technology is allowing
me to build these easily replicable machines,
but then Kubernetes adds on top of that to make
it really easy to manage.
BRIAN DORSEY: Exactly.
And assembling them all together into a real system,
because all systems are pretty complicated, right?
They kind of grow--
LAURENCE MORONEY: And they're always
more complicated than you thought they were going to be.
BRIAN DORSEY: Than you wanted them to be, right?
LAURENCE MORONEY: Yeah.
BRIAN DORSEY: Absolutely.
Then trying to replicate that in other environments,
that's where it really is very powerful.
LAURENCE MORONEY: Cool.
Now how would a developer get started with all of this?
BRIAN DORSEY: Right.
So it does run kind of anywhere, right?
So you can run on your own machines, and run it in ABS,
run it in Google Cloud.
Because of some of the things it does
to make it really easy to connect these pieces together,
setting up the networking piece of it
can be a little bit challenging if you're not
in a cloud environment.
So my recommendation-- maybe this is a little bit biased,
but definitely the easiest way to get started
is to use the Google Cloud free trial,
and there's a one-click startup for a Kubernetes cluster.
LAURENCE MORONEY: OK.
BRIAN DORSEY: So you literally go down and hit a button
and say, give me a Kubernetes cluster.
A few minutes later, you'll have a live cluster
that you can push "Minecraft" to or your software
or whatever else you'd like to run.
LAURENCE MORONEY: Cool.
BRIAN DORSEY: Also I think the key
there is separating getting the cluster up and running
versus running your software on it, because the new stuff here,
in a way, is really thinking about building
your software out of small pieces
and then defining how those connect
to each other in this kind of template,
and so that's a really easy way to play with that.
LAURENCE MORONEY: OK.
Cool.
BRIAN DORSEY: And then when you're like, OK,
I want to run it in this specific place,
you can fiddle with cluster admin as a separate process
from--
LAURENCE MORONEY: Got it.
BRIAN DORSEY: --kind of running software
in one of these clusters.
LAURENCE MORONEY: Nice.
So you can really-- getting started
with one button for Kubernetes, but then you
can really start building stuff in the Cloud
via "Minecraft" server or maybe some other kind of server
that you want to run.
I fiddled with the building 3D rendering servers,
and this was precontainers--
BRIAN DORSEY: Right.
LAURENCE MORONEY: --so every machine
had like a thousand things that I needed to install,
and then I had to do it again the next time,
and again the next time.
BRIAN DORSEY: Run a new version.
LAURENCE MORONEY: It drove me crazy.
BRIAN DORSEY: And this is partly coming from just containers,
but then when you start thinking about a whole system of these,
it makes upgrading your system really easy--
LAURENCE MORONEY: Right.
BRIAN DORSEY: --because each version
has the exact pieces it needs.
But the other kind of magic thing there
that I never achieved personally is
that I got to where I had automated upgrades, systems
working.
LAURENCE MORONEY: Right.
BRIAN DORSEY: But getting it so you could do a downgrade,
so you could roll back to a previous version--
LAURENCE MORONEY: That's tricky.
BRIAN DORSEY: --that's harder, and containers and Kubernetes
together allow you to do that.
It's the exact same process to roll forward a version
as it is to roll back--
LAURENCE MORONEY: Interesting.
BRIAN DORSEY: --and you have this atomic unit.
LAURENCE MORONEY: Right.
Cool.
BRIAN DORSEY: It's really exciting.
LAURENCE MORONEY: So developers get started on the Google Cloud
Console?
BRIAN DORSEY: That's a great place to go.
The other thing to do is check kubernetes.io.
LAURENCE MORONEY: OK.
BRIAN DORSEY: So I'll give you that link,
and I've got a bunch of overview information
there, and then a link to the GitHub site,
where all the active stuff is going.
And as a developer perspective, it's really fun,
because there's a huge number of core people from Google who
built our orchestration stuff internally, Borg and Omega,
but also a bunch of folks from Red Hat and [? CORAL-S, ?]
and a bunch of other folks from the open source community,
a lot of individuals as well.
And so you get to see all of these people doing code review
and arguing over design in public.
So if you've ever wondered how Googlers do code review
or argue, it's a really fun place to go check it out.
LAURENCE MORONEY: So yeah, I could sell tickets for that.
BRIAN DORSEY: Yeah, absolutely.
LAURENCE MORONEY: Cool.
Well, thank you so much, Brian.
And thanks, everybody, for watching this episode of Coffee
with a Googler.
I don't know about you, but I've learned a lot about containers
and Kubernetes and managing containers
and how all that works.
If you want to learn more about this,
check out the links in the description below.
And if you want to see any more content around Kubernetes
or any more cloud content, check out the Google Developers
channel.
If you have any questions for me or any questions for Brian,
just leave them in the comments below.
Thank you so much.
[MUSIC PLAYING]