AZ-104 Certification Study Guide
AZ-104 Certification Study Guide
Whizcard
Quick Bytes for you before the exam!
The information provided in WhizCards is for educational purposes only; created in our efforts to help aspirants
prepare for the Microsoft Azure Exam AZ-104 certification. Though references have been taken from Azure
documentation, it’s not intended as a substitute for the official docs. The document can be reused, reproduced, and
printed in any form; ensure that appropriate sources are credited and required permissions are received.
750+ Hands-on-Labs
Hands-on Labs - AWS, GCP, Azure (Whizlabs)
Azure Basics
● Azure Portal 3
● Azure CLI 6
● Azure Powershell 7
● Azure Resource Manager 8
● Azure Pricing 9
● Azure Advisor 10
Manage Azure identities and governance
● Microsoft Entra 13
● Azure Active Directory 13
● Azure Active Directory Concepts 15
● Managing Azure Active Directory Objects 16
● Azure AD Access Management and Control 22
● Managing Azure subscriptions and governance 27
--Back to Index-- 1
Configure and Manage Virtual Networking
● Introduction to Azure Virtual Network(Azure VNet) 94
● Benefits and Components of Virtual Netwroks 94
● Configure virtual networks 95
● Configure secure access to virtual networks 101
● Configure load balancing 106
● Monitor resources by using Azure Monitor 115
--Back to Index-- 2
Azure Basics
Azure Administration Tools
Azure provides 3 administration tools to choose from
1. The Azure Portal
2. The Azure CLI
3. Azure PowerShell
Azure Portal
● We can use the Azure GUI portal website ([Link]) to create, configure, and alter our
Azure subscription resources.
● We can locate the resource needed and execute any changes. We have wizards and tooltips to
guide you through various administrative tasks.
● Please note that we cannot use the portal to perform repetitive tasks like creating 12 VMs etc.
● We need to use other tools to avoid errors, and it will also be a time-consuming process to do
on the portal.
The Azure portal can be divided into 3 sections.
1. Left — A list of resources and services to create and manage your Azure environment.
2. Center — A dashboard that you can tailor to meet your (Public or Private dashboards)
needs.
3. Top — A search bar to quickly find resources and services, a notification icon, access to a
web-based command line, and more.
--Back to Index-- 3
● Click on the Burger menu on the left top and select Resource group and click on it. You
will get a new Panel.
--Back to Index-- 4
● You can also click on “Download a template for automation” and download the template
and save it to the library additionally for future use.
--Back to Index-- 5
Azure CLI
Azure CLI means → Azure Command Line Interface. It’s a cross-platform command-line
program to connect and execute administrative commands on Azure resources.
Sample command:
az VM create --resource-group WLRG --name WLVM1 --image UbuntuLTS
Azure CLI can be accessed inside a browser via Cloud Shell or with a local install on any OS like
Windows/Linux or MacOS and Docker. It can also work with multiple clouds.
A new browser page will open ([Link] and we enter the authorization code
displayed on the terminal.
Let’s take Storage accounts as an example and work with Azure CLI
--Back to Index-- 6
Azure Powershell
● It’s a module that allows us to connect to Azure subscriptions and manage resources.
● It uses AzureRM command modules, and it has now added Az command modules as well.
● If we used the New-AzureRmVM command to create a VM via the AzureRM Module, we
would change to the New-AzVM command to create a VM via the Az Modules.
--Back to Index-- 7
Azure Resource Manager
● Azure Resource Manager provides a management layer to create, update, and delete
resources in your Azure account.
● We use management features, like access control, locks, and tags, to secure and
organize your resources after deployment.
● When a user sends a request from any of the tools, APIs, or SDKs, the Resource Manager
receives the request and authenticates/authorizes it.
● Then it sends to Azure services to take action. Since it acts as a central point, it leads to
consistent results.
Scopes
When we deploy, they are done at 4 levels.
1. Management Groups – At this level, we can combine multiple subscriptions to apply
changes at an Organizational level. We can connect Organizations with a hierarchy where
there is one management group at the root level. This is called Nesting.
2. Subscriptions – It’s a logical container used to provision resources. We will be billed at
the subscription level. We can have multiple subscriptions.
3. Resource Groups – We can create multiple resources in a resource group. We can
logically group resources at a resource group level. We can delete an entire resource
--Back to Index-- 8
group, and all resources will be deleted within the resource group. We can even move a
whole resource group with all objects within it.
4. Resource – This is the lowest manageable item in Azure resources. Examples of Azure
resources are Virtual machines, storage accounts, web apps, databases, virtual networks,
and tags. Resource groups, subscriptions, and management groups are also examples of
resources.
Azure Pricing
Azure is one of the market leaders in Cloud services and has some of SQL and Windows’s best
pricing. It can leverage several features to save costs, and Azure provides several tools that can
help calculate costs and cost-effectively plan our infrastructure and service.
Some of the available tools are:
➔ Azure Pricing Calculator
➔ Cost Management Center
➔ Migration planning – Estimation, Workload, and right-sizing
➔ Billing Data API & Advisor
➔ DB & Cosmos DB Capacity calculator
Some of the features that we can leverage to save costs are as follows:
● Azure Hybrid Benefit – We can use our existing SQL and Windows licenses to save on costs.
● Spot Virtual machines - This feature allows us to take advantage of the unused CPU at a
significantly lower cost at almost 90% savings.
● Reservations - We can commit to 1 or 3 years & choose to pay upfront/monthly to buy RIs.
● Azure Dev/test pricing – For development environments, we can get special discounted rates
--Back to Index-- 9
Ways to optimize Cost
Please see the self-explanatory chart below for ways to optimize cost
FAQs:
● Are there any other ways to save costs?
o EA – Enterprise Agreements – With this, we can get good pricing offers from Azure.
o Price Match with AWS – This might not be known to all, but we can ask MS to do a price
match.
Azure Advisor
Azure has 5 pillars called the Azure well-architected framework which provides best practices to
help build and deliver great solutions.
To enable customers to follow these best practices and optimize the cloud deployments, Azure
has a free tool called Azure Advisor. Azure Advisor analyses the configurations and usage logs
and offers recommendations that are customized and can be executed.
--Back to Index-- 10
● On each of the 5 pillars, we will be given recommendations to optimize. Please see below.
● If we click on each of these recommendations, we can see what the recommendations are.
--Back to Index-- 11
● You can also note from the above that these recommendations are set up with the help of
Azure policies.
● We can see the Policy definition and we can exempt the policy itself from being flagged as
non-compliant.
● We can enable the deny action also in which case the resource will be prevented from being
created.
● Here we have the policy which is audit and hence the resource is created and marked as
non-compliant.
Sample remediation code:
{
"properties": {
"allowBlobPublicAccess": false
}
}
We can download these recommendations as a CSV or PDF file.
Azure Advisor also has 2 features in preview. One feature is alerts which are yet to be generally
available (GA). The other feature is the Advisor score which gives us on a percentage basis if we
are following best practices.
--Back to Index-- 12
Manage Azure Identities and Governance
Microsoft Entra
It is a new product in the Microsoft family that includes all of Microsoft's identity and access
capabilities. It includes three product categories:
--Back to Index-- 13
Any service invoked on the Azure cloud is with REST APIs and this is the foundation for AAD
(Azure Active Directory). Therefore, AD on the client premises and AAD on the cloud will not
work seamlessly.
Let’s look deeper and compare the two and in that process understand AAD better.
● Communication – As discussed, AD uses LDAP and AAD uses REST API
● Authentication – Cloud based protocols for AD/ AAD use Kerberos and NTLM
● Access Setup – AD uses Admin/data owners and AAD organizes users into groups
● Network Organization – AD uses Forest/Domain/Tree/Organizational Unit (OU) whereas
AAD uses users and groups
● Desktops – AD uses GPO (group policy object) and AAD can use Microsoft intune to join
desktops
Azure AD Connect
In situations where we want to enable a hybrid environment where we have both AD
on-premises and AAD on Azure cloud, we need to use Azure AD connect which syncs data
between the two directories.
AD Connect will allow us to synchronize user accounts and passwords. There are several
methods of synchronization.
● Hash Synchronization – Here only a hash of the password is stored on the cloud.
● Pass-through authentication (PTA) – Here the authentication is forwarded to the
on-premises server
● Federation – Federation services provide authentication across several external identities
in addition to providing on-prem access
AD Features
--Back to Index-- 14
Usernames – Any user name we create will have the suffix of our domain name
Custom domain name – If we want to use our own company name, then we should create a
custom domain (for example [Link]) and then we can create a user
smith@[Link]
App registrations – We can register our applications here and grant access to the
application/users.
License Management – We can perform license Management here. We can track all acquired
licenses and assigned licenses and make sure we don’t overuse and pay heavy penalties
Enterprise Applications – we can see all the enterprise applications and assign them to our
users. When a user logs in, he/she can see only the applications assigned to them.
Security – This is one of the key areas. Under security, we can see the following
● Azure AD Conditional Access –We can add conditional access policies like restricting
users from logging in from outside the office network or even outside the country
● Azure AD Identity Protection –We can assign user risk / sign-in risk and the system will
dynamically assess risk and react like unusual geography of login
● Identity Secure Score – We are given a security score which tells us our overall security
posture
● Named locations – If we readily identify safe locations like cities where headquarters and
branch offices are located, we can create named locations and allow these under
conditional access policies.
● Authentication methods – We can enable additional authentication methods like FIDO2
Security Key/ Microsoft Authenticator
● Multi-Factor Authentication (MFA) – We can configure MFA and add multi-factored
authentication. Please note that this setting is outside of the Azure portal and a link will
take out to the GUI. The sample screen looks like this.
--Back to Index-- 15
A) Managing Azure Active Directory Objects
1) Cloud identities: These users exist only in Azure AD. This type of user account includes
administrative accounts and users managed as part of your organization. Cloud identity can
be for user accounts defined in your Azure AD organization and also for user accounts
defined in an external Azure AD instance. When the cloud identity is removed from the
primary directory, the user account is deleted.
3) Guest users: These users exist outside of Azure. The source for guest user accounts is
Invited user. Guest user accounts are useful when external vendors or contractors need
access to your Azure resources. Examples include user accounts from other cloud providers,
and Microsoft accounts like an Xbox LIVE account.
2. Microsoft 365 groups: These provide collaboration opportunities. Group members have
access to a shared mailbox, calendar, files, SharePoint site, and more.
When you add members to a group, there are different ways you can assign member access.
1) Assigned : The group will contain specific users or groups that you select.
2) Dynamic user: You can create rules based on characteristics to enable attribute-based
dynamic memberships for groups.
--Back to Index-- 16
3) Dynamic device: You can create rules based on characteristics to enable attribute-based
dynamic memberships for groups.
After creating a group, you can add or remove users (or groups) from it by selecting the group
and editing the group membership using the options in the Manage section.
Azure Active Directory supports several bulk operations, including bulk create & delete for user
accounts and supports downloading lists of users. To create/provision bulk user accounts
you must sign in as a User Administrator or Global Administrator in the admin portal.
You may grant guest user access with appropriate restrictions. Remove access after work is done.
You can use the Azure portal to invite B2B, collaboration users. Invite guest users to an Azure AD
organization, group, or application. After you invite a user, their account is added to Azure AD as
a guest account.
Guests can get invitations via email or you can share the invitation to the application using the
direct link. The guest then redeems their invitation to access the resources.
By default, users & administrators in Azure AD can invite guest users. But sometimes this ability
can be limited or disabled by the Global Administrator.
Administrators can easily add guest users to your organization in the Azure portal.
1. Create a new guest user in Azure AD, similar to how you'd add a new user.
2. Assign guest users to apps or groups.
3. Send an invitation email that contains a redemption link, or send a direct link to an app you
want to share.
--Back to Index-- 17
4. Guest users follow a few simple redemption steps to sign in.
In Azure AD, Self-Service Password Reset (SSPR) provides users with the ability to change or
reset their password, without administrator or help desk involvement.
If Azure AD locks a user's account or they forget their password, they can unblock themselves
and follow the prompts to get back to [Link] capability reduces help desk calls and lost
productivity when a user is unable to sign in to their device or application.
In Azure AD, you can enable SSPR for None, Selected, or All users.
--Back to Index-- 18
Administrative units
An administrative unit is an Azure AD resource that can be a container for other Azure AD
resources. An administrative unit can contain only users, groups, or devices.
Administrative units restrict permissions in a role to any portion of your organization that you
define. You could, for example, use administrative units to delegate the Helpdesk Administrator
role to regional support specialists, so they can manage users only in the region that they
support.
Administrative units let you subdivide your organization into any unit that you want, and then
assign specific administrators that can manage only the members of that unit
You can create a new administrative unit using the Azure portal, PowerShell, Microsoft Graph
Azure AD services require you to license each of your users or groups for that service. Only
users with active licenses will be able to access and use the licensed Azure AD services for
which that's true. Licenses apply to Tenants but are not transferable to other Tenants.
There are several license plans available for the Azure AD service, including Azure AD Free,
Azure AD Premium P1 and Premium P2 plans.
You must have one of the following licenses for every user who benefits from group-based
licensing:
● Paid or trial subscription for Azure AD Premium P1 and above
● Paid or trial edition of Microsoft 365 Business Premium or Office 365 Enterprise E3 or
Office 365 A3 or Office 365 GCC G3 or Office 365 E3 for GCCH or Office 365 E3 for DOD
and above
--Back to Index-- 19
Managing the device settings and identity
Azure AD provides a central place to manage device identities and monitor related event
information.
We can manage device identities by using the Azure portal. As an administrator, you can control
the process of registering and joining devices by configuring the following device settings.
You must be assigned one of the following roles to view/manage device settings in the Azure
portal: Global Administrator, Cloud Device Administrator, Global Reader and Directory Reader
--Back to Index-- 20
Azure Active Directory Domain Services(Azure AD DS)
It is a service that provides managed domain services such as domain join, group policy,
lightweight directory access protocol (LDAP), and Kerberos/NTLM authentication.
You get the benefit of domain services without the need to deploy, manage, and patch domain
controllers (DCs) in the cloud with Azure AD DS.
--Back to Index-- 21
B) Azure AD Access Management and Control
Access management in Azure AD
There are three types of roles available for access management in Azure:
● Classic subscription administrator roles
● Azure role-based access control (RBAC) roles
● Azure Active Directory (Azure AD) administrator roles
● The policy of any organization is to follow the principles of least privileges. One must not
be given access beyond what is necessary to perform a role in the organization.
● The principles apply for cloud resources also. Let’s take the example of a VM operator. His
role dictates that he must be able to start/stop/restart/create/delete VMs.
● So, we use Azure RBAC to grant just that access. In our case, we will grant the operator
the RBAC role of VM contributor.
● Azure RBAC is an authorization system. It uses Azure Resource Manager behind the
scenes. Azure RBAC provides fine-grained control of access to Azure resources at various
levels.
● The Policies can be applied with a boundary like being able to do so in a set of resource
groups called scope.
1. Security principal
A security principal is an object that could represent a user or a group or a service
principal or managed identity and requests access to Azure resources. We can grant
access to any of these entities.
--Back to Index-- 22
2. Role definition
A role definition is a collection of permissions and is called a role. A role definition will list
the operations that can be performed. It could be something like read, write, and delete.
We could grant access at a high level like owner, or even more specific roles like the VM
operator where the access is limited to VM operations only.
Azure has built-in roles that you can use. For example, we have a contributor role where
we can create all objects but we cannot grant. If we want to grant access to only certain
resources, we will create a custom-defined role.
As you can see below, we can apply policies against the data stored within the scope’s
resources. For example, the secret within a key will be data, and we can dictate whether
the data can be read or not.
3. Scope
The scope is the set of resources to which we apply for the access. Let’s say that we grant a
VM operator role to a person, but we don’t want that person to be able to stop VMs in
production, then we apply the scope to non-production subscription or resource group only.
A scope can be applied at the four levels:
a. Management group
b. Subscription
c. Resource group
d. Resource
--Back to Index-- 23
● Scopes follow a hierarchical structure, and they follow a parent-child relationship.
● Scopes applied at a higher level are inherited by the resources below them.
● For example, a policy with a scope of Management groups will be inherited by all
subscriptions under it.
● Likewise, a policy scoped at the RG level will be inherited by all resources under it.
4. Role assignments
We assign the role to the user or group. When we assign the role, the user gets the privileges.
And we simply remove the role assignment when we want to revoke the access.
Under IAM, for every resource, we can see the roles under the roles tab.
5. Deny assignments
Earlier RBAC had only allowed, but now it can be denied assignments also. If there is a deny
assignment, the user will be blocked from doing the action. Deny assignments take precedence
over role assignments where a given user has both allow and deny but deny will be the end
action.
6. License requirements
RBAC feature is free and included with our Azure subscription.
--Back to Index-- 24
Access management for cloud resources is a critical function or task for any organization using
the cloud. Role-Based Access Control (RBAC) is a mechanism that helps you manage who can
access your Azure resources. RBAC allows you to control what specific users can do on specific
resources and what resources each user can access.
Azure RBAC is an authorization system built on top of Azure Resource Manager and provides
fine-grained access management to resources in Azure.
There are a few things you need to consider when using Azure RBAC those are
- - -> Requests, Roles, Permissions and Custom (built-in) definitions
--Back to Index-- 25
Provide access to Azure resources by assigning roles
Azure RBAC Roles
You can use RBAC roles to manage access to Azure resources(VMs, SQL DBs, or storage)
Azure RBAC has some built-in role definitions that are given below.
● Owner role has full access to all resources(Includes the ability to assign roles in Azure RBAC.
● Contributor role gives full access to manage all resources but does not allow you to
assign roles in Azure RBAC.
● Reader role has access to view all resources but does not allow you to make any changes.
● User Access Administrator role can manage user access to Azure resources.
You can use Azure Active Directory (Azure AD) roles for managing the Azure AD related
resources (Examples: users, groups, billing, licensing, application registration, and etc.)
There are about 60 Azure Active Directory (Azure AD) built-in roles with a fixed set of role
permissions. Azure AD also supports custom roles to supplement the built-in roles.
Azure AD Roles come in three broad categories: Azure AD-specific roles, Service-specific roles,
and Cross-service roles.
The below image/diagram shows how you can apply for Azure AD administrator roles and Azure
RBAC roles in your organization.
--Back to Index-- 26
Azure RBAC roles vs Azure Active Directory roles
Azure RBAC roles Azure AD admin roles
Access management You can manage access to Azure You can manage access to Azure
resources AD resources
Scope assignment Scope can be specified at multiple The scope is specified at the
levels tenant level
Role definitions Roles can be defined through the Roles can be defined through
Azure portal, Azure CLI, Azure Admin Portal, Microsoft
PowerShell, ARM templates, and 365 Admin Portal, and Microsoft
REST API. Graph Azure AD PowerShell.
--Back to Index-- 27
● With quite a few built-in policies under categories such as Storage, Networking, Compute,
Security Center, and Monitoring, it is very convenient to select the policy that suits us and
use them simply.
There are four basic steps to creating and working with policy definitions in Azure Policy.
--Back to Index-- 28
Step 2: Policy Initiative
Once the policy definition is done, we need to create the initiative definition. We can select
any number of policies we need and create a group to add the policies. Then we can create
initiative parameters and policy parameters and finally we can create the initiative definition.
● Allowed Resource Type (Deny): Defines the types of resources you can run. The effect is to
deny all resources that are not part of this defined list.
● Allowed Locations (Deny): Restricts or limits the locations available for new resources. This
effect is used to implement your geo-optimized requirements.
● Allowed Virtual Machine SKUs (Deny): Specifies the set of virtual machine SKUs you can run
and deploy.
● Add a tag to resources (Modify): Applies the required tag and its default value if not specified
by the deploy request.
● Not allowed resource types (Deny): Prevents list of resource types from deployed/ running.
--Back to Index-- 29
(Source: Microsoft Documentation)
Ex: All Azure Policy data and objects are encrypted at rest.
Once set up, we can see the non-compliant policies, and we will be able to remediate.
● In the portal - - - > These locks are called “Delete” and “Read-only”
● On the command line - - - > These locks are called “CanNotDelete” and “ReadOnly”
● You can set locks that prevent deletions or changes.
You can use management locks to apply a restriction across all users and roles instead of
role-based access control (RBAC). For, Considerations before applying your locks,
Please refer to this → Protect your Azure resources with a lock - Azure Resource Manager
1. Go to the Show portal Menu → Select any resource, resource group, or subscription that
you wish to lock then
--Back to Index-- 30
2. Under the Settings blade you can see the “Locks”
3. You can click the Locks option if you want to add lock to any resource, etc.
4. You need to click the Add option. If you want to create a lock at the parent level, select Parent.
The currently selected resource acquires the lock from the parent.
5. For example, you could lock the resource group to apply a lock to all its resources.
6. Give the lock a name and lock level. Optionally, you can add notes describing the lock.
Configure lock using Template : When using an ARM template or Bicep file to implement a lock,
it's a good idea to understand how the expansion scope and the lock scope work together. For
more info → Pls refer to Configure lock using an ARM template or Bicep file
--Back to Index-- 31
Apply and manage tags on resources
Azure Tags are a part of the Azure Resource Manager that are used to track, manage, and
group your resources and analyze their costs. Also, tagging helps automate resource
deployments in your Azure environment. You can apply tags to your Azure resources to
logically organize them by category. Tags are useful for sorting, searching, organizing and
analyzing your resources.
Example that shows how to add tags for a resource group in the Azure portal:
● Searching on tag data: Search for resources in your membership by querying on tag
name and value.
● Finding relevant resources: Retrieve related resources from other resource groups by
searching on tag name or value.
● Billing Group Data: Group resources such as virtual machines by cost center and
production environment.
● Tags are created with PowerShell or Azure CLI: Create multiple resource tags
programmatically by using Azure PowerShell or Azure CLI.
--Back to Index-- 32
A resource group is a container that holds related resources for an Azure solution. A resource
group stores metadata about resources. A resource group can contain all the resources for a
solution or only the resources you want to manage as a group.
We need to know how to use the Azure portal with Azure Resource Manager to manage your
Azure resource groups.
--Back to Index-- 33
(Source : Microsoft Documentation)
Subscriptions help you manage access to Azure cloud service resources and help you control
how resource usage is reported, billed, and paid for.
Azure offers free and paid subscription options to meet different needs and requirements.
--Back to Index-- 34
Most common subscriptions: Free, Pay-As-You-Go, Enterprise Agreement & Student.
For our organization, we can choose a combination of collection options and subscription options
to suit your business circumstances.
If you only have a few subscriptions, it's easy to manage them independently. But what if you
have a lot of subscriptions? You can then create a management group hierarchy to help manage
your memberships and resources.
Cost control is a key factor in maximizing the value of your investment in the cloud. There are many
scenarios where cost visibility, reporting, and cost-based orchestration are critical to sustaining business
operations.
With Azure products and services, you only pay for what you use. When you create and use Azure
resources, you are charged for the resources. Microsoft Cost Management provides support for
administrative billing tasks and helps you manage billing access to expenses.
Cost analysis is used to explore and analyze your organizational costs. You can view
aggregated costs by an organization to understand where costs have increased and identify cost
trends. Monitor accumulated costs over time to assess monthly, quarterly or annual cost trends
against budget.
--Back to Index-- 35
Budgets are commonly used as part of cost control and features are used to establish and
maintain budgets. This helps prevent exceeding spending limits or limits. You can use analytics
data to inform others about their spending to proactively manage spending. Budgeting features
help you see how a company's spending is developing over time.
Recommendations can optimize and improve efficiency by identifying idle and unused
resources. This can reveal less expensive resource options. Using the recommendations, you
can change the way you use your resources to save money.
Cost Alerts are used to monitor your Azure usage and spending. Cost alerts are automatically
generated when Azure resources are consumed. Alerts show all active expense management
and billing alerts in one place.
There are three types: Budget alerts, Credit alerts, and Department spending quota alerts.
Governance in Azure is one aspect of Azure Management. Management groups help you to
organize or manage resources and subscriptions in Azure. Management groups give you
enterprise-grade management at scale, no matter what type of subscriptions you have. However,
all subscriptions in the same management group must trust the same Azure Active Directory
(Azure AD) tenant.
Organizations using multiple memberships need a way to efficiently manage access, policies and
compliance. Azure management groups provide a level of scope and control over your
subscriptions. You can use management groups as containers to manage access, policy, and
compliance across your subscriptions. You can create a management group with Azure Policy by
using the Portal, PowerShell, or Azure CLI.
When using management groups in Azure Policy to manage subscriptions, there are
a few things you need to consider → Custom hierarchies and groups, Policy inheritance,
Compliance rules, and Cost reporting.
--Back to Index-- 36
Implement and Manage Storage
Introduction to Azure Storage
Azure offers several ways to store your data, including multiple database options such as SQL
Database, Azure Cosmos DB, and Azure Table Storage.
Azure provides several ways to store and send messages, such as queues and event hubs. You
can also store loose files using services like Azure Files and Azure Blobs. A storage account is a
container that groups together a set of Azure Storage services. Only data services from Azure
Storage are included in the storage account.
Azure Storage Platform is Microsoft's cloud storage solution for modern data storage scenarios.
Azure Storage provides highly available, highly scalable, durable and secure storage for a variety
of data objects in the cloud. Azure Storage data objects can be accessed from anywhere in the
world via HTTP or HTTPS via a REST API.
● Azure Blobs: A massively scalable object store for text and binary data.
● Azure Files: Managed file shares for cloud or on-premises deployments.
--Back to Index-- 37
● Azure Elastic SAN (preview): A fully integrated solution that makes it easy to deploy, scale,
manage and configure a SAN on Azure.
You need to know and fill all 7 tabs to create an Azure storage account:
1. Basic Tab: It provides the essential information for your storage account.
2. Advanced tab: You can configure additional options and modify default settings for your new
storage account.
3. Networking tab, You can configure network connectivity and routing preference settings for
your new storage account.
4. Data protection tab: You can configure data protection options for blob data in your new
account
5. Encryption tab, You can configure options for how your data is encrypted in the cloud.
6. Tags tab: You can specify Resource Manager tags to help manage your Azure resources.
7. Review + Create tab: Azure runs validation on the storage account settings you selected. If
the verification is passed, you can proceed to create a storage account.
For more information, pls refer to this link →Create a storage account - Azure Storage
- You can configure storage accounts to allow access only from specific subnets.
- Allowed subnets can belong to a VNet in the same subscription or a different subscription,
including subscriptions that belong to a different Azure Active Directory tenant.
- You can enable a Service endpoint for Azure Storage within the VNet.
- Service endpoint routes traffic from VNet through an optimal path to Azure Storage service.
- The identities of the subnet and the virtual network are also transmitted with each request.
- Administrators can then configure network rules for the storage account that allow requests
to be received from specific subnets in a VNet.
--Back to Index-- 38
- Clients granted access via these network rules must continue to meet the authorization
requirements of the storage account to access the data.
Each storage account supports up to 200 virtual network rules, which may be combined
with IP network rules.
For your information: You can refer to this link → Access storage - Training | Microsoft Learn
Each object you store in Azure Storage has a unique URL address. Your storage account name
forms the subdomain portion of the URL address. A combination of subdomain and domain
name, which is specific to each service, forms the endpoint for your storage account.
Here you can see an example: If your storage account name is whizstorageaccount, the default
endpoints for your storage account for Azure services are as shown in the following table:
Administrators use various strategies to ensure that their data is secure. Common mechanisms
include encryption, authentication, authorization, and user access control with credentials, file
permissions, and private signatures. Azure Storage provides a suite of security capabilities
based on common strategies to help you secure your data.
It is a secure way to share your storage resources without compromising your account keys.
--Back to Index-- 39
With this, you have granular control over how a client can access your data. Like a few below
● What resources the client may access?
● What permissions do they have to those resources?
● How long is the SAS valid?
a) User delegation SAS is secured with Azure Active Directory (Azure AD) credentials and
permissions specified for SAS. User delegation applies only to SAS blob storage.
For more information pls refer to —> Create a user delegation SAS (REST API).
b) Service SAS is secured with the storage account key. A service SAS delegates access to
a resource in only one of the Azure Storage services.
For more information pls refer to this link —> Create a service SAS (REST API).
c) Account SAS is secured with the storage account key. An account SAS delegates access
to resources in one or more of the storage services.
For more information pls refer to this link —> Create an account SAS (REST API).
URI and SAS parameters: When you create your Shared Access Signature (SAS), a Uniform
Resource Identifier (URI) is created by using parameters and tokens. The URI contains your
Azure Storage resource URI and the SAS token.
--Back to Index-- 40
(Source : Microsoft Documentation)
For more info please refer to → Shared access signatures to delegate access
You can use a stored access policy to change permissions for the start time, expiration time, or
signature. You can also use a stored access policy to revoke a signature after issuing it.
Stored access policies support → Blob containers, File shares, Queues, and Tables.
Example: The stored access policy you create for a blob container can be used for all the blobs
in the container and for the container itself. A stored access policy is created with the following
properties:
● Identifier: The name you use to reference the stored access policy.
● Start time: A DateTimeOffset value for the date and time when the policy might start to be
used. This value can be null.
● Expiry time: A DateTimeOffset value for the date and time when the policy expires. After this
time, requests to the storage will fail with a 403 error-code message.
● Permissions: The list of permissions as a string that can be one or all of acdlrw.
--Back to Index-- 41
You can create stored access policy with C# code by using Azure Portal /Azure CLI commands.
When you create a storage account, Azure generates two 512-bit storage account access keys
for that account. These keys can be used to authenticate access to data in your storage account
through shared key authentication.
Microsoft recommends that you use Azure Key Vault to manage your access keys and that you
regularly rotate and regenerate your keys. For your Azure storage security solution, you can use
Azure Key Vault to manage your encryption keys.
Azure Key Vault APIs can be used to generate encryption keys. You can also create your own
encryption keys and store them in a key vault.
--Back to Index-- 42
(Source: Microsoft Documentation)
Azure Storage provides integration with Azure Active Directory (Azure AD) for identity-based
authorization of requests to Blob, Queue, and Table services.
Files stored in Azure storage are accessed by clients via HTTP/HTTPS. Azure checks each
client request for authorization to access stored data.
Four options are available for blob storage: Public access, Azure AD, Shared key, and (SAS)
If you are authenticating using your Azure AD account, you'll see Azure AD User Account
specified as the authentication method in the portal:
Characteristics
● Data is automatically encrypted before persisting to Azure Managed Disks, Azure Blob
Storage, Azure Queue Storage, Azure Cosmos DB (Azure Table Storage) or Azure Files.
● All data written to Azure Storage is encrypted using 256-bit Advanced Encryption Standard
(AES) encryption. AES is one of the strongest block ciphers available.
● Encryption is enabled and cannot be disabled for all new and existing storage accounts.
--Back to Index-- 43
Configuring Azure Storage Encryption
In the Azure portal, you can configure customer-managed encryption keys. You can create your
own keys or you can have keys managed by Microsoft. Consider how you can use Azure Key Vault
to create your own customer-managed encryption keys.
Encryption Type: Choose how the encryption key is managed: by Microsoft or by ourself
Encryption Key: Specify encryption key by entering a URI / select a key from the existing key
vault.
The service is also used to transfer data from Azure Blob storage → to disk drives and transport
→ to your on-premise sites. Data can be imported from one or more disk drives to Azure Blob
storage or Azure Files.
The Azure Import/Export service enables data transfer into Azure Blobs and Azure Files by
creating jobs. Use the Azure portal or the Azure Resource Manager REST API to create jobs.
Each job is associated with a single storage account.
--Back to Index-- 44
(Source: Microsoft Documentation)
Below are steps for creating import/export jobs in Azure (Blob & File share)
Azure Storage Explorer requires both management (Azure Resource Manager) and data layer
permissions to allow full access to your resources. You need Azure Active Directory (Azure AD)
--Back to Index-- 45
permissions to access your storage account, the containers in your account, and the data in the
containers. Azure Storage Explorer lets you connect to different services : Subscriptions, Storage
Account, Blob Container, Azure AD, Fileshare, Queues, and Tables etc.
AzCopy:
This is a command-line utility that you can use to copy blobs or files to or from a storage account.
This article will help you download AzCopy, connect it to your storage account, and then transfer
the data and
For your information: You access the AzCopy tool by using the CLI in a console or terminal
window. The tool provides a simple self-publishing syntax (refer the image below)
--Back to Index-- 46
(Source: Microsoft Documentation)
● Geo-redundant storage (GRS) – Here, the secondary copies are stored in another region,
which protects us against a region-wide outage. Basically, it is LRS plus an additional copy in
a secondary region. The primary copy process is Synchronous, while it is asynchronous for
secondary.
● Read-access geo-redundant storage (RA-GRS) – Compared with GRS, the secondary copy
will also be available only for READ access.
● Geo-zone-redundant storage (GZRS) – Here, it is the same as LRS except that the secondary
copy will be in a zone in another region, which is the twin region of our primary region.
Basically, it is ZRS plus a single copy in the secondary region. The primary copy process is
Synchronous, while it is asynchronous for secondary.
● Read-access geo-zone-redundant storage (RA-GZRS) – Same as GZRS, except that you will
be able to read data from your secondary region also. (If it is not RA, then we need to
remember that data is available but not readable until Microsoft fails over to the secondary
region in case of a regional failure or if we manually failover)
--Back to Index-- 47
SLA 99.90% 99.90% 99.90% 99.90% 99.90% 99.90%
Durability 11 9's 12 9's 16 9's 16 9's 16 9's 16 9's
--Back to Index-- 48
C) Configure Azure Files and Azure Blob Storage
Azure File Storage
File Storage:
1. It is one of the 4 storage solution offerings by Azure.
2. One of the best use cases is the offering of fully managed file shares.
a. The file share is accessible over Server Message Block (SMB) protocol or
Network file system (NDS) protocol.
b. Can mount Azure file shares either on Cloud or on-premises.
c. SMB file shares are accessible from Windows, Linux, and MacOS, whereas
NFS file shares are accessible over Linux or MacOS clients.
3. The file share concept can be extended to caching on Windows Servers with Azure file Sync.
This allows for fast access closer to the location it is being used.
Use Cases:
➔ The Company has headquarters in New York and a branch office in California. Users in
California are seeing latency accessing the data which is created in New York.
◆ Solution – Use Azure File Sync, which will cache the data closer to the California
location.
➔ The Company wants to migrate its application. The application has data residing on file
shares mounted.
◆ Solution – Use Azure files for Lift and Shift scenarios. Create a file share and mount it
as a drive, and the application can be migrated and will point to this file share mounted
as a drive.
➔ One of the clients wants high availability, has had an issue with file servers being down often.
◆ Solution - Use File shares. If a server crashes, place a new Server, and it will
automatically get the data from the cloud with Azure File Sync setup
FAQs
● What ports does file share use?
a. SMB protocol uses 445
b. NFS protocol uses 2049
--Back to Index-- 49
a. Yes, please use Premium file shares as they are stored on SSD. Please note that
replication has to do with the LRS only.
Tips
● Can I use SAS to map a drive?
a. It is possible to map a drive with SAS.
Azure BLOB
Azure Storage has 5 types:
Blob Storage:
● Scalable and It can be used for DR purposes
● Use REST API, CLI, ARM template to create a storage account
● Blob is typically a file, can be image, file, video
● Common scenarios – backup/restore, upload large files, logging
● New version of ADLS (Azure Data Lake Storage) is built on top of Blob called ADLS Gen2
● Endpoint for Blobs is [Link]
● For a blob, the base URI includes the name of the account (myaccount), the name of the
container(mycontainer), and the name of the blob(myblob).
Here name will as follows: [Link]
● You can use Storage Explorer to view/upload/copy files
Limits:
● No limits to the number of objects
● Max size of a single object in a container is about 5TB
Blob types
● Block Blob – Large objects that are broken and each block is uploaded in parallel.
--Back to Index-- 50
It is optimal for Streaming
● Append Blobs – We use these where we keep updating and appending to the files.
For example, logging.
● Page Blob – Stores the VHD VM disks. Max size is 8TB
Access levels
● Private (no anonymous access) – This is the default. A valid token is needed to access data.
● Blob (anonymous read access for blobs only) – Globally accessible with reading access
● Container (anonymous read access for containers and blobs) – All blobs in the container
can be read and listed. Access is at the container level, and hence it is for container level,
and every blob can be read.
Lifecycle Management
● You can use lifecycle management to move your data from one access tier to another.
● For example, you can move from Hot to Cool after 30 days and then from Cool to Archive
after 180 days and then delete after 1 year.
Soft Delete
● If you enable this feature, the blob will not be deleted but will be marked for deletion.
● You specify the number of days, like 90, and after 90 days, the blobs will be deleted.
● This protects against malicious or accidental deletion.
● Please note that you will pay for the 90 days of storage.
Role Access
--Back to Index-- 51
Storage Blob Data Read, write, and delete Azure Storage containers and blobs.
Contributor
Storage Blob Data Owner Provides full access to Azure Storage blob containers and data
operations
Storage Blob Data Reader Read and list Azure Storage containers and blobs.
Storage Blob Delegator Get a user delegation key, which can then be used to create a
shared access signature for a container or blob that is signed with
Azure AD credentials.
For more info —> Configure a lifecycle management policy - Azure Storage
● With Soft delete enabled, a file is deleted. 2 snapshots are also deleted. What can be
recovered? Answer – The snapshots and file can be restored
--Back to Index-- 52
Deploy and manage Azure Compute Resources
ARM Template
Azure Resource Manager templates(ARM Templates) are JavaScript Object Notation (JSON)
files that define the infrastructure and configuration for your project.
Ref: ARM template documentation | Microsoft Learn
To implement infrastructure as code(IaC) for Azure solutions, you need to use ARM templates.
This template uses declarative syntax, which allows you to state what you want to execute
without having to write a sequence of programming commands to create it.
In the template, specify the resources you want to implement and the properties associated with
those resources.
If you want to deploy a template, you can use any of the following options:
➔ Azure portal
➔ Azure CLI
➔ PowerShell
➔ REST API
➔ Button in GitHub repository
➔ Azure Cloud Shell
--Back to Index-- 53
Editing and Deploying a Template
We can use the Azure portal to quickly develop and deploy the ARM templates and in general,
Microsoft recommends → Visual Studio Code to develop your ARM templates and Azure CLI or
Azure PowerShell to deploy the template, but here we can use the portal for quick deployments
without installing those tools.
Let's assume that you have an ARM template that you want to run one time without
setting up other tools. Steps are as follows
6. You see the blade for providing deployment values. Again, select myResourceGroup for the
resource group. You can use the other default values. When you're done providing values,
select Review + create.
7. After the portal validates the template, select Create.
8. When the deployment is complete, you will see the deployment status.
This time select a resource group name.
--Back to Index-- 54
9. Notice that your resource group now contains a storage account and a virtual network.
Example: Consider a scenario where a virtual machine needs software installation or anti-virus
protection, or when a machine configuration script needs to be run.
You can use virtual machine extensions to accomplish these tasks. Extensions are all about
managing your virtual machines.
--Back to Index-- 55
You can apply VM extensions to an existing VM through the Azure portal. Select the VM in the
portal, select Extensions, and then select Add. Select the extension you want from the list of
available extensions and follow the instructions in the wizard.
Below image shows the installation of the Microsoft Antimalware extension from the Azure portal:
Fore more information → Virtual machine extensions and features for Windows
● Azure Virtual Machines are part of the IAAS offering from Azure.
--Back to Index-- 56
● As customers, we are responsible for managing the virtual machine, and just the
hardware will be provided to us by the cloud provider. We can start, stop and delete the
virtual machine.
● If we find that the capacity is insufficient or too high, we can change to a different
machine type. We can install any software as we like.
● Also, please note that this is the most expensive of the three offerings.
● We can create Windows or Linux VMs, and there are multiple locations throughout the
world where resources can run from.
● When we create a VM, we need to attach a virtual hard disk, and the location that we
specify is where the hard disks are stored.
Here is the SLA table:
--Back to Index-- 57
(Source: Microsoft Documentation)
The process includes configuring basic and advanced options and specifying details about disks,
virtual networks, and machine management.
The below are the main key-takeaways for creating a virtual machine.
● The Basics tab contains the project details, administrator account, and inbound port rules.
● On the Disks tab, you select the OS disk type and specify your data disks.
● The Networking tab provides settings to create virtual networks and load balancing.
● On the Management tab, you can enable auto-shutdown and specify backup details.
● On the Advanced tab, you can configure agents, scripts, or virtual machine extensions.
● Other settings are available on the Monitoring and Tags tabs.
● If the validation is completed then we need to click the “Review+Create” tab for final output.
--Back to Index-- 58
Azure Compute Gallery
Azure Compute Gallery helps you create & build structure and organization around the
Azure resources(such as images and applications) and It provides the following
● Global replication and Versioning and grouping of resources for easier management.
● Highly available resources with Zone Redundant Storage (ZRS) accounts in regions that
support Availability Zones. ZRS offers better resilience against zonal failures.
● Premium storage support (Premium_LRS).
● Sharing to the community, across subscriptions, and between Active Directory tenants.
● Scaling your deployments with resource replicas in each region.
With Gallery, we can share our resources with everyone or limit sharing to different users, service
principals, or AD groups in your organization. Resources can be replicated to multiple regions for
rapid scaling of your deployments.
This (Azure Compute Gallery) service is not a global resource. For disaster recovery scenarios,
It is best practice to have at least two galleries in different areas.
FYI: You can use the below links for more knowledge
Overview of Azure Compute Gallery - Azure Virtual Machines | Microsoft Learn
Store and share images in an Azure Compute Gallery.
ADE is Zone resilient, similar to VMs. FYI→Azure Services that support Availability Zones.
If you use Microsoft Defender for Cloud, you'll get a warning if you have unencrypted VMs.
Warnings are shown as high severity and it is recommended to encrypt these VMs.
Supported VMs for ADE : Generations 1 & Generation 2 VMs and also VMs with premium
storage.
ADE is not available on Basic, A-series VMs, or on virtual machines with less than 2 GB of
memory.
--Back to Index-- 59
You can move a VM from one resource group to another one with Portal, CLI, and powershell.
1. Go to the Azure portal to manage the resource group containing the VM to move.
Search for and select Resource groups.
2. Choose the resource group containing the VM that you would like to move.
3. At the top of the page for the resource group, select Move and then select Move to another
resource group. The Move resources page opens.
4. Select each of the resources to move. In most cases, you should move all of the related
resources that are listed.
5. Select an existing resource group or enter a name to create a new resource group.
6. When you're done, select that you understand that new resource IDs will be created and
that the new IDs will need to be used with the VM after the move, and then select OK.
You can practice this using with our Azure Cloud Sandbox Environment
You can practice this using with our Azure Cloud Sandbox Environment
If you are creating a virtual machine (VM), you can create a virtual network or use an existing
one. You need to figure out how you want to access the virtual machines(VM) on the virtual
network(VNet)
It's important to plan before creating resources and make sure you understand the limitations of
networking resources.
In the below image, VMs → are represented as web servers and application servers.
--Back to Index-- 60
Each set of virtual machines are assigned to separate subnets in the VNet.
You can create a virtual network before you create a virtual machine, or you can create a virtual
network when you create a virtual machine(It’s completely up to you)
You need to create the below resources to support communication with the virtual machine:
Network interfaces, IP Addresses, and Virtual network & Subnets
Note: Additionally, you need to consider → Network Security Groups & Load balancers
are optional resources.
You can assign the below types of IP addresses to a network interface in Azure:
➔ You can assign public IP addresses to: Virtual machines & Public load balancers
➔ You can assign private IP address to: Virtual machines & Internal load balancers
➔ Availability zones
➔ Virtual Machines Scale Sets
➔ Availability sets
➔ Load balancer
➔ Azure Storage redundancy
➔ Azure Site Recovery
Here we have provided an overview of the availability options for the Azure VMs.
--Back to Index-- 61
Azure Virtual Machine Scale Sets allow you to create and manage a group of load-balanced
VMs. The number of VM instances automatically increases or decreases in response to demand
or a defined schedule.
When you implement virtual machine scale sets and configure all your virtual machines the same
way, you get true autoscaling. Virtual machine scale sets automatically increase the number of
virtual machine instances as application demand increases and decrease the number of machine
instances when demand decreases.
For more info refer to this link: Create Virtual Machine Scale Sets - Training | Microsoft
Learn
Availability Set
An availability set is a logical grouping of VMs that allows Azure to understand how your
application is structured for redundancy and availability. We recommended that two or more VMs
be created in an availability set to provide the most available application and meet the 99.95%
Azure SLA. There is no cost for an Availability Set, you only pay for each VM instance you
create.
Load Balancer
You can Combine Azure Load Balancer with an Availability Zone or Availability Set for maximum
application resiliency. Azure Load Balancer distributes traffic between multiple virtual machines.
For our standard tier virtual machines, Azure Load Balancer is included. Not all virtual machine
tiers include Azure Load Balancer. For more information about load balancing your virtual
machines, see Load balancing virtual machines for Linux or Windows.
Azure Storage Redundancy
Azure Storage always stores multiple copies of your data so that it is protected against planned
and unplanned events, including temporary hardware failures, network or power outages, and
massive natural disasters. Redundancy ensures that your storage account meets its availability
and durability goals even in the face of failures.
--Back to Index-- 62
Availability zones
An Availability zone is a physically separate zone in an Azure region and it extends the level of
control you have to manage the availability of applications and data in your VMs.
Azure region has three Availability Zones.
Each Availability Zone has a dedicated power source, network and cooling. By designing your
solutions to use replicated VMs in zones, you can protect your apps and data from data center
loss. If one zone is compromised, replicated apps and data are immediately available in the other
zone.
For More info,pls refer to this → Availability options for Azure Virtual Machines
--Back to Index-- 63
You can deploy Azure virtual machine scale sets in the Azure portal. You specify the number of
virtual machines and their sizes, and specify preferences for using Azure Spot instances, Azure
managed disks, and provisioning policies.
In the Azure portal, there are several settings to configure to create a deployment of Azure
Virtual Machine Scale Sets.
Example: Refer to this → Create virtual machines in a Flexible scale set using Azure portal
You can practice this using with our Azure Cloud Sandbox Environment
FAQs
1. How do I resize a VM?
You can first run the list-vm-resize-options and see available sizes. If you find the size, you
can run the resize command
az vm resize --resource-group WLRG --name WLVM1 --size Standard_DS3_v2
Else you need to deallocate the VM, which will allow you to use any size. You need to
deallocate, resize and start a VM.
az vm deallocate --resource-group WLRG --name WLVM1
az vm resize --resource-group WLRG --name WLVM1 --size Standard_DS3_v2
az vm start --resource-group WLRG --name WLVM1
--Back to Index-- 64
2. What are Azure Dedicated hosts?
We usually shared the physical hardware with other tenants. If we want exclusively to use
the physical server, then we can choose dedicated hosts.
3. What are Azure Spot instances?
This feature allows us to take advantage of the unused CPU at a significantly lower cost at
almost 90% savings. If there are workloads that can tolerate disruption and can be
restarted, then we can choose this option. If there is another bidder who bids more than
our price, we will be vacated on 30 seconds’ notice. So we need to be prepared with
proper scripts to save the data or any other process from exiting gracefully.
5. Reserved Instances – We can commit to 1-year or 3-year and choose to pay upfront or
monthly to buy RIs. We have the flexibility to change size if needed.
6. Azure Hybrid Benefit – If you have a license already, you can use the license on Azure and
get this benefit.
7. What are Azure Images?
If there is a custom image that we want every VM to have when created, we can choose
to create a standard VM and sysprep and then create an image. We can then use this
image to create VMs.
8. How can we make VMs highly available?
We had discussed in the excel above with SLAs. We can use multiple machines either in
availability or in more than 1 availability zone. In addition to this, we can use Azure VMSS
(Virtual machine scale sets). VMSS is automatically created from a central configuration
using a standard template. More VMs will be added during peak and will be brought
down when the demand goes down based on our auto-scaling options.
9. How can we back up VMs?
We have 3 options:
a. Azure Backup – We can create recovery vaults and configure Azure Backup to
back up our VMs
b. ASR (Azure Site Recovery) – Here, our VMs are replicated to another region, and
our entire production region fails; we can failover to the backup areas with the
click of a button
--Back to Index-- 65
c. Managed Snapshots – If we have managed disks, we can take a snapshot of our
disks, a read-only copy. We leveraged this feature for quick backups in dev and
test environments.
10. How can we monitor VMs?
Under Monitoring tabs, we have metrics to see various parameters. We can also set
alerts. We can also Log analytics by enabling the Logs option in Monitoring. We need to
create a log analytics workspace.
Advantages of ACI
● Fast Startup times
● Container access
● Custom Sizes
● Persistent Storage – We do this by mounting Azure file shares.
● Virtual Network deployment – When deployed in a Vnet, ACI can securely communicate
with other resources in the Vnet.
--Back to Index-- 66
Azure Container Instances provide a fast and simple way to run a container on Azure, without
having to manage any virtual machines and adopt a high-level service. Azure Container
Instances is a great solution for any scenario that can operate in discrete containers, including
common applications, task automation, and build jobs.
Containers are becoming the preferred way to package, deploy and manage cloud applications.
The following example shows a web server container built with an Azure Container instance. A
container is running in a virtual machine on a virtual network.
FAQs
1. What are probes in ACI?
o You can configure the liveness probe. We check the liveness probe to see if the
container is healthy. If the container is not healthy, we need to restart. There are
common scenarios when containers run for a long time.
o You can configure the readiness probe. Here we might have a scenario where the
container (maybe DB for the backend) is just coming up. We run the readiness
probe and send requests to the container only if the probe succeeds.
--Back to Index-- 67
2. How can we monitor ACI?
We use Azure Monitor. Here are the available metrics at this time.
o CPU Usage measured in millicuries (One millicore is 1/1000th of a CPU core)
o Memory Usage in bytes
o Network bytes received per second.
o Network bytes transmitted per second
3. What are container groups?
● Similar to AKS for orchestration, we can use container groups to combine and
manage containers. They get scheduled on the same host machine.
● The concept is similar to pods in Kubernetes. The use case for this is in scenarios
where we want to divide a single functional task into a smaller number of
container images. An example is a front-end container and a back-end container.
● The front end might serve a web application, with the back end running a service
to retrieve data.
Configuration example
Consider the following example of a multi-container group consisting of two containers.
--Back to Index-- 68
For more information —> Introduction to container groups - Azure Container Instances
Azure Container Apps common use are : Deploying API endpoints, Hosting background
processing applications, Handling event-driven processing and Running microservices.
--Back to Index-- 69
Introduction to Azure Kubernetes Service (AKS)
Kubernetes has become very popular, and many cloud service providers offer a Kubernetes
based platform or infrastructure related PaaS or IaaS offering.
Google has GKE (Google Kubernetes Engine), AWS has EKS (Elastic Kubernetes Service), and
Azure has AKS (Azure Kubernetes Service)
What is Containerization?
● In the traditional computing system, we had to install an Operating system and install all
dependencies for an application to work. Only a single OS could be installed.
● Then came Virtualization where we could install multiple OS by introducing another layer
between the hardware and the OS and this was called Virtualization. So only physical
machines appeared as multiple systems.
● Then came a lightweight alternative to virtualization, which was called Containerization. This
removed the drawback of having a full machine, and this had only the necessary
components.
● Containers will encapsulate an application with its operating system. This would contain all
the dependencies that were needed for an application to run. So we take the container and
run it on any operating system, and it will run.
● Some of the containerization options are Docker, which is the most popular and sometimes
equated to containers. But there are others like LXC/LXD, ContainerD, Rocket.
Orchestration
● Orchestration is the system that is used to manage the deployment of containers. We use
Orchestrators as tools to achieve this. Some of the performed activities are automating the
maintenance of those applications, replacing failed containers automatically, and managing
the rollout of updates and reconfigurations of those containers during their lifecycle.
● The popular tools are Docker Swarm by Docker, Nomad by Hashicorp, Flocker, & Kubernetes.
● Kubernetes, also stylized as K8s, is an open-source container orchestration system. It is used
for automating computer application deployment, scaling, and management. It was
originally designed by Google and influenced by Google’s Borg System and is now
maintained by the Cloud Native Computing Foundation. It is a cluster management software
for Docker containers mainly but supports others also.
Components of AKS
1. The Cluster
o The Cluster contains 2 components
▪ Control Plane – this consists of kube-apiserver, etcd, kube-scheduler and
kube-controller-manager
▪ Nodes that run the applications
--Back to Index-- 70
2. Persistent Volumes
o Since the nodes are added and removed on-demand and the storage associated with it
is temporary, we need to create storage outside of the cluster. Hence we create
persistent volumes.
3. Node
o We create Node pools in Kubernetes (as shown below). Here we choose a VM size, and
that will be the unit size of the nodes within the pool.
o We can add node pools as needed. The first node pool created is the system node pool
which hosts critical system pods like coreDNS and tunnel front.
o We then add user node pools for application support and create different pools based
on the application requirements.
o Pods will be created within the nodes, and the max pod setting is configured at the
node pool level.
4. Containers
o We store our code that is going to be run inside containers. There are readily available
pre-built containers stored in container repositories or we can create our own
containers.
o One or more programs can be run from the containers
--Back to Index-- 71
5. Pods
o Nodes create Pods, and kubernetes use Pods to run instances. Usually, only one
container is run within a pod, but multiple containers could run in a pod if there was a
requirement from the application.
o We scale based on pods. When we can scale, we simply use pod replicas. A new pod
will be spun up in another node, and we now have an additional pod. Same way, we
can remove the pods to scale down.
6. Deployments
o We don’t launch pods directly. Instead, we create deployments.
o A deployment will state how many replicas should run and the system manages that.
--Back to Index-- 72
7. Ingress
o By default, Kubernetes provides isolation between pods and the outside world. If you
want to communicate with the service running in the pods, you need to open the
communication. This is called Ingress.
o You can achieve this communication in several ways. The most common ways are
Ingress controller or a load balancer. Please see the sample [Link] file which
creates an external load balancer. We get the IP of this service and connect.
Multiple pods may need to → Share the same data volumes and reattach data volumes if the
pod is rescheduled on a different node.
Finally, you may need to collect & store sensitive data/ application configuration info in pods.
The below are the main concepts of providing storage for your applications in AKS:
Volumes, Persistent volumes, Storage classes, Persistent volume claims
--Back to Index-- 73
Azure Kubernetes Service Scaling
The scaling process involves adjusting the compute resources allocated to your application
instances to meet workload demands. When you run applications on an Azure Kubernetes
Service cluster, you need to apply scaling to increase or decrease your compute resources.
If the number of your application instances changes, so will the number of underlying Kubernetes
nodes. You may also need to quickly provision a large number of additional application
instances.
The following illustration shows a scaling implementation for Azure Kubernetes Service.
--Back to Index-- 74
The Azure platform helps facilitate virtual networking for Azure Kubernetes service clusters.
In AKS, You can deploy a cluster that uses one of the following network models:
● Kubenet networking: Network resources are typically created and configured as the
AKS cluster is deployed.
● Azure Container Networking Interface (CNI) networking: AKS cluster is connected to existing
virtual network resources and configurations.
Fore more information about AKS networking → Concepts - Networking in Azure Kubernetes
Services (AKS) - Azure Kubernetes Service | Microsoft Learn
Part of the AKS cluster lifecycle includes periodic upgrades to the latest Kubernetes version. It is
important that you apply the latest security releases or upgrade to get the latest features. This
article shows you how to check, configure, and upgrade upgrades to your AKS cluster.
--Back to Index-- 75
AKS clusters that use multiple node pools or Windows Server nodes, see Upgrade a node pool
in AKS. To upgrade a specific node pool without upgrading the Kubernetes cluster, see
Upgrading a specific node pool.
An AKS cluster is divided into two parts: Azure-managed nodes and customer-managed nodes.
● Azure-managed nodes provide core Kubernetes services and orchestration of application
workloads in your AKS cluster.
● Customer-managed nodes run your application workloads in your AKS cluster.
The below mentioned three are important during upgrading an AKS Cluster
- Check for available AKS cluster upgrades.
- Customize node surge upgrade
- Upgrade as AKS cluster
You can Upgrade your AKS cluster through →Azure Portal, Azure CLI, and Azure PowerShell
Example: Here we have provided a reference based on Azure Portal and Steps are same for
both the sections: a) Check for available AKS cluster upgrades and b) Upgrade as AKS cluster
Azure App Service allows us to run applications on the cloud. Here are some features:
● HTTP based Service for hosting web applications, REST APIs, and mobile backends.
● Supports .NET, .NET Core, Java, Ruby, [Link], PHP, Python
● Run and Scale on Windows/Linux
App Services run under an app service plan. An app service plan is the logical abstraction that
represents one or more VMs that runs the app service. It consists of compute resources like CPU,
memory and disk space. We pay for app service plans and not the app service.
Also, we can have more than one app service running inside an app service plan. The number of
app services that can run inside an app service plan depends on the app service plan. Also, the
amount of resources like CPU, RAM and disk space depends on the app service plan.
--Back to Index-- 76
FAQs
1. How does app service plan work?
App service plan is supported by Service Fabric. Service fabric replaces instances if an
existing one fails. Also, it adds instances if there is a requirement.
2. What are the types of App Services?
There are 4 types of services as follows:
S NO Type Purpose
1 Web App (previously Azure Websites) Hosting websites and web applications
4 Mobile App (previously delivered by Used for hosting mobile app back ends
Azure Mobile services)
--Back to Index-- 77
2. Select New > Web App or another kind of App service app.
3. Before you configure an App Service Plan, you must configure the Instance Details section
Settings such as Publish and Operating Systems can change the pricing tiers available for your
App Service Plan. Region determines where your App Service plan is created.
4. In App Service Plan section, select an existing plan, or create a plan by selecting Create new.
5. While creating a plan, you can select a new plan pricing tier.
Select Change Size to change the Sku and Size Price Range.
You can practice creating an Azure App Service using our Hands-on-Labs
Creating Azure App Service using ARM template ([Link])
Azure App Service provides built-in authentication and authorization support. You can sign in
users and access data by writing minimal or no code in your web app, API and mobile backend,
and your Azure Functions apps.
--Back to Index-- 78
Secure authentication & authorization both require a deep understanding of security including
federation, encryption, JSON Web Tokens (JWT) management, grant types, and so on. An app
service provides these utilities so you can spend more time and energy delivering business value
to your customer. Ref: Secure your App Service app - Training | Microsoft Learn
There are three steps to creating a custom domain name and the following steps describe how to
create a domain name in the Azure portal.
--Back to Index-- 79
Backup & Restore are supported in these tiers → Basic, Standard, Premium & Isolated.
Azure contains two types of backups in App Service Environment.
1. Automatic backups are made as long as your app is within the support price range.
2. Custom backups require initial configuration and can be done on schedule/demand.
For more information,please refer to → Back up an app - Azure App Service | Microsoft Learn
App Service
● HTTP based Service for hosting web applications, REST APIs, and mobile backends.
● Supports .NET, .NET Core, Java, Ruby, [Link], PHP, Python
● Run and Scale on Windows/Linux
--Back to Index-- 80
Features
● PAAS – Patches/OS Maintenance done by Azure
● Support for Containerization and Docker
● Serverless
● Deployments Slots – Swap application content in Prod and avoid downtimes
● Grouped under App Service plans with following tiers
Please refer to this → Configure apps - Azure App Service | Microsoft Learn
Tips
● When you move an App service from one RG to another, the App Service plan doesn’t change.
● Destination RG cannot contain App Service resources like Web app or App Service plan.
● .Net Core application can be deployed on Windows or Linux OS
● ASP .Net app CANNOT be deployed on Linux OS. Only Windows OS
● Multiple Web Apps can be hosted on a single App Service plan.
● Web App and App Service plans must exist in the same region.
--Back to Index-- 81
● App Service environments (ASEs) provide very high scaling with isolation and secure
network access with high memory utilization.
● We can create multiple ASEs within a single Azure region or across multiple Azure
regions, making it ideal for horizontally scaling stateless application tiers when we have
high requests per second (RPS) workloads.
There are three types of workloads available when choosing the workload tier. They are
Dev/test, Production, and Isolated.
● Of these, the isolated offering provides the ASE environments which host applications
within the client’s VNets. As stated, we have fine-grained control over inbound and
outbound application network traffic.
● While the other category of app services has a fixed suffix of [Link], we can
create our own domain name.
● Also, ASEs come with powerful computers, which is twice as powerful as the regular app
service plans. They also come with 1TB Storage as compared to 50GB of space for the
regular ones.
● We can host up to 100 instances which are sufficient to host a miniature web service hub.
We can expect the service to cost us about 250-300$ per month, which is very cheap for
the services being provided.
--Back to Index-- 82
Steps to creating Web Apps under ASE
● Please note that the process is similar except that we drop down the region and select
the ASE that we just created.
● Also, the below screen shows various features under ASE and pricing under each of the
pricing tiers I1 and I2, and I3.
--Back to Index-- 83
Monitor and Maintain Azure resources
Introduction to Azure Monitor
● Azure Monitor is a free service that helps increase performance and availability. We could
collect telemetry data from Azure as well as on-premises.
● We could collect the metrics and logs from our resources like VMs. We could even collect
more detailed logs by enabling guest diagnostics and collecting OS level information.
● We can also integrate additionally with SIEM and ITSM tools. We could also send data via
event hubs or other services.
● Metrics are available at each resource level or they can be collectively seen at the Azure
Monitor. This way Monitor acts as a central location for all our monitoring needs like
Metrics, logs, alerts and activity logs.
● We also have a section on Insights where we can see more intelligent information for
various resources like Applications, VMs, Storage Accounts, Containers, Networks, SQL
(Preview), CosmosDB, KeyVault, Azure Cache for Redis.
● We could also see a map of our application and understand how the different
components work together.
Here are some of the components which make up the Azure Monitor
--Back to Index-- 84
1) Inputs –
a. Logs – these are the logs generated by various resources like VMs/ Databases etc.,
b. Metrics – Metrics provides numbers like CPU percentage, Network data in/out which
helps us understand performance.
The metrics are stored in a time series DB which helps understand real time scenarios.
With metrics, we can set triggers to scale the resources up and down. Please see a metric
chart below on CPU percentage usage:
2) Insights
a. With Insights, we can get a deeper view into the resources. We could see a map of the
resources and get an overall view. Please see below some insights:
APPLICATION MAP:
STORAGE OVERVIEW
--Back to Index-- 85
KEYVAULT INSIGHTS
3) Analyze
a. Log Analytics – We can work with log data from multiple sources with log analytics. We
can perform complex queries with KQL (Kusto Query Language). We can analyse and act
on that data.
b. Metric Analysis
4) Visualize
a. Metrics explorer – interactively work with metric data with metric explorer
b. Workbooks – We can use a combination of text, metrics, log queries and parameters into
interactive reports. There are several built-in workbooks available for use.
c. Dashboards – We can add metric graphs and queries output and create dashboards.
5) Respond
a. Alerts - When there is any issue, then we will get alerts proactively and we can
automatically run functions, runbooks, webhooks or logic apps.
b. AutoScale – With the metric as inputs, we can set up the system to scale up or down
automatically.
--Back to Index-- 86
Configure Azure Monitor Logs
Azure Monitor Logs is a feature of Azure Monitor that collects and manages log and performance
data from monitored resources.
Data Collection: After you create a Log Analytics workspace, you must configure sources to
send their data. No data is collected automatically.
Azure Monitor Logs stores the data that it collects in one or more Log Analytics workspaces.
● You need to create at least one workspace to use the Azure Monitor Logs service.
● Log Analytics is a tool in the Azure portal, with this tool you can edit and run log queries
and analyze their results interactively.
--Back to Index-- 87
Data is retrieved from a Log Analytics workspace through a log query, which is a read-only
request to process data and return results.
Azure Monitor Logs is based on Azure Data Explorer. A Log Analytics workspace is roughly the
equivalent of a database in Azure Data Explorer.
Configuring VM insights
VM Insights monitors the performance and health of your virtual machines and virtual machine
scale sets. It monitors their running processes and dependencies on other resources.
--Back to Index-- 88
B) Implement backup and recovery
A recovery services vault is a storage entity in Azure that stores data. Recovery Services Vaults
make it easy to manage your backup data while reducing maintenance overhead.
1. It can be used to back up Azure Files file shares or on-premises files and folders.
2. It stores backup data for various Azure services such as IaaS virtual machines (Linux or
Windows) and Azure SQL databases.
3. It supports System Center Data Protection Manager, Windows and Azure Backup Server, etc.
4. In the Azure portal, you can create a Recovery Services vault from the Backup Center
dashboard.
1. Type Backup vaults in the search box (in the top of the Console)
2. Under Services, select → Backup vaults.
3. On the Backup vaults page, select → Add.
4. On the Basics tab → Project details, make sure the correct subscription is selected and
then choose Create new resource group. Type myResourceGroup for the name.
5. Under Instance details, type myVault for the Backup vault name and select your region of
choice, in this case East US for your Region.
--Back to Index-- 89
6. Select your Storage redundancy. It can’t be changed after protecting items in the vault.
7. Microsoft recommends that if you're using Azure as a primary backup storage endpoint,
continue to use the default Geo-redundant setting.
8. If you don't use Azure as a primary backup storage endpoint, Select Locally redundant
9. Select the Review + create button at the bottom of the page.
➔ The Admin can select the Create a new policy link in the Choose backup policy section.
--Back to Index-- 90
In the Backup Policy blade displayed in the screenshot, the administrator can define
the following properties:
➢ Policy name
➢ Backup schedule
➢ Instant Restore settings
➢ Retention range
After you back up your virtual machine, the backup snapshots and recovery points are stored in
your Recovery Services vault. You can restore your machine by accessing a snapshot or restore
data to a specific point-in-time by using recovery points.
--Back to Index-- 91
Configure Azure Site Recovery for Azure resources
Azure Site Recovery(ASR) helps ensure business continuity by keeping business applications
and workloads running during [Link] replicates workloads running on physical and virtual
machines from a primary site /location to a secondary site/location.
If any outage occurs at your primary site, the Site Recovery implements a failover to your
secondary location to allow continued access to your applications. After the primary location is
up and running again, you can resume application access on the primary machine.
The following image shows two regions connected by Azure Traffic Manager.
Azure Site Recovery is deployed to enable failover from Region 1 to Region 2.
--Back to Index-- 92
Failover to a secondary region by using Azure Site Recovery
The below are the important steps for to perform failover to a secondary region by using ASR
1. Check prerequisites
2. Verify VM settings
3. Run a failover to the secondary region
4. Start replicating the VM back to the primary region.
Azure Backup provides a reporting solution that uses Azure Monitor logs and Azure workbooks.
These resources help you gain great insights into your backups across your entire backup
estate. The points below shows → how to configure and view Azure backup reports.
● Backup reports are supported for Azure VMs, SQL in Azure VMs, SAP HANA in Azure VMs,
MARS agent, MABS, and System Center Data Protection Manager (DPM).
● For DPM workloads, Backup reports are supported for DPM Version [Link] and above and
Agent Version 2.0.9127.0 and above.
● For MABS workloads, Backup reports are supported for MABS Version [Link] and above
and Agent Version 2.0.9170.0 and above.
● Backup reports can be viewed across all backup items, vaults, subscriptions, and regions.
● If you're an Azure Lighthouse user with delegated access to your customers' subscriptions.
● Currently, data can be viewed in Backup Reports across 100 Log Analytics Workspaces.
● Data for log backup jobs currently isn't displayed in the reports.
For more information, pls refer to this → Configure Azure Backup reports - Azure Backup
--Back to Index-- 93
Configure and Manage virtual networking
Components
● IP addresses
o Public and private IP addresses
▪ The Vnets are configured with a range of IP addresses. The Notation is in CIDR.
▪ By default, Private IP addresses are assigned to the resources with which
communication takes place between the resources
▪ Optionally, Public IP address can be assigned to the resources
▪ Please note that we will pay for Public IPs if they are not assigned.
This is to conserve Public Ips
--Back to Index-- 94
● Subnets
o A Subnet is a subcomponent of Vnet. All resources must exist in a subnet. A default
subnet is created when a Vnet is created.
o Access can be restricted at a subnet level also
o Let's say we have 2 tiers in an application called Front end and Back end. We can create
2 subnets and configure access in such a way that internet traffic will flow to the front
end subnet and from there to the back end subnet.
--Back to Index-- 95
5. Select the IP Addresses tab, or select the Next: IP Addresses button at the bottom of the
page and enter in the following information then select Add:
6. Select the Security tab, or select the Next: Security button at the bottom of the
page.
8. Select the Review + create tab or select the Review + create button.
Practice this with using our Hands-on-Labs → Create a Virtual Network ([Link])
--Back to Index-- 96
Virtual Network Peering
FAQs
1) What is Vnet Peering?
Vnet Peering allows two Vnets either in the same region (Default Vnet Peering) or
Globally (Global Vnet Peering)
--Back to Index-- 97
Public and Private IP Addresses
Private IP addresses Enable communication between Azure Virtual Network and your
on-premises network. When you use a VPN gateway or Azure ExpressRoute circuit to extend
your network to Azure you create a private IP address for your resource.
Public IP addresses Allow your resource to communicate with the Internet. You can create a
public IP address to connect to Azure public facing services.
You can create a public IP address for your resource in the Azure portal.
Azure handles all network traffic routing automatically, but in some cases, a custom configuration
is preferable. In these situations, you can configure user-defined routes (UDRs) and next-hop
destinations.
--Back to Index-- 98
UDR Characteristics
● The next hop can be one of the following targets:
Virtual network gateway, Vnet, Internet, Network virtual appliance (NVA)
● Similar to system routes, UDRs also access route tables.
● Each route table can be associated with multiple subnets.
● Each subnet can be associated to one route table only.
● There are no charges for creating route tables in Microsoft Azure.
● This is facilitated by DNS Servers which are setup in a hierarchy. At the top most level, we
have the ROOT and under the root, we have the top level domains (TLD) examples of
which are .ORG, .COM, .NET, .IN etc.,
--Back to Index-- 99
● In addition to this, we have domain registrars where we purchase a domain name.
● Examples are Godaddy, Namecheap and Amazon too via Route53. When a user tries to
connect to a server [Link], the DNS resolves this to the IP address by going to the
ROOT and then to the .COM [Link] works with a concept of Zones. We can set up
Private or Public zones. Public zones are used when we want the internet to be able to
resolve our names.
● However when we want to enable internal communication, we create private zones.
● Please note that zones can also be configured with a “Split-horizon” view which allows a
private and public DNS zone to share a name.
FAQ
1) What is IP [Link]?
This is actually called a Wire Server and has an IP address of [Link]. and it
facilitates communication between Azure resources. It also serves as a DNS and DHCP
server by default. Please ensure that this IP is not blocked.
When we create any NSG, the default security rules are applied and the rule attributes you can
modify to create an augmented security rule.
Source: Microsoft Docs → Azure network security groups overview | Microsoft Learn
Please refer to this link → Creating and Configuring -Azure Network security group
Application security groups allow you to configure network security as a natural extension of an
application's architecture, allowing you to group virtual machines and define network security
policies based on those groups.
Let's take a look at how to implement application security groups by creating a configuration for
an online retailer. In the below example. We need to control network traffic to virtual machines in
application security groups.
Application security groups work similarly to network security groups, but they provide an
application-centric way of looking at your infrastructure. You join your virtual machines to an
application security group. Then you use the application security group as the source or
destination in the network security group rules.
● It is a fully managed PaaS that you run/provision inside your virtual network.
● It provides secure, seamless RDP/SSH connectivity to your VMs directly from portal over TLS.
● When you connect through this, your VM doesn't need a public IP, agent, or client software.
Prerequisites
● A virtual network. This will be the VNet to which you deploy Bastion.
● A virtual machine in the virtual network. This VM isn't a part of the Bastion configuration and
doesn't become a bastion host. You connect to this VM later in this tutorial via Bastion.
● Required VM roles: Reader role on VM & Reader role on the NIC(with private IP of VM).
● Required inbound ports: For Windows VMs - RDP (3389) & For Linux VMs - SSH (22).
Pls refer to this → Tutorial: Deploy Bastion using specified settings: Azure portal
Service Endpoints
service endpoint provides secure and direct connectivity to Azure services in an optimized path
through the Azure backbone network.
These allow you to secure your critical Azure service resources only to your virtual networks.
These allow private IP addresses in a VNet to reach the endpoint of an Azure service without
requiring a public IP address in the VNet.
Service endpoints are available for the following Azure services and regions.
● Extends your virtual network identity to your Azure services to secure your service resources.
● You can secure your Azure service resources to your virtual network by using virtual network
rules.
● VNet rules can remove public internet access to resources & allow traffic only from your VNet
● It takes service traffic directly from your VNet to service on the Microsoft Azure backbone
network.
● Service endpoints are configured through the subnet (No extra overhead is required)
Azure Load Balancer provides high availability and network performance for your applications.
Administrators use these load balancers to efficiently distribute incoming network traffic across
back-end servers and resources. It is implemented using load balancing rules & health probes.
● Azure provides load balancing at Layer 7 which is the application layer via Azure
Application Gateway. This is typically http traffic.
● Azure also provides load balancing at Layer 4 which is a transport layer consisting of
TCP and UDP protocols. This is the Azure Load Balancer.
● We could use the Azure Load balancer for both public facing as well as internal
● Public load balancer can provide outbound connections for VMs inside your virtual network.
● Internal (or private) load balancer is used where private IPs are needed at the frontend only.
But how do we now distribute the load between the two VMs?
The solution is Load Balancing.
Load balancing can be done at 2 layers in the OSI model. One is at Layer 4 where we will use the
Azure load balancer. Here a combination of source and target ip and TCP/UDP Protocol will be
used to achieve routing.
The other routing type is at Layer 7, which is the Azure Application gateway. Here the application
gateway uses a front-end IP address which is resolved from FQDN via DNS. It has an optional
WAF (Web application firewall).
OSI LAYER and the load balancing options within Azure
● Some of the features that WAF provides are preventing SQL injection/ XSS/ http protocol
violations.
● It also protects against crawlers and scanners. We also can allow or block traffic coming in from
certain countries/regions in preview, and it is called Geo-filter traffic.
● WAF can be set up in two modes which are Detection or Prevention.
● When WAF is added, the traffic will be evaluated before Step 3 above against the WAF rules.
● If violating traffic is found in Detection mode, the warning will be issued, and traffic continues to
flow. In Prevention mode, the traffic will be blocked.
Connection Monitor provides unified, end-to-end connection monitoring. The Connection Monitor
feature supports hybrid and Azure cloud deployments.
The below are few important definitions that are related to the Connection Monitor
It also provides access to network monitoring capabilities such as connection monitor, flow
logging for network security groups (NSGs), and traffic analytics. And it provides other network
diagnostic features. You can use Network Insights for Monitoring the Virtual networks.
The below are few important key components of monitoring Vnets using Network Insights
● Topology, Network health and metrics, Connectivity, Traffic and Diagnostic Toolkit
The Azure Monitor Network Insights overview page provides an easy way to visualize a list of
your networking resources, along with resource health and alerts. It is divided into four key
functional areas: search and filtering, resource health and metrics, alerts and resource view.
Network Watcher is designed to monitor and repair the network health of IaaS
(Infrastructure-as-a-Service) products, including virtual machines (VMs), virtual networks
(VNets), application gateways, load balancers, etc.
Unmanaged Disks
➔ This is the traditional type of disk. Here we create the storage account and specify the
storage account when we use the disk.
➔ If we have too many disks, then there will be contention, and VMs will throttle, which will
impact the performance.
Managed Disks
➔ This is the latest and recommended type to allocate. If we have unmanaged disks, Azure
gives us the option to migrate to managed disks.
➔ We don’t need to specify a storage account or manage the storage account. Azure takes care
of management, including scalability. We just need to give the size and performance tier.
➔ These are the types of managed disks.
◆ Standard HDD – These are standard magnetic drives and are the cheapest. We can offer
Recovery services to replicate locally or be geo-redundant
◆ Standard SDD – These are more consistent and reliable, and suitable for web servers.
◆ Premium SSD – These are backed by solid-state drives and deliver high performance, low
latency, and useful workloads that are I/O intensive, like production and
performance-sensitive ones.
◆ Ultra disk – This is the latest type, which has a max iops of 160K. But these can be used as
data disks only and not OS disks.
FAQs
● A company has SAP Hana and other top tier databases like SQL and Oracle. What is the
recommended disk type?
o Please use Ultra disks for data disks. Use Premium SSD for OS disk.
● A company has a disk requirement of more than 32TB. What are the available options?
o Please use Ultra disks or use mirroring with striping.
● A company wants more than 50,000 IOPS but does not want to use Ultra disks. What
can be done?
o Please use mirroring with striping. If one disk has 20K iops and you do striping
with 2 disks, you will get 40K iops, and with 3 disks, you will get 60K IOPS
● Will the disk be deleted when we delete a VM?
o No, you need to delete disks explicitly.
● I had allocated 100 GB, but now I want to add 100 GB more. Can I do that on my
existing machine?
o Yes, deallocate VM and update disk.
● Can we cache data?
o Yes, disk caching can be set to NONE or READ ONLY or READ/WRITE. For log disks,
use READ ONLY.
● Can Multiple VMs read the disk on a given VM?
o Yes, we can enable disk sharing.
● URL format: Queues are addressable using the following URL format:
[Link] account>.[Link]/<queue>
● The following URL addresses a queue in the diagram:
[Link]
Use Cases
● Provides a decoupling architecture. This allows for asynchronous communication.
● Let’s take an example of a Purchase system integrated with a Shipping system.
● In the traditional model, both the purchase and shipping system is integrated.
● When a customer places an order, the purchase system sends the order to Shipping, and
it has to get an acknowledgment.
● If there are too many orders and the shipping system does not acknowledge, it will break
the system.
● In asynchronous communication, we decouple, and the purchase system does not wait
for an acknowledgment.
● It will send a message, and the shipping system might check for the message queue every
5-10 minutes and process the orders. Here we use the Azure queue storage.
FAQs
● Can we have ordering like FIFO for messages?
o No
Use Case
FAQs
● How much can we store?
o We can store Petabytes of data.
● Is availability a concern?
o With GRS, data is replicated 3 times within a region and another 3 times in an
additional region. So it is highly available.
● What is Cosmos DB table API?
o Cosmos has several APIs like Mongo/SQL/Gremlin, and one of the supported APIs
is Table API. Both Azure Table storage and Cosmos DB table API have the same
data model and support the same operations like query insert via SDK. Using the
Cosmos DB table API will increase the performance like single-digit ms latency,
scalability, global distribution, etc.
Use Cases
● Archival
o Healthcare and other regulations like SOX (financial records etc.) require that
information be stored for multi-year periods. This provides long term compliant
storage.
● Long term Backup Retention
o There might be a requirement to store Database, server, desktop data for
multi-years. This provides long-term storage freeing up local disk space.
● Magnetic tape replacement
o If your organization has a VTL (Virtual tape library), you can move the least
accessed data to archive storage.
● Other use cases are Security/Public safety data and other digital media content retention.
FAQs
● What types of storage can be stored in Archive Storage?
o Only Blob storage
Azure has a secret store called Azure Key Vault, which stores our secrets and passwords. One
could never be able to read the secret but will be able to use it with the right set of permissions.
Azure Key Vault is a PaaS platform in Azure. It is integrated into Azure Active Directory. We can
store secrets, Keys, and certifications and have multiple versions stored. We have audit logs as a
feature. Azure Key vault is FIPS 140-2 compliant.
Secrets
● We can store up to 25kb in size.
● We can store plain text passwords, connection strings, JSON, XML, and more.
● We can have an activation date and expiry date.
● We can create as enabled or not if we don’t have immediate use etc
Keys
● A Key is typically asymmetric in the PKI (Private Key Infrastructure). Here we have a
public key and a private key. The public key is known to all, and anybody can use it to
encrypt the data. But the private key is known only to the owner, and only the private key
can decrypt the data.
● Azure will generate the private and public keys, but the private keys will never be
disclosed.
● We could also use symmetric keys for storage and SQL data, and in this case, the
symmetric key would be wrapped with an asymmetric key making it secure.
● The key type could be RSA/EC and 2/3/4 kb in size.
● We can have an activation date and expiry date.
● We can create as enabled or not if we don’t have immediate use etc.
Audit
Since all activity takes place within the Azure Key vault, we can audit all types of usage. We can
see who is using and type of activity.
Versioning
It is always recommended to keep changing the secrets. This will help protect in case the secrets
were leaked to limit the damage. To do this, we can create a new version. Also, we need to
automate the process so that we don’t forget to do it.
Access Policy
We can set access policies at the key vault level and more granularly at the Key/Secret and
Certificate level.
We can enable access to:
● Azure Virtual Machines for deployment
● Azure Resource Manager for template deployment
● Azure Disk Encryption for volume encryption
The above will allow the usage of the key vault for the VMs/ disk and other deployments to be
attached automatically.
Also, we can have access granted via the key vault policy or via RBAC.
FAQs
1) We want to have a different set of access for different secrets to the same individual.
How do we achieve it?
Create another key vault and grant access.
4) My RBAC roles for Key vault management are not working. What could be the
problem?
a. Please see the permission model below is selected for Vault access Policy and not
Azure RBAC. Please change to RBAC and retry.
Providers
Few providers provide the container registry services, and they are:
● Docker Hub
● Azure ACR (Azure Container Registry)
● AWS ECR (Elastic Container Registry)
● Github Container Registry
● Google Container Registry
GitHub Azure
Amazon Container Container
ECR Docker Hub Registry Registry (ACR)
Public No YES YES
Repository No
Private Yes YES YES
Repository Yes
Pricing (Public $0 $0 $0
Repository)
ACR Roles
Role/Permission Create/Delete ACR Push Pull Signature Signing
Owner X X X
Contributor X X X
Reader X
AcrPush X X
AcrPull X
AcrImageSigner X
FAQs
Health Alerts
● We can set health alerts to be notified for the services we choose and for the
regions which are of interest to us.
● Here we have selected to be alerted via the Action group when there are issues
with VMs and VNets for all regions.
● Once set up, we will get an email when any issue occurs. We could also select the
type of event. In this case, we have selected all events.
Azure Firewall
● Azure Firewall is a network virtual appliance (NVA) which is a managed network security
device on the cloud.
● The function is to protect our network resources on the cloud. There are two types of
firewalls and they are classified as either Stateful or Stateless. Let’s say that you allow a
certain incoming traffic (say port 80).
● When the same traffic returns, it is automatically allowed if it is stateless. On the other
hand, Stateful traffic will need a specific rule for the outgoing traffic also, else the traffic
will be blocked.
● Azure Firewall is a fully stateful firewall. So, we need to allow both incoming as well as
outgoing traffic.
● Azure Firewall has built-in high availability and is highly scalable. We can create, enforce,
and log application and network connectivity policies across subscriptions and virtual
networks from a central location called Firewall Manager.
● We need to set up a static public IP address for the virtual network resources allowing
outside firewalls to identify traffic originating from the virtual network. It is fully
integrated with Azure Monitor for logging and analytics.
● A typical setup for the firewall is done via a hub and spoke model where the Vnet which
hosts the firewall will act as a hub and the other Vnets will act as a spoke.
● The On premises and Internet is also connected to Azure Firewall. In this way, all traffic
will enter via the firewall and the rules setup via the policies will then allow or deny the
traffic.
● Please note the subnet that hosts the firewall must be named as Azurefirewallsubnet else
it will not function
● As discussed, the rules are set up in a central location using the Firewall Manager. You can
see the pol1 being assigned to fwvnet1 Virtual Networks. We can assign the same policy
to other networks and it is easier to manage centrally.
● A Policy consists of rule collections which in turn contains individual rules. Here we
specify if the rule is to allow or deny.
● We can optionally enable intelligence-based filtering called Threat Intelligence and the
mode can be set to OFF/Alert only or Alert and deny. Microsoft threat intelligence feed
provides a list of IP addresses and domains and these recorded are included as rules to
allow or deny
Finally, we can see the topology of the Vnet and the firewall subnet on the Network watcher
blade under the Topology tab.
Routing Methods:
Here are the routing methods which we can configure:
FAQs
1. What is the name of the website that will be created when we configure Traffic
Manager?
Azure will always use [Link] as a suffix. We cannot change it
We could even have a site-to-site VPN for adding redundancy. If there were issues with the
Express route, we can failover to the S-2-S VPN.
FAQs
1) If I have a 100 Mbps circuit, what is ingress and egress capacity?
You will have an incoming capacity of 100 Mbps and outgoing capacity of 100 Mbps.
What is the routing protocol?
Express route uses BGP (Border gateway protocol)
2) What happens if there is any maintenance?
There won’t be any impact. Express route uses an active-active setup and only the circuit
will be maintained at a given time.
3) So where does the connection land on the Azure cloud?
We connect to one of the Vnets in a subscription. We can connect upto 10 Vnets in each
of the 10 subscriptions max. We need to go for Premium if we would like to add more.
4) How do we plan for Disaster recovery?
Microsoft recommends 2 Express connectivity to avoid a single point of failure. We could
also set up a Site-to-site VPN instead of a second circuit.
Please note that not all products might be available at all locations. You will need to check the
product availability for your location.
Often the load will be so heavy that it will cause the server/machine to crash. This is called denial
of service where customers are denied service by rendering the server unusable.
Imagine the same 100K requests coming from multiple servers where malicious entities do a
coordinated attack with multiple servers. This is called distributed denial of service where multiple
servers hit a given target to bring it down. We have seen attacks feeding as much as 800 Gbps
which can bring the biggest servers down.
Azure DDoS
It provides protection against DoS attacks with always-on monitoring and automatic network
mitigation.
😊
There are two levels of Service – One is BASIC and the other is STANDARD. Basic plan is free
and enabled by default. After all, Azure needs to protects its resources
Basic plan, like the name says, provides only basic services (always-on monitoring and automatic
network mitigation).
Happy Learning!