WEBVTT

00:00.810 --> 00:01.643
-: In the last section,

00:01.643 --> 00:02.580
we started to investigate

00:02.580 --> 00:04.710
how we can get a deployment to make sure

00:04.710 --> 00:07.140
that all of our pods are using the latest version

00:07.140 --> 00:09.450
of an image that is available.

00:09.450 --> 00:10.283
So in the last section,

00:10.283 --> 00:11.190
we flipped our deployment

00:11.190 --> 00:12.990
to use the multi-client again,

00:12.990 --> 00:16.230
we're now going to go back to the complex project,

00:16.230 --> 00:17.910
that's the multi-container project

00:17.910 --> 00:19.080
that we worked on previously,

00:19.080 --> 00:22.290
and we're going to update the multi-client image.

00:22.290 --> 00:23.970
So inside of my terminal,

00:23.970 --> 00:26.040
I'm gonna open up a second tab,

00:26.040 --> 00:27.270
and then I'll navigate over

00:27.270 --> 00:29.070
to the complex project

00:29.070 --> 00:30.960
that we had previously put together.

00:30.960 --> 00:32.100
Remember that inside of here

00:32.100 --> 00:33.510
we have that client folder,

00:33.510 --> 00:36.870
that's where the multi-client project is coming from.

00:36.870 --> 00:38.760
So I'm gonna change into that directory,

00:38.760 --> 00:40.770
and then I'm gonna start up my code editor

00:40.770 --> 00:42.483
inside of that client folder.

00:44.820 --> 00:45.930
All right.

00:45.930 --> 00:46.803
So here we go.

00:47.640 --> 00:50.100
So I've got my client project right here,

00:50.100 --> 00:53.340
inside of the client project is that src folder,

00:53.340 --> 00:54.720
and inside there are a couple

00:54.720 --> 00:56.580
of different react components.

00:56.580 --> 00:58.980
And so to update our multi-client image

00:58.980 --> 01:00.810
and get kind of a change this thing

01:00.810 --> 01:03.210
that we can very easily see inside of our browser

01:03.210 --> 01:04.920
when we run this application,

01:04.920 --> 01:07.650
I'm gonna open up the app.js file.

01:07.650 --> 01:08.580
And inside of here,

01:08.580 --> 01:11.400
I'm gonna find the render method,

01:11.400 --> 01:13.980
inside there we have an h1 right here.

01:13.980 --> 01:16.140
I think that a very easy to detect change

01:16.140 --> 01:16.980
that we could make would be

01:16.980 --> 01:20.250
to alter the title that appears on a page.

01:20.250 --> 01:22.650
So rather than simply saying Fib calculator,

01:22.650 --> 01:26.433
I'm gonna put on Fib calculator version two, like so.

01:27.540 --> 01:29.460
So that's just gonna be a very simple change

01:29.460 --> 01:31.050
that will appear inside of our browser,

01:31.050 --> 01:32.430
and it'll make it very obvious

01:32.430 --> 01:34.800
when we are using a newer version

01:34.800 --> 01:36.273
of this particular image.

01:37.110 --> 01:37.943
All right.

01:37.943 --> 01:38.780
So I'm gonna save this file,

01:39.960 --> 01:42.960
and then we're going to close that code editor

01:42.960 --> 01:45.120
and we'll then rebuild our image

01:45.120 --> 01:47.523
and push it back up to Docker Hub.

01:48.480 --> 01:49.590
So back at my command line,

01:49.590 --> 01:50.850
I'm gonna make sure that I'm still inside

01:50.850 --> 01:52.113
of that client directory.

01:53.100 --> 01:54.510
We'll do a Docker build,

01:54.510 --> 01:56.400
and we'll be sure to tag this thing

01:56.400 --> 02:00.333
with your Docker ID/multi-client, like so.

02:01.329 --> 02:03.090
And then I'll specify my build context

02:03.090 --> 02:04.500
with a dot at the very end.

02:04.500 --> 02:06.360
Don't forget the dot.

02:06.360 --> 02:07.470
Okay, so I'm gonna run that,

02:07.470 --> 02:09.990
it's gonna rebuild the entire image.

02:09.990 --> 02:12.570
Now remember, we have to rerun

02:12.570 --> 02:14.310
the build portion of that script

02:14.310 --> 02:15.143
because we made a change

02:15.143 --> 02:16.070
to our source code.

02:17.010 --> 02:18.000
After all that,

02:18.000 --> 02:20.490
we finally get our new image created.

02:20.490 --> 02:21.450
So now the last thing we have to do

02:21.450 --> 02:22.860
is push this new image

02:22.860 --> 02:24.540
up to Docker Hub.

02:24.540 --> 02:29.540
So I'll do a Docker push my Docker ID/multi-client,

02:30.870 --> 02:31.703
like so.

02:33.540 --> 02:34.373
Okay?

02:34.373 --> 02:36.273
So it's gonna push that set of changes up.

02:37.980 --> 02:39.030
And there we go,

02:39.030 --> 02:39.870
that's pretty much it.

02:39.870 --> 02:42.120
So now Docker Hub has the latest version

02:42.120 --> 02:43.680
of our multi-client image.

02:43.680 --> 02:45.150
And now it's just up to us to figure out

02:45.150 --> 02:46.770
how we can somehow get our deployment

02:46.770 --> 02:49.170
to make use of that newer image

02:49.170 --> 02:51.330
for all the pods that it manages.

02:51.330 --> 02:52.860
So, let's take a quick pause right here.

02:52.860 --> 02:53.850
We'll come back to the next section,

02:53.850 --> 02:54.683
and we're gonna figure out

02:54.683 --> 02:56.610
how we can somehow get our deployment

02:56.610 --> 02:58.923
to update all of the pods that it manages.
