Azure Files Tutorial | Easy file shares in the cloud

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments

Will I be able to use this to replace my on-prem home drive file servers?

👍︎︎ 1 👤︎︎ u/Dolinhas 📅︎︎ May 26 2020 🗫︎ replies
Captions
hey guys this is Adam and back with another video today I will show you what is a surefire service and how can you use it to create your own file shares and manage them with an adder this is a quick introduction to this fantastic service stay tuned as always let's start with some basics is a fully managed file share service within the cloud which you can access through SMB with a server message block or HTTP but also it is a sub service of other storage account that means you get all the great features that come with storage account as part of our jar files and the easiest that I found when talking about how other files work is talking about common scenarios and the first one is lift and shared applications so a lift and shift is a process where you move application from one to another environment without making any redesign and any changes and other files is great at it because if you have your server and on that server you have application this application will work with some Drive and usually this is just a hard drive for within your server application will use that drive to save its data files maybe some logs and things like this what you can do with other files is create a storage account on that storage account by default you have access to other files and inside of that service you will create a file share once you do it you can actually mount this file sure to your drive and from that point onward all the files that application will save to a local drive will be actually saved to a sure storage account to a file share through SMB protocol and you don't actually have to make any changes to application you just mount your drive and point your application to the specific folder or specific drive and that's it as you see it's perfect for lift and shift application and extending your servers with capabilities of either from the perspective of your server and application those files look like normal files because this is just a map drive so there's no difference there and the second scenario that is very common for files is replacing or standing on premises servers so imagine you have file server within your organization and you use some drives and folders in that server and you expose those to your clients through maybe NFS SMB or FTP whatever your organization needs what you can do in this case is take advantage of are your files by again creating a storage account and then within that storage account creating a share once you do it what you actually need to do next is to install a shell file sync agent this agent will be responsible for syncing the server local folders with are restored account and in order to create that sync you need to use storage sync services and create something called sync group in that sing group you'll actually point to that file sync agent and tell him synchronize those folders with this specific share so your local file server will act as a cache and as your file sync will actually perform the syncing in this case using local file server as a cache and extending it allows you to get that high performance of local connectivity between your clients and your file server but still extending that functionality to other and getting more capabilities out of it and also a very common use case for other files is working with containers so for instance if you again have your storage account with your file sure you can actually mount it as a drive as a persistent storage for your container inside of whenever that's kubernetes or maybe container instances it's an amazing tool and it's very easy to configure and you can take advantage of it in just couple of minutes let's jump to Azure portal and create file share in order to create a file sure go to the mini click create a resource and you can either type other files but notice that when you do you will actually not find anything you will actually find a file sync so what you actually need to do is to create a storage account hit create and you need to provide a resource group name in this case I will create a resource group called our files tutorial you need to provide a name for the storage account am demo files a region in this case as always I'm choosing north Europe is the closest to me and everything can be left as default now hit review and create and hit create in just one or two minutes a storage account will be provisioned and nothing else is required for you to create other files once the surface has been provisioned simply hit go to the resource and that's it now you are ready to use fosters as you see this is pretty much standard storage account you have containers tables queues but you also have five shirts in it so let's go to file shares and create ourselves a new file sure hit new file share on the top give you the name and in this case I'm going to call it demo share you can specify a quota some maximum capacity of your file sure in this case it's gonna be 10 gigabytes for me and select create now we're done a for-sure has been created and you can start using it if you go and navigate to demo share that we just created as you see there are not many options here so the most important options is the connect option because it gives you a small auto-generated script for your operating system of choice so you can mount it very easily so let's try this out let's start with Windows virtual machine for this purpose I created you a small script that will create those virtual machines for you simply open cloud show let it instantiate select bash as a language and then just copy paste the script from the video description and let it run it will create a Windows virtual machine for you once it's done a scrip will provide you with the username and a password public IP and the name of virtual machine that is created so those are the all information you need in order to connector I will copy the first public IP now go to a tool that I like to use to connect through remote desktop to Windows virtual machines which is remote desktop connection manager in here simply right-click add a new server and in server name paste a P for the display name I'm gonna use the name of my virtual machine so my Windows VM next we need to paste a username so go to logon credentials unselect inherit and paste the username clear the domain because this is a locally running account and grab the password and paste the password here before you hit add I also like to go to remote desktop settings here and unselect inherit from parent and select same as client area this is a pretty cool feature actually because now when I connect to this virtual machine it will instantiate the resolution based on the client size area of this window so it will perfectly fit into my window without any scroll bars so I highly recommend this tool except the certificate unless you see the resolution of the window perfectly fits my client area so let's close all those pop-ups and start working on our ROV em in this case we want to map the drive and there are a couple ways to do so the first one is using PowerShell so let's open partial window in reality we don't really need to know how to write a proper PowerShell script to mount the drive we just need to go back to our portal let's hide the cloud shuffle now and just copy paste the script this is already prepared for you from our row so just choose the drive letter maybe I want to drive letter P copy to clipboard and go back to our VM and paste the script this script will now run test the connectivity first to ensure that all the firewalls are open for the proper ports for vultures it will add a new credential that will be used and stored locally and then mount the drive on your local VM remember that you can also use this to extend machines and workstations of your organization your employees can also take advantage of our show files to extend their drives and get some file share capabilities from other directly under machines but one thing that I want you to note here is the username and the password that is used to mount this drive if you see here let me actually change the resolution and the font size to something bigger like 24 and in this case notice the username is a sure slash the name of your file sure and then the password is the storage account key so mounting your drive with full admin privileges you can use identities of your organization but we're going to talk about that later in the video for now this is the simplest way to extend your servers and for server purposes using the administrative key is fine now that the file shares mounted let's do a quick demo in here we can actually simply upload a file from our portal we can I'll maybe choose a small PNG file and then go to our VM to find the file sure you should be able to find it within your computer so just go to your PC and see demo sure so it's the same name as we created in natural portal and if you open it notice the quick PNG file that we uploaded you can of course do pretty much the same from here just by creating text file called demo and maybe editing its contents so let's edit it and type hello world simply save it close this and if you go back to our portal and refresh the view notice default is already there and this is because that server right now whenever you change anything on the drive directly sends it to other file sure you don't really have to do anything just remember that might be a slight latency so usually that second scenario of doing the local file server as a cache is also very good for performance reasons but this is very simple very easy to setup and you can extend existing applications with pretty much no effort needed if a common line is not your thing and you don't want to send some scripts to your users to execute but you can also do is a normal month life on a Windows first part what we need is to grab the URL to our file sure go to properties blade select a URL without HTTP at the start and go to your other VM in here first thing you need to do go to your PC right click on your county mounted share and hit disconnect because you cannot have two same drives connected at the same time once you do it right-click on your PC select map network drive provide the folder path which is two backslashes and the URL to your posture remember to remove the slashes and make sure that there is no HTTP at the start should be just the name of your file service and the name of the char select connect using different credentials hit finish remember you can also change the drive letter if you want hit finish select more choices use different account and type backslash name of the file service can actually go back to portal go to file share go to storage account because this is the name of entire storage account so you can go to access key and grab it from many places you can grab it from here from the top or from this store to come name here copy paste it and put it as a username and the password for the drive is simply said that account key that's why I came to into this panel so paste it as a password hit OK attempting to connect and the drive was mapped this time as a letter Z as you see you can very easily prepare some operational procedures so users can map it through GUI instead of some sort of script that you don't want them to run anyway we can go back to our portal and do the second demo with Linux VM so let's open cloud shell let's reconnect if we were disconnected in the meanwhile and in this case again I prepared your script which will create a Linux VM so just paste it here let it run and it will create a Linux virtual machine and we'll connect to it through SSH once the script is done again you get public IP name of your VM and a user there's no password here because this will be using SSH so simply type SSH remember SSH is already installed on our cloud so you don't have to do anything and just provide a username add a public IP and press Enter do you want to connect yes do you trust the server yes and we just like that connected with SSH to that VM now if we want to mount our storage we perform that almost same operational like previously go to overview maybe hide this panel for a second a little select File shirt's select our demo sure hit connect and select Linux this will again give you an already prepared bar script that you need to run just copy to clipboard expand this and copy place the script and let it run and just literally under a second it's already done to verify it works you can actually type LS / mount to see what kind of mountains drives do you have in this Linux as you see there's a and demo files so again let's type a.m. tab to fill and as you see demo txt manager identity PNG and if you want to output something hello world queue you can do that by just using a simple command line I've made a typo der but it's not relevant just type LS and you'll see the new file is already there refresh in the portal and it's also here it's this easy to manage multiple file shares on multiple VMs just couple of minutes now let's go back to presentation so first of all you should remember that file share has some requirements and when it comes to SMB version that you're using it depends on your system there are more supported versions if you're mounting file shares with another but usually if you using up-to-date systems which you shoot anyway you should be fine to use it just make sure that the proper port is open in some internet providers and some organizations you might have it locked so definitely check that script but that script if you remember at the very first thing it will do it will try to connect and will let you know in case there are some connectivity issues on your end when it comes to Linux systems most of the common operating systems on the market are supported and it supports both two point while in some older versions but this is required to be within the same outer region or if you want to do it for own premises or cross region then you need to use SMB 3.0 so what else do we get here first of all you also have support for Mac OS if you signal in the portal it also prepares you a specific script just to run second of all there's something called snap shutting and this is something I actually want to show you because it's pretty neat feature simply go to agile portal let's close the cloud Jean right now you no longer need it let's close this blade and on the left hand side there's operations and there's a snapshot blade if you hit on it you can actually create a new snapshot so let's create new snapshot as you see I just pressed it and it's done right now we have snapshot at our state of our file sure so let's demo how this works if you go back to your VM and maybe change our demo txt file let's hit edit and let's add a new line new new line and save the file if you close it right now you already have two versions of that phone because snapshotting is simply set versioning for your shares so if you right-click on that file you go to properties you will be able to find the properties and previous versions of that file and this is pretty much pulled and notice the hour and the date is pretty much today so it's a snapshot that I just created and of course you can create more snapshots in the portal by simply going back to portal and hitting other snapshot again right now if you go back to your file right-click properties go to previous versions you still see only the previous version because we didn't change anything in that file but if you close it you edit it for the first time again new line and save it close it you can now review all the previous versions for that file go to properties previous versions and now you can see two previous versions based on the previous snapshots that we created and if you want it's as easy as just clicking it hitting restore restoring the file it will grab the previous version from the azure the previous version has been restored successfully and you can right click and edit it and as you see we're back to the previous version to the first version that we created and it is also equally easy to do it from other portal so if you go back to portal and select any of these snapshots you will be able to review a list of files and if you want to revert to any previous version of the snapshot simply hit context menu restore but additionally you have cool option here that we can actually provide a new file name so you might not want to override your file when restoring it just provide a new copy and review what was changed across those files so it's pretty neat feature that you get out of the box and you can very easily automate it using your scripts to get a daily snapshots of your VMs alright so what else do we get well we get support for all the tools that you can use with either blob storage and storage account in general like AZ copy to copy bulk amount of data a lot of files at once easy copies fantastic for that or maybe storage Explorer which allows you to get UI and use and manage your vouchers very easily additionally have support for CLI and partial so you can automate some stuff around vultures as well additionally because this is a sub service of storage accounts you get those scalability high availability security all the cool features of storage accounts just by using our vouchers and lastly you have support for identity which is an amazing feature because so far we were mounting our charts using standard admin account and access key which is fine for server to server communications and up patience but if you want to replace your on-premises pushers Asha has you covered because it supports identities from your organization both on-premises and in other you just need to deploy domain services and then connect your DMS to those domain services and then you can integrate your storage account with identities so users would retain their privileges would be able to assign privileges on a holder level and use their own personal accounts to connect definitely a feature worth exploring and we'll have a separate video just for this and that's it remember that are your file service is an extension of storage accounts so you get all the benefits of storage accounts definitely check what's there also for you to take advantage in just couple of minutes for today that's it hit the thumbs up leave a comment if you want to suggest something subscribe if you want to see more videos and support me and definitely see you next time [Music]
Info
Channel: Adam Marczak - Azure for Everyone
Views: 42,947
Rating: undefined out of 5
Keywords: Azure, Storage, Storage Account, File, File Share, FileREST, SMB, Samba, NFS, FTP, File Server, Share
Id: BCzeb0IAy2k
Channel Id: undefined
Length: 21min 25sec (1285 seconds)
Published: Tue May 26 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.