>> Did you know you can edit files directly
within Cloud Shell or create locks to prevent
accidental deletion of subscriptions or resources?
Spend a few minutes now to save yourself hours later.
Michael Crump is here to share the latest
Azure Tips and Tricks today on Azure Friday.
[MUSIC]
>> Hey everyone.
Donovan Brown here with another episode of Azure Friday.
I'm here with Michael and we're going to learn about
the latest Azure Tips and Tricks.
So we did a show earlier talking about
the universe of it but now you're actually
going to show us some of the latest Tips and Tricks.
>> Absolutely. I've worked with the community.
We have a couple of new things that I love to share with us.
So why don't we just jump right in?
>> Just jump right into it. So what area
of the tips and tricks are
we're going to be? So what does this focus on?
>> So I'm going to focus on the Azure portal.
>> Okay.
>> Then we'll take a look at a couple of
them that have a couple of
App Service and tips and then we'll finish up
with Cloud Shell.
>> Perfect.
>> Another little surprise inside of there.
>> Awesome. So let's see.
>> Okay. Great. So a lot of people,
they are already familiar with,
you use the mouse to click
around and open up the different resources.
One thing that I've found a lot of people aren't
necessarily familiar with is the actual keyboard shortcuts.
So there is this whole list of
keyboard shortcuts and this list actually updates quite often.
So if you want to quickly go
to the dashboard or go to all resources,
instead of going over and navigating,
do leftmost Devs, just click on it.
Use G plus D and this G plus R and in this,
G plus A, and this example to jump over to that resource.
Another one that has come up often is
the double-click to change to the theme.
A lot of folks were asking, "Hey, okay.
What if I don't necessarily want this?"
They were like, "Oh well, you're forcing me to
have this double-click functionality and I don't want."
Well, luckily, there's actually now the ability to turn that off.
So if you go into the "Settings" here,
you'll see that there is a button that will allow you.
>> To look at the dashboard. Yeah.
>> Yeah, and so you can actually turn that off.
>> Okay.
>> One more other thing inside of Azure,
when you want to know,
what's some of the latest and greatest?
What's happening next to the world of Azure?
Our roadmap. That also is contained right inside of here.
So you can click one button and if you're looking at,
okay, so the next coming weeks. Okay, cool.
The Azure policy for AKS is going to be in private preview.
It gives me that ability to keep my mind on what's coming up next.
That way for my future projects,
I'm always ready to rock and roll.
>> Yeah, and as a Microsoft employee,
it would help me answer questions like,
when are we going to get AKS in Korea?
I can actually just come here and
see exactly when we're going to do that.
>> Exactly. The other,
the nice thing here is,
you can show now available.
I used to work in healthcare,
and obviously, in healthcare,
we only had to use trusted base like two years later.
>> Later exactly.
>> Exactly. So for a lot of those establishments,
they have to have the ability
to click and see what's currently available,
and obviously, you can do in preview and in development.
>> Awesome.
>> One other tip inside of the portal,
and then we'll move right on is that,
this is sometimes the default or this
is the default dashboard.
>> Okay.
>> Now, for me,
I work a lot of
private projects for
maybe some demos and some of the other things,
and this is a kind of a boring dashboard.
What a lot of folks have asked for in the past was,
what if we could start here at home and say,
okay, here's all my recent resources.
Let's look at virtual machines,
some of the top most popular things that a developer does.
Again, you can absolutely do that super quick.
It is right within the "Settings".
Choose your default view,
and so instead of going into
the dashboard, you can quickly go "Home".
>> Got you.
>> Well, we switch things
over and take a look at some apps services.
>> App service is one of my favorite features
inside of Azure.
I actually use it for a production site that
I run and it just changed my life,
because I used to host on a VM and
you'd have to service pack it and reboot it,
and all the things that owning a VM is about.
You go to App Service in your life is
just a Virtual Directory essentially right.
You never worry about the OS, you never reboot it.
Deployment slots give me zero downtime deployment.
I cannot say enough nice things about App Service.
It's one of my favorite features. So any tips and tricks
that's going to make it even cooler is going to be awesome.
>> Yes, absolutely.
So one of the things that once you
spin up or you create an App Service,
in this example, there is Quickstart guides.
So I created just a blank Azure App Service.
I can click on this button and whatever stack
that I'd like to do,
it gives me that full guidance.
Now, a lot of people,
they already know what they're building or whatever.
So this is primarily good for new developers.
>> Okay.
>> That are new to the platform.
But another thing that is in here is
this "Diagnose and solve problems".
At first glance, you may think "Diagnose,
and solve problems" it
is only about let's do solve problems,
but it also has things in here such as "Best Practices".
For myself, I know the code part of it but I don't
necessarily know some of
the best practices with things like auto-scaling.
So it brings up this little wizard
and you can just click through it,
and it will diagnose your current Web app.
From there, it can give you
recommendations on what you can do better.
Then even if you have
connection strings that you want to validate and test,
you can do that thing as well as
troubleshooting just like the name here suggest.
So there's quite a few options
that you can do like SSL's and domains.
>> Right.
>> The other cool thing here is deployment slots.
Most folks know what deployment slots are.
They allow you to have two separate types of
web applications and you can switch over to one another.
But you may be familiar with testing and production
which we call our changing traffic percentage
from one area to the next.
Now, that's been moved up into deployment slots.
>> Okay.
>> So I have a production Azure Friday account here,
and if I wanted to change the traffic to say,
let's put 40 percent to my other site.
Now, I could apply these changes and folks would
60 percent would go to my production site
and then 40 would go to my other site.
But now you can do that right here,
it's all managed within the deployment slots.
>> Right. This allows you as
a developer to be able to start testing how
those new changes are going to be received
by your users without turning the
switch all the way on for everybody.
So if it is a bad experience,
only 40 percent of the people are going
to be affected but you'll be
able to then watch the telemetry of that 40 percent say,
"Okay, do we need to turn this up or do we need to turn
it back down and put everyone back in production?"
>> Yeah, absolutely.
>> Okay.
>> That is perfect for AD testing.
>> Exactly, canary deployments, all that kind of stuff
>> Excellent. So inside of the configuration here,
this configuration screen, this is
the new configuration screen
that we had in the past and right now,
the older application settings.
This one is currently going to be no longer support.
It's going to be removed at some point but you can't
start using the configuration path here.
In the past when you wanted to edit some of these values,
you may click inside of one of
these and you'd hit the "Edit" and things.
What I have found is that when I have
application settings of maybe 40 different settings,
instead of clicking in each one of
these with the new advanced edit,
I can actually see that JSON and from there,
I can actually edit all of them very
very quickly and just save them in one file.
So it helps you speed up things a bit there.
>> I'd seen that new configuration
tab but I didn't know this part.
I didn't know that I could actually see
this JSON as well. That's very cool.
>> Yeah. It's awesome.
I've just recently started using it.
The next thing here I want to talk about is "Locks".
So "Locks" is a way to prevent folks from deleting
subscriptions or updating or deleting
subscriptions or resources.
You can put that lock on any of these resources.
So I'm just going to name this my lock
and then for "Lock top",
you have read only.
Then you have "Delete" for example.
I don't think I need a notes in here.
But once I click that you'll see that this lock is now in place.
So if somebody else was able to,
they were logged in here.
They were all my team and I set this for the whole side and maybe,
they want to try to go to the "Console"
and delete some files.
You'll see something like, "Hey,
this feature is disabled because
the app already has a read-only lock on it."
So it's really great with
these big massive teams and sometimes you may
have the new person there and they don't know what
exactly that they should remove or update.
With "Locks" you can turn that on really within seconds.
>> Yeah, I find it could be really
important too because a lot of us starting in the use
the Azure CLI we're starting to use
Azure PowerShell and you
can do some really dangerous things in there.
For example, get all resources groups and then pipe it to
remove all resources groups and you
literally can flush your entire subscription.
I do that on one of my subscriptions because it's just for demos.
But if there's something in
that subscription I really need to stay
around but I want to be able to do a mass deletion,
I could do this and say,
"When I run that command in the future,
delete everything except this one resource."
>> Yeah.
>> Awesome.
>> Yeah, you can. Yeah, and
it's just amazing some of the things you can do there.
So let me go back up really quickly to "Locks"
and just because this next feature requires
this resource to be unlocked.
I'm going to delete that and I'm going to go down into alerts.
So this is one of my absolute favorite features
is the inside of alerts and
most folks have seen you can create alerts to do things
like CPU usage which is an example of use here.
I'm just going to take the first one here which is CPU time.
This should be a familiar screen to
everybody but one button that's brand new
is actually the button that's located down at
the bottom and this is called "Preview",
I mean, it's called "Dynamic preview".
So I don't necessarily know a lot
of the infrastructure side of things especially,
when it comes to what is the CPU time or
CPU percentage that I need to either scale up, scale down.
Even if I want to create and send out
alerts to the team to go take a look at it.
You can actually turn on this
dynamic and what this will do is this will use
machine learning and it will watch
your application and whenever there is an over time,
it can create the recommendation like defaults for you.
So a lot of the hard work and when you
look at all the different things that you can monitor,
this takes a lot of that hard work out.
You can send it to folks via SMS which I do
with some of them are
more important ones and as well as like e-mail and
there's a million other hooks
to send those alerts and make sure folks see.
>> Perfect. So this is could save you a lot of money
where if you set these numbers incorrectly you
could be scaling up or scaling out way
prematurely and then paying
for all this compute you're not really utilizing.
But allowing it to actually analyze my app over time,
it's going to be able to fine tune those numbers and say,
"You really need to scale out at
this number not at the one you had before".
>> Absolutely.
>> Okay got it.
>> Yeah and it's golden for me.
Like I'm already starting to use it
in some of my other personal apps.
I'll switch over and show you something kind of
quick in Cloud Shell.
So Cloud Shell is obviously accessed.
You can click at the top here in
this little button that I'm hovering over and you can
see that you've got a Cloud Shell and
inside of this this is a great way to like
manage your Azure resources and so forth.
But the Cloud Shell doesn't just exist inside
of the Azure portal.
Obviously, you can go and you can see things
like the Cloud Shell inside of our documentation.
So this was really,
really nice for me was that when I want to
test something out,
a lot of our docs already supports
this and so I can come in here and if I want to try this,
I can copy this out,
come back over here and I can paste it.
I can even have Cloud Shell on my mobile phone as well.
>> Yes. [inaudible]
>> Isn't that awesome? But one thing that I want to show
you with Cloud Shell is that in the past,
we did this touch mynewfile.txt.
If we were creating a new file,
then we may go like nano
mynewfile.txt and from here
in this editor and I don't know if you're like me.
I can barely ever exit out of these.
>> Never.
>> I may not even be able to today.
>> Yes, it's very scary.
>> But you can go into that and you can create that.
Well, Visual Studio code is what I know and love,
and so I can simply go code mynewfile1.txt and from here,
this is actually a shell of Visual Studio code.
So this to me looks a lot better and
if I wanted to do things my test,
if I wanted to save this file again,
I can never figure out how to save in these other editors.
I can do the same command that I'm doing in
Visual Studio code that's running on my machine.
Which is just like a Command-S.
So now, that file is saved and
you'll see some of your favorite things like "Save",
"Open files", and even the "Command
Palette" has some options available there.
But use code if you are in Cloud Shell.
It makes life easier. This is great to me.
>> Yeah, I'm intimidated when you type nano.
I got a little intimidated right away
because I couldn't help you get out of
there if you've got stuck.
But in code it's like you said.
I love code because I use it on my Mac,
I use it on my Windows, I use it in my Linux and now,
I can use it in Cloud Shell.
So I don't have to learn new keyboard shortcuts.
I don't have to learn how to exit if it's
a Q or a W or which way they go,
if I'm going to save my file or not.
So when I saw this come out,
I was really excited because every
once in while you need to make
those quick edits right there in Cloud Shell,
but now you can use code instead.
>> Yeah. Absolutely.
Fantastic. So we're learning all about
the latest Azure Tips and Tricks here on Azure Friday.
[MUSIC]