Perhaps you already know what the Azure Cloud Shell is,
and you've maybe even accessed it. That's great.
Let's kick it up a notch by creating a resource group,
deploying a virtual machine inside of it,
accessing that virtual machine via SSH, right from the cloud shell.
Let's dive right in.
I am inside Azure Portal.
I'm going to go ahead and click on the cloud shell icon on the top left.
First thing I'm going to do is set the subscription I want to work in.
Is the account set dash dash subscription,
and the name is Gwyn play ground. Perfect.
Now what I'm going to go ahead and do is create a research group so we can
deploy some resources inside of that resource group.
The command for that would be AZ group create
dash dash location is an argument we need to provide.
I'm going to say East US 2,
and then dash name is going to be the name of the subscription.
And I'm going to call this cloud shell demo
dash resource group, go ahead and hit, enter and fantastic.
We see some output with details of our newly created resource group.
Now that we have somewhere to actually deploy some resources and let's go ahead
and create a VM.
I'm going to clear this and the command we're going to use now is AZ VM three
eight dash dash name here. We're going to provide the name of DBM.
I'm going to call it cloud show demo VM.
And now we have to provide the resource group. Here's a little tip.
Sometimes you can hit tab and it'll,
auto-fill the command like it'll type it out for you. Uh,
you do have to provide a certain amount of letters for it to be able to properly
guess. Sometimes it won't guess accurately. Uh, but this, in this case it did.
Uh, so resource group now will provide the name of the resource group,
which was cloud shell demo dash resource group.
And now we're going to provide the image we want to use for the VM and we'll
say, Ubuntu long-term support. And finally,
we're going to provide this argument. That's generate dash SSH,
dash, keys.
And then I'm going to go ahead and hit enter here. Uh,
everything is pretty straightforward here, except for this final argument here,
they generate SSH keys.
What this does is create a key on the VM and inside of our cloud shell.
So we can later SSH or access RVM,
right from the cloud show. Now this is probably going to take a minute or so.
So another tip I have for you is you see this name here.
This can actually be abbreviated to dash N and this dash dash
resource dash group can be abbreviated to dash G.
And these are just things that you pick up along the way, you know,
as you explore commands and you, um, you know, read the documentation.
So accessing the documentation for each command is pretty straightforward.
If we did something like AZ VM dash dash help,
we get a listing of the information for that command.
So it'll give us a description, uh,
AZ VM managed Linux or windows for virtual machines, and then we have subgroups.
We have commands that we can use and a whole bunch of information.
I'd suggest you take a look at this as you are exploring the cloud shell in each
command that you run, just run that AZ command dash dash help, uh,
to read more about it. All right.
So I'm going to go ahead and clear this here.
All right. So we have our VM,
so now let's try to actually access the VM. That's pretty neat, right?
What we're going to do is go into the portal and then we're going to find that
VM
and we have the public IP address here.
This would also be in the output of the command,
but I just wanted to show you that you have another way of accessing it from
here. So what we're going to do is type in SSH and then the username,
which is Gwenyth.
Your username is the value on the left side of the atom at the public
IP address. So it's one, three, seven.one, one six, five,
six.one, four eight,
and then we're going to hit enter there. And then we're going to hit. Yes.
To continue connecting. There we go. Yes.
Alrighty. And you now see that instead of at Azure,
it's at cloud shell demo VM, all right.
Any further is outside of the scope of this video, sadly,
it's time to exit and delete the VM.
So we're going to hit exit here and clear that out.
And now we can delete the virtual machine and their resource group.
We can do that by using AZ group,
delete dash dash name,
cloud show demo dash resource group.
And then it's going to ask us to confirm we're going to hit it. Why?
And that's it now to verify that it's actually been erased,
that the resource group has actually been erased.
We can run the AZ group lists command and just make sure
it's not in the list here.
We've called shell storage and then network watcher, but nothing else.
And there we have it.
We've removed the resource group in order to avoid unwanted
charges on our invoice. And that is it for this demo.
Alrighty, we've accessed the cloud shell, created a resource group,
created a virtual machine inside of that group.
We also access the documentation of the AZ account command,
and we know how to access that documentation for any Azure cloud shell command.
Finally, we access the VM,
exited the VM and removed the resource group to make sure we avoid any
surprise charges.
We listed out all of our research groups just to verify that indeed that demo
resource group we created was removed. What a day.
I'll make sure to link any additional resources that I have in the show notes.
So you can read about and learn about more on the cloud shell. Alrighty,
Cloud Gurus. That's it for this episode of ACG Fundamentals,
go on and give the cloud shell a test drive and let me know in the forums,
how it went. Keep being awesome. And I'll see you in the next one.