So friends, in this particular video, what I want to do is I want to
effectively build
upon our lab environment to more closely mimic what we will see in our
examination.
So think about it like this.
In the lab, or rather in the exam, should I say, we actually see in the actual
description
that we're not going to have internet access.
Now throughout this particular course, when we have been using things like DNA,
we've
actually been registering our system and ultimately pulling down our packages
over the internet.
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
If it's not going to happen in the examination, then we want to perhaps modify
our lab environment.
So here's what we're going to do.
We are, as we know, we have this Ansible Control Mode right here.
And we also have our two managed devices.
This can be device number one, and down here can be device number two.
Now, as opposed to these devices going out and reaching out to the big old
internet to
receive their packages, this is not what we're going to do.
Instead, what we're going to do is we're going to configure our repository here
to actually
act as a repo server. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
act as a repo server.
Now, in this particular video, I'm going to be blazing ahead and just getting
you set
up as fast as possible because this part here, the setting up of our local
system as a local
repository server, this is not something we're going to have to do in the exam
itself.
What we just want to do though is to have this in play so that when it comes to
configuring
these particular devices settings, we have this environment whereby we can set
up a connection
to a non-internet-based repo.
So really what I'm seeing here is in this particular video, do not stress about
trying
to memorize what we're doing. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
to memorize what we're doing.
We're just trying to build our lab environment.
The next video though, where we talk about the configuration of the servers on
the actual
managed devices, this is much more important for us to actually understand and
memorize.
So with that said, all I'm saying is don't stress this particular video, let's
just get
hands on and get ourselves set up.
What I will do is that everything I happen to do in this particular video is
going to
be available to you so that you can easily copy paste in what I'm actually
doing here
and set up your own lab environment with relative ease. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
and set up your own lab environment with relative ease.
So check it out.
Like I said, if I happen to go into one of my managed nodes and I say say for
example,
pseudo-DNAF updates, type in my super user passwords or rather try to type in
the correct
passwords.
Notice it says here the system is not registered with an entitlement server.
You can use a subscription manager to register and it says here there are no
enabled repositories
in etsyormrepos.d.
So previously what we've been doing is using the internet to actually register
with Red Hat.
We're not going to do that this time.
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
So let's go and get this actual control node set up to act as a repository
server them.
Now what I will say is that if you just happen to be very curious about the
actual individual
details of what I'm doing here, if you follow along the CBT nuggets course for
the Red Hat
certified system admin exam, the examination which is pretty much a
prerequisite to this
particular examination, we actually walk through this particular process in a
lot more detail.
What I'm going to do here is to use Ansible to effectively automate the process
.
In a nutshell though, what I'm going to do is I'm going to make use of my ISO.
This is the actual installation desk that I use to effectively make this WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
This is the actual installation desk that I use to effectively make this
virtual machine.
And pretty much on this ISO it's going to have all of the available packages
that we
want, things like AppStream and Bass OS and effectively make them accessible.
So really what I'm going to do is I'm going to mount my ISO desk so that it
becomes accessible
to me and then going to copy particular contents from this desk into a
directory called forward
slash repo.
Now this repo folder I'm effectively going to create a symbolic link to a
particular directory
within an Apache web server. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
within an Apache web server.
So I'm going to be installing HTTPD and essentially I will just take everything
that I've copied
into the forward slash repo directory and make it available to external users
via my
web server.
Like I say, the greater details of how this operates is in my RHCSA course.
So feel free to check that out if you so wish like I say in this particular
examination,
we're not going to have to do that.
Now one final thing because we are happening to be effectively serving up a web
server
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
and content from that server, we're also going to have to open our firewall so
that
we can allow incoming connections over port 80 and we're also going to have to
consult
se Linux so that our fails actually have the correct context and they can be
accessed.
I know that is a lot to actually deal with but let's just go and get to it as
quickly
as possible.
So here's the thing on my actual system right here.
In my case here I'm using VMware Fusion.
What I want to do is I want to make sure that my desk is accessible.
Now in my case here, this little icon here, this little disk, I can click this
and I can
say disconnect DVD or CD.
Now right now I can say yes to disconnect it. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
Now right now I can say yes to disconnect it.
So this is what I'm doing.
I'm starting from afresh.
If I just click on it once again and choose connect CD DVD, pretty much the
optical disk
is going to be available to us.
In fact, if I just happened to say the mount command, this one here, dev sr0 is
actually
that optical disk.
Now of course in reality it's not a real physical optical disk.
This is effectively virtualization after all but this is what I want to be
targeting.
Okay.
Now first things first, I'm going to just copy in an Ansible playbook which I
'll make available
to you.
Okay. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
Okay.
So I'll just call this configure local repo dot yml and I'm just going to paste
all of
this in.
So I paste all this in and here is what the playbook is going to do.
We're going to target the local host which is the control node.
We're going to act on this particular machine.
We want to effectively install hdpd which will be your web server.
Then we're going to start and enable that server so it also begins upon boot.
Then what I want to do is I want to allow hdpd through the firewall so anyone
can connect
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
to this web server and then I want these changes to take effect by restarting
the firewall.
Next I'm going to actually create this repo directory and then I want to create
a symbolic
link between this repo directory to a very particular destination within my web
server
configuration.
So pretty much the web server is going to be configured to server up content
within this
particular directory and it's going to be symbolically linked to anything that
is inside of the actual
repo directory right here.
Then what I want to do is I want to make all the content in this repo directory
accessible
via hdpd.
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
I'm going to modify ac linux to allow for this by attaching this particular tag
and then
I want to run my restore command against that particular directory to make the
policy take
effect.
So let's just go and try this out then.
So right now you'll notice if I happen to go to my root directory and do an ls
we don't
actually have this repo directory but once I run this playbook this shall be
created.
So let's say answerable playbook and I'll just say configure local repo dot yml
and to enter
open appears I happen to have an error we can see we cannot resolve a module as
is answerable
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
POSIX firewall D so what I will do here is I will just say answerable galaxy
collection
and I'm going to install answerable dot POSIX so just give this a moment and
whilst I'm
at it I'm also just going to go and install the community dot general
collection as well
so let's just save this or rather install this should I say kill kill don't ls
we don't
have this collections folder if I now just run my playbook here and to enter
now we're
going to go through the installation of the web server so that is now installed
we're
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
going to now start this particular server and enable it we now configure the
firewall to
allow the web traffic and then restart that firewall then we create the
repository and
the sim link configure se linux and then run at restorkon so with this now done
you
should see here if I go to my root directory and do an ls we now have this
particular directory
called repo now and say to this directory we don't actually have any contents
what we
now want to do is you want to effectively mount or optical drive so that we can
access
the data and then copy over what we actually need to copy so if I do an ls blk
dash f
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
here are my file systems if I happen to say so the amount and then say dev sr0
and what
I want to do is I want to mount it in the mounted directory for the moment okay
so we
can see here this is right protected it's only redone but that is fine we only
have to read
the actual data here if I run an ls blk dash f once again if we scroll on up we
can see
here now that our optical drive has indeed been mounted what I can now do then
is go
into my mnt directory and do an ls we actually see the contents of that
particular disk so
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
things like app stream things like base OS this is what we want to copy over
into our
repo directory so here's what I will do I'll go to this directory here and I
will say sudo
cp - capital R and then I'm going to go into my mount directory and then copy
everything
within base OS I'm going to put that into my repo directory okay so give a
moment to
copy over there we go and similarly I also want to copy over app stream okay
and then
again put this into my repo directory hit enter give it a moment there is a lot
of data to
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
copy over after all it may take a few moments just be patient okay perfect so
if I now go
to my repo directory and do an ls we now have the contents from that disk
copied into this
particular directory and because it has been similar to what is effectively or
var www html
repo directory inside of here we can actually access that content directly
within here
okay now what we want to do here is we want to make a slight modification to
our server
to actually serve up the contents within this particular directory so here's
the thing
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
I'm going to give you a bit of text that you're going to copy right here and
like I say this
text will be directly available to you within this scale so all you have to do
is to go
in to the actual ac file for the atdpd so that'll be atdpd conf and then atdpd.
conf
let's go in here if we scroll on down all the way to document routes which is
this part
here and simply I'm going to delete all of this content right here okay and I'm
going
to continue deleting till all of my directory tags are going okay so let's get
rid of all
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
of this stuff right here just go all the way down and there we go perfect and
all I want
you to do is to paste in the text I just gave you okay just pop all that in and
it looks
a little bit complex but really just knock it in and it should actually allow
you to
affect your access your page so let's write and quit and all I will do is I
will say sudo
systemctl and I will restart atdpd give it a moment to actually restart perfect
so with
that now done all I will do is I will go and check my own local IP address so
all I want
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
to do is I want to take this particular IP address which is my local IP address
again
and your configuration that will no doubt be different and all I will do is I
will just
go to one of my devices my managed devices that is and all I'm going to say
here is
curl hdp colon forward slash forward slash and then type in the IP address of
my control
node which is 192.168.160.133 and then I will say forward slash or repo okay
and if I hit
answer notice if you started the output we're actually getting things like App
Stream and
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
base OS within the actual text we see here this is a good sign that the remote
managed
devices can actually reach this repository server so with that now done what we
actually
want to do is to get to the actual configuration of our devices and instruct
them to use this
particular local node as their repository.