Hey, everyone, and welcome back.
Now, in the earlier video we were discussing about the basics of the elastic file system and how it
can be used to connect to multiple set of servers and how the applications and the users connected to
that server can go ahead and access the shared file system.
Now, in today's video, we are going to go ahead and implement this practically and we'll look into
how all of these steps would really look like now from the aid of this console.
Let's quickly go to the FS service.
Now, Virginia, let's quickly go to the file system and we'll quickly create a new file system.
I'll just call it as demo hyphen FS And in this storage class you have standard as well as one zone.
If you select standard, then it will store the data redundantly across multiple availability zones.
One zone by the name itself, it states it stores the data redundantly within a single availability
zone.
So for testing purpose, you can use one zone because it will be cheaper.
However, for production environments, you can go ahead and use the standard one.
We'll be using the one zone with this selected.
Let's go ahead and quickly create a elastic file system.
So at this stage it is in the creating stage and you see it is now available.
So generally creating the FS is much more faster.
Not much of configuration is required.
Now that the FS is ready, let's go ahead and quickly create a set of instances to which we'll mount
this FS file system.
So let's open up the easy to service.
And let's launch easy to instance, the number of instances I'll select it to be two.
To verify if the shared capability works.
The name I'll just call it as a demo is two FS.
Once this is done, we'll go a bit down the keypad.
You can select the keypad that you have in the region and you can go ahead and launch the instance.
Great.
So both of our instances have been initiated successfully.
Let's go to the instances and currently both of the instances are now independent state.
You can also just change your name to quickly identify each one of them.
First one, I'll just say hyphen one.
Second one, I'll say hyphen two.
All right.
So now the instance state is running.
You can go ahead and quickly copy the public IP.
So from the CLA, you can go ahead and quickly connect to the server.
Great.
So we are connected to the server one.
Let's copy the server to public IP from a different tab.
Will quickly connect to server two as well.
Great.
Now currently I'm in the documentation associated with FS related to mounting the file system on the
AC two instance.
Now in this documentation, we'll go a little down to understand the steps that are involved.
I'll also be adding the documentation link after this video so that you can also reference to it.
Now within here in this specific step of installing the NFS client.
Now note that we have discussed that FS makes use of the network file system protocol and this is one
of the reasons why the NFS client must be present within your system.
Now, generally, if you're using the latest version of Amazon Linux, the NFS is already available.
Again, this is also added as part of the notes, so you can go ahead and skip running this command.
However, let's also run this to verify if things are present or it is installing any new package.
So from the cloud terminal, let's in fact switch to the root user.
Let's run this command and immediately you see it states that the NFS utils package is already installed
and the latest version and nothing additional needs to be done in case if you're using different operating
systems into a rocky Linux RedHat, you can go ahead and run this command to install the NFS utils.
Now the important step here is creating a directory and mounting the file system module.
So let's go ahead and quickly do that.
So first we are going ahead and we are creating a new folder called this FS Hyphen Mount Hyphen Point.
You can give any name if you'd like, I'll be using the same name.
So let's go ahead and run this command.
Similarly for the different ESI two instance, make sure you log into the root user and run this specific
command.
And if you do a list you should see a new folder of FS Mount Hyphen Point.
Now the step number two is to go ahead and mount our elastic file system and associate it with this
specific folder.
So let's copy this command now within the text document.
I'll go ahead and I'll paste the command over here.
Now what you need to do this mount hyphen, target, hyphen DNS is something that you need to replace
with your DNS over elastic file system.
So in the FS you can quickly open up your file system.
Within here you will see that you have a DNS name.
You need to copy this DNS theme and you need to replace it to.
So this is the final command.
And one more thing.
Before you run this, you have to make sure that your AC to instance, is able to connect to your elastic
file system.
And for this, in fact, if you look into this diagram, in fact, let me open it up in full screen.
We have seen on how the AC two instance connects to the amount target associated with the elastic file
system.
Now, since we have used a single availability zone based approach, we will have a mount target in
one of the availability zone.
So this easy two instance must be able to connect to the mount target.
Now for the elastic file system, if you'll quickly go to the network here, you see that our mount
target is created in the availability zone of us based one B this is the IP address and this Mount Target
has a specific security group, which is the default security group.
So let's copy this default security group ID within the instances.
Let's go to the security group section.
I'll paste the ID over here and within the modules.
We'll edit the inbound rule over here and we'll have to add one rule specifically related to NFS.
Now the NFS protocol, if you just directly type it, it will auto fill in the port of 2049 in case
if you do not see it, let's say it changes at a later stage.
You can go ahead and select custom TCP and you can add a2049 and who should be able to access it?
I'll just say one 7230 100 slash 16, which is the idea of the two instances in a VPC and I'll click
on Save Rules.
All right.
Once this is done, you can copy this entire command.
And from the ClA.
Let's clear the screen and let's run this command.
Same for the server to.
And that's it.
We are done.
Now, if I do a list under this specific folder, in fact, let's quickly go to this folder over here.
Let's create a new file class server hyphen 1.3 HD.
Now from the server to if you go to the FS mount point, if I do a list, you should be able to see
this server one txt file.
And if you do a touch on server hyphen 2.3 HD.
If I do a list, both of these files are present and from the server one.
If I do a list again, both of these files are present.
All right.
So I hope with this at a high level overview, you understood the steps required for us to be able to
mount the elastic file system to a set of resources in it.
Now, once I've done this practical, make sure that you go ahead and terminate all the resources so
that you won't be charged.
So let's select both of these easy to instances and will terminate them.
Similarly, the elastic file system that we had created, you can go ahead and delete it.
Just add the file system ID here and we'll do a confirm.
And great our filesystem is deleted.
So that's the high level overview associated with practical source of FS and with this will conclude
today's video.