Hi and welcome back.
How did you get on with the challenge?
Were you able to complete it?
Let me show you how we go ahead and complete the challenge.
So step one, we need to copy templates, Chot.
So I'm going to copy paste it and we need to rename it.
And the folder name is going to be challenged to excellent.
Now, inside, we need to do some work with our service, so let me open up that file and have a look
so we know the target port is always going to remain the same.
And make the code a little bit neater, I'm going to put this on top.
Next, what I can do is get started with my statements, calibrates, calibrates.
EKU.
We said it's going to be the type.
So you can copy this line here.
Values service type.
Because it's a string, I'm going to use double quotes and we said it's going to be no pork barrel set,
no pork, and I want to set the notebook here and we're going to want the port.
Next, we need another if statement, so I'm going to copy this line again.
This time, we're going to say else if.
And is equal to type load balancer.
And we need to support someone to copy this, paste it in.
And lastly, we need a generic statement that is if it doesn't match any of the other conditions.
Use this type in LS.
Copy reports.
Then what we need to do is end our if statement, so it's open end.
Let's format this a bit, make sure our indentation matches and now, like I said in the challenge,
we can actually go ahead and assign this manually.
So what we do is thirty thousand one.
And I'm going to leave generic port, so say Port Said, for if it was low, Beltzer use eight thousand
one.
And if not, go ahead and use Force eight one eight zero.
This isn't going to work.
When we go ahead and deploy it, we set it here anyway.
Because we've also mentioned hardcoded it, we don't need to change anything in daddy's Yamal so we
can do is go ahead and give us a quick test of why not go to the integrated terminal CD Insitute challenge
to.
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
at the beginning of every statement.
One was at the end because what is going to try and do is remove the new line from there and you will
start seeing you get these errors about Yamal to Jason conversion because what in effect will be doing
is this and that's not valid and it's not valid, Jason.
So we actually need is to keep that space in there.
What we do is just remove this line here.
Because it's an if statement is not actually rendered, so putting it in the front here is, in effect,
going to remove a slight.
This, in effect, is going to bring this line up.
Now, let's go ahead and templated that and see if that's what.
Was good so far, we can see with no errors.
Now, let's go to the top.
Awesome.
That's exactly what we want to see now.
Let's go ahead and sort out the last part, which is the templating.
So we can see we got this Ingenix container, so it's turned into a template, so I'm right.
Click creates a new file.
I call it Underscore Ingenix dot kpl that we need to defined statement so to define and we'll call this
Ingenix Loosley to end it.
There we go.
So this is the base of our template now what we can do is go ahead and copy.
Well, one thing I'm going to check is, again, the indentation.
One, two, three, four, five, six, seven, eight, call me paranoid, but I want to save a lot
of time, especially if things stop going rural and only the biggest reason for health issues is indentation.
So we care about what's good to me.
And in case you're wondering about this image, it all gets rendered at the same time.
So when we run Helme template, these values will get populated.
All looks good to me.
So now let's go ahead and use it.
So Dash, Dash and I've been include and we said it's called Ingenix the context, which is right here.
And next we need to indent it because you want it on a new line, you can use an indent.
And we also did it by eight spaces.
Now let's go ahead and templated.
Let's run health simply full stop.
So now we copy over and created Ingenix template.
Now, again, word of warning there with the indentation.
In my case it looked like eight spaces, four tabs.
And again, it's very important we make sure the formatting is correct.
So now this is looking good.
Let's go over to our deployment and add it.
So, Kelly CodeBase.
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,
as we saw, like Dash nine engine container, then we need to include a template name, which is engine
X context, which is right here.
But we also need to do is indents it now.
We could use a new line indentation which will effectively do what we want.
This case is going to put a space here, which is not what we want because it's going to do it above
this line.
Instead, what we want to use is indent and eight.
What we want to do with this current line is paste from line 17 and below.
If not, what it's going to do is keep 117 blank, literally a new line and start from 18.
So now let's go ahead and template this out and make sure it works.
So inside challenge to Let's run Helme template.
Full stop.
Awesome.
That's exactly what we want to see.
Well, there we go.
That wraps up how to complete a challenge to it's usually quite tricky with working with formatting
and working out ways to include a dash where not to.
Sometimes it can be trial and error, even when creating new challenges.
I can spend quite a while having to look up my things on indenting why things aren't working as they
should.
Important thing is, is having to go and doing it because you're going to learn more by having a go
at doonas and finding out the indentation didn't work or what did.
And if you could just watch for you and not have a go at doing it, I hope you're able to complete that.
It was quite a gnarly challenge to have.
But now you've covered beyond basics.
You now know about templating how to set up if statements, and quite rightly now, you'll be well on
your way of converting your current humanises files into Helmholtz.
Join me in the next section where we're going to be taking our health knowledge to the next level.
And we're going to be covering Chot Museum.
I look forward to seeing you there.