– [Instructor] In this week’s video,I want to show how we can go out and create a Linux Machineand then connect to it.In the Azure portal, go out to create a resource.And we’re going to just create the Ubuntu server.Click on the Create icon,and it takes us to the new provisioning set of dialoguesthat step us through all the things we needto put into this to make it work.So what I’m going to do, is I’m going to create a new Linux VM.Put this into my Azure quick tipproof of concept.We’re going to give this a name azqtvm-linuxand we’ll call this our number one.
We’ll put this into an environmentthat is going to be living in the Central US.So pick the data center you want to run this to.Inside of the creating a Virtual Machine,I’ve got opportunities to create Availability zonesand Availability sets.This is just going to be a testor an example of how you can go out and connect to this.So we’re just going to leave that aloneand then we’re going to come downand pick the size of the machine.Now there’s a number of different sizes that are out there,but we’ll go ahead and just use the default a D2s,which has got two CPUs and eight giga memory.
And then we have to get our Administrative account.The Username msdnadmin is where I’m going to havethe name of the account that I want to use.And then I have an SSH public key,now, in order to create that you have to go into a commandprompt, and you can do this by using the ssh-keygento generate key set.So what I’m going to do,is create this in my default directory,and then if you want, you could put a passphrase on it.I’m going to put a passphrase on hereso that I make sure that if whoever’s usingthis would get the same password.
And what this does, it generates the SSH keyfor me in my folder for .ssh/id_rsa.You’ll see in here I’ve got my id for rsa and my public key.So, if I do a notepad id_rsa.pub,I can go out and I can copy this wholething, copy that and then I paste that into the portal,which is going to be the full place where it’s going to go.
Now, I’ve got my Login with Azure Active Directory,that’s a Preview thing, I’m not going to play with that.I do want to allow me to connect up to this.So, I’m going to connect this on port 22,which is using SSH since this is a Linux machine.Now the other settings we have for our Disks,we can set up a data disk if we want.We’ve got the ability to go to premium ora standard hard drives,we’ve got networking,I’ve created a virtual network called azqt19which is the vnet that I already have in my subscriptionand it’s also has a Subnet for the front-end,So, I can get to it.
Now, I could also create something alongthe Network security group by creating special rules for it.But I’m going to have the SSH port open for the inbound.I click on Next.And we get into the diagnostics.You can add an extension.Extensions are code that gets added to a VM.So like for instance,you might have the Symantic cloud agent for this,you might have the Custom Script for Linux,you may have Stackify, or Datadog,just a bunch of different thingsthat you could install on the machinewhen it gets provisioned.
And then you can go ahead and you can add the Tags.I always have a CostCenterbecause I need to know where I’m doing things.So we’ll put a CostCenter in hereand say next, and then we can go out to review andcreate,now it’s going to run a validation makesure that everything looks rightand then we can go aheadand click on Create to provision that machine.This then goes out and initializes the deploymentand sends it to the Azure Fabricto provision all of the things that needs for this machine.
Now, it’ll take a few minutes for the provisioningto complete, and it’s going to create a public IP address,it’ll create a network security group,it’ll spin up the desk,it’ll add the VM,and then when all of those things are doneand the machine is started,then it will take us to the portal dashboard page for it.I can then go out and do things like connect to it.So we’ll give that a secondand then I can click on Go to resource.This then is showing me my Linux Machinewhere it is now open running.
I can click on Connect,and what this has,is the public IP address,but I run with my SSH command.So if I copy this and go out tomy command window,I can paste that in.It’ll then go out anddo the connection.Since I put a pass key on to my RSA key,I just need to type that in,type yes.
Let’s make sure it works.Then with that, now we’re logged into the environment.And then I can go ahead and do whatever I need to.And I can see that I’m logged into my Ubuntu Machine.I’ve got my network directory and everything else.When I’m done, I can just exit.And that closes up my SSH.And that is how we can go out and connect up to this.Now, one of the things that I enabled is Auto-shutdownand this is an important part of any kind of demos.
You do want to enable your auto-shut downto shut down at a particular time,so, like I want this to shut down at 5 pmmy time.We could send a notificationif I want to to a Webhook or to an Email address,but I’m just go ahead and save this.And now this machine will automatically deallocateand shutdown at the end of the day.But that’s a quick overview of creatingand working with a Linux VM inside of Azure.