1 00:00:01,330 --> 00:00:05,350 In this video we're going to go through setting up ingress and tonics on our Google Cloud cluster yet 2 00:00:05,350 --> 00:00:05,870 again. 3 00:00:05,870 --> 00:00:08,240 Now this is going to end up being really easy and straightforward. 4 00:00:08,260 --> 00:00:09,580 So let's just get to it. 5 00:00:09,590 --> 00:00:15,970 I'm going to first go to the official documentation for ingress engine X yet again I'll then go to a 6 00:00:15,970 --> 00:00:24,990 deployment I'll then go down to the mandatory command to the mandatory command is this one right here. 7 00:00:25,210 --> 00:00:27,940 I'm going to copy that command. 8 00:00:27,990 --> 00:00:34,240 I'll go back over to my terminal I go in to make sure that I'm connected to the correct context. 9 00:00:34,240 --> 00:00:38,440 So if you're still running Docker for Mac or Docker for Windows you'll want to open up that Cuban I.D. 10 00:00:38,440 --> 00:00:41,340 menu and just make sure that you're connected to the GK. 11 00:00:41,500 --> 00:00:45,740 Or Google Cuban settings engine context right there. 12 00:00:45,780 --> 00:00:48,170 Well then go ahead and paste that command in and run it. 13 00:00:50,560 --> 00:00:54,430 That'll take just a moment or two to create all the appropriate objects. 14 00:00:54,450 --> 00:00:54,870 There we go. 15 00:00:54,900 --> 00:00:56,610 Everything has been created. 16 00:00:56,650 --> 00:01:01,230 Now if we go back over to the installation directions you'll notice that there is a little bit of additional 17 00:01:01,230 --> 00:01:04,200 setup that we have to go through if we are using Google Cloud. 18 00:01:04,200 --> 00:01:09,510 So I going to click on that Google Cloud link right there and you'll see that is telling us to run this 19 00:01:09,510 --> 00:01:11,460 one additional command. 20 00:01:11,460 --> 00:01:21,120 So I'm going to also copy that GC e.g. K E command go backwards to my console again and paste it. 21 00:01:21,160 --> 00:01:22,540 There we go. 22 00:01:22,540 --> 00:01:22,740 All right. 23 00:01:22,750 --> 00:01:29,530 Well that's pretty much it for that setup we have now installed ingress engine X on our Google Cloud 24 00:01:29,530 --> 00:01:30,630 cluster. 25 00:01:30,640 --> 00:01:35,770 So now we need to update our host file again so that whenever we try to go to ticketing dot Dev rather 26 00:01:35,770 --> 00:01:41,640 than having it loop back to our local machine we want to redirect it to that remote cluster so let me 27 00:01:41,640 --> 00:01:46,320 just give you a quick reminder of what ingress engine X is really doing for us and what the step right 28 00:01:46,320 --> 00:01:48,530 here really truly means. 29 00:01:48,540 --> 00:01:53,040 So we took a look at this diagram a while ago you might recall that I told you that at some point time 30 00:01:53,070 --> 00:01:58,260 we were going to deploy our cluster to some cloud providers such as eight of us Google Cloud or Microsoft 31 00:01:58,260 --> 00:01:59,440 Asa. 32 00:01:59,460 --> 00:02:03,210 So the commands that we just executed created two things for us. 33 00:02:03,240 --> 00:02:05,750 It created first an ingress controller. 34 00:02:05,790 --> 00:02:10,760 That's the thing that runs inside of our cluster that has some of our routing rules tied to it. 35 00:02:11,040 --> 00:02:16,710 But it also created something else it created something a look called a load balancer. 36 00:02:16,740 --> 00:02:19,590 This is tied directly to Google Cloud. 37 00:02:19,590 --> 00:02:24,540 It's essentially a Google cloud thing that is running outside of our cluster entirely. 38 00:02:24,660 --> 00:02:29,310 So whenever we want to connect to our cluster now we really want to attempt to connect to this load 39 00:02:29,310 --> 00:02:31,290 balancer right here. 40 00:02:31,290 --> 00:02:35,460 This is really relevant for when we go to update our host file because we need to at some point enter 41 00:02:35,460 --> 00:02:37,400 an IP address inside there. 42 00:02:37,410 --> 00:02:41,940 So when we go to our host file and we enter in the IP address we actually want to connect to whenever 43 00:02:41,940 --> 00:02:49,260 we go to ticketing dot Dev we want to enter in the IP address of this load balancer to get the IP address 44 00:02:49,260 --> 00:02:50,360 for that load balancer. 45 00:02:50,400 --> 00:02:54,000 We're going to look it up on the Google cloud dashboard. 46 00:02:54,000 --> 00:02:58,790 So again when we just ran those commands it created this load balancer for us. 47 00:02:58,860 --> 00:03:04,440 Which means we should be able to go to the Google cloud load balancer page on this menu on the left 48 00:03:04,440 --> 00:03:05,040 hand side. 49 00:03:05,130 --> 00:03:10,260 And we should see that a load balancer was automatically created for us by our Cuban editors cluster 50 00:03:10,290 --> 00:03:16,060 or more specifically by ingress engine X so going to scroll down on the left hand side and go to the 51 00:03:16,060 --> 00:03:24,320 section called networking then inside of networking I'm going to find network services and go to load 52 00:03:24,320 --> 00:03:27,300 balancing and then site up here. 53 00:03:27,330 --> 00:03:30,220 We're going to see a load balancer that was created for us. 54 00:03:30,300 --> 00:03:35,700 It's got a randomly generated name and it apparently is pointing to our back end server. 55 00:03:35,700 --> 00:03:38,370 Now you might notice a little warning right here right now. 56 00:03:38,430 --> 00:03:40,540 Something says two instances are unhealthy. 57 00:03:40,620 --> 00:03:41,360 That's really okay. 58 00:03:41,370 --> 00:03:43,730 We're gonna ignore that right now. 59 00:03:43,810 --> 00:03:47,830 I'm going to click on that load balancer that was just created for us and it's then going to give us 60 00:03:47,890 --> 00:03:51,280 the IP address that our load balancer exists set. 61 00:03:51,400 --> 00:03:58,690 So again this is the IP address of the load balancer that was created for us by the ingress engine stuff. 62 00:04:00,130 --> 00:04:04,720 So that is the IP address that we want to tell our hosts file to connect to any time we tried to go 63 00:04:04,720 --> 00:04:05,870 to ticketing dot Dev. 64 00:04:06,580 --> 00:04:09,900 Let's open up our host file right now in entering that IP. 65 00:04:09,930 --> 00:04:12,180 I'm gonna copy that IP address. 66 00:04:12,190 --> 00:04:17,900 I'll then go over to my terminal and open up my etsy post file yet again. 67 00:04:17,990 --> 00:04:21,260 Of course if you're on Windows you'll want to make sure that you open up your host file on a Windows 68 00:04:21,260 --> 00:04:21,970 machine. 69 00:04:22,040 --> 00:04:29,640 Again that's some file inside the system 32 directory and then find ticketing dev and I'm going to update 70 00:04:29,640 --> 00:04:31,070 the IP address. 71 00:04:31,200 --> 00:04:32,600 Like so. 72 00:04:32,670 --> 00:04:37,320 So now whenever you type in ticketing that dab into our browser we're going to actually connect to our 73 00:04:37,320 --> 00:04:40,150 load balancer inside of Google Cloud. 74 00:04:40,340 --> 00:04:41,710 So I gotta save this. 75 00:04:42,010 --> 00:04:43,980 I get that permissions ever again. 76 00:04:44,020 --> 00:04:47,680 So enter my password and I'm good to go. 77 00:04:49,770 --> 00:04:50,120 All right. 78 00:04:50,120 --> 00:04:51,620 So that is it. 79 00:04:51,620 --> 00:04:57,080 Now in theory less than we have to do is restart scaffold when we restart scaffold it should reload 80 00:04:57,140 --> 00:04:59,830 are off or I shouldn't really say reload. 81 00:04:59,840 --> 00:05:04,920 It's gonna take our off deployment config file and deploy it to the Google cloud cluster. 82 00:05:04,970 --> 00:05:09,520 It's also going to take our set of routing rules and apply them to that cluster as well. 83 00:05:09,560 --> 00:05:11,490 Let's do that final test in the next video.