WEBVTT

00:00.900 --> 00:01.740
-: Alright, my friends.

00:01.740 --> 00:04.350
In this section, we're gonna start the long process

00:04.350 --> 00:05.940
of getting our Kubernetes cluster

00:05.940 --> 00:08.010
over to a production environment.

00:08.010 --> 00:11.460
So step number one is to create a new GitHub repository

00:11.460 --> 00:14.130
that's going to eventually house all of our source code.

00:14.130 --> 00:16.380
Now we have already made a GitHub repository

00:16.380 --> 00:17.910
for our project in the past.

00:17.910 --> 00:19.896
I'm gonna create a totally separate repository

00:19.896 --> 00:21.960
so that there's no confusion

00:21.960 --> 00:23.970
between this Kubernetes stuff and all

00:23.970 --> 00:27.120
of the Elastic Beanstalk stuff that we had done previously.

00:27.120 --> 00:32.120
So I'm going to first navigate to GitHub and then once here,

00:32.310 --> 00:34.770
I'll find the little plus on the top right hand side,

00:34.770 --> 00:37.170
and I'll make a new repository.

00:37.170 --> 00:42.030
Now I'm gonna call this repository Multi-K Eights, like so.

00:42.030 --> 00:44.250
You can call it anything else you might wanna call it.

00:44.250 --> 00:45.120
Totally up to you.

00:45.120 --> 00:48.390
I'm just gonna choose the name Multi-K Eights.

00:48.390 --> 00:51.477
I'm then gonna make sure that the repository is marked

00:51.477 --> 00:54.077
as public, and then I'll click on Create Repository.

00:55.320 --> 00:57.300
Okay, great, so there's my link right there.

00:57.300 --> 00:59.430
I'm gonna copy the link and we'll now create

00:59.430 --> 01:00.870
a local Git repo

01:00.870 --> 01:04.560
and set the remote to be this GitHub repository.

01:04.560 --> 01:06.720
So I'm gonna flip over to my terminal.

01:06.720 --> 01:10.256
Now, quick reminder, you have already created a Git repo

01:10.256 --> 01:13.706
inside of the complex directory earlier in this project

01:13.706 --> 01:17.340
and you had used it to deploy the multi-container

01:17.340 --> 01:19.680
application to Elastic Beanstalk.

01:19.680 --> 01:23.460
So I want you to do a LS-A right now

01:23.460 --> 01:26.670
and if you see inside of your a .git folder

01:26.670 --> 01:30.090
that means that you've already set up a local Git repository

01:30.090 --> 01:32.250
and you do not need to create a new one.

01:32.250 --> 01:34.890
Now I do not have a Git repo inside this folder

01:34.890 --> 01:39.270
so I'm going to now create one with Git in it

01:39.270 --> 01:41.673
and I'll do a Git add and a commit,

01:44.790 --> 01:45.930
like so.

01:45.930 --> 01:48.780
So now I have a Git repository inside of here as well.

01:48.780 --> 01:51.210
I see the .git folder.

01:51.210 --> 01:53.730
Now again, if you already had a .git folder inside

01:53.730 --> 01:57.090
of here, you probably already had a remote setup

01:57.090 --> 02:00.690
for the previous GitHub repository that we had created.

02:00.690 --> 02:04.140
So I want you to do a git remote dash V right now.

02:04.140 --> 02:05.413
Like so

02:05.413 --> 02:08.370
If you run that command and you see something come up

02:08.370 --> 02:11.250
that says, like, origin and the name of a repository next

02:11.250 --> 02:14.400
to it, then you're going to want to delete that remote

02:14.400 --> 02:17.580
and change it over to be the new GitHub repository

02:17.580 --> 02:18.990
that we just created.

02:18.990 --> 02:23.240
So to delete the existing remote, you can run Git remote...

02:24.120 --> 02:24.953
what is it?

02:24.953 --> 02:26.610
Remove origin. There we go.

02:26.610 --> 02:28.440
That's totally off the top of my head here.

02:28.440 --> 02:30.480
So you can run that command and it will delete

02:30.480 --> 02:32.482
the existing remote called origin.

02:32.482 --> 02:35.760
Then to wire it up to our new GitHub repository that we just

02:35.760 --> 02:40.620
created we'll run Git remote ad origin, and then I'll paste

02:40.620 --> 02:41.901
in the link that I just got off of

02:41.901 --> 02:44.160
the GitHub page over here.

02:44.160 --> 02:45.543
So this link right here.

02:46.530 --> 02:48.630
So I'll paste that in and there we go.

02:48.630 --> 02:50.592
So now I can do a Git remote dash V

02:50.592 --> 02:54.832
and I'll see the origin appear with the new repository name.

02:54.832 --> 02:56.850
Now I'm going to do a push to

02:56.850 --> 02:59.010
send all the code that we just added

02:59.010 --> 03:01.740
inside this repo up to GitHub.

03:01.740 --> 03:05.163
So I'll do a Git push origin master like so.

03:06.960 --> 03:09.000
Now, after a second or two, we'll see a little message

03:09.000 --> 03:11.280
here that says the push is complete.

03:11.280 --> 03:12.720
So I'm just gonna wait for that.

03:12.720 --> 03:14.400
Okay, there we go. The push is complete.

03:14.400 --> 03:16.470
So now the last thing I wanna do is flip back

03:16.470 --> 03:17.730
over to GitHub.

03:17.730 --> 03:20.100
I wanna refresh the page and I wanna make sure

03:20.100 --> 03:23.460
that I see all of my work inside this directory here.

03:23.460 --> 03:24.584
Now, you'll notice I got that stupid...

03:24.584 --> 03:26.490
I hate this File DS Store.

03:26.490 --> 03:28.770
It's from when you copy paste stuff around on OSX.

03:28.770 --> 03:30.690
I'm gonna take care of that in just a second

03:30.690 --> 03:31.650
but you should see at least

03:31.650 --> 03:33.285
the client server worker directories

03:33.285 --> 03:35.405
along with the K Eights folder as well

03:35.405 --> 03:38.520
with all of our different config files inside there.

03:38.520 --> 03:40.560
So at this point, please make sure

03:40.560 --> 03:42.480
that you have those three different directories

03:42.480 --> 03:44.490
along with the K Eights folder as well.

03:44.490 --> 03:46.020
If you don't have this then you need to

03:46.020 --> 03:48.720
do a little bit of work on your Git repo.

03:48.720 --> 03:50.430
All right, so let's take a quick pause right here

03:50.430 --> 03:52.140
and we'll continue in the next section.

03:52.140 --> 03:53.757
Our next step is going to be to wire up

03:53.757 --> 03:56.400
the GitHub repository to Travis CI.

03:56.400 --> 03:58.050
So I'll see you in just a moment.
