Okay.
Hello clubbers and welcome to this lecture and this lecture we're going to look at if s so what is E
F S or F S stands for elastic file system and its file storage service for Amazon's Elastic Compute
Cloud or easy two instances so similar to IBS except where you've got IBS you can only mount your virtual
desk to one easy to instance and that's just the way it works you cannot have an easy to instance too
easy two instances sharing and IBS volume however you can have them sharing and ESFs volume so ESFS
is an easy way to use and provide a simple interface that allows you to create and configure file systems
quickly and easily and with the airfare storage capacity is elastic growing and shrinking automatically
as you add and remove files so your applications have the storage they need when they need it so it
is actually really cool.
Basically if you provision NTFS instance your it will just grow automatically so you could put like
one terabyte file on there and then add another terabyte.
You don't need to pre provision storage like you do with IBS CFS as a way.
It's great for basically file servers.
It's a great way to share files between different two instances so as always the best way to learn FSD
is to go in and start using it.
What we're gonna do is we're going to create two little easy two instances.
We're going to run a bootstrap script on them to install some tools as well as Apache and then what
we're going to do is we're going to go and mount this Alvar dub dub dub each team Al directory to an
airforce mount point and then that way we only need one copy of our website or a Web site will be stored
on ESFS and when we go an update or make changes to it we're just that those changes are replicated
automatically across all our E2 instances.
So if you go the time please join me in the adobe us console.
Okay Sir Harry M in the obvious management console currently in the London Region.
Let's go ahead and provision our airforce clusters.
You'll find airfares under storage and we're going to go in and provision our ESFs file system.
So let's go ahead and create our file system in here.
We can see the three different Availability Zones that's going to be spread across.
It is going to go into our default security group within our default VPC and you will need to remember
that for a bit later let's go ahead and hit next.
And in here we can add in our tags we don't need to add any in there.
This is quite new enable lifecycle management so just like how we have lifecycle policies on S3 we also
have this with ESFS and essentially you've got different policies in here.
So if your files haven't been access in the last 14 days or 30 days or 60 days or et cetera et cetera
it will automatically move them over to ESFs infrequently access storage class which is cheaper.
I'm not gonna do that because we're going to delete this almost straight away in here we've got our
throughput mode we can just use bursting we don't need provisioned throughput.
Same with performance is just going to be a single web page that we're putting on here.
So I'm gonna do general purpose and not Max IO and I am going to enable encryption of my data and I'm
just going to use this came as master key.
It's going to make one for me called elastic file system.
Let's go ahead and hit next and we'll go ahead and hit create file system so that can take about four
or five minutes to go in and create your file system you will see it in here that it's the Mount target
state is creating this will change to available in about four or five minutes let's go over to our easy
two instances I'm going to go in and provision our easy two instances let's go ahead and launch our
instances we're gonna do an Amazon Linux 2 am I gonna do a t to micro and I'm going to change the number
of instances in here to 2 and then I'm gonna give it this bootstrap script.
So this is the bootstrap script in here essentially all we're doing is running a yum update we're installing
Apache were starting the Apache service we're making sure Apache comes back on air power easy to instance
restarts and then we're installing the Amazon airforce utilize tool and that will allow us to mount
it a bit later to our our file system to our easy two instances so grab that copy it into your clipboard
and then just paste it in here and then we'll go ahead and hit next to add our storage gonna leave everything
else is default I'm going to drop this into my web DMZ security group and then we're gonna go ahead
and launch it and make sure you have access to your key pair because you will need to SS H into these
easy two instances they're now launching while we're waiting for those to launch Let's go over to our
security group so if you remember we provisioned our ESFs file system into our default security group
and ESFS is going to or our Web servers are going to communicate to our file system using the NFL protocols
we actually need to open this up on our inbound firewall rules Cisco in hearing hit edit and you can
see I've actually already got this one in but we may as well just add it in manually.
So you just click in here scroll down to NFL.
And then it's on Pt. 2 0 4 9.
And to do that you just type in SMG and then select your web DMC and go ahead and hit safe and then
you should be able to see that you've got your NFL s firewall rule in here.
So it's allowing NFL protocol into our default security group from our Web servers.
And if you don't do this it's not the lab is it going to work.
So don't forget to do this.
Let's go back over to our airfares and see if it's up online to our elastic file system.
See in here that my mount target states are now all available.
So it is good to go before we go in and mount this.
Let's go and open up.
Let's go over to E2 and we want to grab the public IP addresses of our two running instances.
So I'm going to select this one first.
Going to copy this into my clipboard and then type SSA easy to.
And then hyphen user.
And then at.
And then paste my public IP in there and then it's called My London key.
And going to hit.
Yes.
And then I'm going to elevate my privileges to route going to clear the screen.
Let's go over to our VAR dub dub dub HCM El directory and just make sure it exists if it exists that
means that Apache has been installed so we're all good to go.
Then you just need to go back at directories to go back to your dub dub dub directory and go ahead and
clear the screen.
Let's grab our second IP address.
So the second one is this one here and we're gonna do exactly the same steps.
So just copy this into our clipboard.
Go back over and then need to go back over to my other tab and then in here I'm going to type in SSA
H easy to then hyphen user then and then enter in my public IP address minus I mean it's my London keypad
again I'm type yes.
Elevate your privileges to routes are pseudo SMU.
It's clear the screen just to make it easier to see.
Then we're gonna go over to city dub dub dub and then he reached your email directory.
Make sure Apache is install which it is and then go back a directory it's very important and you always
go back a directory to our dub dub dub.
So we've got our two tabs open both in our dub dub dub and we've got separate internal IP addresses.
Let's go back over to our browser and we're gonna go back over to ESFS.
We're going to mount our elastic file system to our easy two instances Amazon make this very easy for
us or we need to do is scroll down to here and click on the Mount instructions from a local VPC that
will then give us the command.
We've already ran this command in the boot straps scripts that has already been done.
And then what we need to do is go down here.
There's two different commands here using the Mount helper.
This one will do it and it means that there will be no encryption in transit.
We don't want that we want to make sure our files are encrypted in transit because we've also got encryption
at rest turned on.
So we want to use the tier less command in here.
You won't need sudo because already at root so just copy that into your clipboard.
Go back over to your browser and click on one of the taps in a pasted in here.
But we don't want it to go to the ESFS directory.
We want it to go to our VAR dub dub dub.
And then he watched TMF directory so he watched PML and then when you hit enter it can take like a few
seconds if it hangs for more than a minute.
It means these security groups aren't working.
That's typically what it is.
Again I'm going to paste the same tab of the same command into the other tab.
And we're gonna change it to my var dub dub dub.
And then reached him male directory and then in here I'm going to tape L S so I can see my reached here
male directory they go into it and then type L S there's nothing in there.
So let's create a file so I'm gonna do echo gonna make a little web page so each team will then do our
body and we'll do a header and we'll say hello ESFs gurus and then I'm going to end my header and the
body and then we're going to end the tempo and each time I'll close out our quotations and then we're
going to output this to our index.
Then each team.
And then if we type in L S that's created the file we type cat index dot reached him l You can see the
contents of the file in there we go back over to our other tab type in Alice we can see I hate them
email directory we go into the tail end all directory and type our s we can see indexed at each demo
we cannot index each time l You can see the contents of the file.
Now we can go in on this easy to instance and we could change the file so we could go nano index dot
each demo and then instead of saying hello airfare scorers we end it.
Keep being awesome.
Cloud gurus and then I'm just gonna hit control x.
Yes and then hit enter and change my tab over tomorrow.
They're easy to instance.
And if I do cat indexed I reached him out.
You can see that they're all reading from the same files so it's all on the same file system.
So you make a change on one that changes automatically you know replicate it out to our other web servers.
You can go and visit the website we just created by going to the public IP address and you can check
it out there.
I'm not going to.
What we are going to do is it can take a while to delete your file systems in airports.
So I'm going to go in and just terminate the easy two instances first.
So we'll just do that by going up here actions instance state and then we go over and hit terminate
and hit yes terminate and then we'll go over to ESFS and then we're going to go into this office elastic
file system and delete the file system and you just grab the name of the file system in here.
Copy it into your clipboard and then pasted in here and it says it's a destructive action that cannot
be undone.
So let's be destructive in our head of the US environment.
So that is it is really really simple ESFS is a way of having common file systems or storage using NFL
s between your different you know easy two instances.
Very easy to set up and get going and then you don't need to worry about you know sinking files between
your easy two instances because they're all on the same file system.
So let's go and have a look at my exam tips.
So what are my exam tips.
Well airfare supports and network file system version 4 or NF s a V for protocol with airfares you only
pay for the storage that you use there's no pre provisioning required it's not like IBS where we have
to you know say hey I want an eight gig IBS volume we basically just pay as we go.
It can scale up to the petabytes and it can support thousands of concurrent NFC East connections and
then data is stored across a multiple Availability Zones within a region.
And in terms of the consistency model it's always read after right to consistency.
So you're almost at the end of this section on the course we're going to have a very quick lecture looking
at placement groups in the next lecture and then we're going to summarize everything that you've learned.
So if you've got the time please join me in the next lecture.
Thank you.