WEBVTT

1
00:00.000 --> 00:03.280
So I hope you have fully recovered from that previous video.

2
00:03.280 --> 00:05.160
I know that was a lot to actually get to,

3
00:05.160 --> 00:06.200
but with that now done,

4
00:06.200 --> 00:09.280
we're in a good place to begin practicing some of our skills.

5
00:09.280 --> 00:10.800
So in this particular video,

6
00:10.800 --> 00:15.080
we're going to focus in on the actual configuration of our managed nodes.

7
00:15.080 --> 00:17.240
Okay, this is the important part.

8
00:17.240 --> 00:19.480
So let's pretend we're in an examination,

9
00:19.480 --> 00:23.800
and what I'm going to ask you is to configure your managed nodes

10
00:23.800 --> 00:27.320
to actually access the base OS and AppStream packages

11
00:27.320 --> 00:30.120
from the repository that we just configured.
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

11
00:27.320 --> 00:30.120
from the repository that we just configured.

12
00:30.120 --> 00:32.040
So right now, what I would encourage you to do is

13
00:32.040 --> 00:33.800
to pause the video momentarily,

14
00:33.800 --> 00:37.720
and then I'll walk through how I would actually solve this particular problem.

15
00:37.720 --> 00:39.920
Okay, so I've unposed the video, I'm now back.

16
00:39.920 --> 00:44.060
Let me see how you actually did by comparing it to how I solved this particular

17
00:44.060 --> 00:44.600
problem.

18
00:44.600 --> 00:47.360
So first thing to actually consider is we want to think,

19
00:47.360 --> 00:52.600
"Hmm, how are we actually going to configure a repository server?"

20
00:52.600 --> 00:54.720
Now recall, within this particular course,

21
00:54.720 --> 00:59.320
we discussed something known as the YUM_Repository module.

22
00:59.320 --> 01:01.760
Now this one should maybe stand out in your mind
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

22
00:59.320 --> 01:01.760
Now this one should maybe stand out in your mind

23
01:01.760 --> 01:05.880
because it was a little bit strange because as we know in modern rail-based

24
01:05.880 --> 01:06.320
systems,

25
01:06.320 --> 01:08.720
we actually don't really use YUM anymore.

26
01:08.720 --> 01:10.720
In fact, it's basically been replaced by DNF,

27
01:10.720 --> 01:13.920
although both are effectively compatible with one another.

28
01:13.920 --> 01:17.320
So despite the fact that DNF is the more modern solution,

29
01:17.320 --> 01:22.120
the Ansible module to configure a repository is still known as YUM_Repository.

30
01:22.120 --> 01:24.320
So this is the one that we're going to look at.

31
01:24.320 --> 01:26.720
So let's go and write this playbook.

32
01:26.720 --> 01:28.720
So let's just call this one, oh I don't know,

33
01:28.720 --> 01:31.920
"configure_remote_repose.YML" okay.
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

33
01:28.720 --> 01:31.920
"configure_remote_repose.YML" okay.

34
01:31.920 --> 01:35.320
Now in this particular case, what I want you to do is to target all of the

35
01:35.320 --> 01:35.720
devices,

36
01:35.720 --> 01:37.120
so that is the two devices.

37
01:37.120 --> 01:38.920
So at the very top, I have my three hyphens,

38
01:38.920 --> 01:40.720
I'll give this playbook a name,

39
01:40.720 --> 01:44.520
I'm just taking "figure_repose" on all devices.

40
01:44.520 --> 01:46.320
Now I'll target the host, who am I going to target,

41
01:46.320 --> 01:47.520
I'll target the all group.

42
01:47.520 --> 01:48.720
Do I want to gather facts?

43
01:48.720 --> 01:50.320
Well, I don't actually have to use them,

44
01:50.320 --> 01:52.320
so what's the point? It's just going to slow me down.

45
01:52.320 --> 01:55.120
Let's just save the seconds and we'll configure that to be false.

46
01:55.120 --> 01:57.720
Although I will say if you do actually gather facts,

47
01:57.720 --> 02:00.720
that's perfectly fine, you're not going to lose any points for that at all.
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

47
01:57.720 --> 02:00.720
that's perfectly fine, you're not going to lose any points for that at all.

48
02:00.720 --> 02:02.920
Okay, so let's define our tasks.

49
02:02.920 --> 02:06.320
And the first task is going to be "configure_appstream".

50
02:06.320 --> 02:10.950
Cool, so what I'm going to use, I'm going to use the Ansible built-in YUM_Rep

51
02:10.950 --> 02:14.520
ository module.

52
02:14.520 --> 02:18.520
Now again, just to refresh your mind with respect to the YUM_Repository module,

53
02:18.520 --> 02:20.720
we want to specify the base URL,

54
02:20.720 --> 02:23.320
which is going to be the URL to the directory,

55
02:23.320 --> 02:26.920
where are the YUM repositories repo data directory actually lives?

56
02:26.920 --> 02:29.720
This can be a list of multiple URLs.

57
02:29.720 --> 02:32.320
We also have our description right here,
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

57
02:29.720 --> 02:32.320
We also have our description right here,

58
02:32.320 --> 02:35.720
which is going to be a human readable string describing the repository.

59
02:35.720 --> 02:38.320
"Enabled", we can specify as a billion value,

60
02:38.320 --> 02:39.720
this is the default, it's going to be true.

61
02:39.720 --> 02:42.720
It specifies whether or not YUM should actually use this repository.

62
02:42.720 --> 02:45.320
Now the GPG check, this is important.

63
02:45.320 --> 02:48.520
If we happen to specify that the value is false,

64
02:48.520 --> 02:52.120
then we're not going to effectively perform our GPG signature check.

65
02:52.120 --> 02:54.120
However, if we actually do,

66
02:54.120 --> 02:57.120
then we want to supply the GPG key value

67
02:57.120 --> 03:01.520
and then specify the URL pointing to the actual GPG key file.
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

67
02:57.120 --> 03:01.520
and then specify the URL pointing to the actual GPG key file.

68
03:01.520 --> 03:06.120
So say for example, you may in fact be asked to specify a GPG check,

69
03:06.120 --> 03:10.320
set as to true, and then we also want to add in that actual GPG key.

70
03:10.320 --> 03:12.920
Now we have the name key, which is specified as required,

71
03:12.920 --> 03:15.120
if the state is set to present or absent.

72
03:15.120 --> 03:18.920
And in here, we provide a unique repository ID.

73
03:18.920 --> 03:21.520
So let's take this information and build the playbook.

74
03:21.520 --> 03:23.920
So let's use the name parameter right here,

75
03:23.920 --> 03:25.720
or specify it's going to be AppStream,

76
03:25.720 --> 03:27.120
we're going to configure right here.

77
03:27.120 --> 03:28.720
Then we'll have a description,

78
03:28.720 --> 03:31.720
or just say AppStream on the control node.
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

78
03:28.720 --> 03:31.720
or just say AppStream on the control node.

79
03:31.720 --> 03:32.920
Now what is the base URL?

80
03:32.920 --> 03:34.520
This is always very, very important.

81
03:34.520 --> 03:37.520
Now of course, on my Loho system right here,

82
03:37.520 --> 03:41.720
my IP address is 192.168.160.133.

83
03:41.720 --> 03:44.320
So I want to say that my devices should reach this

84
03:44.320 --> 03:47.320
via HTTP, and then I'll say colon forward slash forward slash

85
03:47.320 --> 03:48.520
and type in the IP address.

86
03:48.520 --> 03:51.520
Obviously modify this to whatever your environment happens to be,

87
03:51.520 --> 03:54.720
or whatever you're asked to actually use as the base URL.

88
03:54.720 --> 03:56.120
Maybe you'll actually have a domain name,

89
03:56.120 --> 03:57.920
maybe you'll have an IP address, who knows.

90
03:57.920 --> 03:59.520
And then I'll say forward slash repo,

91
03:59.520 --> 04:02.720
and then I want to actually target AppStream particularly, okay.
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

91
03:59.520 --> 04:02.720
and then I want to actually target AppStream particularly, okay.

92
04:02.720 --> 04:05.320
Then I'll say enabled is equal to true,

93
04:05.320 --> 04:08.920
and then I'll set GPG check to the value of false.

94
04:08.920 --> 04:10.920
So this is going to be how I configure AppStream,

95
04:10.920 --> 04:13.920
and I'll do the same type of thing with respect to base OS,

96
04:13.920 --> 04:15.120
so I'll just give this a new name,

97
04:15.120 --> 04:16.720
or just I configure base OS.

98
04:16.720 --> 04:18.120
Once again, what am I going to use?

99
04:18.120 --> 04:19.080
The exact same module,

100
04:19.080 --> 04:21.120
Ansible built in, YumRepository.

101
04:21.120 --> 04:23.720
The name this time is going to be base OS.

102
04:23.720 --> 04:28.120
The description will just be base OS on the control node.

103
04:28.120 --> 04:29.720
And then I'll specify the base URL.

104
04:29.720 --> 04:31.320
Once again, really, really similar,
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

104
04:29.720 --> 04:31.320
Once again, really, really similar,

105
04:31.320 --> 04:33.920
we're going to target the same server over HTTP.

106
04:33.920 --> 04:36.320
But once again, target that repo directory,

107
04:36.320 --> 04:39.520
this time though, we're going to access base OS.

108
04:39.520 --> 04:42.520
And again, we'll have enabled set to true

109
04:42.520 --> 04:45.720
and GPG check set to false.

110
04:45.720 --> 04:47.920
So let's check this out and see how we actually get on.

111
04:47.920 --> 04:49.920
So all we'll do here is I'll say Ansible,

112
04:49.920 --> 04:53.720
hyphen playbook configure remote repos and hit enter.

113
04:53.720 --> 04:55.520
Oh, I'm going to have a spelling mistake right there.

114
04:55.520 --> 04:56.720
Let's go back in.

115
04:56.720 --> 04:59.320
Notice I wrote rest positoro.

116
04:59.320 --> 05:00.320
This is obviously an error.
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

116
04:59.320 --> 05:00.320
This is obviously an error.

117
05:00.320 --> 05:01.520
It should be a repository.

118
05:01.520 --> 05:03.320
Let's just save this, apologies about that.

119
05:03.320 --> 05:04.920
I'll do it and try again.

120
05:04.920 --> 05:07.720
Now the playbook kicks off and we have our changes.

121
05:07.720 --> 05:09.720
So let's go to our devices.

122
05:09.720 --> 05:11.520
So over on device number one,

123
05:11.520 --> 05:15.120
if I say pseudo DNF repo list and to enter,

124
05:15.120 --> 05:17.320
type in my password of password one,

125
05:17.320 --> 05:19.440
notice we can actually see here we have configured

126
05:19.440 --> 05:22.840
AppStream and base OS over on the control node.

127
05:22.840 --> 05:23.680
Now here's the test.

128
05:23.680 --> 05:26.920
If I happen to say pseudo DNF updates and to enter,

129
05:26.920 --> 05:28.080
notice we don't get any errors.

130
05:28.080 --> 05:29.720
It just says there is nothing to do.

131
05:29.720 --> 05:32.600
So what I will try to do is I'll now say pseudo DNF install.
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

131
05:29.720 --> 05:32.600
So what I will try to do is I'll now say pseudo DNF install.

132
05:32.600 --> 05:34.200
And let's try to install say, for example,

133
05:34.200 --> 05:36.520
engine X directly from the control node.

134
05:36.520 --> 05:38.720
If I enter now, look at what we actually have here.

135
05:38.720 --> 05:41.680
We have the option to actually begin installing

136
05:41.680 --> 05:44.360
this particular package over my control node.

137
05:44.360 --> 05:45.200
So say, for example,

138
05:45.200 --> 05:48.120
if I just say a Y for yes, it's going to begin installing

139
05:48.120 --> 05:50.400
and now I actually have engine X on my system.

140
05:50.400 --> 05:53.920
So if I say systemctl status for engine X,

141
05:53.920 --> 05:55.880
notice we actually do have the service module.

142
05:55.880 --> 05:58.200
It just happens to be disabled and inactive.

143
05:58.200 --> 05:59.840
But of course, if I so watched what I could do,

144
05:59.840 --> 06:03.680
is I could say, so the systemctl and I could start engine X.
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

144
05:59.840 --> 06:03.680
is I could say, so the systemctl and I could start engine X.

145
06:03.680 --> 06:05.120
And then if I check the status,

146
06:05.120 --> 06:06.760
now we can see engine X is active

147
06:06.760 --> 06:08.120
and running on the system.

148
06:08.120 --> 06:11.360
All of this enabled because we were able to download

149
06:11.360 --> 06:13.960
the actual package without having to register

150
06:13.960 --> 06:17.280
over the internet for your subscription manager to Retat.

151
06:17.280 --> 06:20.920
We simply used the repo server to server up the actual

152
06:20.920 --> 06:24.520
packages via what we copied over from our optical disk.

153
06:24.520 --> 06:26.840
So as we can see here with the Yum repository module,

154
06:26.840 --> 06:29.920
very, very important, we can actually configure our servers

155
06:29.920 --> 06:34.400
to actually use a specific server to act as a repository host.
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

155
06:29.920 --> 06:34.400
to actually use a specific server to act as a repository host.
