1 00:00:01,970 --> 00:00:06,080 As I mentioned at the in the last video we're going to focus on deploying that streaming server into 2 00:00:06,080 --> 00:00:07,980 our communities cluster in this video. 3 00:00:08,000 --> 00:00:09,180 So let's get to it. 4 00:00:09,380 --> 00:00:15,140 Like anything we've been deploying we're going to go into our code Ed find the infra directory inside 5 00:00:15,140 --> 00:00:16,230 the K AIDS folder. 6 00:00:16,310 --> 00:00:22,390 We'll make a new file called Nat's dash devil thought memo we're gonna write out a deployment site of 7 00:00:22,410 --> 00:00:26,640 here again very similar to the ones we've already created at the very top. 8 00:00:26,700 --> 00:00:35,740 We'll write out API version apps slash the one I'm going to set this to a kind of deployment for metadata 9 00:00:35,830 --> 00:00:43,090 we'll give a name of Nat's dash devil then for the spec and say that I want to run one copy of this 10 00:00:43,090 --> 00:00:53,650 thing we'll put on our selector with match labels app that's then our pod template section 11 00:00:57,100 --> 00:01:02,030 we'll once again put in a metadata section meta data. 12 00:01:02,030 --> 00:01:02,620 There we go. 13 00:01:02,630 --> 00:01:05,980 Couple of typos you're gonna fix up in here. 14 00:01:05,980 --> 00:01:14,580 We'll set up some labels in particular just app that's then on the same level of indentation as metadata. 15 00:01:14,580 --> 00:01:19,440 We'll put in our pod spec we're going to be running at one container. 16 00:01:19,560 --> 00:01:27,000 I'm going to give it a name of Nat's and then our image that's dash streaming and we're gonna specify 17 00:01:27,030 --> 00:01:33,710 a specific version here of zero point one seven point zero. 18 00:01:33,800 --> 00:01:39,280 All right now we've got our container specified right here and we said Here's the image we want to run. 19 00:01:39,410 --> 00:01:43,190 Just a moment ago I had said over here on the docker have documentation that some of these command line 20 00:01:43,220 --> 00:01:45,460 options were really important for us to set. 21 00:01:45,650 --> 00:01:50,630 If we ever want to set some custom command line options to be executed with our container starts up 22 00:01:51,020 --> 00:01:55,360 we can provide them in an option right here in this container section. 23 00:01:55,440 --> 00:01:57,320 So we're gonna write out arcs. 24 00:01:57,530 --> 00:02:04,010 This is going to be an array of arguments to provide to the primary command that gets executed when 25 00:02:04,010 --> 00:02:06,530 a container is built out of our image. 26 00:02:06,560 --> 00:02:11,450 So in other words we can take a look at all these different command line options right here. 27 00:02:11,480 --> 00:02:18,140 Let's just pick one at random and say How about Dash s.t. if we wanted to set this dash as t flag and 28 00:02:18,140 --> 00:02:23,390 make sure that Nat streaming server executed itself with the s t flag we would add inside this args 29 00:02:23,390 --> 00:02:31,270 array instead of a string dash as T each separate argument that we put inside of here is going to be 30 00:02:31,270 --> 00:02:34,340 separated inside of this array and two separate strings. 31 00:02:34,360 --> 00:02:40,400 So for example the documentation here says that we when we use the s t flag we provided a string. 32 00:02:40,480 --> 00:02:47,380 So if I wanted to provide s t and give it a string argument I would put in Nash s t and then something 33 00:02:47,380 --> 00:02:50,890 right here like that. 34 00:02:50,930 --> 00:02:52,460 Now we're not going to actually set S T. 35 00:02:52,480 --> 00:02:56,960 But there are a variety of different arguments that we are going to be setting our list here of different 36 00:02:56,960 --> 00:02:59,470 arguments is going to end up being pretty darn long. 37 00:02:59,510 --> 00:03:03,320 So bear with me for a second because we're gonna write out a lot of different arguments right here. 38 00:03:03,410 --> 00:03:06,400 Please make sure that you put in the exact same order that I do. 39 00:03:06,440 --> 00:03:10,160 Make sure that you don't have any typos of course or anything like that. 40 00:03:10,160 --> 00:03:10,370 All right. 41 00:03:10,390 --> 00:03:11,200 So let's get to it. 42 00:03:11,230 --> 00:03:13,280 A lot of different arguments we're going to put in. 43 00:03:13,280 --> 00:03:23,170 Dash P or two to two we'll put in dash M 8 2 2 2. 44 00:03:23,330 --> 00:03:31,660 I'm going to put in dash HB I five s dash HB t five s 45 00:03:34,480 --> 00:03:42,100 dash HB F Up to then s dash SD. 46 00:03:42,110 --> 00:03:42,560 There we go. 47 00:03:44,160 --> 00:03:45,330 And then finally Dash. 48 00:03:45,330 --> 00:03:48,100 See I.D. ticketing. 49 00:03:48,200 --> 00:03:52,970 Like so now we are going to come back over here and discuss exactly what all these different arguments 50 00:03:52,970 --> 00:03:53,780 are about. 51 00:03:53,780 --> 00:03:57,500 Or alternatively of course you can reference all those different arguments against these command line 52 00:03:57,530 --> 00:04:01,420 options but of course you don't want to do the reference yourself. 53 00:04:01,430 --> 00:04:01,940 Don't sweat it. 54 00:04:01,940 --> 00:04:05,000 We'll go over these options later on get. 55 00:04:05,000 --> 00:04:07,640 So that is it for the actual deployment itself. 56 00:04:07,740 --> 00:04:13,110 Naturally we still want to be able to get a connection to this deployment of the pod created by it. 57 00:04:13,160 --> 00:04:18,590 So we are going to also create a service a cluster IP service that's going to get us access to the net 58 00:04:18,600 --> 00:04:21,630 streaming server that gets created to down at the bottom. 59 00:04:21,630 --> 00:04:26,690 The file I gonna put in the dash dash dash and I'll write out a separate config to create a cluster 60 00:04:26,720 --> 00:04:28,130 IP service. 61 00:04:28,370 --> 00:04:37,050 I'm gonna put in an API version of V1 a kind of service for metadata a name of Nats SRB 62 00:04:39,780 --> 00:04:46,080 or a spec a selector of app Nats and then ports. 63 00:04:46,100 --> 00:04:49,390 In this case we're going to expose two separate ports. 64 00:04:49,400 --> 00:04:58,380 We're going to put in name calling client and protocol DCP and for that we'll have a port for 2 2 2 65 00:04:59,100 --> 00:05:07,360 and a target port of 4 2 2 2 then we'll add in a second port to expose I'm gonna give this one a name 66 00:05:07,390 --> 00:05:21,870 of monitoring protocol of DCP a port of 8 2 2 2 and a target port of 8 2 2 2. 67 00:05:21,920 --> 00:05:23,230 All right so a lot of typing. 68 00:05:23,300 --> 00:05:26,690 I apologize for all the typing but this is the worst of it from here on out. 69 00:05:26,720 --> 00:05:30,830 All the code that we're gonna write around outstripping server is going to be actually kind of interesting 70 00:05:32,110 --> 00:05:34,470 thing we're gonna do is save this. 71 00:05:34,540 --> 00:05:40,280 We're gonna go back backwards to scaffold we're going to make sure that our deployment was created. 72 00:05:40,280 --> 00:05:44,810 Yep I see somewhere inside of here the thing actually was created once I see that. 73 00:05:44,820 --> 00:05:46,430 I'll then go over to a new terminal window. 74 00:05:46,440 --> 00:05:50,580 We're going to try to print out all the different pods that are running inside of our cluster. 75 00:05:50,910 --> 00:05:57,780 And remember we do that with the cube GTL get pods and I should then see a Nats deployment pod right 76 00:05:57,780 --> 00:05:58,900 there. 77 00:05:58,920 --> 00:06:00,720 Very good. 78 00:06:00,850 --> 00:06:02,540 Make sure that you've got a status of running. 79 00:06:02,620 --> 00:06:07,000 It might take some time of course to pull down the actual image so if it says that thing is still creating 80 00:06:07,000 --> 00:06:11,800 or something like that you can rerun QCT I'll get pods and make sure that just eventually flips over 81 00:06:11,800 --> 00:06:13,460 to running. 82 00:06:13,520 --> 00:06:13,750 All right. 83 00:06:13,760 --> 00:06:17,200 So now that are not streaming servers up and running now though a quick pause right here. 84 00:06:17,240 --> 00:06:22,540 Next video we're going to focus on what Nat streaming server is and how we're going to work with it. 85 00:06:22,550 --> 00:06:25,330 He had no J.S. CEO in just a minute.