Azure 2
Azure 2
Learning objectives
After completing this module, you’ll be able to:
Many teams start exploring the cloud by moving their existing applications to
virtual machines (VMs) that run in Azure. Migrating your existing apps to VMs
is a good start, but the cloud is much more than a different place to run your
VMs.
The Azure free account is an excellent way for new users to get started and
explore. To sign up, you need a phone number, a credit card, and a Microsoft
or GitHub account. The credit card information is used for identity
verification only. You won't be charged for any services until you upgrade to
a paid subscription.
The Azure free student account is an offer for students that gives $100 credit
and free developer tools. Also, you can sign up without a credit card.
Many of the Learn exercises use a technology called the sandbox, which
creates a temporary subscription that's added to your Azure account. This
temporary subscription allows you to create Azure resources during a Learn
module. Learn automatically cleans up the temporary resources for you after
you've completed the module.
Microsoft provides this lab experience and related content for educational
purposes. All presented information is owned by Microsoft and intended
solely for learning about the covered products and services in this Microsoft
Learn module.
Activate sandbox
In this exercise, you explore the Learn sandbox. You can interact with the
Learn sandbox in three different ways. During exercises, you'll be provided
for instructions for at least one of the methods below.
You start by activating the Learn sandbox. Then, you’ll investigate each of
the methods to work in the Learn sandbox.
You can tell you're in PowerShell mode by the PS before your directory on
the command line.
Use the PowerShell Get-date command to get the current date and time.
PowerShellCopy
Get-date
Most Azure specific commands will start with the letters az. The Get-date
command you just ran is a PowerShell specific command. Let's try an Azure
command to check what version of the CLI you're using right now.
PowerShellCopy
az version
PowerShellCopy
bash
Tip
You can tell you're in BASH mode by the username displayed on the
command line. It will be your username@azure.
Again, use the Get-date command to get the current date and time.
Azure CLICopy
Get-date
Azure CLICopy
date
Just like in the PowerShell mode of the CLI, you can use the letters az to start
an Azure command in the BASH mode. Try to run an update to the CLI with
az upgrade.
Azure CLICopy
az upgrade
You can change back to PowerShell mode by entering pwsh on the BASH
command line.
Azure CLICopy
az interactive
Decide whether you wish to send telemetry data and enter YES or NO.
You may have to wait a minute or two to allow the interactive mode to fully
initialize. Then, enter the letter “a” and auto-completion should start to work.
If auto-completion isn’t working, erase what you’ve entered, wait a bit
longer, and try again.
Once initialized, you can use the arrow keys or tab to help complete your
commands. Interactive mode is set up specifically for Azure, so you don't
need to enter az to start a command (but you can if you want to or are used
to it). Try the upgrade or version commands again, but this time without az
in front.
Azure CLICopy
version
Azure CLICopy
upgrade
The commands should have worked the same as before, and given you the
same results. Use the exit command to leave interactive mode.
Azure CLICopy
exit
Sign in to the Azure portal to check out the Azure web interface. Once in the
portal, you can see all the services Azure has to offer as well as look around
at resource groups and so on.
Continue
You're all set for now. We'll come back to this sandbox later in this module
and actually create an Azure resource!
6 minutes
Throughout your journey with Microsoft Azure, you’ll hear and use terms like
Regions, Availability Zones, Resources, Subscriptions, and more. This module
focuses on the core architectural components of Azure. The core
architectural components of Azure may be broken down into two main
groupings: the physical infrastructure, and the management infrastructure.
Physical infrastructure
The physical infrastructure for Azure starts with datacenters. Conceptually,
the datacenters are the same as large corporate datacenters. They’re
facilities with resources arranged in racks, with dedicated power, cooling,
and networking infrastructure.
The Global infrastructure site gives you a chance to interactively explore the
underlying Azure infrastructure.
Regions
A region is a geographical area on the planet that contains at least one, but
potentially multiple datacenters that are nearby and networked together
with a low-latency network. Azure intelligently assigns and controls the
resources within each region to ensure workloads are appropriately
balanced.
When you deploy a resource in Azure, you'll often need to choose the region
where you want your resource deployed.
Note
Some services or virtual machine (VM) features are only available in certain
regions, such as specific VM sizes or storage types. There are also some
global Azure services that don't require you to select a particular region,
such as Microsoft Entra ID, Azure Traffic Manager, and Azure DNS.
Availability Zones
You want to ensure your services and data are redundant so you can protect
your information in case of failure. When you host your infrastructure, setting
up your own redundancy requires that you create duplicate hardware
environments. Azure can help make your app highly available through
availability zones.
You can use availability zones to run mission-critical applications and build
high-availability into your application architecture by co-locating your
compute, storage, networking, and data resources within an availability zone
and replicating in other availability zones. Keep in mind that there could be a
cost to duplicating your services and transferring data between availability
zones.
Availability zones are primarily for VMs, managed disks, load balancers, and
SQL databases. Azure services that support availability zones fall into three
categories:
Zonal services: You pin the resource to a specific zone (for example,
VMs, managed disks, IP addresses).
Zone-redundant services: The platform replicates automatically across
zones (for example, zone-redundant storage, SQL Database).
Non-regional services: Services are always available from Azure
geographies and are resilient to zone-wide outages as well as region-
wide outages.
Even with the additional resiliency that availability zones provide, it’s
possible that an event could be so large that it impacts multiple availability
zones in a single region. To provide even further resilience, Azure has Region
Pairs.
Region pairs
Most Azure regions are paired with another region within the same
geography (such as US, Europe, or Asia) at least 300 miles away. This
approach allows for the replication of resources across a geography that
helps reduce the likelihood of interruptions because of events such as
natural disasters, civil unrest, power outages, or physical network outages
that affect an entire region. For example, if a region in a pair was affected by
a natural disaster, services would automatically fail over to the other region
in its region pair.
Important
Not all Azure services automatically replicate data or automatically fall back
from a failed region to cross-replicate to another enabled region. In these
scenarios, recovery and replication must be configured by the customer.
Examples of region pairs in Azure are West US paired with East US and
South-East Asia paired with East Asia. Because the pair of regions are
directly connected and far enough apart to be isolated from regional
disasters, you can use them to provide reliable services and data
redundancy.
Additional advantages of region pairs:
If an extensive Azure outage occurs, one region out of every pair is
prioritized to make sure at least one is restored as quickly as possible for
applications hosted in that region pair.
Planned Azure updates are rolled out to paired regions one region at a
time to minimize downtime and risk of application outage.
Data continues to reside within the same geography as its pair (except
for Brazil South) for tax- and law-enforcement jurisdiction purposes.
Important
Most regions are paired in two directions, meaning they are the backup for
the region that provides a backup for them (West US and East US back each
other up). However, some regions, such as West India and Brazil South, are
paired in only one direction. In a one-direction pairing, the Primary region
does not provide backup for its secondary region. So, even though West
India’s secondary region is South India, South India does not rely on West
India. West India's secondary region is South India, but South India's
secondary region is Central India. Brazil South is unique because it's paired
with a region outside of its geography. Brazil South's secondary region is
South Central US. The secondary region of South Central US isn't Brazil
South.
Sovereign Regions
US DoD Central, US Gov Virginia, US Gov Iowa and more: These regions
are physical and logical network-isolated instances of Azure for U.S.
government agencies and partners. These datacenters are operated by
screened U.S. personnel and include additional compliance
certifications.
China East, China North, and more: These regions are available through
a unique partnership between Microsoft and 21Vianet, whereby
Microsoft doesn't directly maintain the datacenters.
When you’re provisioning resources, it’s good to think about the resource
group structure that best suits your needs.
There aren’t hard rules about how you use resource groups, so consider how
to set up your resource groups to maximize their usefulness for you.
Azure subscriptions
In Azure, subscriptions are a unit of management, billing, and scale. Similar
to how resource groups are a way to logically organize resources,
subscriptions allow you to logically organize your resource groups and
facilitate billing.
An account can have multiple subscriptions, but it’s only required to have
one. In a multi-subscription account, you can use the subscriptions to
configure different billing models and apply different access-management
policies. You can use Azure subscriptions to define boundaries around Azure
products, services, and resources. There are two types of subscription
boundaries that you can use:
If you have many subscriptions, you might need a way to efficiently manage
access, policies, and compliance for those subscriptions. Azure management
groups provide a level of scope above subscriptions. You organize
subscriptions into containers called management groups and apply
governance conditions to the management groups. All subscriptions within a
management group automatically inherit the conditions applied to the
management group, the same way that resource groups inherit settings from
subscriptions and resources inherit from resource groups. Management
groups give you enterprise-grade management at a large scale, no matter
what type of subscriptions you might have. Management groups can be
nested.
Management group, subscriptions, and
resource group hierarchy
You can build a flexible structure of management groups and subscriptions
to organize your resources into a hierarchy for unified policy and access
management. The following diagram shows an example of creating a
hierarchy for governance by using management groups.
Some examples of how you could use management groups might be:
Microsoft provides this lab experience and related content for educational
purposes. All presented information is owned by Microsoft and intended
solely for learning about the covered products and services in this Microsoft
Learn module.
Activate sandbox
In this exercise, you’ll use the Azure portal to create a resource. The focus of
the exercise is observing how Azure resource groups populate with created
resources.
Important
Expand table
Setting Value
Subscription Concierge Subscription
Resource group Select the resource group name that begins with learn.
Virtual machine name my-VM
Region Leave default
Availability options Leave default
Security type Leave default
Image Leave default
VM architecture Leave default
Run with Azure Spot discount Unchecked
Size Leave default
Authentication type Password
Username azureuser
Password Enter a custom password
Confirm password Reenter the custom password
Public inbound ports None
Important
Product details will include a cost associated with creating the virtual
machine. This is a system function. If you’re creating the VM in the Learn
sandbox, you won’t actually incur any costs.
6. Select Create
1. Select Home
2. Select Resource groups.
3. Select the [sandbox resource group name] resource group
You should see a list of resources in the resource group. The storage account
and virtual network are associated with the Learn sandbox. However, the
rest of the resources were created when you created the virtual machine. By
default, Azure gave them all a similar name to help with association and
grouped them in the same resource group.
Clean up
The sandbox automatically cleans up your resources when you're finished
with this module.
When you're working in your own subscription, it's a good idea at the end of
a project to identify whether you still need the resources you created.
Resources that you leave running can cost you money. You can delete
resources individually or delete the resource group to delete the entire set of
resources.
Knowledge check
Choose the best response for each question. Then select Check your
answers.
One
Two
Three
2. What happens to the resources within a resource group when an
action or setting at the Resource Group level is applied?
Region pairs
Availability Zones
Sovereign regions