WEBVTT

1
00:00.000 --> 00:02.000
So friends, let's walk through the solution.

2
00:02.000 --> 00:05.600
Now the first thing to state is that NGP is ultimately all about time

3
00:05.600 --> 00:06.640
synchronization.

4
00:06.640 --> 00:11.040
And if you recall in the earlier skills, we actually saw that there was

5
00:11.040 --> 00:12.960
actually a time sync role

6
00:12.960 --> 00:15.040
directly within the rail system roles.

7
00:15.040 --> 00:17.680
Now this is something that you really should make great use of.

8
00:17.680 --> 00:20.640
Rail system roles really can make your life much, much easier.

9
00:20.640 --> 00:23.040
So because of that, what we're going to do is we're going to ensure that we

10
00:23.040 --> 00:24.320
have them available to us.

11
00:24.320 --> 00:28.160
So in this case here, what I will do is I'll start off by saying to the DNF,

12
00:28.160 --> 00:32.320
install a rail-system-ros-answer.
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

12
00:28.160 --> 00:32.320
install a rail-system-ros-answer.

13
00:32.320 --> 00:35.520
Now just give this a moment, hit Y and enter the game.

14
00:35.520 --> 00:38.240
Now as we can see here, we have these available to us.

15
00:38.240 --> 00:42.640
Now with these now installed, if you happen to go in to the user, share-answer

16
00:42.640 --> 00:43.920
able-ros-directory,

17
00:43.920 --> 00:46.560
this is where all these roles should actually exist.

18
00:46.560 --> 00:47.200
You see that?

19
00:47.200 --> 00:50.080
Say for example, rail-system-ros-time-sync,

20
00:50.080 --> 00:54.330
and also if you recall, in our answerable csh file, when we actually configured

21
00:54.330 --> 00:55.120
a role path,

22
00:55.120 --> 00:58.400
we specified that answerable would look in our roles directory.

23
00:58.400 --> 00:59.680
This is our relative path.

24
00:59.680 --> 01:03.520
So any type of custom roles we placed in this directory would be picked up.
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

24
00:59.680 --> 01:03.520
So any type of custom roles we placed in this directory would be picked up.

25
01:03.520 --> 01:06.800
But also remember, after the colon, we have another path entirely.

26
01:06.800 --> 01:10.560
Now this is actually the path of where the rail system roles are going to

27
01:10.560 --> 01:10.800
reside.

28
01:10.800 --> 01:12.640
So they also will be picked up.

29
01:12.640 --> 01:14.880
And again, we also have this third path right here.

30
01:14.880 --> 01:18.480
So because we actually have this path, they should actually be available to us.

31
01:18.480 --> 01:22.040
One other location I really want to talk to you about is one that we saw

32
01:22.040 --> 01:22.640
earlier on,

33
01:22.640 --> 01:27.760
we talked about roles, and this is the user-share.rail-system-ros.

34
01:27.760 --> 01:29.280
Now this is your best friend.

35
01:29.280 --> 01:32.160
Okay, so if we go in here, we can see all of these directories,
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

35
01:29.280 --> 01:32.160
Okay, so if we go in here, we can see all of these directories,

36
01:32.160 --> 01:35.520
and inside of these directories, we're going to have both examples,

37
01:35.520 --> 01:38.240
as well as descriptions about how to use the role itself.

38
01:38.240 --> 01:41.520
So we want to effectively create some time synchronization.

39
01:41.520 --> 01:44.960
So if we go into our time-sync directory, and do an LS,

40
01:44.960 --> 01:48.800
we can actually see we both have an example for a single pool playbook,

41
01:48.800 --> 01:51.840
as well as a multiple pool, and we also have a readme file.

42
01:51.840 --> 01:54.960
So it's going to the readme.md file right here.

43
01:54.960 --> 01:57.920
And as we can see, we actually get this collection about what this role is

44
01:57.920 --> 01:58.320
going to do.

45
01:58.320 --> 02:02.640
It's going to allow us to install and configure NTP or PTP implementation.
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

45
01:58.320 --> 02:02.640
It's going to allow us to install and configure NTP or PTP implementation.

46
02:02.640 --> 02:07.040
So if I scroll on down, we can see all of these role variables,

47
02:07.040 --> 02:10.240
and it tells us the variables that can be passed into the role itself.

48
02:10.240 --> 02:12.640
Now check this out, think about what we've got to do.

49
02:12.640 --> 02:16.880
This key right here, the hostname, is going to allow us to specify the hostname

50
02:16.880 --> 02:18.880
or the address of the server.

51
02:18.880 --> 02:25.360
Now in our case, we're asked to configure a server 192.168.100.1.

52
02:25.360 --> 02:30.320
So we want to feed this particular value into this particular parameter right
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

52
02:25.360 --> 02:30.320
So we want to feed this particular value into this particular parameter right

53
02:30.320 --> 02:30.720
here.

54
02:30.720 --> 02:35.120
Similar label also has to specify the minimum polling interval,

55
02:35.120 --> 02:36.800
which we can see right here.

56
02:36.800 --> 02:39.840
Now in that case here, we would use the min poll keyword,

57
02:39.840 --> 02:41.120
and then specify the value.

58
02:41.120 --> 02:43.840
Now I believe the value we had to use was two,

59
02:43.840 --> 02:48.080
whereas we also had to specify the maximum polling interval,

60
02:48.080 --> 02:49.280
which we can see right here.

61
02:49.280 --> 02:51.520
And that is denoted with the max poll key,

62
02:51.520 --> 02:54.480
and the value this time for us should be six.

63
02:54.480 --> 02:58.800
Now also we were supposed to enable fast initial synchronization,

64
02:58.800 --> 03:02.720
and we can see here we do this by specifying the key i-burst,
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

64
02:58.800 --> 03:02.720
and we can see here we do this by specifying the key i-burst,

65
03:02.720 --> 03:05.840
and we just give it a billion value in this case here of true.

66
03:05.840 --> 03:08.480
So we can see here the documentation pretty much tells us

67
03:08.480 --> 03:11.440
how to actually implement this just by consulting it quickly.

68
03:11.440 --> 03:15.760
Now even better yet, if we go back, if I go into my example right here,

69
03:15.760 --> 03:18.320
we can see how to actually use the actual role.

70
03:18.320 --> 03:21.280
So what I could do is highlight all of this and right click it and save,

71
03:21.280 --> 03:25.120
but since it's in an actual text file, what I will do is I'll just copy this

72
03:25.120 --> 03:28.720
example single playbook, and I'll copy it to my home directory.

73
03:28.720 --> 03:32.480
So if I go back to my home with the CD, here I am, let's close the screen.
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

73
03:28.720 --> 03:32.480
So if I go back to my home with the CD, here I am, let's close the screen.

74
03:32.480 --> 03:35.840
And if I do an LSP now have this example single playbook,

75
03:35.840 --> 03:40.480
let's just rename this, and let's just call it NTP_config.yml.

76
03:40.480 --> 03:44.320
So let's go into here, our new file, and all I want to do is I want to make

77
03:44.320 --> 03:44.480
some

78
03:44.480 --> 03:46.880
modifications. Now think about it, what we're really asked to do,

79
03:46.880 --> 03:49.920
we want to target a particular set of hosts, which is the test group,

80
03:49.920 --> 03:52.480
and now what we want to do to define our values.

81
03:52.480 --> 03:56.800
So the host name we're going to use is going to be 192.168.100.1,

82
03:56.800 --> 03:58.480
so let's just populate that value in.

83
03:58.480 --> 04:01.520
We also want to ensure that fast synchronization is enabled.
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

83
03:58.480 --> 04:01.520
We also want to ensure that fast synchronization is enabled.

84
04:01.520 --> 04:04.800
The in the example here, I burst is set to true, which is what we need.

85
04:04.800 --> 04:06.400
So let's just leave that as it is.

86
04:06.400 --> 04:08.720
Let's just delete the pull value, we don't need that.

87
04:08.720 --> 04:11.840
And also, we have to set the minimum polling interval to two,

88
04:11.840 --> 04:13.680
and the maximum polling interval to six.

89
04:13.680 --> 04:15.600
So we saw the keys we had to use was

90
04:15.600 --> 04:18.080
"minpool" and "maxpool" as per the documentation.

91
04:18.080 --> 04:20.480
So let's just say "minpool" is equal to two,

92
04:20.480 --> 04:22.800
and "maxpool" is equal to six.

93
04:22.800 --> 04:25.920
And with that now done, we should be ready to go.

94
04:25.920 --> 04:30.000
So let's just say "answerable playbook, NTP_config.yml" and to answer.
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

95
04:30.000 --> 04:32.160
Oh, we're actually going to gather facts, let's just speed things up,

96
04:32.160 --> 04:34.080
just in order to keep things really quick.

97
04:34.080 --> 04:36.240
I do like to do that, so let's go back in.

98
04:36.240 --> 04:39.120
I'm not a fan of gathering facts unless I really need them, so let's just save

99
04:39.120 --> 04:39.760
this.

100
04:39.760 --> 04:41.200
And let's try again.

101
04:41.200 --> 04:44.320
So now it kicks off, the row goes, just give it a moment to actually run

102
04:44.320 --> 04:44.720
through.

103
04:44.720 --> 04:48.200
And we can see the playbook completes, we've now made the configuration changes

104
04:48.200 --> 04:48.400
.

105
04:48.400 --> 04:52.000
So if I want to verify this, I can say "answerable" against the test group.

106
04:52.000 --> 04:54.640
And I'll say the command I want to run is going to be "goret".

107
04:54.640 --> 04:57.360
I'm going to "goret" for the actual IP address that I configured,

108
04:57.360 --> 04:59.600
192.168.100.1.

109
04:59.600 --> 05:02.640
And the file I'm going to target is going to be the "8sacrona.conf" file.
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

109
04:59.600 --> 05:02.640
And the file I'm going to target is going to be the "8sacrona.conf" file.

110
05:02.640 --> 05:04.960
If I enter here, look at what we actually get.

111
05:04.960 --> 05:06.320
We can see here device number one,

112
05:06.320 --> 05:09.600
which is a member of the test group actually does have this configuration.

113
05:09.600 --> 05:12.880
It's got the server of 192.168.100.1.

114
05:12.880 --> 05:16.080
And then pull value of two, and max pull value of six,

115
05:16.080 --> 05:19.840
and I burst fast synchronization has been enabled.
