WEBVTT 00:00.430 --> 00:01.420 Hi and welcome back. 00:01.870 --> 00:03.670 How did you get on with the challenge? 00:04.180 --> 00:05.230 Were you able to complete it? 00:05.770 --> 00:08.530 Let me show you how we go ahead and complete the challenge. 00:09.540 --> 00:11.880 So step one, we need to copy templates, Chot. 00:13.580 --> 00:16.160 So I'm going to copy paste it and we need to rename it. 00:19.150 --> 00:23.020 And the folder name is going to be challenged to excellent. 00:25.380 --> 00:30.590 Now, inside, we need to do some work with our service, so let me open up that file and have a look 00:30.900 --> 00:33.480 so we know the target port is always going to remain the same. 00:34.580 --> 00:37.520 And make the code a little bit neater, I'm going to put this on top. 00:41.620 --> 00:46.230 Next, what I can do is get started with my statements, calibrates, calibrates. 00:49.360 --> 00:50.020 EKU. 00:51.180 --> 00:52.460 We said it's going to be the type. 00:53.560 --> 00:54.820 So you can copy this line here. 00:55.950 --> 00:57.540 Values service type. 00:59.670 --> 01:05.550 Because it's a string, I'm going to use double quotes and we said it's going to be no pork barrel set, 01:06.360 --> 01:11.640 no pork, and I want to set the notebook here and we're going to want the port. 01:14.890 --> 01:18.690 Next, we need another if statement, so I'm going to copy this line again. 01:21.820 --> 01:24.970 This time, we're going to say else if. 01:26.560 --> 01:29.070 And is equal to type load balancer. 01:30.810 --> 01:34.420 And we need to support someone to copy this, paste it in. 01:36.210 --> 01:41.860 And lastly, we need a generic statement that is if it doesn't match any of the other conditions. 01:41.910 --> 01:44.010 Use this type in LS. 01:45.840 --> 01:46.730 Copy reports. 01:49.510 --> 01:53.350 Then what we need to do is end our if statement, so it's open end. 01:54.330 --> 02:00.810 Let's format this a bit, make sure our indentation matches and now, like I said in the challenge, 02:00.810 --> 02:04.080 we can actually go ahead and assign this manually. 02:05.560 --> 02:07.750 So what we do is thirty thousand one. 02:08.670 --> 02:17.130 And I'm going to leave generic port, so say Port Said, for if it was low, Beltzer use eight thousand 02:17.130 --> 02:17.460 one. 02:19.060 --> 02:23.400 And if not, go ahead and use Force eight one eight zero. 02:24.090 --> 02:24.850 This isn't going to work. 02:24.850 --> 02:27.130 When we go ahead and deploy it, we set it here anyway. 02:28.470 --> 02:33.300 Because we've also mentioned hardcoded it, we don't need to change anything in daddy's Yamal so we 02:33.300 --> 02:41.280 can do is go ahead and give us a quick test of why not go to the integrated terminal CD Insitute challenge 02:41.280 --> 02:41.610 to. 02:44.580 --> 02:50.220 So now we're seen we've got these added spaces and we don't want them, so we can do is put in a dash 02:50.220 --> 02:52.470 at the beginning of every statement. 02:54.780 --> 02:59.580 One was at the end because what is going to try and do is remove the new line from there and you will 02:59.580 --> 03:05.520 start seeing you get these errors about Yamal to Jason conversion because what in effect will be doing 03:05.880 --> 03:09.950 is this and that's not valid and it's not valid, Jason. 03:10.320 --> 03:12.440 So we actually need is to keep that space in there. 03:13.140 --> 03:15.630 What we do is just remove this line here. 03:16.860 --> 03:21.690 Because it's an if statement is not actually rendered, so putting it in the front here is, in effect, 03:21.690 --> 03:23.190 going to remove a slight. 03:25.080 --> 03:27.630 This, in effect, is going to bring this line up. 03:29.120 --> 03:31.790 Now, let's go ahead and templated that and see if that's what. 03:34.510 --> 03:36.910 Was good so far, we can see with no errors. 03:38.180 --> 03:39.170 Now, let's go to the top. 03:41.610 --> 03:42.190 Awesome. 03:42.210 --> 03:44.760 That's exactly what we want to see now. 03:44.790 --> 03:47.820 Let's go ahead and sort out the last part, which is the templating. 03:54.130 --> 03:59.680 So we can see we got this Ingenix container, so it's turned into a template, so I'm right. 03:59.680 --> 04:01.030 Click creates a new file. 04:01.060 --> 04:10.090 I call it Underscore Ingenix dot kpl that we need to defined statement so to define and we'll call this 04:10.700 --> 04:13.600 Ingenix Loosley to end it. 04:15.940 --> 04:16.520 There we go. 04:16.550 --> 04:21.550 So this is the base of our template now what we can do is go ahead and copy. 04:21.850 --> 04:24.610 Well, one thing I'm going to check is, again, the indentation. 04:25.630 --> 04:31.570 One, two, three, four, five, six, seven, eight, call me paranoid, but I want to save a lot 04:31.570 --> 04:37.090 of time, especially if things stop going rural and only the biggest reason for health issues is indentation. 04:42.050 --> 04:43.320 So we care about what's good to me. 04:43.970 --> 04:47.950 And in case you're wondering about this image, it all gets rendered at the same time. 04:47.960 --> 04:51.140 So when we run Helme template, these values will get populated. 04:52.010 --> 04:52.970 All looks good to me. 04:53.000 --> 04:55.480 So now let's go ahead and use it. 04:55.850 --> 05:05.090 So Dash, Dash and I've been include and we said it's called Ingenix the context, which is right here. 05:05.810 --> 05:11.720 And next we need to indent it because you want it on a new line, you can use an indent. 05:13.570 --> 05:15.830 And we also did it by eight spaces. 05:16.300 --> 05:17.920 Now let's go ahead and templated. 05:25.220 --> 05:28.490 Let's run health simply full stop. 05:49.050 --> 05:52.290 So now we copy over and created Ingenix template. 05:53.130 --> 05:55.290 Now, again, word of warning there with the indentation. 05:55.440 --> 05:57.980 In my case it looked like eight spaces, four tabs. 05:58.440 --> 06:01.240 And again, it's very important we make sure the formatting is correct. 06:01.440 --> 06:02.670 So now this is looking good. 06:02.820 --> 06:05.040 Let's go over to our deployment and add it. 06:05.730 --> 06:07.170 So, Kelly CodeBase. 06:09.420 --> 06:14.160 But in a dash, because what we don't want it to do is when it renders we have a space and then we have, 06:14.640 --> 06:22.780 as we saw, like Dash nine engine container, then we need to include a template name, which is engine 06:22.830 --> 06:25.700 X context, which is right here. 06:26.940 --> 06:29.760 But we also need to do is indents it now. 06:29.760 --> 06:34.140 We could use a new line indentation which will effectively do what we want. 06:34.560 --> 06:39.840 This case is going to put a space here, which is not what we want because it's going to do it above 06:39.840 --> 06:40.380 this line. 06:40.840 --> 06:44.600 Instead, what we want to use is indent and eight. 06:45.290 --> 06:49.320 What we want to do with this current line is paste from line 17 and below. 06:49.590 --> 06:55.140 If not, what it's going to do is keep 117 blank, literally a new line and start from 18. 06:57.240 --> 07:00.330 So now let's go ahead and template this out and make sure it works. 07:00.690 --> 07:03.810 So inside challenge to Let's run Helme template. 07:04.350 --> 07:04.990 Full stop. 07:05.830 --> 07:06.460 Awesome. 07:06.480 --> 07:08.100 That's exactly what we want to see. 07:09.090 --> 07:09.630 Well, there we go. 07:09.630 --> 07:14.760 That wraps up how to complete a challenge to it's usually quite tricky with working with formatting 07:14.760 --> 07:17.440 and working out ways to include a dash where not to. 07:17.850 --> 07:21.090 Sometimes it can be trial and error, even when creating new challenges. 07:21.120 --> 07:25.140 I can spend quite a while having to look up my things on indenting why things aren't working as they 07:25.140 --> 07:25.480 should. 07:26.200 --> 07:30.120 Important thing is, is having to go and doing it because you're going to learn more by having a go 07:30.150 --> 07:33.540 at doonas and finding out the indentation didn't work or what did. 07:34.080 --> 07:38.490 And if you could just watch for you and not have a go at doing it, I hope you're able to complete that. 07:38.670 --> 07:40.440 It was quite a gnarly challenge to have. 07:40.440 --> 07:42.540 But now you've covered beyond basics. 07:42.750 --> 07:47.700 You now know about templating how to set up if statements, and quite rightly now, you'll be well on 07:47.700 --> 07:51.180 your way of converting your current humanises files into Helmholtz. 07:51.570 --> 07:54.990 Join me in the next section where we're going to be taking our health knowledge to the next level. 07:55.470 --> 07:57.240 And we're going to be covering Chot Museum. 07:57.450 --> 07:58.740 I look forward to seeing you there.