You are on page 1of 10

hello guys it's adam and in this episode

of azure fundamentals we'll learn about

the tools that help us with management

of our other environments and resources

stay tuned

[Music]

and the tools that we'll learn about

today are azure portal

powershell cli and the cloud shell

the first one is azure portal we've used

azure portal

across all of our demos up until this

point

in this case as a users we simply open

browser

type in portal azure.com to connect to

azure

and manage our azure resources and we've

all seen what azure portal can do for us

because this is our web interface a

publicly accessible web interface

for management of everything related to

usher platform

it is really designed for self-service so all of the tasks are pretty easy to do
most of like 99 of the things with azure can be done in azure portal

portal is also quite customizable because you can create your own dashboards to get
a quick glance at your azure resources and their statuses

azure portal is designed to help customers with fairly simple tasks

it is not a tool that you will use if you want to do very big deployments or
automation tasks

which brings me to azure powershell


which is our first

tool that allows us to automate stuff in azure

besides the classic approach of


using browser and accessing

azure through azure portal you can also

allowing access azure through a terminal so this works for both windows, linux and
macos you just need to install powershell modules and you will be able to connect
to azure to work with azure resources through a command terminal

this is one of the ways of managing azure resources in an imperative way

so azure powershell is simply a module

that microsoft created for a popular

powershell scripting language

it was designed to help with automation

tasks when it comes to azure

with this module and powershell language you can create very complex logic using
scripts

and with the release of powershell core

in 2016 you can now use powershell in

any operating system windows linux or

macos

and the module is quite simple to use

for example

you can type connect ac account to login

to azure

you can also type get a z resource group

to list

all the available resource groups in

your azure subscription

you can type new ac resource group if

you want to create new resource groups

you can also type new azvm to create new


virtual machine

so using those commands and very

powerful scripting language which is

powerful

you can create almost any automation

tasks in no time

you can then grab those scripts and

either automate them in azure

or in a tool like azure devops

powershell in general

is a very native approach for it

professionals who are working with

windows servers in the past

but if your background is more on the

linux side

you might prefer to use azure cli

instead

cli stands for command line interface

just like with powershell you will use terminal to log into azure and manage azure
resources
but instead of installing modules for powershell you will install cli
this is just another way of managing other resources through terminal

so in short azure cli is our command line interface for azure it is also designed
for automation just like powershell
- it is also multi-platform it's based on python so you can use it on any operating
system
well

it is fairly simple to use because you

just type ac login to login to azure

ac group list list resource groups ac

group create to create a new ones

or acvm create to create virtual machine

but one important thing to note is that


cli is just a tool for the

native terminal so depending on which

operating system terminal you are using

you will have different scripting

capabilities so it's quite important

decision to make here

but in general you can use either

powershell or cli to perform most of the

tasks when it comes to azure

but really it's just a matter of

preference microsoft wanted to provide

you with toolkit

so that you can use your existing skills

whether you're coming from windows or

more unix-based environments

and integrate with azure in no time

which brings us to our

last tool azure cloud shell everything

that we talked about today

is happening on user machine so users

need to either use their own browsers

or they need to install tools like

powershell or cli to perform automations

with azure

but there are many scenarios where you

simply won't be able to install those

tools locally or you don't have access

to user machine on a specific time

microsoft wanted to solve those

challenges by providing you with another


cloudshell is an extra environment where all the tools will be pre-installed for
you and will always be up to date
this extra environment is called cloudshell and you can access this through

accessible via many interfaces for exemple: web browser by navigating to


shell.azure.com there are a lot of cool things

about cloud shell environment

for example it's based on ubuntu container so you get a lot of additional

tools that come with linux natively

you can of course use both powershell

and cli depending on which do you prefer

and what's better this environment is

completely free

so you can perform your day-to-day

operations directly from the browser

without the need to install a single

tool on your local machine

azure cloud show also comes with a lot

of interfaces to use it

you can use it from dedicated shell

azure com portal

you can also use portal azure.com with a

small integration directly in azure

portal

or if you are on the go and you don't

have access to your machine or you don't

want to open this

you can use mobile application which has

a native integration with cloud shell

let me show you how easy it is to use

cloud shell to automate stuff in

azure i can go directly to azure portal


as i said is one of the interfaces to

use azure cloud shell

at the top of azure portal you will find

a button which will open in new cloud

shell session

and after just couple of seconds

microsoft will be able to provision this

new environment

and we will be ready to perform our

tasks

notice that currently we are using bash

with cli

but if we want to we can switch to

powershell as quickly using this drop

down here

once this session is established i'm

already logged in to my azure

environment so i can type

commands like ac group list dash o table

to list all the resource groups

available in my azure subscription

i can also type ac group create to

create new azure resource group

by adding parameters like name to

provide resource group name

let's say az900 cli location to provide

the

azure region where the resource group

will be located
in just under a second our resource

group was created

so how about we do something more

complex using cli

i will now create new virtual machine by

typing azvm

create provide the parameter name for

the name of virtual machine in this case

am demo

resource group to provide the name of

the resource group where this machine

will be located we also need to specify

the base image for our virtual machine

using dash touch

image in this case i will choose ubuntu

alt ts

as my base image so this will be a linux

based virtual machine

and with generate ssh keys parameter i

will be able to connect to this virtual

machine using ssh keys

in no time and lastly as always we need

to provide dash dash location to provide

the region

where this virtual machine will be

created now just hit enter and wait for

provisioning to finish

this should take about one or two

minutes and after about one minute my

virtual machine has been provisioned


and it's really that easy using cli to

create new virtual machines

you can confirm this virtual machine

works by using built-in

ssh functionality of azure cloud shell

to do that we just type ssh providing

the username which is adam

add and then public ip of our virtual

machine

which is visible right above this

command just paste it in

press enter to connect to the virtual

machine

and that's it we are now connected to

this virtual machine using ssh

directly from our cloud shell so let's

close this session and go back to azure

portal

you can minimize and open cloud shell at

any time during your session

but for now let's close the cloud shell

let's go back to the resource group

to the one that i just created called

az900 cli

which should be at the bottom here

there's ad900cli and you can see all the

resources that we created

with a simple command line so azure

cloud shell is our cloud-based scripting


environment which is completely free to

use

and allows us to use both powershell and

cli directly in our browsers

to connect to azure and manage other

resources

it has a lot of additional tools

installed because it's based on ubuntu

machine and a lot of client interfaces

so you can use things like azure portal

you can use dedicated portal like shell

portal

you can also use visual studio code

extension to connect to cloud shell

directly from visual studio code

you can use windows terminal azure

mobile application

or use cloud directly in microsoft

documentation

when you are learning which is also one

of the amazing features

of cloud shell to summarize the tools

that we learned today

we have azure portal which is our

web-based interface for managing

azure platform we also have azure cli

which is one of the automation tools for

managing azure resources through a

terminal and if we want to create

scripting
using powershell we can simply install

azure module

and use powershell instead this is just

one of the multiple options available to

us

and lastly we've learned about the cloud

environment for scripting which is

clausal

to perform our day-to-day operations

without a need to install anything

on our local machines all the materials

for this episode can be found

under episode 19 on my website for this

episode we're done but make sure to

watch the next one because it's all

about

azure advisor if you like my work

support the channel by subscribing

liking and commenting

if you want to go to the next episode

simply hit icon on the side or follow

the playlist

and see you next one

You might also like