In the last couple of sections, we went through the very long process of generating a service account
and then encrypting the file and tying it to our Travis-ci project.
Now, I want to remind you one last time, please make sure you delete the original service account
JSON file.
So inside my complex folder I should only see the encrypted file right here.
So only inside the old JSON file.
Totally gone.
All right, so now that we've got this all set up, we're going to continue with our Travis YAML file.
The next thing we need to do inside of there is to configure our SDK with the service account file that
we just uploaded and encrypted.
So I'm going to flip back over to my code editor and I'll find my Travis YAML file.
Now in the last couple of sections we added in that OpenSSL command right here.
After this command runs, it takes that encrypted file and then it decrypts it and places it into our
root project directory.
So now when we call gcloud auth activate service account right here and specify the key file of service
account JSON.
That file has already been unencrypted and placed into our project directory.
And so the gcloud command should see that file inside there with our real account credentials, and
be able to use that to get access to our Google Cloud account.
So that's pretty much it with doing the initial setup of Google Cloud.
Now we do have to do some additional setup.
I only mean to say we finish the initial setup right there.
So the additional setup we have to do we have to tell the gcloud CLI exactly what project and what zone
we want it to operate on inside of our Google Cloud account.
Remember, in a single Google Cloud account, if you still have your dashboard open right here, we've
got that project selector up here at the very top.
So we have many different projects that we can work on inside of a single Google Cloud account.
And so we need to tell gcloud exactly which project we want to work on.
So to do so I'm going to add on a new command of gcloud config set project.
And then I'm going to put in my project name right here.
Now very important.
Your project name is not the simple project that you see right here.
It's not multi k8's in fact it's a little bit more involved.
Project name.
If you open up the project selector you'll see the ID over here on the right hand side.
This is your real project name.
And so in my case my project name is really skillful berm blah blah blah.
So I'm going to copy that ID and then I'll put it back inside my Travis dot YAML file like so.
After that we need to specify a compute zone.
So remember Google Cloud very similar to AWS has multiple different data centers around the world.
We selected a data center a little bit ago to use as our default for our cluster.
So to get my default data zone I'm going to open up my navigation menu over here.
I'll navigate back to Kubernetes Engine.
And then right here I see location of us Central1 a.
So that is my compute zone.
And I need to also configure my Google Cloud CLI to use that compute zone as well.
So I'm going to copy that location.
And then I'll enter in another command here that says gcloud config set compute slash zone.
And then I'll paste in my particular zone which again is us Central1 a.
Now the very last configuration command we have to do, we have to tell the gcloud command exactly what
cluster it needs to be working with.
If we issue any set of Kubernetes related commands.
And so to do so, we need to add in the name of our cluster.
So the name of my cluster is multi dash cluster.
So back over here I'll put in gcloud container.
Notice how this configuration command is different than the others.
So I'll say gcloud container clusters get credentials.
And then the name of my cluster which is multi-cluster.
So as you might imagine this is going to tell the Google Cloud command to reach out to our Multi-cluster
and configure it to work specifically with that cluster.
All right.
So that's it.
That's all the configuration we have to do with this gcloud command.
So now at some point in the future we're going to use it.
And the kubectl command as well to essentially update our cluster from a script that we put inside of
either this Travis file or anywhere else inside of our project.
So let's take another quick pause right here.
When we come back in the next section, the next thing we have to do is log into Docker CLI, build
the test version of our image, and run our tests.
We've already gone through these steps before, so we should be able to get through them pretty darn
quickly.
Let's take a quick pause right here and we'll continue in the next section.