WEBVTT

00:00.810 --> 00:02.190
-: All right, my friends, that's pretty much it.

00:02.190 --> 00:05.100
We've set up everything we need to set up for Kubernetes

00:05.100 --> 00:07.980
at least in our development local environment.

00:07.980 --> 00:08.910
We're now gonna start thinking

00:08.910 --> 00:10.410
about how we can take this application

00:10.410 --> 00:13.260
and deploy it off to a production environment instead,

00:13.260 --> 00:15.780
such as AWS or Google Cloud.

00:15.780 --> 00:17.670
Now, before I show you a diagram that's gonna walk through

00:17.670 --> 00:19.920
the series of steps that we're going to use to deploy this,

00:19.920 --> 00:21.420
just one quick last thing.

00:21.420 --> 00:24.060
Again, if you're seeing the not secure message up here,

00:24.060 --> 00:26.520
totally fine in a development environment.

00:26.520 --> 00:27.960
We're going to eventually fix this

00:27.960 --> 00:29.370
in the production environment.

00:29.370 --> 00:33.180
But again, in development, no issue whatsoever.

00:33.180 --> 00:35.430
Okay, so let's walk through our deployment steps.

00:35.430 --> 00:36.450
So the first thing we're going to do

00:36.450 --> 00:38.730
is create a GitHub repository.

00:38.730 --> 00:40.680
We're gonna create a GitHub repo.

00:40.680 --> 00:43.890
We'll also create a GI repo locally on our local machine

00:43.890 --> 00:46.200
and then push all of our code up to GitHub.

00:46.200 --> 00:49.050
After that, we're gonna set up a Travis CI project

00:49.050 --> 00:51.240
to tie in with our GitHub repo as well.

00:51.240 --> 00:53.010
So we're going to use a very similar

00:53.010 --> 00:56.310
Travis CI focused deployment method as we did previously

00:56.310 --> 00:59.010
on both of our Elastic Beanstock projects.

00:59.010 --> 01:01.950
Travis CI is going to be in charge of building our images

01:01.950 --> 01:03.720
and pushing them off to Docker Hub.

01:03.720 --> 01:05.700
And then after that, we're going to use Travis CI

01:05.700 --> 01:09.870
to also deploy our application to a Kubernetes cluster.

01:09.870 --> 01:12.600
You can use other CI environments

01:12.600 --> 01:14.940
if you choose to, in general, maybe not in this course.

01:14.940 --> 01:17.040
I recommend you do use Travis along with me.

01:17.040 --> 01:18.990
But in general, you could use other deployment

01:18.990 --> 01:22.350
or other CI environments such as Circle CI if you choose to.

01:22.350 --> 01:24.060
They were just as well as Travis.

01:24.060 --> 01:25.890
Just in this course, I chose to use Travis

01:25.890 --> 01:28.470
because in general it's a very reliable service

01:28.470 --> 01:31.380
which makes it quite appropriate for a course.

01:31.380 --> 01:34.620
After that, we're gonna set up a Google Cloud project.

01:34.620 --> 01:36.420
So again, we're not going to deploy

01:36.420 --> 01:38.910
this Kubernetes application to AWS.

01:38.910 --> 01:41.490
We're going to using Google Cloud instead.

01:41.490 --> 01:43.650
And I've got a whole slide that I'm gonna show you

01:43.650 --> 01:45.720
in this video in like one or two minutes

01:45.720 --> 01:47.670
that's going to outline the reasons that we're swapping

01:47.670 --> 01:50.250
from AWS over to Google Cloud.

01:50.250 --> 01:52.740
Again, trust me, very good reasons that we're going to use

01:52.740 --> 01:56.070
Google Cloud here as opposed to AWS.

01:56.070 --> 01:57.690
Now, something that's very important,

01:57.690 --> 02:00.720
and this is really the main point of this entire lecture,

02:00.720 --> 02:02.790
is that in order to deploy this application

02:02.790 --> 02:05.970
off to Google Cloud, you will need to enable billing

02:05.970 --> 02:08.010
on a Google Cloud account.

02:08.010 --> 02:10.290
And that means that you need a credit card

02:10.290 --> 02:13.320
or some type of payment card that is accepted

02:13.320 --> 02:14.790
by Google Cloud.

02:14.790 --> 02:16.230
Now, if you are in some country

02:16.230 --> 02:18.420
that does not have access to Google Cloud,

02:18.420 --> 02:20.700
unfortunately you're probably not going to able to walk

02:20.700 --> 02:22.050
through these deployment steps

02:22.050 --> 02:24.750
but that is just kind of the reality of the situation.

02:26.100 --> 02:29.280
Now, the billing aspect here is rather important

02:29.280 --> 02:31.320
to mention this time around. because unlike

02:31.320 --> 02:34.410
the Elastic Beanstock stuff where we paid $0

02:34.410 --> 02:36.630
if you were in the free tier or you paid very little

02:36.630 --> 02:38.220
if you were outside the free tier,

02:38.220 --> 02:40.950
unfortunately this Kubernetes project is going to encourage

02:40.950 --> 02:43.650
just a little bit of billing and it probably

02:43.650 --> 02:46.110
is going to be for the most part unavoidable.

02:46.110 --> 02:48.270
Now, I wanna very quickly show you a calculator

02:48.270 --> 02:50.550
that you can use to get an idea of how much

02:50.550 --> 02:53.040
you're going to be paying for this Kubernetes project

02:53.040 --> 02:54.240
that we're going to set up.

02:54.240 --> 02:57.660
Just so you know, I put like all the Travis CI stuff

02:57.660 --> 03:00.390
up here, even though It kind of makes sense to create

03:00.390 --> 03:01.560
the Google project first.

03:01.560 --> 03:04.830
I put all the Travis CI stuff earlier up here

03:04.830 --> 03:06.720
to just to minimize the amount of time

03:06.720 --> 03:08.700
that we have to have this Kubernetes cluster

03:08.700 --> 03:11.280
up and running and causing you to have to pay money.

03:11.280 --> 03:14.040
So I am very much conscious of the fact that

03:14.040 --> 03:15.600
you probably don't wanna be paying a lot of money

03:15.600 --> 03:17.100
to learn all this stuff.

03:17.100 --> 03:18.720
Now, if you wanna get a good idea on how much

03:18.720 --> 03:20.940
you're going to be paying, you can do a Google search

03:20.940 --> 03:24.123
for Google Cloud cost calculator.

03:25.230 --> 03:27.660
Like so, you'll find the first result here

03:27.660 --> 03:30.420
which is products slash calculator.

03:30.420 --> 03:33.150
And then on this page, we can very quickly get an idea

03:33.150 --> 03:35.520
of exactly how much money you might be paying

03:35.520 --> 03:37.380
over a short period of time

03:37.380 --> 03:39.300
that you might be running this application.

03:39.300 --> 03:41.580
So on this page, and I'm gonna zoom in a little bit here

03:41.580 --> 03:43.050
just to make sure it's very legible,

03:43.050 --> 03:45.990
you can select Kubernetes engine at the top.

03:45.990 --> 03:47.760
And then under Kubernetes engine,

03:47.760 --> 03:50.550
we're going to be running three separate notes.

03:50.550 --> 03:52.560
We're going to be using the standard instance type

03:52.560 --> 03:54.480
so you can leave that as the same.

03:54.480 --> 03:56.970
So I'm gonna scroll down, leave everything else the same

03:56.970 --> 03:58.770
and I'm gonna click Add to Estimate.

03:59.730 --> 04:02.820
I will then find the persistent disc section.

04:02.820 --> 04:05.610
On here we're going to have one persistent disc

04:05.610 --> 04:08.640
that's gonna have like two gigabytes of space.

04:08.640 --> 04:10.860
Two like so, so you can add in a two

04:10.860 --> 04:13.140
and then a click Add to Estimate.

04:13.140 --> 04:15.900
And then you can also find load balancing right here.

04:15.900 --> 04:17.910
We're going to have one forwarding rule

04:17.910 --> 04:20.640
and we're going to at best be transferring

04:20.640 --> 04:23.310
about one gigabyte, like absolute no way

04:23.310 --> 04:25.380
we're going to actually be doing one gigabyte here.

04:25.380 --> 04:27.540
I guess you could go down to megabyte if you want to.

04:27.540 --> 04:28.710
And we could probably say like something like

04:28.710 --> 04:31.350
a 100 megabytes is probably much more realistic.

04:31.350 --> 04:33.690
And then you can add that as an estimate as well.

04:33.690 --> 04:36.600
So if you look at the total price for all this thing,

04:36.600 --> 04:39.960
it comes out to around $42 per month.

04:39.960 --> 04:42.360
Now, if you're running this for only one day

04:42.360 --> 04:44.730
because the billing here is like on a per minute basis

04:44.730 --> 04:45.810
or something like that.

04:45.810 --> 04:47.700
So if you go through all the Kubernetes videos

04:47.700 --> 04:50.100
in this course in like one day,

04:50.100 --> 04:53.730
then you're going to paying about $42 divided by 30.

04:53.730 --> 04:55.470
So that's something like, I don't know, a $1.40

04:55.470 --> 04:56.580
or something like that total.

04:56.580 --> 05:01.290
So $1.40 if you get through everything in here in 24 hours.

05:01.290 --> 05:03.480
If you get through it faster and shut everything down,

05:03.480 --> 05:05.400
you'll be paying even less.

05:05.400 --> 05:07.920
So in general, probably not gonna be paying

05:07.920 --> 05:10.590
anywhere near $42 as long as you complete

05:10.590 --> 05:12.810
all this content in a reasonable amount of time.

05:12.810 --> 05:15.690
I just want you to be aware that you are gonna be paying

05:15.690 --> 05:17.820
at least some tiny amount of money here.

05:17.820 --> 05:19.890
And you do really need to make sure

05:19.890 --> 05:22.980
that you absolutely clean up all these instances

05:22.980 --> 05:24.600
after you get through this content,

05:24.600 --> 05:26.430
especially if you like quit halfway through.

05:26.430 --> 05:29.370
You need to be making sure that you close everything down.

05:29.370 --> 05:31.500
And, of course, at the end of the Kubernetes section,

05:31.500 --> 05:33.420
I'll give you a very detailed video

05:33.420 --> 05:36.120
on how you clean all this stuff up as well.

05:36.120 --> 05:38.400
Okay, so that's my spiel on pricing.

05:38.400 --> 05:39.960
Now, we're gonna a little bit long here

05:39.960 --> 05:41.970
so let's take a quick pause and when we come back

05:41.970 --> 05:43.710
to the next section, we're gonna talk a little bit

05:43.710 --> 05:46.890
about why we're making use of Google Cloud over AWS.

05:46.890 --> 05:49.673
So quick pause and we'll cover that in the next section.
