WEBVTT

1
00:00.000 --> 00:03.320
So friends, in this particular video, what I want to do is I want to

2
00:03.320 --> 00:04.040
effectively build

3
00:04.040 --> 00:08.130
upon our lab environment to more closely mimic what we will see in our

4
00:08.130 --> 00:09.360
examination.

5
00:09.360 --> 00:11.160
So think about it like this.

6
00:11.160 --> 00:15.450
In the lab, or rather in the exam, should I say, we actually see in the actual

7
00:15.450 --> 00:16.280
description

8
00:16.280 --> 00:18.440
that we're not going to have internet access.

9
00:18.440 --> 00:22.660
Now throughout this particular course, when we have been using things like DNA,

10
00:22.660 --> 00:23.040
we've

11
00:23.040 --> 00:26.870
actually been registering our system and ultimately pulling down our packages

12
00:26.870 --> 00:28.960
over the internet.

13
00:28.960 --> 00:33.340
If it's not going to happen in the examination, then we want to perhaps modify
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

13
00:28.960 --> 00:33.340
If it's not going to happen in the examination, then we want to perhaps modify

14
00:33.340 --> 00:34.840
our lab environment.

15
00:34.840 --> 00:36.640
So here's what we're going to do.

16
00:36.640 --> 00:39.920
We are, as we know, we have this Ansible Control Mode right here.

17
00:39.920 --> 00:42.400
And we also have our two managed devices.

18
00:42.400 --> 00:45.880
This can be device number one, and down here can be device number two.

19
00:45.880 --> 00:50.000
Now, as opposed to these devices going out and reaching out to the big old

20
00:50.000 --> 00:50.720
internet to

21
00:50.720 --> 00:53.960
receive their packages, this is not what we're going to do.

22
00:53.960 --> 00:57.900
Instead, what we're going to do is we're going to configure our repository here

23
00:57.900 --> 00:58.360
to actually

24
00:58.360 --> 01:00.120
act as a repo server.
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

24
00:58.360 --> 01:00.120
act as a repo server.

25
01:00.120 --> 01:04.170
Now, in this particular video, I'm going to be blazing ahead and just getting

26
01:04.170 --> 01:04.640
you set

27
01:04.640 --> 01:08.790
up as fast as possible because this part here, the setting up of our local

28
01:08.790 --> 01:10.080
system as a local

29
01:10.080 --> 01:14.070
repository server, this is not something we're going to have to do in the exam

30
01:14.070 --> 01:14.720
itself.

31
01:14.720 --> 01:18.280
What we just want to do though is to have this in play so that when it comes to

32
01:18.280 --> 01:19.040
configuring

33
01:19.040 --> 01:22.940
these particular devices settings, we have this environment whereby we can set

34
01:22.940 --> 01:23.680
up a connection

35
01:23.680 --> 01:25.760
to a non-internet-based repo.

36
01:25.760 --> 01:28.800
So really what I'm seeing here is in this particular video, do not stress about

37
01:28.800 --> 01:29.160
trying

38
01:29.160 --> 01:30.440
to memorize what we're doing.
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

38
01:29.160 --> 01:30.440
to memorize what we're doing.

39
01:30.440 --> 01:32.680
We're just trying to build our lab environment.

40
01:32.680 --> 01:36.680
The next video though, where we talk about the configuration of the servers on

41
01:36.680 --> 01:37.320
the actual

42
01:37.320 --> 01:41.190
managed devices, this is much more important for us to actually understand and

43
01:41.190 --> 01:41.920
memorize.

44
01:41.920 --> 01:45.730
So with that said, all I'm saying is don't stress this particular video, let's

45
01:45.730 --> 01:46.080
just get

46
01:46.080 --> 01:48.360
hands on and get ourselves set up.

47
01:48.360 --> 01:51.800
What I will do is that everything I happen to do in this particular video is

48
01:51.800 --> 01:52.280
going to

49
01:52.280 --> 01:56.220
be available to you so that you can easily copy paste in what I'm actually

50
01:56.220 --> 01:56.840
doing here

51
01:56.840 --> 02:00.280
and set up your own lab environment with relative ease.
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

51
01:56.840 --> 02:00.280
and set up your own lab environment with relative ease.

52
02:00.280 --> 02:01.280
So check it out.

53
02:01.280 --> 02:04.300
Like I said, if I happen to go into one of my managed nodes and I say say for

54
02:04.300 --> 02:04.800
example,

55
02:04.800 --> 02:09.170
pseudo-DNAF updates, type in my super user passwords or rather try to type in

56
02:09.170 --> 02:10.000
the correct

57
02:10.000 --> 02:11.000
passwords.

58
02:11.000 --> 02:14.440
Notice it says here the system is not registered with an entitlement server.

59
02:14.440 --> 02:18.360
You can use a subscription manager to register and it says here there are no

60
02:18.360 --> 02:19.680
enabled repositories

61
02:19.680 --> 02:22.240
in etsyormrepos.d.

62
02:22.240 --> 02:25.220
So previously what we've been doing is using the internet to actually register

63
02:25.220 --> 02:25.840
with Red Hat.

64
02:25.840 --> 02:27.560
We're not going to do that this time.

65
02:27.560 --> 02:31.760
So let's go and get this actual control node set up to act as a repository
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

65
02:27.560 --> 02:31.760
So let's go and get this actual control node set up to act as a repository

66
02:31.760 --> 02:32.760
server them.

67
02:32.760 --> 02:35.400
Now what I will say is that if you just happen to be very curious about the

68
02:35.400 --> 02:36.200
actual individual

69
02:36.200 --> 02:40.110
details of what I'm doing here, if you follow along the CBT nuggets course for

70
02:40.110 --> 02:40.760
the Red Hat

71
02:40.760 --> 02:44.420
certified system admin exam, the examination which is pretty much a

72
02:44.420 --> 02:45.480
prerequisite to this

73
02:45.480 --> 02:49.600
particular examination, we actually walk through this particular process in a

74
02:49.600 --> 02:50.880
lot more detail.

75
02:50.880 --> 02:55.030
What I'm going to do here is to use Ansible to effectively automate the process

76
02:55.030 --> 02:55.200
.

77
02:55.200 --> 02:58.840
In a nutshell though, what I'm going to do is I'm going to make use of my ISO.

78
02:58.840 --> 03:01.860
This is the actual installation desk that I use to effectively make this
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

78
02:58.840 --> 03:01.860
This is the actual installation desk that I use to effectively make this

79
03:01.860 --> 03:02.800
virtual machine.

80
03:02.800 --> 03:06.210
And pretty much on this ISO it's going to have all of the available packages

81
03:06.210 --> 03:06.640
that we

82
03:06.640 --> 03:12.160
want, things like AppStream and Bass OS and effectively make them accessible.

83
03:12.160 --> 03:15.370
So really what I'm going to do is I'm going to mount my ISO desk so that it

84
03:15.370 --> 03:16.400
becomes accessible

85
03:16.400 --> 03:20.710
to me and then going to copy particular contents from this desk into a

86
03:20.710 --> 03:22.520
directory called forward

87
03:22.520 --> 03:23.520
slash repo.

88
03:23.520 --> 03:27.790
Now this repo folder I'm effectively going to create a symbolic link to a

89
03:27.790 --> 03:29.000
particular directory

90
03:29.000 --> 03:30.800
within an Apache web server.
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

90
03:29.000 --> 03:30.800
within an Apache web server.

91
03:30.800 --> 03:34.840
So I'm going to be installing HTTPD and essentially I will just take everything

92
03:34.840 --> 03:35.600
that I've copied

93
03:35.600 --> 03:40.840
into the forward slash repo directory and make it available to external users

94
03:40.840 --> 03:41.320
via my

95
03:41.320 --> 03:42.400
web server.

96
03:42.400 --> 03:46.680
Like I say, the greater details of how this operates is in my RHCSA course.

97
03:46.680 --> 03:49.920
So feel free to check that out if you so wish like I say in this particular

98
03:49.920 --> 03:50.840
examination,

99
03:50.840 --> 03:52.240
we're not going to have to do that.

100
03:52.240 --> 03:55.340
Now one final thing because we are happening to be effectively serving up a web

101
03:55.340 --> 03:55.760
server

102
03:55.760 --> 04:00.280
and content from that server, we're also going to have to open our firewall so
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

102
03:55.760 --> 04:00.280
and content from that server, we're also going to have to open our firewall so

103
04:00.280 --> 04:00.480
that

104
04:00.480 --> 04:04.060
we can allow incoming connections over port 80 and we're also going to have to

105
04:04.060 --> 04:04.520
consult

106
04:04.520 --> 04:09.220
se Linux so that our fails actually have the correct context and they can be

107
04:09.220 --> 04:10.000
accessed.

108
04:10.000 --> 04:14.030
I know that is a lot to actually deal with but let's just go and get to it as

109
04:14.030 --> 04:14.560
quickly

110
04:14.560 --> 04:15.560
as possible.

111
04:15.560 --> 04:18.640
So here's the thing on my actual system right here.

112
04:18.640 --> 04:20.600
In my case here I'm using VMware Fusion.

113
04:20.600 --> 04:23.440
What I want to do is I want to make sure that my desk is accessible.

114
04:23.440 --> 04:26.850
Now in my case here, this little icon here, this little disk, I can click this

115
04:26.850 --> 04:27.280
and I can

116
04:27.280 --> 04:29.240
say disconnect DVD or CD.

117
04:29.240 --> 04:32.080
Now right now I can say yes to disconnect it.
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

117
04:29.240 --> 04:32.080
Now right now I can say yes to disconnect it.

118
04:32.080 --> 04:33.080
So this is what I'm doing.

119
04:33.080 --> 04:34.080
I'm starting from afresh.

120
04:34.080 --> 04:37.880
If I just click on it once again and choose connect CD DVD, pretty much the

121
04:37.880 --> 04:38.600
optical disk

122
04:38.600 --> 04:40.200
is going to be available to us.

123
04:40.200 --> 04:44.950
In fact, if I just happened to say the mount command, this one here, dev sr0 is

124
04:44.950 --> 04:45.560
actually

125
04:45.560 --> 04:46.560
that optical disk.

126
04:46.560 --> 04:50.240
Now of course in reality it's not a real physical optical disk.

127
04:50.240 --> 04:53.080
This is effectively virtualization after all but this is what I want to be

128
04:53.080 --> 04:53.840
targeting.

129
04:53.840 --> 04:54.840
Okay.

130
04:54.840 --> 04:57.680
Now first things first, I'm going to just copy in an Ansible playbook which I

131
04:57.680 --> 04:58.480
'll make available

132
04:58.480 --> 04:59.480
to you.

133
04:59.480 --> 05:00.480
Okay.
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

133
04:59.480 --> 05:00.480
Okay.

134
05:00.480 --> 05:03.390
So I'll just call this configure local repo dot yml and I'm just going to paste

135
05:03.390 --> 05:04.040
all of

136
05:04.040 --> 05:05.040
this in.

137
05:05.040 --> 05:08.200
So I paste all this in and here is what the playbook is going to do.

138
05:08.200 --> 05:10.920
We're going to target the local host which is the control node.

139
05:10.920 --> 05:13.120
We're going to act on this particular machine.

140
05:13.120 --> 05:17.520
We want to effectively install hdpd which will be your web server.

141
05:17.520 --> 05:22.360
Then we're going to start and enable that server so it also begins upon boot.

142
05:22.360 --> 05:26.120
Then what I want to do is I want to allow hdpd through the firewall so anyone

143
05:26.120 --> 05:26.840
can connect

144
05:26.840 --> 05:31.100
to this web server and then I want these changes to take effect by restarting
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

144
05:26.840 --> 05:31.100
to this web server and then I want these changes to take effect by restarting

145
05:31.100 --> 05:32.200
the firewall.

146
05:32.200 --> 05:35.510
Next I'm going to actually create this repo directory and then I want to create

147
05:35.510 --> 05:36.080
a symbolic

148
05:36.080 --> 05:40.770
link between this repo directory to a very particular destination within my web

149
05:40.770 --> 05:41.200
server

150
05:41.200 --> 05:42.200
configuration.

151
05:42.200 --> 05:44.880
So pretty much the web server is going to be configured to server up content

152
05:44.880 --> 05:45.440
within this

153
05:45.440 --> 05:48.970
particular directory and it's going to be symbolically linked to anything that

154
05:48.970 --> 05:50.240
is inside of the actual

155
05:50.240 --> 05:52.080
repo directory right here.

156
05:52.080 --> 05:55.520
Then what I want to do is I want to make all the content in this repo directory

157
05:55.520 --> 05:56.200
accessible

158
05:56.200 --> 05:57.200
via hdpd.

159
05:57.200 --> 06:02.290
I'm going to modify ac linux to allow for this by attaching this particular tag
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

159
05:57.200 --> 06:02.290
I'm going to modify ac linux to allow for this by attaching this particular tag

160
06:02.290 --> 06:02.400
and then

161
06:02.400 --> 06:06.350
I want to run my restore command against that particular directory to make the

162
06:06.350 --> 06:06.960
policy take

163
06:06.960 --> 06:07.960
effect.

164
06:07.960 --> 06:10.440
So let's just go and try this out then.

165
06:10.440 --> 06:13.500
So right now you'll notice if I happen to go to my root directory and do an ls

166
06:13.500 --> 06:13.920
we don't

167
06:13.920 --> 06:18.490
actually have this repo directory but once I run this playbook this shall be

168
06:18.490 --> 06:19.080
created.

169
06:19.080 --> 06:23.040
So let's say answerable playbook and I'll just say configure local repo dot yml

170
06:23.040 --> 06:24.080
and to enter

171
06:24.080 --> 06:27.710
open appears I happen to have an error we can see we cannot resolve a module as

172
06:27.710 --> 06:28.320
is answerable

173
06:28.320 --> 06:32.690
POSIX firewall D so what I will do here is I will just say answerable galaxy
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

173
06:28.320 --> 06:32.690
POSIX firewall D so what I will do here is I will just say answerable galaxy

174
06:32.690 --> 06:33.520
collection

175
06:33.520 --> 06:38.480
and I'm going to install answerable dot POSIX so just give this a moment and

176
06:38.480 --> 06:39.320
whilst I'm

177
06:39.320 --> 06:42.460
at it I'm also just going to go and install the community dot general

178
06:42.460 --> 06:43.440
collection as well

179
06:43.440 --> 06:47.230
so let's just save this or rather install this should I say kill kill don't ls

180
06:47.230 --> 06:47.520
we don't

181
06:47.520 --> 06:52.140
have this collections folder if I now just run my playbook here and to enter

182
06:52.140 --> 06:52.800
now we're

183
06:52.800 --> 06:56.240
going to go through the installation of the web server so that is now installed

184
06:56.240 --> 06:56.560
we're

185
06:56.560 --> 07:00.340
going to now start this particular server and enable it we now configure the
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

185
06:56.560 --> 07:00.340
going to now start this particular server and enable it we now configure the

186
07:00.340 --> 07:01.040
firewall to

187
07:01.040 --> 07:04.430
allow the web traffic and then restart that firewall then we create the

188
07:04.430 --> 07:05.200
repository and

189
07:05.200 --> 07:10.800
the sim link configure se linux and then run at restorkon so with this now done

190
07:10.800 --> 07:10.800
you

191
07:10.800 --> 07:13.720
should see here if I go to my root directory and do an ls we now have this

192
07:13.720 --> 07:14.760
particular directory

193
07:14.760 --> 07:19.080
called repo now and say to this directory we don't actually have any contents

194
07:19.080 --> 07:19.520
what we

195
07:19.520 --> 07:23.300
now want to do is you want to effectively mount or optical drive so that we can

196
07:23.300 --> 07:23.680
access

197
07:23.680 --> 07:28.170
the data and then copy over what we actually need to copy so if I do an ls blk

198
07:28.170 --> 07:29.040
dash f

199
07:29.040 --> 07:34.000
here are my file systems if I happen to say so the amount and then say dev sr0
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

199
07:29.040 --> 07:34.000
here are my file systems if I happen to say so the amount and then say dev sr0

200
07:34.000 --> 07:34.200
and what

201
07:34.200 --> 07:38.280
I want to do is I want to mount it in the mounted directory for the moment okay

202
07:38.280 --> 07:38.400
so we

203
07:38.400 --> 07:41.640
can see here this is right protected it's only redone but that is fine we only

204
07:41.640 --> 07:42.280
have to read

205
07:42.280 --> 07:47.800
the actual data here if I run an ls blk dash f once again if we scroll on up we

206
07:47.800 --> 07:48.120
can see

207
07:48.120 --> 07:51.450
here now that our optical drive has indeed been mounted what I can now do then

208
07:51.450 --> 07:51.760
is go

209
07:51.760 --> 07:55.560
into my mnt directory and do an ls we actually see the contents of that

210
07:55.560 --> 07:56.720
particular disk so

211
07:56.720 --> 08:01.310
things like app stream things like base OS this is what we want to copy over
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

211
07:56.720 --> 08:01.310
things like app stream things like base OS this is what we want to copy over

212
08:01.310 --> 08:02.000
into our

213
08:02.000 --> 08:05.320
repo directory so here's what I will do I'll go to this directory here and I

214
08:05.320 --> 08:06.400
will say sudo

215
08:06.400 --> 08:10.760
cp - capital R and then I'm going to go into my mount directory and then copy

216
08:10.760 --> 08:11.560
everything

217
08:11.560 --> 08:15.890
within base OS I'm going to put that into my repo directory okay so give a

218
08:15.890 --> 08:16.320
moment to

219
08:16.320 --> 08:20.890
copy over there we go and similarly I also want to copy over app stream okay

220
08:20.890 --> 08:21.520
and then

221
08:21.520 --> 08:26.770
again put this into my repo directory hit enter give it a moment there is a lot

222
08:26.770 --> 08:27.200
of data to

223
08:27.200 --> 08:31.630
copy over after all it may take a few moments just be patient okay perfect so
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

223
08:27.200 --> 08:31.630
copy over after all it may take a few moments just be patient okay perfect so

224
08:31.630 --> 08:32.280
if I now go

225
08:32.280 --> 08:36.360
to my repo directory and do an ls we now have the contents from that disk

226
08:36.360 --> 08:37.320
copied into this

227
08:37.320 --> 08:42.470
particular directory and because it has been similar to what is effectively or

228
08:42.470 --> 08:45.080
var www html

229
08:45.080 --> 08:49.490
repo directory inside of here we can actually access that content directly

230
08:49.490 --> 08:50.200
within here

231
08:50.200 --> 08:55.350
okay now what we want to do here is we want to make a slight modification to

232
08:55.350 --> 08:56.080
our server

233
08:56.080 --> 08:59.350
to actually serve up the contents within this particular directory so here's

234
08:59.350 --> 08:59.800
the thing

235
08:59.800 --> 09:03.460
I'm going to give you a bit of text that you're going to copy right here and
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

235
08:59.800 --> 09:03.460
I'm going to give you a bit of text that you're going to copy right here and

236
09:03.460 --> 09:03.920
like I say this

237
09:03.920 --> 09:07.730
text will be directly available to you within this scale so all you have to do

238
09:07.730 --> 09:08.200
is to go

239
09:08.200 --> 09:15.920
in to the actual ac file for the atdpd so that'll be atdpd conf and then atdpd.

240
09:15.920 --> 09:15.920
conf

241
09:15.920 --> 09:21.000
let's go in here if we scroll on down all the way to document routes which is

242
09:21.000 --> 09:21.720
this part

243
09:21.720 --> 09:25.550
here and simply I'm going to delete all of this content right here okay and I'm

244
09:25.550 --> 09:25.840
going

245
09:25.840 --> 09:28.850
to continue deleting till all of my directory tags are going okay so let's get

246
09:28.850 --> 09:29.400
rid of all

247
09:29.400 --> 09:35.210
of this stuff right here just go all the way down and there we go perfect and
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

247
09:29.400 --> 09:35.210
of this stuff right here just go all the way down and there we go perfect and

248
09:35.210 --> 09:35.760
all I want

249
09:35.760 --> 09:39.990
you to do is to paste in the text I just gave you okay just pop all that in and

250
09:39.990 --> 09:40.280
it looks

251
09:40.280 --> 09:43.480
a little bit complex but really just knock it in and it should actually allow

252
09:43.480 --> 09:43.800
you to

253
09:43.800 --> 09:47.440
affect your access your page so let's write and quit and all I will do is I

254
09:47.440 --> 09:47.800
will say sudo

255
09:47.800 --> 09:54.000
systemctl and I will restart atdpd give it a moment to actually restart perfect

256
09:54.000 --> 09:54.200
so with

257
09:54.200 --> 09:57.890
that now done all I will do is I will go and check my own local IP address so

258
09:57.890 --> 09:58.480
all I want

259
09:58.480 --> 10:02.200
to do is I want to take this particular IP address which is my local IP address
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

259
09:58.480 --> 10:02.200
to do is I want to take this particular IP address which is my local IP address

260
10:02.200 --> 10:02.560
again

261
10:02.560 --> 10:05.460
and your configuration that will no doubt be different and all I will do is I

262
10:05.460 --> 10:06.040
will just

263
10:06.040 --> 10:09.360
go to one of my devices my managed devices that is and all I'm going to say

264
10:09.360 --> 10:09.800
here is

265
10:09.800 --> 10:14.840
curl hdp colon forward slash forward slash and then type in the IP address of

266
10:14.840 --> 10:15.600
my control

267
10:15.600 --> 10:22.520
node which is 192.168.160.133 and then I will say forward slash or repo okay

268
10:22.520 --> 10:23.000
and if I hit

269
10:23.000 --> 10:26.620
answer notice if you started the output we're actually getting things like App

270
10:26.620 --> 10:27.200
Stream and

271
10:27.200 --> 10:31.240
base OS within the actual text we see here this is a good sign that the remote
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

271
10:27.200 --> 10:31.240
base OS within the actual text we see here this is a good sign that the remote

272
10:31.240 --> 10:31.800
managed

273
10:31.800 --> 10:36.080
devices can actually reach this repository server so with that now done what we

274
10:36.080 --> 10:36.600
actually

275
10:36.600 --> 10:40.940
want to do is to get to the actual configuration of our devices and instruct

276
10:40.940 --> 10:41.840
them to use this

277
10:41.840 --> 10:44.480
particular local node as their repository.
