WEBVTT

00:00.880 --> 00:04.720
In the last couple of sections, we went through the very long process of generating a service account

00:04.720 --> 00:08.200
and then encrypting the file and tying it to our Travis-ci project.

00:08.560 --> 00:13.200
Now, I want to remind you one last time, please make sure you delete the original service account

00:13.200 --> 00:14.280
JSON file.

00:14.280 --> 00:18.840
So inside my complex folder I should only see the encrypted file right here.

00:18.840 --> 00:21.360
So only inside the old JSON file.

00:21.400 --> 00:22.200
Totally gone.

00:23.160 --> 00:27.520
All right, so now that we've got this all set up, we're going to continue with our Travis YAML file.

00:27.720 --> 00:33.120
The next thing we need to do inside of there is to configure our SDK with the service account file that

00:33.120 --> 00:35.160
we just uploaded and encrypted.

00:35.640 --> 00:39.640
So I'm going to flip back over to my code editor and I'll find my Travis YAML file.

00:40.320 --> 00:44.320
Now in the last couple of sections we added in that OpenSSL command right here.

00:44.520 --> 00:50.480
After this command runs, it takes that encrypted file and then it decrypts it and places it into our

00:50.480 --> 00:51.800
root project directory.

00:52.080 --> 00:58.680
So now when we call gcloud auth activate service account right here and specify the key file of service

00:58.680 --> 00:59.840
account JSON.

00:59.880 --> 01:04.000
That file has already been unencrypted and placed into our project directory.

01:04.320 --> 01:09.800
And so the gcloud command should see that file inside there with our real account credentials, and

01:09.800 --> 01:13.100
be able to use that to get access to our Google Cloud account.

01:13.380 --> 01:17.780
So that's pretty much it with doing the initial setup of Google Cloud.

01:18.340 --> 01:19.860
Now we do have to do some additional setup.

01:19.860 --> 01:22.180
I only mean to say we finish the initial setup right there.

01:22.420 --> 01:29.620
So the additional setup we have to do we have to tell the gcloud CLI exactly what project and what zone

01:29.620 --> 01:33.340
we want it to operate on inside of our Google Cloud account.

01:33.380 --> 01:40.380
Remember, in a single Google Cloud account, if you still have your dashboard open right here, we've

01:40.380 --> 01:42.980
got that project selector up here at the very top.

01:42.980 --> 01:47.220
So we have many different projects that we can work on inside of a single Google Cloud account.

01:47.260 --> 01:51.100
And so we need to tell gcloud exactly which project we want to work on.

01:51.500 --> 01:58.020
So to do so I'm going to add on a new command of gcloud config set project.

01:58.020 --> 02:00.300
And then I'm going to put in my project name right here.

02:00.780 --> 02:01.540
Now very important.

02:01.540 --> 02:04.940
Your project name is not the simple project that you see right here.

02:04.940 --> 02:08.420
It's not multi k8's in fact it's a little bit more involved.

02:08.420 --> 02:09.260
Project name.

02:09.460 --> 02:13.780
If you open up the project selector you'll see the ID over here on the right hand side.

02:14.060 --> 02:15.780
This is your real project name.

02:15.780 --> 02:19.740
And so in my case my project name is really skillful berm blah blah blah.

02:20.240 --> 02:27.040
So I'm going to copy that ID and then I'll put it back inside my Travis dot YAML file like so.

02:30.480 --> 02:33.520
After that we need to specify a compute zone.

02:33.560 --> 02:38.880
So remember Google Cloud very similar to AWS has multiple different data centers around the world.

02:39.160 --> 02:43.880
We selected a data center a little bit ago to use as our default for our cluster.

02:44.160 --> 02:48.840
So to get my default data zone I'm going to open up my navigation menu over here.

02:49.080 --> 02:51.640
I'll navigate back to Kubernetes Engine.

02:53.520 --> 02:57.720
And then right here I see location of us Central1 a.

02:58.040 --> 02:59.360
So that is my compute zone.

02:59.360 --> 03:04.440
And I need to also configure my Google Cloud CLI to use that compute zone as well.

03:04.760 --> 03:06.440
So I'm going to copy that location.

03:08.840 --> 03:15.640
And then I'll enter in another command here that says gcloud config set compute slash zone.

03:15.960 --> 03:20.240
And then I'll paste in my particular zone which again is us Central1 a.

03:21.600 --> 03:28.080
Now the very last configuration command we have to do, we have to tell the gcloud command exactly what

03:28.080 --> 03:29.700
cluster it needs to be working with.

03:29.740 --> 03:32.980
If we issue any set of Kubernetes related commands.

03:33.180 --> 03:36.300
And so to do so, we need to add in the name of our cluster.

03:36.300 --> 03:38.780
So the name of my cluster is multi dash cluster.

03:39.620 --> 03:43.060
So back over here I'll put in gcloud container.

03:43.060 --> 03:46.100
Notice how this configuration command is different than the others.

03:46.300 --> 03:51.100
So I'll say gcloud container clusters get credentials.

03:51.460 --> 03:55.980
And then the name of my cluster which is multi-cluster.

03:58.420 --> 04:03.180
So as you might imagine this is going to tell the Google Cloud command to reach out to our Multi-cluster

04:03.180 --> 04:05.780
and configure it to work specifically with that cluster.

04:07.020 --> 04:07.340
All right.

04:07.340 --> 04:08.100
So that's it.

04:08.100 --> 04:10.980
That's all the configuration we have to do with this gcloud command.

04:10.980 --> 04:13.540
So now at some point in the future we're going to use it.

04:13.540 --> 04:19.420
And the kubectl command as well to essentially update our cluster from a script that we put inside of

04:19.420 --> 04:22.540
either this Travis file or anywhere else inside of our project.

04:23.060 --> 04:24.700
So let's take another quick pause right here.

04:24.820 --> 04:29.180
When we come back in the next section, the next thing we have to do is log into Docker CLI, build

04:29.180 --> 04:32.020
the test version of our image, and run our tests.

04:32.060 --> 04:35.300
We've already gone through these steps before, so we should be able to get through them pretty darn

04:35.300 --> 04:35.820
quickly.

04:36.140 --> 04:39.060
Let's take a quick pause right here and we'll continue in the next section.
