The Developers Guide To Azure Ebook
The Developers Guide To Azure Ebook
E-Book series
The Developer's
Guide to Azure
New content on:
Cloud-native apps, dev tools,
DevOps, data & AI, and security
The Developer’s Guide to Azure 2
01 / 04 / 07 /
Getting started with the Azure Connecting your application Deploying your services and
application platform with data optimizing costs
Where to host your application Azure has your data needs covered How can Azure help you deploy your
Azure services and products for Azure SQL Database services and optimize costs?
app development Azure Database for MySQL, Infrastructure as code
Azure Communication Services PostgreSQL, and MariaDB Azure Blueprints
Making your application more Azure Arc‑enabled data services Tracking your Azure usage
performant Azure Cosmos DB Creating a billing alert
Azure Storage How to use Azure Billing APIs
Azure data analytics solutions
02 / Azure Purview
Azure IoT Solutions
08 /
Developer tools and
Microsoft Azure in action
developer cloud
The most comprehensive developer
05 / Navigating the Azure portal
tools and cloud Develop your first web app and
Adding intelligence to
Visual Studio and Visual Studio Code extend it with Logic Apps and
your application Cognitive Services
Build, release, and deploy with GitHub
+ Azure DevOps The role of AI in modern Ready for production
CI/CD application development
Security features Why choose Azure AI?
Better together: Visual Studio +
GitHub + Azure
Azure Applied AI Services
Azure Cognitive Services
09 /
Use your preferred programming Azure Machine Learning
Summary and resources
language Developer tooling for AI
Mixed reality Keep learning with Azure
Free resources extravaganza
06 /
Cloud-native applications
Securing your application
What do we mean by cloud native?
Cloud-native components How can Azure help to secure
Kubernetes on Azure your application?
Serverless on Azure Identity
Cloud native and open source Application security
How to build cloud-native applications Posture management
on Azure App access and connectivity
Logging and monitoring
Encryption
The Developer’s Guide to Azure 3
The
The Developer's Guide to Azure is designed for
developers and architects who are embarking on their
journey into Microsoft Azure. In this guide, you will
learn how to get started and choose services that are
Developer's
appropriate for your scenarios.
Guide to
technologies into your application, Azure does the
heavy lifting for you. Azure services are designed to
work together so you can build complete solutions that
last for the lifetime of your application.
Azure Whether you are just starting out, writing code for fun,
or a professional developer, developing with Azure puts
the latest cloud technology and best-in-class developer
tools at your fingertips. You can easily build for the
cloud in your favorite language.
With the Azure support plans, you will get access to Azure Advisor automatically makes personalized
Azure technical support teams, guidance for cloud recommendations for your Azure resources, including
design, and assistance with migration planning. You can what you need to do to be more secure, have higher
even acquire a support plan that guarantees a response availability, increase performance, and reduce costs.
from the technical support teams within 15 minutes.
Azure Service Health gives you a personalized view of
The official Azure documentation and guides give you the health of your Azure services.
an overview of everything in Azure and provide deep
insights through the documentation of each feature. Stack Overflow provides answers to Azure questions
and includes many active posts by members of the
Service Level Agreements (SLAs) inform you about Azure engineering teams.
the uptime guarantees and downtime credit policies
for Azure. Stay up to date with the latest releases and product
announcements on Azure at Azure updates.
The Developer’s Guide to Azure 5
What can Azure By the time you finish reading this guide, you will be
able to:
to containers, databases, and more, to ensure we’re and frameworks you already know and use.
keeping you ahead of the curve. Azure provides • Add new skills at your own pace and connect
end-to-end developer experience that helps you with a global community of your developer peers
create reliable, global, and secure applications faster. to advance your knowledge and career.
You can build your applications using your favorite • Use different hosting services that Azure offers:
programming languages, open-source frameworks, Azure Virtual Machines, Azure App Service, and
and tools, and host them on Azure. There is a vast containers and featured services.
collection of sample applications available to help • Build modern applications with a cloud-native
you get started and to inspire you with ideas for architecture.
your projects.
• Connect your application to data and include
AI capabilities.
The Developer's Guide to Azure will give you guidance
• Turn your ideas into reality!
and explain the benefits of hosting your application
on Azure.
Let's begin our journey by learning how to get started
with the Azure application platform.
The Developer’s Guide to Azure 6
01 /
Getting
You have made the decision to build applications
on the cloud, and now you can't wait to begin!
started
need to do is to sign up for an Azure free account.
with the
choose to upgrade:
Azure
for 30 days
• 25+ services, always free
application
tools, platforms, and frameworks you want to use,
and then start running your applications on Azure.
In this section, we will cover the following topics:
platform
• Where to host your application
• What to use, and when
• How to make your application more
performant
Azure offers services designed to provide what you If you have an existing application that you wish to
need to deliver and scale every application. When you migrate to Azure, there is a vast number of tooling
use Azure services to run your application, you get options you can use, including Azure Migrate, Azure
scalability, high availability, a fully managed platform, App Service migration assistant, PowerShell scripts
and database services. Azure also offers the following for assessing and migrating .NET sites, and ASP.NET
options for running your application. app containerization and migration to Azure App
Service.
PaaS LEARN
MORE
You can develop and deliver Java apps using fully Containers
managed Spring Cloud components, including service
discovery, configuration management, and distributed While much more lightweight, containers are similar
tracing. Azure Monitor provides deep insights into to virtual machines (VMs), and you can start and
application dependencies and operational telemetry, stop them in a few seconds. Containers also offer
providing aggregate metrics for a holistic view of how tremendous portability, which makes them ideal for
different services interact. Powerful visualization tools developing an application locally on your machine
built into the Azure portal enable you to monitor and then hosting it in the cloud, in test, and later
average performance and error rates, along with rich in production.
detail into platform events that may be relevant to
performance decreases or errors. This allows you to You can even run containers on-premises or in other
detect issues before they impact users and continuously clouds—the environment that you use on your
improve your application performance. development machine travels with your container, so
your application always runs in the same ecosystem.
A large portfolio of Spring starters provides
native integration with Azure services such as Scale and orchestrate containers with Azure
Azure Cosmos DB, Azure Active Directory, and Azure Kubernetes Service
Key Vault. With Spring starters, you can make your Azure Kubernetes Service (AKS) makes it simple to
application more secure and connect it to various data create, configure, and manage a cluster of VMs that are
sources, all out of the box. preconfigured to run containers, with support for both
Linux and Windows containers.
Azure Spring Boot is a fully managed service with
scalable global infrastructure. This allows you to focus This means that you can use your existing skills to
on code with no need to manage infrastructure, and manage and deploy applications that run in containers
reduce downtime and deployment risk with turnkey on Azure.
support for blue-green deployments.
AKS reduces the complexity and operational overhead
QUICK of managing a Kubernetes cluster by offloading much
START of that responsibility to Azure. As a hosted Kubernetes
Deploy your first Azure Spring service, Azure handles critical tasks such as health
Cloud application
monitoring and maintenance.
In addition, you pay only for the agent nodes within With Web App for Containers, your applications are
your clusters, not for the masters. As a managed hosted using a predefined application stack based
Kubernetes service, AKS provides automated on a Docker container. The Docker containers, both
Kubernetes version upgrades and patching, easy cluster Windows and Linux, can be deployed from any Docker
scaling, a self-healing hosted control plane (masters), registry, such as Docker Hub, Azure Container Registry,
and cost savings, since you only pay for running agent and GitHub.
pool nodes.
Azure Container Registry
With Azure handling the management of the nodes in Once you have created a container image to run
your AKS cluster, there are many tasks that you don't your application in, you can store that container in
have to perform manually, such as cluster upgrades. Azure Container Registry, which is a highly available
Because Azure handles these critical maintenance tasks and secure storage service, specifically built to store
for you, AKS does not provide direct access (such as container images.
with SSH) to the cluster.
Azure Container Registry is great for storing your
QUICK private Docker images.
START
Get started with Azure You can also use Container Registry for your existing
Kubernetes Service
container development and deployment pipelines.
Use the acr build command to build container images
in Azure. You can either build on demand or fully
Host containers in Azure App Service Web automate builds with source code commit and base
App for Containers image update build triggers.
Web App for Containers helps you to easily deploy and
run containerized web applications at scale.
Virtual machines
Just pull container images from Docker Hub or a private
Azure Container Registry, and Web App for Containers Hosting your application in a VM in Azure Virtual
will deploy the containerized application with your Machines provides you with a lot of control over how
preferred dependencies to production in seconds. you host your application. However, you're responsible
The platform automatically takes care of operating for maintaining the environment, including patching
system (OS) patching, capacity provisioning, and load the OS and keeping antivirus programs up to date.
balancing. You can run Docker containers on Linux and
Windows using Web App for Containers. You can use a VM to test the latest preview version
of Visual Studio without getting your development
machine "dirty."
The Developer’s Guide to Azure 10
Azure DevTest Labs and Azure Lab Services provide Batch is well suited to running parallel workloads at
the ability to set up lab environments in Azure. These scale, such as financial risk models, media transcoding,
services enable developer teams to more easily manage VFX, 3D image rendering, engineering simulations, and
developer VM resources and costs in the cloud. many other compute-intensive applications. Use Batch
to scale out an application or script that you already run
Azure DevTest Labs allows you to set up an on workstations or an on-premises cluster, or develop
environment for your team. Users connect to VMs in software as a service (SaaS) solutions that use Batch as a
the lab and use them for their day-to-day work and compute platform.
short-term projects. This enables the lab admin to
analyze costs and usage, as well as setting policies to QUICK
optimize the team's costs. START
Get started on Azure Batch with
these step-by-step tutorials
Azure Lab Services lets you create managed lab types.
The service handles all the infrastructure management
for the lab, from spinning up VMs to handling errors
and scaling the infrastructure.
Azure Arc: Hybrid and
Azure Batch multi‑cloud environments
If you need to run large-scale batch or high-
performance computing (HPC) applications on VMs, Azure offers world-class tools and cloud services that
you can use Azure Batch. empower developers to build the applications of
the future. However, your company probably has a
Batch creates and manages a collection of thousands hybrid environment and wants the same best‑in‑class
of VMs, installs the applications you want to run, and development and management experiences for
schedules jobs on the VMs. You don't need to deploy your applications in Azure and in your on-premises
and manage individual VMs or server clusters; Batch environments, edge locations, and even on
schedules, manages, and autoscales your jobs so you other clouds.
only use the VMs you need.
Azure Arc offers simplified management, faster app
Batch is a free service, so you only pay for the development, and consistent Azure services anywhere.
underlying resources consumed, such as VMs, storage, As a developer, you can architect, design, and deploy
and networking. applications anywhere without sacrificing central
visibility, security, and control. You can get Azure
innovation and cloud benefits by deploying consistent
Azure data, application, and machine learning services
on any infrastructure.
The Developer’s Guide to Azure 11
QUICK
START
Azure services
and products for
app development
As shown in Table 1.1, Azure services and products for
app development are designed to work together and
are highly optimized for developer productivity:
Azure App Service features For example, if you move 10 percent of your users to the
new version of your application in the deployment slot,
Azure App Service is one of the key services in Azure you can see whether the new features are functioning
that you can use to host your applications created with as expected and whether users are using them.
popular frameworks (.NET, .NET Core, Node.js, Java,
PHP, Ruby, or Python) in containers, or running on any When you are satisfied with how the new version of
OS. Azure App Service also adds the power of Azure to your application is performing in the deployment
your applications, including security, load balancing, slot, you can carry out a "swap," which exchanges
autoscaling, and automated management. the application in the deployment slot with that in
your production slot. You can also swap from the
Each of these services brings unique capabilities to the development slot to a staging slot, and then to the
table, but they all share some common features. production slot. Before doing this, the swap operation
verifies that the new version of your website is warmed
Scaling up and ready to go. When this has been confirmed,
Azure App Service runs on App Service plans, which the swap operation switches the slots, and your users
are abstractions from VMs. One or more VMs run now see the new version of the application—with
your Azure App Service, but since Azure takes care of no downtime. You can also swap back and revert the
them, it is not necessary for you to know which ones. deployment of the new version.
You can, however, scale the resources that run your
Azure App Service. You use deployment slots within environments such
as development, test, or production. You don't use
You can either choose a higher pricing tier (ranging deployment slots as environments because they all
from free to premium) or increase the number of reside in the same App Service plan.
application instances that are running. It's even possible
to have Azure App Service automatically scale the Those deployment slots should be separated for
number of instances for you, based on a schedule or security, scaling, billing, and performance. You can
metric, such as CPU, memory, or HTTP queue length. swap deployment slots manually through the Azure CLI
and Azure API Management. This allows DevOps tools
Deployment slots to perform swap operations during a release.
After deploying a new version of your application to
a deployment slot, you can test whether it works as Continuous deployment
expected and then move it into your production slot. To publish your application to App Service, you can use
services such as Jenkins and Octopus Deploy. You can
By setting up staging environments in Azure App also use the continuous deployment (CD) feature in
Service, you can route a percentage of traffic from your App Service.
production application to a deployment slot.
The Developer’s Guide to Azure 14
To isolate these support services from the internet, you Automatic OS and .NET Framework patching
can use Azure Virtual Network. This service wraps your Because you are using a fully managed platform, you
support services and connects them to your application don't manage your own infrastructure at all, but you do
in Web Apps so that the support services are exposed benefit from automatic OS and framework patching.
only to the application, and not to the internet. This
documentation describes the Azure App Service VNet
integration feature and how to set it up with apps in Azure Functions
App Service.
With Azure Functions, you can write the code you need
Sometimes, you want even more control. Maybe for a solution without worrying about building a full
you want your application to be wrapped in a virtual application or the infrastructure to run it. A function is
network in order to control access to it. Perhaps you a unit of code logic that's triggered by an HTTP request
want it to be called by another application in Web or an event in another Azure service, or is based on
Apps and be part of your back end. For this scenario, a schedule.
you can use an Azure App Service Environment. This
affords you a very high scale and gives you control over Some of the key features of Azure Functions include:
isolation and network access.
Input and output bindings connect your function Cold start/warm start
code to other services, including Azure Storage, Azure Cold start is a term used to describe the behavior of
Cosmos DB, Azure Service Bus, and even third-party an application and its tendency to take longer to start
services such as Twilio and SendGrid. Using Azure up after it has been inactive for a period of time. For
Functions, you can build small pieces of functionality functions running in Consumption and App Service
quickly and host them in an elastic environment that plan pricing models, when a function app has been
automatically manages scaling. inactive for a period of time, it will automatically scale
to zero instances. When new events come in, a new
With Azure Functions, it is possible to pay only instance needs to be specialized with your application
for functions that run, rather than having to keep running on it. Specializing a new instance may take
compute instances running all month. This is also called some time (latency) before the first event can be
serverless because it only requires you to create your handled.
application—you don't have to deal with any servers
or even the scaling of servers. You can write Azure To eliminate cold start latency, you can use the
Functions in .NET, JavaScript, Java, and a growing list Azure Functions Premium plan and configure the
of languages. number of pre-warmed instances. The Azure Functions
application will maintain the specified number of
An application that uses Azure Functions activates a pre‑warmed instances to more readily scale up to
function every time a new image file is uploaded to handle new events.
Azure Blob storage. The function then resizes the image
and writes it to another Blob storage account. Data
from the blob that triggered the function is passed into Azure Logic Apps
the function as the myBlob parameter, which includes
the blob URL. Use the outputBlob output binding You can orchestrate business logic with Logic Apps
parameter to specify which blob to write the result to. by automating a business process or integrating with
There's no need to write the plumbing for connecting SaaS applications.
to Blob storage—you just configure it.
Just like in Azure Functions, Logic Apps can be activated
QUICK by an outside source, for instance, a new message.
START Weaving together API calls to connectors, you can
Create your first Azure function create a (possibly complex) workflow that can involve
using the Azure portal
resources both in the cloud and on-premises.
You can also expose your own APIs or functions as Power Apps
connectors to use in a logic app, making it possible for
you to easily perform actions against external systems Power Apps is a suite of apps, services, and connectors,
in your workflow or have your logic app activated by as well as a data platform, that provides a rapid
one of them. development environment to build custom apps
for your business needs. Using Power Apps, you can
The following is an example of a workflow in quickly build custom business apps that connect
Logic Apps: to your data stored either in the underlying data
1. The logic app is activated when an email platform (Microsoft Dataverse) or in various online
containing a shipping order arrives in and on‑premises data sources (such as SharePoint,
Microsoft 365. Microsoft 365, Dynamics 365, and SQL Server).
Power Automate
QUICK
START
Both Microsoft Power Automate and Logic Apps offer Both services can integrate with various SaaS and
designer-first integration services that can create workflows. enterprise applications; however, they are each targeted
at different users.
Here's a side-by-side comparison to help determine when
to use Power Automate or Logic Apps for a particular
integration scenario:
Figure 1.1: How to choose between Power Automate and Logic Apps
The Developer’s Guide to Azure 20
API Management allows you to create API gateways for Azure APIs + Microservices Guide
existing back-end services in a consistent manner.
With API Management, you can publish APIs to Azure API Design E-Book
external, partner, and internal developers to unlock the
potential of their data and services. Essentially, you can
use Azure API Management to take any back end and API Management in a Hybrid and
launch a full-fledged API program based on it. Multi-Cloud World
* Services with an asterisk have a free tier that you can use to get started at no cost.
Using events and messages in By decoupling the systems, the web application
Event handlers could be Functions or Logic Apps, which Azure SignalR Service
can then act on the data in the event. You can use Azure SignalR Service to simplify the
process of adding real-time web functionality to
Another important aspect of Event Grid is that it applications over HTTP that enables services to push
is serverless. This means that, like Logic Apps and content updates to connected clients. The service is
Functions, Event Grid scales automatically and does based on ASP.NET Core SignalR and is offered as a
not need an instance of it to be deployed. You just standalone, fully managed service in Azure.
configure and use it, and pay only when it's used.
SignalR can update connected applications in real
You can use Event Grid if you want an email notification time over HTTP without the need for the applications
every time someone is added to, or removed from, your to poll for updates or submit new HTTP requests. This
mailing list in Mailchimp. Event Grid is used to activate enables you to create seamless web experiences that
an application in Logic Apps and configured to listen to update information on the fly. For example, an auction
changes to the Mailchimp mailing list. Event Grid then application might use SignalR to refresh the latest bid as
signals to Logic Apps to send an email containing the soon as it happens, without completely refreshing the
name of the person who has been added or deleted page or constantly polling for information.
and the action that was performed.
Hosting a SignalR server yourself is not a simple task,
and it can be difficult to scale and secure properly.
TUTORIAL
When you use the fully managed Azure SignalR Service,
Monitor virtual machine changes setup is easy, and security, availability, performance,
with Event Grid and Logic Apps
and scalability are all managed for you.
QUICK
START
Service Bus
1 MB
queues*
Service Bus
1 MB
topics*
Event Grid* 64 KB
SignalR
64 KB
Service*
* Services with an asterisk have a free tier that you can use to get
started at no cost.
and secure infrastructure that powers Microsoft Add communication workflows to apps with
Teams. You can add communication features to your flexible SDKs and APIs for common platforms
applications without being an expert in communication and programming languages, including iOS,
technologies such as media encoding and real-time Android, Web, .NET, and JavaScript.
application more
Azure Front Door
performant
Your users may be spread across the globe and, at
times, they may be traveling. This can make it difficult
After your application is up and running in Azure, you to ensure that they have a performant experience and
want it to be as performant as possible. Azure provides that your application is available and secure, regardless
a range of services that can help you with that. of location.
Traffic Manager is an intelligent routing mechanism Because of this difference, Front Door does a lot more
that you put in front of your Web Apps applications. than route users to available and performant endpoints.
Web Apps acts as an endpoint, which Traffic Manager
monitors for health and performance. Front Door allows you to author custom web
application firewall (WAF) rules for access control to
When users access your application, Traffic Manager protect your HTTP/HTTPS workload from exploitation
routes them to the Web Apps application in their based on client IP addresses, country codes, and
proximity that is most performant. HTTP parameters.
The Developer’s Guide to Azure 28
Azure Content Delivery Network You can benefit from Content Delivery Network in
web applications as well as in mobile and desktop
One of the Azure services that can help you to applications. One way to use Content Delivery Network
make your application faster is Azure Content is to serve videos for a mobile application. Since
Delivery Network. videos can be large, you don't want to store them on
the mobile device—and neither do your users. Using
You upload your static files—videos, images, JavaScript, Content Delivery Network, the videos are served
CSS, and even static HTML files—to a data store, such as from the PoP. Since it is close to the user, this also
Azure Blob storage, and then couple Content Delivery improves performance.
Network to that.
QUICK
Content Delivery Network will then take those static START
files and replicate them to hundreds of points of Get started with Azure Content
Delivery Network
presence (PoP) all over the world. All you need to do in
your application is change the reference to the static
files to a different URL.
In the next chapter, you will look at the Microsoft
For example, the previous reference might have developer ecosystem, including the Visual Studio family
been ~/images/image.png, and it would now be of IDEs, GitHub, and Azure DevOps.
https: //example. azureedge.com/image.png.
02 /
Developer
tools and
developer
cloud
The Developer’s Guide to Azure 31
The most
comprehensive
developer tools
and cloud
The Microsoft developer ecosystem, including the Let's take a look at the key tooling and platforms that
Visual Studio family of IDEs, coupled with the power comprise Microsoft's developer ecosystem:
of DevOps platforms—GitHub, Azure DevOps, and • Visual Studio and Visual Studio Code:
cloud services in Microsoft Azure—provides the most World‑class IDEs built for everyone and
comprehensive end-to-end developer experience. runnable anywhere.
• GitHub and Azure DevOps: Community‑based,
"Microsoft has the world's most beloved developer tools
open-source, and enterprise-grade work item
with Visual Studio, and with GitHub hosts the developer
tracking, CI/CD pipelines, artifact storage,
community where the world comes together to build
and more.
software. Developers can use their favorite languages,
• Microsoft Azure: Azure is an excellent cloud
open-source frameworks, and tools to code and deploy
provider, offering the ability to host .NET, Java,
code to the cloud from anywhere, collaborating in
JavaScript/Node.js, Python, and more.
a secure way, and integrating different components in
no time." Now it's time to explore the Visual Studio family
Visual Studio inside the IDE. Visual Studio Live Share lets developers
collaborate in their IDE in real time by setting up a
Preview for XAML apps, Web Live Preview for ASP.NET Visual Studio Code
apps, and IntelliCode whole-line completion will enable
developers to be productive in their app development Visual Studio Code is a cross-platform code editor
lifecycle. Improved Git and GitHub tooling and Live with binaries for Windows, macOS, and Linux. Many of
Share with integrated chat will enable developers to the features that make Visual Studio great can also be
collaborate seamlessly. found in Visual Studio Code, from classic IntelliSense to
newer features like IntelliCode and Live Share.
Visual Studio 2022 will also come with the latest
innovative tools for modern app development. Visual Leveraging an ecosystem of 30,000 (and growing) first-
Studio 2022 will have full support for .NET 6 and its party and third-party extensions and themes, Visual
unified framework for web, client, and mobile apps for Studio Code can be customized to the needs of each
both Windows and Mac developers. This includes the developer and supports working with virtually every
.NET Multi-platform App UI (.NET MAUI) for cross- programming language and framework, and tools like
platform client apps on Windows, Android, macOS, and package managers. Extensions for Azure allow building,
iOS. Developers will be able to use ASP.NET Blazor web deploying, and managing applications using a variety
technologies to write desktop apps via .NET MAUI. For of Azure services with a few clicks, while collaboration
C++ developers, Visual Studio 2022 will include robust is made simpler with extensions for GitHub pull
support for C++ workloads with new productivity requests and issues. You can even develop your own
features, C++20 tooling, and IntelliSense. We're also custom extensions that satisfy any unique needs you
integrating support for CMake, Linux, and Windows or your team may have. Visual Studio Code also allows
Subsystem for Linux (WSL) to make it easier for you to developers to work with remote hosts and machines,
create, edit, build, and debug cross-platform apps. via extensions like Remote-SSH and Remote-Containers
(for Docker containers), as well as GitHub Codespaces.
DOCS
Visual Studio Code is completely free to use on any
Visual Studio platform and is based on an open-source codebase.
GETTING
STARTED
Visual Studio 2022 Roadmap
Visual Studio Code
and deploy with Both GitHub and Azure offer management of the
product roadmap and backlogs as a part of agile
DevOps
GitHub offers issues to track ideas, enhancements,
tasks, or bugs. GitHub also offers project management
with tagging, milestones, and Kanban boards to drive a
project forward.
The Azure DevOps product management and
engineering teams at Microsoft joined GitHub under If a more structured process is desired, Azure Boards
a single leadership team to deliver on coordinated can be integrated into GitHub or used with other
roadmaps. This renewed focus on both offerings Azure DevOps services. Azure Boards supports agile
ensures that GitHub will continue to rise as the platform methodologies, including Agile, Scrum, and Kanban.
of choice for code management and CI/CD mechanics, Azure Boards enables you to track work with Kanban
while ensuring Azure DevOps continues to deliver the boards, backlogs, team dashboards, and custom
mature software development lifecycle features to reporting. For roadmap planning, Delivery Plans can
its users. be added to Azure DevOps from the Visual Studio
Marketplace, providing everything a team needs to
The GitHub and Azure DevOps team recognizes track a feature from ideation to production.
that one solution doesn't always fit all, which is why
Microsoft allows customers to adopt hybrid GitHub and GitHub Boards
Azure DevOps environments. Two of the most well- Project boards on GitHub can help you organize and
known hybrid solutions are: prioritize your work using a Kanban approach to work
• Azure Boards-GitHub integration management. These boards are flexible and can be
used to track specific feature work, software roadmaps,
• Azure Pipelines-GitHub integration
and even release checklists.
GitHub Public Roadmap who opened them. Notes can be used to create task
reminders, reference specific issues or pull requests,
or any other information that may be relevant to
the board.
The Developer’s Guide to Azure 35
Project boards come in three different configurations: Repository and dev workflows
• User-owned project boards, related to
GitHub enables developers to share code and packages
personal repos
through its core repository capabilities, GitHub
• Organization-wide project boards, which can Packages, and npm. Azure Repos provides both Git
contain issues and pull requests on up to 25 and Team Foundation Version Control (centralized)
repositories within an organization repositories and Azure Artifacts for packages. Both
• Repository project boards, which are scoped to GitHub and Azure DevOps integrate with Azure
issues and pull requests within a single repository Container Registry, which provides a fully managed and
optionally geo-replicated instance for Docker images
Project boards can also be automated, allowing for and Helm Charts.
cards to move from one status to another. Trigger-
based workflows enable cards to assume specific GitHub Repos
statuses such as To do, In progress, or Done. Typically Repos are the heart of GitHub. Using standard Git
the triggers consist of simple events, such as issues format, you can manage your project's files, as well
being created, new pull requests being opened, issues as discussing and managing your project's work. You
being closed, or pull requests being merged. can restrict who is allowed to view or contribute to a
repository by changing its visibility level. You may select
Azure Boards public (default) or private, which keeps access restricted
Planning your work and tracking your progress are to users you wish to have access.
important tasks—and Azure Boards can help you
complete them. If you are using the free version of GitHub, you are
able to use unlimited public repositories with access
In Azure Boards, you can create a complete backlog to a full feature set, or unlimited private repositories
of work items (such as user stories) and plan them with a limited feature set. The limitations are in the
in sprints so your team can work iteratively to finish form of scoped access to GitHub Community support,
the tasks. Dependabot® alerts, storage limits, and other
constraints. Premium tiers offer the ability to increase
The whole planning system is optimized for working minutes/month on GitHub Actions and storage on
in an agile way. It even includes Kanban boards for GitHub Packages storage along with advanced features
managing your work. around pull request management, protected branches,
and repository insight graphs. Please see GitHub's
Everything can be customized to work in the best products listing for more information.
possible way for your teams, whether using Scrum,
another agile method, or the Capability Maturity
Model Integration (CMMI) process. You can create
and manage tasks, features, user stories, bugs,
requirements, issues, change requests, and more.
The Developer’s Guide to Azure 36
With Azure Repos, you have a rich toolset to support Azure Artifacts
the Git workflow. You can link work items, such as user You can host all sorts of packages on Azure Artifacts,
stories or bugs, to pull requests so you know what including NuGet, npm, Maven, Python, and universal
each change is about. You can have discussions about packages. You can even use the Azure Artifacts feed
committed code and even comment on changes within to store packages from public sources, such as nuget.
code. Azure Repos also enables voting on changes in org and npmjs.com. When you store packages from
code, so a change only gets accepted once everyone on public sources on your feed, you'll be able to keep using
the team agrees to it. them even if they're no longer available on the public
feed. You'll also be able to leverage Azure Artifacts
Azure Repos offers unlimited private Git repositories. to review and validate each package for security
purposes within your feed. This is especially useful for
GitHub Packages mission‑critical packages.
GitHub Packages is a software package hosting service
that allows you to host your own packages privately Follow these simple steps to use Azure Artifacts:
or publicly. These packages can then be used in your 1. Create an Azure Artifacts feed.
projects or made available to other users.
2. Publish your package to the feed.
Azure Pipelines
Security features Between GitHub and Azure, we have a suite of tools and
services to help. Azure and GitHub provide the building
blocks to develop and scale DevSecOps practices:
• Shift security left with GitHub Advanced Security,
When developing an application, security needs to allowing issues to be detected as soon as they
be integrated into your DevOps process as much as are introduced into the codebase.
CI, testing, and work item tracking. In many CI/CD
• Understand the runtime behavior of your apps
platforms, proactive security scanning can be enabled
and infrastructure with Azure Monitor.
through the use of custom scripts or plug-ins to the
• Leverage secret scanning with GitHub.
platform itself. With GitHub, security is always at the
top of your mind. From helping to integrate security • Create policy as code with Azure Policy.
into your workflows to proactively scanning your • Secure your application using secret
repositories for potential vulnerabilities in your code or management with Azure Key Vault.
libraries, GitHub's powerful platform tools help take the • Uncover vulnerabilities and dependencies with
guesswork out of writing and maintaining secure code. GitHub code scanning and Dependabot.
• Integrate production instances with Azure
Security Center, your home for security
DevSecOps information and status.
DevOps best practices of CI and CD rely on heightened With GitHub and Azure, it's never been easier to
collaboration between software engineers and kickstart and scale your own DevSecOps practices
operations teams to accelerate software development. with our unified solution. This complete toolset offers
While DevOps delivers on the promise of faster ways for you to remove bottlenecks clogging your
software development, digital leaders face issues with delivery pipeline and provide the necessary controls for
the security and compliance of their code, workflows, compliance and security. By uncovering vulnerabilities
and infrastructure. Azure and GitHub provide the tools earlier, your teams save time remediating issues and
for any organization to implement DevSecOps, the achieving compliance, while also minimizing any
evolution of DevOps, where developer, security, and associated costs. So, they can focus on their main
operations teams foster a culture of collaboration to goals: propelling innovation with efficient and secure
achieve continuous security. software delivery.
The Developer’s Guide to Azure 40
GitHub Advanced Security is a suite of advanced GitHub Dependabot creates automated pull requests
application security capabilities that helps developers to help keep your dependencies secure and up to date.
find and fix issues within their workflow. GitHub Dependabot monitors security advisories for Ruby,
Advanced Security consists of code scanning and secret Python, JavaScript, Java, .NET, PHP, Elixir, and Rust.
scanning capabilities along with Security Overview. Pull requests are created immediately in response to
new advisories. When there's remediation for a new
Code scanning provides an automated security review security threat or an updated version of referenced
with every Git push. It provides accurate, actionable components, Dependabot creates pull requests
security reviews within the developer workflow and that include release notes, changelogs, commit
offers an opportunity to fix issues before merging code. links, and vulnerability details. These pull requests
Code scanning is powered by GitHub's CodeQL engine are then reviewed and committed by developers or
and integrates with any static application security maintainers—keeping dependencies secure and up
testing (SAST) engine while providing the same user to date.
experience that developers love.
If you want to improve the quality of your software and
Secret scanning watches your repositories for known learn more about automating your build and release
secret formats and notifies you as soon as secrets are processes, download and read these free resources:
found. Secret scanning supports 45+ commonly used
secret patterns (including Azure, AWS, Google Cloud,
DOCS
npm, Stripe, and Twilio) and custom secret patterns.
Effective DevSecOps
Security Overview provides a high-level view of
the application security risks to which a GitHub
organization is exposed. This view includes code
GitHub Advanced Security
scanning, secret scanning, and Dependabot results,
along with associated risks.
GitHub Dependabot
The Developer’s Guide to Azure 41
Better together:
• Collaboration platforms provide developers
with access to communicate and coordinate
Visual Studio +
with team members and leverage the collective
knowledge of the open-source community.
GitHub + Azure
• Advanced cloud services give developers more
tools to innovate and experiment with building
apps for a variety of platforms.
DOCS
GitHub Codespaces
Use your extensions for any Azure services you may be using.
Leveraging your .NET skills and Azure, you can begin
language
of your application.
DOCS
Developers have their tools, languages, and frameworks Key Azure Services for .NET
developers
of choice, and Azure supports a wide array of developer
options. From .NET to Java, JavaScript, Python, and
more: you have the ability to develop in your stack of Configure Visual Studio for Azure
choice and the flexibility to use different languages development with .NET
and frameworks. Azure supports running applications
written in these languages seamlessly.
Configure Visual Studio Code for
Azure development with .NET
From Java runtimes to different versions of Node.js or Azure services that is compatible with Windows,
Python, you can rest assured that your development macOS, and Linux. Likewise, Azure PowerShell is a set
experience will be consistent using Visual Studio, of cmdlets that allows you to manage Azure resources
GitHub, and Azure. Azure App Service (web and from the PowerShell command line.
function apps) offers support for applications written
in any programming language, including Docker Regardless of the development platform or deployment
containers. target, Microsoft has a rich offering of development
tools and cloud services to meet your needs. From
For Java developers, Azure App Service offers Java 11 Visual Studio 2022 to Visual Studio Code to GitHub
on both Linux and Windows, allowing developers to Codespaces, there is an IDE that will rise to the
run JAR files or even WAR files through Apache Tomcat challenge and enable your productivity.
v8.5 and v9.0 hosted in App Service. Linux services
also support the two latest LTS versions of Java, while The software development lifecycle is also completely
Windows services support the three latest LTS versions. covered with platform offerings from GitHub as
well as Azure DevOps. Tracking your work, building
Python support is available for 2.7, 3.6, and 3.7 on App and deploying your code, testing, and managing
Service, giving developers the flexibility to deploy their artifacts are easily handled. With GitHub, integrated
apps using a targeted runtime. There is also support for DevSecOps features such as Dependabot and GitHub
running apps using Gunicorn as well as hosting apps Advanced Security allow you to rest easy knowing that
written in WSGI frameworks such as Django and Flask. vulnerabilities are always being scanned for.
03 /
Cloud-native
applications
The Developer’s Guide to Azure 46
Over the past several years, you must have seen story
after story about data breaches and compromised
applications that expose sensitive information. As
more businesses embrace digital transformation, the
resiliency and security of application infrastructure
and data are of the utmost importance. Microsoft
Azure offers built-in tools that can help you create
highly available geo-distributed applications, along
with intelligent threat protection in real time. With
scalable services, you can create applications that can
withstand high demand and achieve cost savings at the
same time.
QUICK
START
Build cloud-native applications
in Azure
The Developer’s Guide to Azure 48
By having a cloud-native approach, app developers can When applications are built as microservices, the
overcome the challenges they face every day around release velocity can increase because changes to any
agility, reliability, and security. Not all applications are component are easier to make. Microservices make
the same, and in some cases, it is important to prioritize applications easier to scale and faster to develop,
certain characteristics over others. Regardless of the enabling innovation and accelerating the time to
need, however, there are several basic building blocks market. These microservices can be delivered as
for cloud-native applications, which include: containers, which package application code and
dependencies together to increase portability, or as
• Microservices
functions, which offer an event-driven compute-on-
• Containers demand experience that extends with capabilities to
• Functions implement code triggered by events. Often, these
• APIs microservices are surfaced as lightweight APIs and are
• DevOps shipped using DevOps processes and tools to automate
build, test, and delivery (see Chapter 1, Getting started
When it comes to a cloud-native architecture, with Azure Application Platform, and Chapter 2,
it can be implemented in two different ways— Developer tools and developer cloud).
optimizing for infrastructure control or optimizing
for developer productivity. QUICK
START
Infrastructure control provides control on what you are Azure Architecture Center –
Cloud Design Patterns
running, where you are running it, and how it performs.
When you have requirements such as the need to use
a legacy code base or custom libraries that require
runtime access, you want to optimize for infrastructure
control and use containers with Kubernetes to
orchestrate them.
The Developer’s Guide to Azure 49
Kubernetes on Azure
The Developer’s Guide to Azure 50
Azure Red Hat OpenShift Azure Red Hat OpenShift provides built-in CI/CD. You
can create automated builds, tests, and deployments
Red Hat OpenShift is an enterprise Kubernetes of applications using OpenShift Pipelines, a serverless
container platform created by Red Hat. OpenShift is all CI/CD system designed to create and scale a pipeline
about choosing a platform to power your applications using GitHub Actions, or using existing pipelines.
today by automating processes and reducing
complexity, allowing you to rapidly deliver without QUICK
roadblocks. When running Kubernetes in production, START
you often need to add additional services to get basic Azure Red Hat OpenShift
functionality such as authentication, logging, and
CI/CD. Those are separate components that you must
integrate, manage, and keep up to date on your own.
Furthermore, when using new features to build modern
applications such as Serverless and Service Mesh, this Arc-enabled Kubernetes
means even more integration and testing.
With Azure Arc-enabled Kubernetes, you can attach
Azure Red Hat OpenShift allows developers to focus on and configure Kubernetes clusters located either inside
what matters. You can take advantage of the enhanced or outside Azure and bring cloud operations anywhere.
user interface for application topology and builds in the
web console. It allows you to build, deploy, configure, Azure Arc can manage applications running on
and visualize containerized applications and cluster Kubernetes at scale through advanced DevOps
resources more easily. techniques like GitOps. It provides a single pane of
glass with central visibility through the Azure portal and
You can bring code from your Git repository or governance and compliance of your applications and
an existing container image and build it using Kubernetes clusters through Azure Policy.
source‑to‑image (S2I) builds or deploy solutions from
the developer catalog, such as OpenShift Service
NOTE
Mesh, OpenShift Serverless, or Knative.
GitOps is a way to operate
infrastructure in continuous
delivery by using tools
TUTORIAL developers are already familiar
with, like Git and CI/CD tools.
Create an Azure Red Hat
OpenShift 4 cluster
QUICK
Deploy an application from START
source to Azure Red Hat
Azure Arc-enabled Kubernetes
OpenShift
The Developer’s Guide to Azure 51
Application services on top of If the project requires you to have more control over
• Functions
QUICK
• Logic Apps START
Set up an Azure Arc-enabled
• Event Grid
Kubernetes cluster to run
• API Management App Service, Functions, and
Logic Apps
The Developer’s Guide to Azure 52
Let's look at these options more closely and see what Azure Logic Apps
they bring to the table.
Azure Logic Apps is a cloud-based platform for creating
and running automated workflows for integrated apps,
Azure Functions data, services, and back-end systems with a library of
more than 450 connectors.
Azure Functions is a serverless solution in Azure that
allows you to focus on the code that matters most to You can quickly develop highly scalable integration
you, while Azure Functions handles the rest. solutions, allowing you to easily connect to any system
or data source.
Azure Functions makes event-driven programming
easier with state-of-the-art autoscaling, and triggers QUICK
and bindings to integrate with other Azure services. START
Create integration workflows with
You can run a piece of code in response to an event and Azure Logic Apps in the Azure
scale without having to worry about infrastructure. portal
The Developer’s Guide to Azure 53
open source
Check out featured open source
projects and products
Azure users build the best possible solutions. There are Gain flexibility to run
open‑source applications your
several areas of investment:
way with Microsoft Azure
• Ensuring open-source technologies perform well
on Azure
• Open-source communities (Apache, Linux, the Overview of open source
.NET Foundation)
on Azure
• Tools and integrations to help with Azure
deployments Open source has fundamentally changed software
• DAPR – Distributed Application Runtime, a development. With the increase in open-source
lightweight framework for building modern adoption, it must run smoothly on Azure.
distributed applications
More than half of all the cores on Azure are running
With added commitments to supporting open-source Linux, and Microsoft has heavily invested in
functionality in Azure as well as the advent of more enhancing its performance, reliability, security, and
modern runtimes for service-based applications such resiliency. Azure provides you with enterprise‑grade,
as DAPR, open-source technologies are an essential managed open-source software databases like
building block for individuals and organizations looking MySQL and MariaDB, Linux operating systems,
to build solutions that run on Azure. analytics, and machine learning services to bring AI to
your application.
The Developer’s Guide to Azure 55
QUICK
START
applications on applications:
• Scaling in order to handle increased traffic
Azure
and bursts
• Low latency so users have the same experience
anywhere in the world
• High availability to achieve maximum uptime
Depending on the requirements of the software you are
building, you may have to take different architectural A design example for modern business-critical
approaches to comply with business needs. Microsoft applications is shown in Figure 3.1:
Azure offers tools and services that can accommodate
any scenario.
• Business-critical applications
• API-first applications
• Real-time data processing
• Geo-distributed applications
With an API-first approach, the biggest challenge Real-time data processing can be a challenge when
is how to secure, govern, and catalog the APIs. You multiple data sources are in play. Azure offers tools that
can create an API gateway and developer portal in a can help with real-time data ingestion and processing
matter of minutes and publish APIs easily for internal or pipelines, capable of detection and notification
external use. within seconds.
Figure 3.2: API-first design in Azure Figure 3.3: Real-time data processing design in Azure
This approach allows you to easily handle any data This way, any data change can be processed just a
schema change and adapt quickly to rapid changes. moment after the change occurred. With a secure API
You can connect to back-end services running gateway, you can connect to back-end services running
anywhere and manage, secure, and optimize all APIs in anywhere. Elastic provisioning of compute capacity,
one place no matter where they run. without the need to manage the infrastructure, allows
you to focus on data and provide cost savings in
the process.
The Developer’s Guide to Azure 59
04 /
Connecting
your
application
with data
The Developer’s Guide to Azure 62
Azure has your Azure makes it simple to mix and match data solutions
of varying volumes, varieties, and velocities while
As a developer or architect, at some point in the What can Azure do for your data?
application design and creation process, a decision
must be made as to what type of data should be By choosing Azure data solutions to store or process
collected, along with its format and where it will be corporate data, businesses gain access to fully managed
stored. Additionally, an important key parameters like Platform as a Service (PaaS) services that free up
costs, performance, growth, security, compliance, and valuable time and resources, time and resources that
the data lifecycle need to be considered in determining can be focused on new ways to delight business users
the perfect data solution for the system. When and unlock data insights and business opportunities.
progressing through all the options, realize it is highly By removing the hardware and software management
likely that no single data solution will be able to meet components, architects and developers can focus on
the final needs of the users of the system. designing impressive, data-focused business solutions.
Data is valuable and a strategic asset. Taking a big- Developers can take advantage of industry-leading
picture approach and being open to new ideas around innovations, such as built-in security with automatic
data storage and data processing can lead to incredible monitoring and threat detection, automatic tuning
opportunities for taking applications to new heights for improved performance, and turnkey global
and ensuring a stable and organized data estate. distribution and replication. Moreover, any cloud
investments are protected by financially backed
Whether the solution is a traditional relational service-level agreements (SLAs).
database-based application; a stream-based analytics
solution; a data mart or data warehouse; or a storage Whatever the business needs dictate, Azure data
facility for structured and unstructured data, slow- or solutions will help get applications to production
fast-flowing data, or small data or big data via Lambda faster, scale them widely, and manage them easily, all
or Kappa architectures, Azure has an answer! while maintaining security and compliance with laws
and regulations. Not only that, but Azure's services,
such as machine learning and artificial intelligence, are
designed to be integrated together easily with a few
clicks of the mouse.
The Developer’s Guide to Azure 63
Additionally, Azure data solutions can help solve some Finally, Microsoft has been continually recognized as a
of these important questions: leader by Gartner for the past 7 years in a row.
• What data do you have?
• Is it trustworthy?
Where to store your data?
• Can people access the data needed to make the
right decisions?
Today's data storage options are numerous. Picking
• How can you enable faster business insights? the right one for the target application can be a
• What's the compliance exposure? daunting task even for developers and architects who
have been around since the creation of traditional
relational database management systems (RDBMSes).
Why trust Azure with your data?
Today's business problems typically require much more
No matter what role you may play in the lifecycle of than what RDBMS can provide. Navigating the potential
the data estate, it is everyone's responsibility to be solutions for a new or potential modernization of an
cognizant of its security and integrity. When it comes to application is a vital skill for developers and architects.
data in Azure, Microsoft's trusted data principles put
the control in your hands: Azure provides many types of data stores with the
• You control your data. flexibility to support any data storage and processing
scenario where it is on-premises, hybrid, in the
• You choose your data location.
cloud, or on the Edge. For quick prototyping and
• Microsoft secures your data.
proof‑of‑concept tasks, many of these services have a
• Microsoft defends your data. free tier or 30-day trial period.
For example, Azure allows the data location to be As we progress through the various solutions, we will
chosen from several best-of-class datacenters around make frequent reference to the Azure Architecture
the world to meet any compliance or regulatory Center, which will provide you a helpful reference
requirements that businesses may be required to architectures to help visualize potential data solutions.
adhere to.
NOTE
In terms of security, many Azure services support Almost all storage options
a Bring Your Own Key (BYOK) feature that allows mentioned in this section can be
for the encrypting of data using privately owned used as activators and bindings
for Azure Functions.
keys. Additionally, Microsoft defends the data
stored in Azure from known bad actors using
Indicators of Compromise (IoCs) that are compiled Let's now take a closer look at each storage option.
from a vast set of inputs from the Microsoft Graph
Security API.
The Developer’s Guide to Azure 64
Azure SQL Database is a relational database system like • Transparent Data Encryption (TDE), which
on-premises Microsoft SQL Server. Azure SQL Database adds a security layer to protect data at rest from
runs in the cloud, so it's fully managed, performant, unauthorized or offline access.
scalable, automatically backed up, and includes many • Always Encrypted, which allows developers
other advanced features, such as flexible and responsive to store and query encrypted data within
serverless compute as well as Hyperscale. the database, and protects sensitive data by
encrypting it on the client side, never allowing
Databases in Azure SQL Database are extremely reliable the data or the cryptographic keys to appear in
and robust and offer an SLA that guarantees 99.99 plaintext inside the database engine.
percent uptime. From a cost standpoint, consider
the fact that running SQL PaaS and IaaS workloads
on Azure can be up to 86% less costly than other Get more compatibility with
cloud platforms, which makes yet another compelling
Azure SQL Managed Instance
argument for using Azure.
When migrating databases from a source such as an
Because Azure SQL Database communicates on-premises hardware-based instance or a virtualized
over the same protocol as SQL Server, the same instance of SQL Server, the application may be using
familiar tools developers used previously, such as features of SQL Server that may not be available in
SQL Server Management Studio (SSMS), Azure Data Azure SQL Database. In these cases, it may be possible
Studio, and Visual Studio Code, will continue to to migrate to Azure SQL Managed Instance. Because of
work seamlessly. its design, Azure SQL Managed Instance provides many
more features that provide parity with SQL Server and
yet provides the benefits of a fully managed service. For
example, features such as Linked Server and SQL Agent
are supported by Azure SQL Managed Instances, but
not by Azure SQL Database.
The Developer’s Guide to Azure 65
MariaDB
workloads with predictable performance and
dynamic scalability.
See Intelligent apps using Azure Database for The Azure Database for PostgreSQL Flexible
PostgreSQL for a reference architecture using Azure Server deployment option provides maximum
Database for PostgreSQL. flexibility and control with a choice of a single zone
or zone-redundant high availability, with up to 99.99
SLA and the ability to leverage custom maintenance
Flexible Server windows for planned database maintenance. Enjoy
a simplified end-to-end deployment experience with a
Azure Databases for MySQL and PostgreSQL support low cost of ownership. Reduce the time to market with
a new deployment model—Azure Database for tight integration with Azure Kubernetes Service, Azure
MySQL Flexible Server and Azure Database for App Service, and more.
PostgreSQL Flexible Server. Flexible Server provides
more options when it comes to configuration and
customization, for example, more support for platform Azure Database for MariaDB
features and additional configuration parameters for
fine-grained tuning. Compared to the single-server Azure Database for MariaDB is a relational database
deployment option, Flexible Server provides better cost service based on the open-source MariaDB Server
optimization with start-stop capabilities and burstable engine. It is a fully managed database-as-a-service
instances. Burstable instances are great for scenarios offering that can handle mission-critical workloads with
where you don't have steady workloads and/or need predictable performance and dynamic scalability.
more compute power only at peak times.
The Developer’s Guide to Azure 67
Supporting applications with data solutions that reside Azure Arc-enabled data services enable cloud
on-premises or in other cloud providers without advantages (such as scalability and self-service
continuous or direct Azure connectivity doesn't have provisioning, and unified management) in on-premises
to be difficult. Begin the journey to Azure by exploring environments. It also enables them to be always current
Azure Arc-enabled services. by receiving frequent updates.
Companies have significant, existing investment Database services currently enabled by Azure Arc
on‑premises, and are looking for a consistent include Azure SQL (Azure SQL Managed Instance) and
experience as they expand to the cloud and the edge. Azure Database for PostgreSQL Hyperscale.
Many organizations are taking a hybrid approach when
it comes to the cloud. See Azure Arc hybrid management and deployment
for Kubernetes clusters and Manage configurations
Microsoft is committed to providing a true hybrid for Azure Arc-enabled servers for reference
experience that's seamless and enables access to architectures using Azure Arc.
the latest innovations, regardless of where the
data lives. Azure has been built to enable seamless
hybrid capabilities when it comes to development,
deployment, and management across on-premises
servers, public clouds, and edge devices. Azure Arc
now enables Azure data services to run anywhere,
on any infrastructure across on-premises, Edge, and
third‑party clouds.
The Developer’s Guide to Azure 68
QUICK
TUTORIAL
START
Get started with Azure Blob Get started with Azure
Storage Queue Storage
Azure Table Storage is an inexpensive, extremely You can use Azure Files as a drive from which to share
fast NoSQL key-value store. Key-value stores are files. It uses the Server Message Block (SMB) protocol,
very flexible. For example, one key can contain data meaning it can be used with Windows and Linux and
describing an order and another key could describe accessed from either the cloud or on-premises systems
customer information. Table Storage does not have when a direct path to Azure is available. By design,
defined data schemas, making it very flexible. Azure Files SMB shares are blocked from the internet.
Like the other services in Azure Storage, Azure Files is
scalable and inexpensive.
DOC
Queue Storage
Azure Data Lake Storage See Modern data warehouse for small and medium
business for a reference architecture with Azure Data
The previous data stores were intended for regular Lake Storage.
application use or for use with VMs. Azure Data Lake
Storage, on the other hand, is storage for big data QUICK
applications. It provides massively scalable, secure data START
lake functionality built on Azure Blob Storage. Use it Get started with Azure Data Lake
Storage using the Azure portal
to store large amounts of data in its native format—
structured, unstructured, or anything in between. The
point of Data Lake Storage is to hold your raw data so
that it can be analyzed, transformed, and moved when
needed. Host static websites on Azure
Storage
The following are the main characteristics of Azure Data
Lake Storage: Another exciting feature of Azure Storage is static
• Unlimited storage capacity. A single file can be website hosting. This static website feature only uses
larger than one petabyte in size—200 times Blob Storage as its data store and can be used to host a
larger than what other cloud providers offer. static website on Azure Storage. Simply upload the files
of the static website to Blob Storage and indicate which
• Scalable performance to accommodate
file is the default document (such as index.html) and
massively parallel analytics.
which one is the error document (such as 404. html).
• Data can be stored in any format, without
The website will run quickly for very little cost—in fact,
a schema.
only pay for the storage used, since the static website
feature doesn't cost anything extra. Additionally, when
This is a very different approach from the using geo-redundancy (which is enabled by default),
traditional data warehouse, where data schemas are the website will be up and running even if the primary
defined upfront. datacenter fails.
Azure data
analytics solutions
Just as important as where and how an application No matter how large, small, or complex the data
stores data is how that data is analyzed to get business might be, Azure has a solution that can meet any data
insights. Azure provides cloud-scale analytics solutions analytics requirement.
that cover all major data analytics scenarios and,
in most cases, are faster and less costly than other As shown in Figure 4.2, Azure provides solutions for
cloud providers. ingestion, storage, operations, preparation, serving,
and visualization. Each of these will be covered in
Whether the solution requires simple data movement more detail from a developer's perspective in the
and transformations, real-time analytics, or big data following sections.
analysis driven by AI and machine learning models
that requires days, weeks, or months of processing, For more architecture diagrams for data solutions,
Azure data analytics solutions enable businesses to reference the Azure Architecture repo.
get valuable and actionable insights from data to drive
business outcomes.
With Azure Data Factory, you can create a Azure Synapse Link is Microsoft's preferred solution for
comprehensive pipeline that performs a complete analytics on top of Cosmos DB data.
extraction, transformation, and loading (ETL) process.
Azure Synapse Link for Azure Cosmos DB is a
Data Factory can help you move data from on-premises cloud‑native hybrid transactional and analytical
to the cloud, within the cloud, or to on-premises—it processing (HTAP) capability that enables the running
doesn't matter where your data resides. Data Factory of near real-time analytics over operational data in
also provides a variety of built-in connectors that Azure Cosmos DB. Azure Synapse Link creates a tight
you can use to easily connect to various data sources, seamless integration between Azure Cosmos DB and
including SQL Server, Azure Cosmos DB, Oracle, and Azure Synapse Analytics.
many more.
While moving data, you can also filter it, clean it up, or Azure Analysis Services
transform it with an activity in the pipeline, such as the
Apache Spark activity. In addition, Data Factory allows Azure Analysis Services is used to create a semantic
the scheduling and monitoring of pipelines, as well as a model of data, so users can access it directly with
path to lift and shift SQL Server Integration Services visualization tools such as Power BI. This is a managed
(SSIS) packages to the cloud. cloud service—it is scalable, data is stored redundantly,
and when not using it, you can pause the service to
See Hybrid ETL with Azure Data Factory for a minimize costs.
reference architecture using Azure Data Factory.
With Azure Analysis Services, you can provide modeled
QUICK data directly to users in a very performant way. Users
START can query millions of records in seconds because the
Create a data factory using the model lives completely in-memory and is periodically
Azure Data Factory UI
refreshed. You can get data into the semantic model
from anywhere; data sources can be in any cloud or
on-premises.
QUICK
START
Create an Azure Analysis
Services server using the
Azure portal
The Developer’s Guide to Azure 75
Azure Data Lake Analytics SQL-like language or custom code. After querying
and filtering the stream of data, Stream Analytics can
Another Azure service for performing data analytics natively output the result to many Azure services,
tasks is Azure Data Lake Analytics. With this service, including Azure SQL Database, Azure Storage, and
you can analyze, process, and transform potentially Azure Event Hubs.
massive amounts of data from Azure Storage and Azure
Data Lake Storage. See Stream processing with Azure Stream Analytics
for a reference architecture using Azure Stream
Azure Data Lake Analytics allows you to create and Analytics.
submit jobs that query data, analyze it, or transform
it. You can write these jobs in U-SQL, which is an QUICK
SQL‑like language, and extend U-SQL with Microsoft R START
Only pay for the jobs that are submitted and run, and
the service scales automatically depending on the
power the jobs need. Azure Data Lake Analytics is
typically used for long-running analytics jobs against Azure Time Series Insights
massive amounts of data.
You can use Azure Time Series Insights to get quick
See Scalable Data Science with Azure Data Lake: An insights on large amounts of typically IoT-type data.
end-to-end Walkthrough for a sample of using Azure This service gets data from Azure Event Hubs, IoT Hub,
Data Lake Analytics. and custom reference inputs, and it retains that data for
a specified amount of time.
TUTORIAL
With Azure Time Series Insights, users can query and
Create your first U-SQL script analyze data through a visualization tool as soon as it
through the Azure portal
comes in. Time Series Insights not only analyzes data
but also ingests and holds it for a while. Time Series
Insights is optimized for IoT and time-based data, and
contains its own data visualization tool.
Azure Stream Analytics
Check out the Azure IoT reference architecture which
The Azure Stream Analytics service is used to analyze, includes Azure Time Series Insights.
query, and filter real-time streaming data. Stream
Analytics can get its data from many services, including
DEMO
Azure Blob Storage, Azure Event Hubs, and Azure
Explore a Time Series Insights
IoT Hub. You can analyze the data by using a simple demo environment from your
browser
The Developer’s Guide to Azure 76
Azure Databricks provides a unified analytics platform HDInsight allows you to run specialized clusters of
with a host of tools and capabilities. Within Databricks, open‑source data analytics tools. The advantage
you can run optimized versions of Apache Spark to do of running these tools in HDInsight is that they're
advanced data analytics. managed, which means you don't have to maintain
VMs or patch operating systems. Plus, these tools can
In addition to Spark-based analytics, Databricks scale and easily connect to one another, other Azure
provides interactive notebooks and integrated services, and on-premises data sources and services.
workflows and workspaces that you can use to
collaborate with the entire data team, including data You can run potentially massive, specialized clusters
scientists, data engineers, and business analysts, all of of different types, such as an Apache Hadoop cluster.
whom have access to specialized tools for their specific It enables you to process and analyze data with
requirements. Hadoop tools such as Hive, Pig, and Oozie. You can
spin up an Apache HBase cluster, which provides a very
Databricks is fully integrated with Azure Active fast NoSQL database, or you can create an Apache
Directory, which gives you the ability to implement Storm cluster, which is geared toward analyzing data
granular security. With Databricks, you can perform streams, and provides a framework for processing
Spark-based data analytics on data that comes from a and analyzing massive amounts of data. HDInsight
variety of places. Additionally, you can plug Databricks can also run a cluster for Microsoft Machine Learning
into Power BI to create and show powerful dashboards. Server (previously Microsoft R Server). Finally, you
can create a cluster that runs Apache Kafka, which is
See Ingestion, ETL, and stream processing pipelines a publish‑subscribe messaging system used to build
with Azure Databricks for a sample reference applications with queueing mechanisms.
architecture.
See Interactive querying with HDInsight for a sample
reference architecture using HDInsight.
EXERCISE
Run a Spark job on Azure
Databricks using the Azure
TUTORIAL
portal
Extract, transform, and load
data using Apache Hive on
HDInsight
The Developer’s Guide to Azure 77
Use Azure Data Explorer for a fast, fully managed, Power BI is a suite of business analytics tools that
and highly scalable data analytics service for real- deliver insights throughout an organization. Connect to
time analysis of large volumes of data streaming from hundreds of data sources, simplify data prep, and drive
applications, websites, IoT devices, and more. unplanned analysis. Produce beautiful reports, and
then publish them for the organization to consume on
Azure Data Explorer allows you to natively export Kusto the web and across mobile devices.
queries that were explored in the web UI to optimized
dashboards. With Azure services and Power BI, your application
can turn data processing efforts into analytics and
See Azure Data Explorer interactive analytics and reports that provide real-time insights. Whether
Streaming using HDInsight for reference architectures. data processing is cloud-based or on-premises,
straightforward, or complex, single-sourced, or
massively scaled, warehoused, or real-time, Azure and
Azure Data Studio Power BI have the built-in connectivity and integration
to bring business intelligence efforts to life.
Azure Data Studio is a cross-platform database tool for
data professionals using on-premises and cloud data Power BI has a multitude of Azure connections
platforms on Windows, macOS, and Linux. available, and the business intelligence solutions allow
for the creation of data insights unique to the business.
Azure Data Studio offers a modern editor experience Use Power BI to connect as few as one Azure data
with IntelliSense, code snippets, source control source, or many, and then shape and refine the data to
integration, and an integrated terminal. It's engineered build customized reports.
with the data platform user in mind, with the built-
in charting of query result sets and customizable See Enterprise business intelligence for a reference
dashboards. architecture using Power BI.
The source code for Azure Data Studio and its data
providers is available on GitHub under a source code Common Data Model
EULA that provides rights to modify and use the
software, but not to redistribute it or host it in a cloud The Common Data Model simplifies bringing together
service. data from multiple systems and creating a shared data
language for business and analytical applications to
use. The Common Data Model metadata system makes
it possible for data and its meaning to be shared across
applications and business processes such as Microsoft
PowerApps, Power BI, Dynamics 365, and Azure.
The Developer’s Guide to Azure 78
* Services with an asterisk have a free tier to get started with at no cost.
Azure Purview Chief data officers and compliance teams can gain a
bird's-eye view of their data, especially sensitive data,
with Purview Data Insights, to assess data usage across
the organization.
The growing amount of data you have today makes
it very difficult to discover and catalog. With Azure Additionally, Azure Purview enables the following:
Purview, you can have a central location for your data • Improved data tracking and understanding
catalog where you can register data sources across through metadata. Data remains at its source
the enterprise. This enables better data understanding location, but a copy of the metadata is added to
and a central location that provides a seamless data Azure Purview with reference to the data source
consumption process. location. As metadata is indexed, a data source
search is easy and understandable to users.
As data becomes fundamental for maximizing
• Eliminates operational silos by enabling business
business value, managing and governing that data
and technical data analysts, data scientists, and
across growing on-premises, multi-cloud, and SaaS
data engineers to find trustworthy, valuable data.
environments is essential.
• Tracks data through lineage, thereby allowing a
view into data moves from one source to another
Azure Purview sets the foundation for effective data
through ETL processes and pipelines.
governance by helping with automated metadata
discovery, AI-powered classifiers, and end-to-end • Provides a better understanding of data changes
lineage. With the help of built-in connectors and and how data is affected by different processes
across clouds, or in external SaaS apps such as Dropbox • Using classification and sensitivity label
and Slack. insights, the business can better track sensitive
information.
At the heart of Azure Purview is the data map, which
provides automated scanning and classification of See Data governance with Profisee and Azure
metadata at cloud scale. Purview for a reference architecture using Azure
Purview.
Data consumers across the business interact with the
data discovered in the Data Map using the Purview
Data Catalog. The Data Catalog enables effortless
discovery for data consumers by offering capabilities
such as semantic browse and search, business
glossaries, and visual data lineage.
The Developer’s Guide to Azure 80
These applications and features of these IoT devices When devices send messages to Azure IoT Hub, it can
are virtually unlimited, but they all tend to have one either store them or route them to another service, such
thing in common: they generate a lot of data. In many as Azure Event Grid, for analysis or action.
cases, it is not practical to forward that data to Azure
for processing, and it makes more sense to do the You can also create bidirectional communication
processing on the device, or even more likely, a specific tunnels using device streams. Azure IoT Hub device
edge device. streams facilitate the creation of secure bidirectional
TCP tunnels for a variety of cloud-to-device
Azure provides a robust and scalable platform for communication scenarios.
managing these devices and then getting valuable
insights from them.
Azure IoT Hub Device
Refer to the Azure IoT reference architecture to see
Provisioning Service
how all the following solutions work together.
The Azure IoT Hub Device Provisioning Service (DPS)
provides Azure IoT Hub with zero-touch, just-in-time
provisioning of devices to the appropriate IoT hub
without intervention, allowing for the provisioning of
devices in a secure and scalable manner.
The Developer’s Guide to Azure 81
Azure IoT Central It's possible to run many Azure services at the edge to
help with certain scenarios—and the list of available
Azure IoT Central is a Software as a Service (SaaS) services keeps growing. For example, using Azure
offering that enables IoT developers to create rich IoT IoT Edge, it is possible to push the Azure SQL Edge
applications just by navigating through wizards. modules to devices and gain the power to stream,
collect, and process that data right on the edge device
There's no need to perform any coding or in-depth itself, whether it is in a connected, semi-connected, or a
configuration—IoT Central does it all by provisioning disconnected environment. Table 4.2 lists just some of
and configuring everything needed. these:
specific app templates for retail, energy, healthcare, Build and deploy AI models Machine Learning
and government. Alternatively, it is also possible to
start with a blank, custom app template to build a Customize computer vision Custom Vision
models for use cases Service
fully customized solution with Azure IoT Central.
Process real-time
Through app templates, it is possible to get up and Stream Analytics
streaming data
running very quickly, without the need for years of
Process events using
programming experience. However, if further control Azure Functions
serverless code
and customization are needed, it is possible to tweak
the solution according to solution requirements. SQL Edge Azure SQL Edge
Microsoft has extended the most secure Microsoft SQL The world of IoT tends to lend itself to many IoT
engine and machine learning to the edge with Azure devices and sensors that function in connection
SQL Edge. By using Azure SQL Edge, devices gain the with environments and business systems. In many
ability to: cases, extra context must be added when attempting
• Stream, store, and analyze time series data using to understand the data IoT devices capture. This
time-windowing, aggregation, and filtering can include the environment in which the various
capabilities, and achieve deeper insights by devices operate.
combining data types such as time series
and graphs. For instance, for a temperature sensor, temperature
data by itself doesn't disclose much information
• Enjoy consistent app development and
without some extra context. When basic temperature
management, from the cloud to datacenters to
data is supplemented with external data, such as which
the edge—develop once and deploy anywhere.
room the sensor is in, what data other devices in the
• Conduct real-time scoring, detect anomalies,
room provide, how many people are in the room, or
and apply business logic at the edge using the
how people are moving in the room, a much better
built‑in machine learning (ML) capabilities.
picture of what the temperature data means is created.
• Process data at the edge before forwarding it By utilizing Azure Digital Twins, it is possible to more
to the datacenter and cloud storage to optimize effectively model the physical environment in which the
network bandwidth and cost. IoT devices reside.
• Deploy and update from Azure or the
enterprise portal for consistent security and Leveraging their domain expertise on top of Azure
turnkey management. With SQL Edge, gain Digital Twins' flexible modeling, enterprises can build
high availability and disaster recovery, as contextually aware solutions. With Azure Digital Twins'
well as industry-leading data protection and next-generation IoT solutions, customers can track the
security tools. past, control the present, and predict the future.
• Expand device architecture coverage to include
ARM-based devices on top of x64-based
architecture, choose Windows or Linux as
the operating system, and run SQL Edge in a
connected or disconnected environment.
The Developer’s Guide to Azure 83
There are many scenarios where Azure Digital Twins can Windows for IoT
be helpful:
• Predicting maintenance needs for a factory Windows 10 IoT is a member of the Windows 10
family that brings enterprise-class power, security, and
• Analyzing real-time energy requirements for an
manageability to IoT. It leverages Windows' embedded
electrical grid
experience, ecosystem, and cloud connectivity, allowing
• Optimizing the use of available space for
organizations to create their IoT with secure devices
an office
that can be quickly provisioned, easily managed, and
• Tracking daily temperatures across several states seamlessly connected to an overall cloud strategy.
• Monitoring busy drone paths
• Identifying autonomous vehicles Windows 10 IoT comes in two editions:
• Analyzing occupancy levels for a building • Windows 10 IoT Core is the smallest member
• Finding the busiest cash register in a store of the Windows 10 family. While only running
a single app, it still has the manageability and
security expected from Windows 10.
Azure Digital Twins allows for the management of
• Windows 10 IoT Enterprise is a full version of
permissions to data and devices in the context of the
Windows 10 with specialized features to create
physical world. By leveraging Azure Active Directory
dedicated devices locked down to a specific set
(Azure AD), it is possible to specify that only certain
of applications and peripherals.
users can access data from a certain physical location.
Azure Security Center for IoT provides threat Windows Server IoT 2019 is a full version of Windows
prevention and analysis for every device, for both Server 2019 that comes with enterprise manageability
IoT Edge and IoT Hub, across the entire IoT solution. and security for your IoT solutions. Windows Server IoT
It provides unified visibility and control, along with 2019 comes with all benefits of Windows ecosystems,
adaptive threat prevention with built-in intelligent offering a seamless experience with familiar tools for
threat detection and response for your workloads both development and management.
wherever they reside—the edge, on-premises, in Azure,
or in other clouds.
The Developer’s Guide to Azure 84
Acquire further knowledge on using Azure IoT solutions Learn more about data and data analytics in Azure by
in the following free learning path: downloading and reading the following free e-books:
RESOURCE RESOURCE
HUB HUB
Securely connect IoT devices to
Proof of concept playbook
the cloud
05 /
Adding
intelligence
to your
application
The Developer’s Guide to Azure 86
The role of
AI in modern
application
development
Artificial intelligence (AI) brings human-like capabilities
into software. The ability to use AI and use it well can
distinguish a software product from its competitors,
streamline business processes, and reduce manual
labor costs.
Visual perception
Natural language processing (NLP) allows an Decision-making AI can use data from past experiences
application to understand written and spoken to apply correlations to current situations and take
language. One of the most common application of appropriate actions. Use Azure Machine Learning
NLP is in digital assistant software. In addition, NLP is to develop custom models, or take advantage of
also used in online chatbots, language translation, and the powerful inferencing engine readily available
speech output (synthesis) scenarios. Leveraging Azure in the Anomaly Detector service. For example, the
services such as Text Analytics, Speech, and LUIS can health and efficiency of factory equipment directly
improve overall customer satisfaction. For example, impacts the profitability of a company. Therefore, the
implementing a chatbot on the company website that company can use sensors on the equipment to gather
can detect and converse with a user in their preferred real-time telemetry to obtain identifiable trends that
language. It can also identify the sentiment of an lead to failure. These trends are encapsulated in a
interaction as being positive or negative to recognize trained model and applied to the factory's incoming
potential areas of improvement and automation on telemetry data stream. This practice enables predictive
the website. maintenance, warding off unexpected downtime
and expense.
Speech
Azure Bot Service Azure Bot Service makes it easy to create a bot and
provides the following support:
Azure Bot Service provides the tools and frameworks • It provides a way for hosting and managing bots
necessary for building conversational AI solutions, such built using the Microsoft Bot Framework.
as a virtual assistant for a website. The complexity of
• It integrates natively with Cognitive Services.
interpreting the context of an interaction with each user
• It allows you to connect bots to customers'
and providing rich, sensible, human-like responses is
channels (Facebook, Microsoft Teams, Slack,
greatly simplified with AI.
and more).
The Bot Framework SDK is available for C#, Java, • It is a fully managed service in Azure.
GET
STARTED
QUICK
START
Make your first Azure Immersive
Reader request
Azure Cognitive Services is a set of pre-trained, In addition to these services, Cognitive Research
customizable AI models based on Microsoft AI Technologies contain innovative APIs and SDKs for
research, enabling access to sophisticated language, researchers and developers looking for emerging
vision, decision-making, and speech capabilities cognitive capabilities. One such experimental service
through simple API calls. Azure Cognitive Services does is Project Gesture, which enables the AI model to
not require previous ML experience for integration. recognize gestures such as waving a hand and use them
In addition, many of these existing models are as actionable feedback in application user experiences.
extensible by training with custom data to fit specific
knowledge domains. Let's take a closer look at some Cognitive
Services offerings.
Cognitive Services provides a robust set of APIs to
incorporate ML and AI into applications. RESOURCE
HUB
Table 5.1 shows a series of categories and a list of APIs Hands on with AI
that are currently available. Note that this list keeps
growing, and we will cover a few of these services in the
Access a 4-week learning path
following sections.
to grow your skills and get
certified
* All services have a free tier that you can use to get started.
Personalizer STEP BY
Personalizer helps applications choose the most STEP
relevant content to show a user based on their user Create a new application in the
LUIS portal
behavior, collective trends, and real-time information
provided by the current context.
This section looks at services for transcribing speech With Text-to-Speech, choose from more than 250
to text and converting text to speech to enable voices and 70 languages and variants. Differentiate
conversational experiences. This functionality is made applications using a customized voice and use voices
available in applications via the Speech SDKs available with different speaking styles and emotional tones
in multiple programming languages and via the full to fit specific use cases. The application of Text-to-
REST API. As with many Azure AI services, multiple Speech is common in text readers and customer
model deployment options are available. By deploying support chatbots.
models as a container, data does not need to leave
the cloud to be processed, resulting in a more secure With the level of customization available in
solution as the power of Speech services is brought Text‑to‑Speech, create lifelike voices that are unique
closer to the data. to an organization.
Speech-to-Text QUICK
Speech-to-Text is an AI service that accurately START
transcribes spoken audio to text. It allows quick and Get started with Text-to-Speech
accurate audio transcription in more than 85 languages
and variants.
QUICK
START
Create your own Custom Vision
project
Azure Machine
The ML process works as follows:
Learning •
prepared for the ML algorithm.
The ML algorithm is used to train a model to
identify these patterns.
• The trained model is deployed so that it can be
Azure Machine Learning empowers developers
used to recognize patterns in new datasets.
and data scientists with a wide range of productive
• Applications use services or libraries to use
experiences for building, training, and deploying
the trained model and take actions based on
machine learning models more quickly. It also helps
the results.
accelerate the time to market and foster team
collaboration with industry-leading MLOps (DevOps for
machine learning). The crucial part of this process is that it is iterative.
Thus, the ML model can be improved constantly by
First, let's introduce ML. training it with new data and adjusting the algorithm to
distinguish correct results from wrong ones.
Azure Machine Learning is a complete service that Azure Machine Learning designer
offers end-to-end capabilities. Prepare data; train, test,
and deploy models, and track their lifecycle through the Azure Machine Learning designer is the code-
model registry. For example, a data scientist creates a free approach to prep data and train, test, deploy,
notebook to train and register a model. This notebook manage, and track machine learning models. There
can be run within Azure Machine Learning workspace, is no programming required—each step is visually
Synapse Notebooks, or Azure Databricks. The data constructed using drag-and-drop modules.
scientist can then deploy the model on a Kubernetes
container cluster in Azure Kubernetes Service. The Azure Machine Learning designer is a feature of
the Azure Machine Learning workspace resource. This
QUICK workspace acts as a centralized place to work with and
START store all the artifacts related to ML.
Get started with Azure Machine
Learning by using the Azure
portal In the designer, a project begins by creating a pipeline
from scratch or by starting with one of the many
prebuilt samples, including one for predicting
flight delays and another for customer relationship
Azure Machine Learning studio management (CRM) prediction:
TUTORIAL
AutoML
Developer tooling
for AI
This section looks at two main frameworks that can AI Toolkit for Azure IoT Edge
help developers infuse AI into their applications;
ML.NET and AI Toolkit for Azure IoT Edge. First, let's Using ML models locally on devices (the intelligent
explore these frameworks. edge) delivers a powerful advantage: it enables
disconnected, local processing on a device without
relying on an internet connection or incurring the
ML.NET latency of a web service call to get results.
ML.NET is an open-source and cross-platform ML The AI Toolkit for Azure IoT Edge provides tooling to
framework with support for macOS, Windows, and package machine learning models in Azure IoT Edge-
Linux. ML.NET brings ML to .NET developers, allowing compatible Docker containers and expose those models
them to integrate ML into new or existing web, as REST APIs. The Docker containers are deployed as an
mobile, desktop, gaming, and Internet of Things (IoT) IoT edge module on the device and run by to the local
applications. IoT Edge runtime infrastructure.
ML.NET Model Builder provides an easy-to- The AI Toolkit for Azure IoT Edge contains examples
understand visual interface to build, train, and deploy for getting started, is fully open source, and is
custom ML models. Prior ML expertise is not required. available on GitHub.
Model Builder supports AutoML, which automatically
explores different ML algorithms and settings to help In summary, using these frameworks allows developers
you find the one that best suits your scenario. to reuse all their knowledge and skillsets to start
building intelligent algorithms and experiences without
QUICK having to start from scratch. With ML.NET and Azure
START services such as Azure Machine Learning, developers
Get started developing on can be productive quickly and easily.
Azure AI
The Developer’s Guide to Azure 101
Mixed reality
Applications are no longer limited to a 2D environment. Azure Spatial Anchors works with applications built
The world is now the canvas for applications. Various on Unity, ARKit, ARCore, and Universal Windows
IoT sensors, mixed reality, and computer vision are Platform (UWP) and are consumed with a HoloLens
combined with spatial intelligence to bring data to life device, iOS‑based devices supporting ARKit, and
in 3D. Android‑based devices supporting ARCore.
Azure Kinect DK
06 /
Securing
your
application
The Developer’s Guide to Azure 104
DOCS
LEARN
What is Key Vault? MORE
How to use managed identities
for Azure resources in App
Service and Azure Functions
Figure 6.1: Decision tree for choosing the right Azure service based on your requirements
The Developer’s Guide to Azure 109
Azure Firewall is a managed, cloud-native network You've heard about it on the news, and you certainly
security service that protects your Azure Virtual don't want it to happen to your enterprise: applications
Network resources. It's a fully stateful firewall as a are targeted by distributed denial of service (DDoS)
service with built-in high availability and unrestricted attacks all the time. These types of attacks are
cloud scalability. becoming more common and can overwhelm your
application to the point that no one can use it anymore.
Azure Firewall enables you to have centralized network- DDoS Protection offers protection from DDoS attacks
and application-level connectivity policy controls as through a free tier (Basic) and a paid tier (Standard).
well as intelligence-based traffic filtering. Azure Firewall
has built-in TLS inspection for your selected encrypted You don't have to do anything to enable the Basic
applications and offers the ability to detect and block tier—it's automatically enabled for every customer as
malicious traffic through an advanced IDPS engine. part of the Azure platform. This service protects your
applications against the most common DDoS attacks
You can use Azure Firewall to secure your Azure virtual by performing real-time monitoring and mitigation,
networks in hybrid connectivity scenarios through and it provides the same defenses as those used by
deployments behind VPN and ExpressRoute gateways. Microsoft Online Services (MOS).
DOCS
DOCS
Azure Defender
BLOG
connectivity APIs should be secure. This is true for APIs you create
yourself as well as those from third-party vendors.
To assist in making your APIs secure, you can use
API Management. This is basically a proxy you put
In this section, we will look at the Azure services and in front of APIs that adds features such as caching,
tools that can enable you to secure the connectivity throttling, and authentication or authorization.
of, and access to, your application. We will review tools
and services to help you secure your APIs and connect With API Management, you secure an API by
securely to your virtual machines (VMs), and we'll requiring users to create a subscription to it. This way,
see how you can securely connect your on-premises applications need to authenticate before they can use
network to Azure. your API. You can use various authentication methods,
including access tokens, basic authentication, and
certificates. Additionally, you can track who's calling
Azure Bastion your API and block unwanted callers.
Azure Bastion is a fully managed PaaS offering that API Management supports multiple pricing tiers up to
provides secure and seamless RDP and SSH access to 99.95% SLA guarantee. The Consumption pricing tier
your VMs directly through the Azure portal. Azure offers the ability to have the API Management service
Bastion is provisioned directly in your virtual network automatically scale to handle the load.
and supports all the VMs in your virtual network using
SSL (Secure Socket Layer) without any exposure through While security is critical, API Management offers
public IP addresses. other capabilities that can help streamline your
development and testing workflow, such as test
With Azure Bastion, you can limit the public exposure data response mocking, publishing multiple API
of your VMs' IP addresses. Exposing the Bastion host versions, introducing non-breaking changes safely
as the primary exposed public access point helps to with revisions, and giving developers access to your
reduce public internet exposure and limit threats such API's autogenerated documentation, catalog, and
as port scanning and other types of malware targeting code samples.
your VMs.
TUTORIAL
LEARN
MORE Get started with API Management
Read about Azure Bastion
The Developer’s Guide to Azure 113
Azure VPN Gateway private zones removes the need to introduce custom
DNS solutions that could increase the overall attack
One of the many options for connecting Azure to surface with independent updating and management
your on-premises network is VPN Gateway. This requirements.
lets you set up an encrypted site-to-site (S2S) VPN
connection between an Azure virtual network and your
DOCS
on‑premises network.
Read more about DNS private
zones
Because the traffic is encrypted, it's secure—even when
it travels over the public internet. VPN Gateway can
send encrypted traffic between Azure virtual networks
over the Microsoft network.
Cross-premises VPNs
You can also create encrypted point-to-site (P2S)
connections from your computer to Azure. This way, Azure supports two types of cross-premises VPN
you have your own private, secure connection to Azure connections: P2S VPN and S2S VPN. A P2S VPN
even when you're on the road. connection lets you create a secure connection to your
virtual network from an individual client computer.
TRY IT This type of connection is established from the client
OUT computer, which is useful for telecommuters who want
Get started by creating an Azure to connect to Azure virtual networks from a remote
VPN gateway with PowerShell
location. A P2S VPN is also useful when you have
only a few clients who need to connect to a virtual
network. In contrast, an S2S VPN connection is used
to connect your on-premises network to an Azure
Azure DNS private zones virtual network over an IPsec/IKE (IKEv1 or IKEv2) VPN
tunnel. This type of connection requires a VPN device
The DNS is responsible for translating (or resolving) located on‑premises that has an externally facing public
a service name to its IP address. Azure DNS is a IP address.
hosting service for DNS domains, providing name
resolution using the Azure infrastructure. In addition to
DOCS
internet‑facing DNS domains, Azure DNS now supports
private DNS domains as a preview feature with Azure Read more about P2S VPNs
DNS private zones. Security benefits arising from
private DNS zones include the ability to create a split
DNS infrastructure. This enables you to create private
Read more about S2S VPNs
and public DNS zones with the same names without
exposing internal names. In addition, the use of DNS
The Developer’s Guide to Azure 114
Azure ExpressRoute
LEARN
MORE
Read about load balancer and
HA ports rules
The Developer’s Guide to Azure 115
monitoring QUICK
START
When there is a threat, you'll be alerted and can Log Analytics within Azure Monitor allows you to write,
investigate it with AI, utilizing decades of cybersecurity execute, and manage Azure Monitor log queries in the
work at Microsoft. You can respond to incidents with Azure portal.
The Developer’s Guide to Azure 116
RESOURCE
HUB
DOCS
Encryption
• Always Encrypted encrypts data within client
applications prior to storing it in Azure SQL
Database. It allows the delegation of on-premises
database administration to third parties and
maintains separation between those who own
By default, your data is encrypted in Azure when it's
and can view the data and those who manage it
stored in Azure SQL Database, Azure Synapse Analytics
but should not access it.
(formerly Azure SQL Data Warehouse), Azure Database
• Azure Cosmos DB requires no action from
for MySQL, Azure Database for PostgreSQL, Azure
you—user data stored in Azure Cosmos DB
Storage, Azure Cosmos DB, or Azure Data Lake Storage.
in non‑volatile storage (solid-state drives) is
All this encryption works automatically, and you don't
encrypted by default, and there are no controls
need to configure anything when you use it.
to turn it on or off.
07 /
Deploying your
services and
optimizing costs
The Developer’s Guide to Azure 120
Azure Blueprints
It's easy to use Azure Resource Manager templates,
resource groups, user identities, and access rights and
policies to design and create a complete infrastructure.
But how do you keep all of these things together? And
how do you keep track of which environments each
piece of infrastructure has been deployed to and which
version of the artifact is deployed now?
QUICK
START
Get started by defining and
assigning an Azure blueprint in
the Azure portal
The Developer’s Guide to Azure 124
Tracking your You can use the Azure portal or various APIs for export
automation to integrate cost data with external systems
TUTORIAL
With Azure products and services, you only pay for
what you create and the Azure resources you use. It's Optimize costs from
recommendations
important to keep track of what you are using and the
costs involved.
Creating a
billing alert
Azure Cost Management alerts can be used to Cost alerts can easily be viewed within the Azure portal.
monitor your Azure usage and spending. Cost alerts All alerts will show the alert type. A budget alert shows
are automatically generated based on when Azure the reason why it was generated and the name of the
resources are consumed. Alerts show all active cost budget it applies to. Each alert shows the date it was
management and billing alerts together in one place. generated, its status, and the scope (subscription or
management group) that the alert applies to.
When your consumption reaches a given threshold,
alerts are generated by Azure Cost Management. The possible statuses for alerts include "active" and
There are three types of cost alerts: "dismissed." An active status indicates that the alert is
• Budget alerts notify you when spending, still relevant. A dismissed status indicates that someone
based on usage or cost, reaches or exceeds the has marked the alert to set it as no longer relevant.
amount defined in the alert condition of the
budget. Azure Cost Management budgets are Select an alert from the list to view its details. Alert
created using the Azure portal or the Azure details show more information about the alert. If a
Consumption API. recommendation is available for a budget alert, then a
link to the recommendation is also shown. You can also
• Credit alerts notify you when your Azure
navigate to Cost analysis, where you can explore costs
credit monetary commitments are consumed.
relating to the alert's scope.
Monetary commitments are for organizations
with enterprise agreements. Credit alerts are
generated automatically at 90% and 100% of
your Azure credit balance. Whenever an alert is
generated, it's reflected in cost alerts and in the
email sent to the account owners.
• Department spending quota alerts notify
you when department spending reaches a fixed
threshold of the quota. Spending quotas are
configured in the EA portal.
The Developer’s Guide to Azure 126
08 /
Microsoft
Azure in
action
The Developer’s Guide to Azure 128
Navigating the This opens the search box for Azure Marketplace, where
you will find everything from web applications to Linux
TUTORIAL
Develop your For example, if a user creates a to-do item with the text
"family dinner next Friday at 7:00 PM," the application
first web app and will create a calendar item for that specific Friday at 7:00
PM with the subject "family dinner."
extend it with This can be set up using the Logic Apps feature
Cognitive Services
• The .NET Core application writes the to-do item
in the SQL database.
• The logic application is triggered by every new
row created in the database.
• The logic application takes the to-do item text
We will use this tutorial to develop and deploy a sample
and passes it to LUIS.
to-do list application to Azure. You will learn how to
create a .NET Core app and a SQL database in Azure, • LUIS analyzes the text and creates a calendar
connect the app with the database, and deploy it to item in your Microsoft 365 calendar if the text
Azure App Service. You will also learn how to update the contains a date and time.
Creating LUIS
Extending applications with Logic
Apps and Cognitive Services First, you'll create LUIS so that you can use it later in
your logic application.
Once you have your app and the database deployed
in Azure, you can start adding additional features. You can use the LUIS portal to build a language model.
A powerful feature of your application could be the First, you need to add some entities, which are items
ability to analyze the content of to-do items and then in the text the service will recognize. Then, you enter
automatically create calendar appointments for tasks utterances, which are sample texts that represent the
that include a specific date. intent you want to detect.
The Developer’s Guide to Azure 131
QUICK
START
When using LUIS actions, you enter the API key for
your LUIS service, so the logic app can connect to
and integrate with your Language Understanding
service. Then, you configure the logic app to pass
the particular utterance text to LUIS and use it for
recognizing utterances.
So far, we've been pushing code from our local Git All the deployment slots run in the same App Service
repository to Azure. This is fine if you work alone, but if plan, which is what you pay for. Having additional
you work in a team, you'll need another type of source deployment slots in an App Service plan will
control, such as Azure Repos, one of the services in consume resources such as CPU and memory, so you
Azure DevOps, or GitHub. need to be mindful of how additional slots might
impact production.
Setting up continuous delivery You can create new deployment slots from the
with GitHub Deployment Slots menu item in the web app. You need
to run the web application in the Standard or Premium
With your application running in Azure, you could use a pricing tier because the free plan doesn't come with
GitHub repository to push your code and then link that additional deployment slots.
to your web application so that changes are deployed
automatically in a continuous delivery pipeline. In each deployment slot you create, you can configure
the deployment options as we did earlier to deploy
Continuous delivery can be configured using the code automatically. You can even work on different
Deployment Center feature of Web Apps through the source code branches for different environments and
Azure portal. This feature enables you to choose the automatically deploy specific branches to specific
location of your code as well as options for building and deployment slots.
deploying it to the cloud.
Additionally, you can test your final version in
a deployment slot and then swap it with the version
Setting up staging environments in the production slot. This warms up the application
before it swaps, resulting in a deployment with
Using web apps from the Azure App Service, you no downtime.
can set up a staging slot to test new versions of your
application through deployment slots. Deployment
slots are application services with which you can test
your code before you promote it to the next slot.
The Developer’s Guide to Azure 133
When your web app is inundated with lots of traffic Azure Monitor Application Insights provides another
and user activities, you can scale up your web app to powerful way to track applications. This monitoring
accommodate the increased traffic. Conversely, when tool provides information about your application, such
your web app is idling, you can scale it back to reduce as how many visitors used it, how many exceptions
costs. Thanks to the automatic scaling feature of occurred, and where they occurred in the code.
Azure App Service, you can achieve this with ease. The Unlike diagnostic logs, Application Insights requires a
best part of this feature is that it only takes a matter nominal fee.
of seconds to adjust the scale settings and you do
not even need to make any changes to your code or
redeploy your application. Adding Secure Sockets Layer
To use this feature, you need to run the web apps in the When an application is ready for production, you need
Standard or Premium pricing tier. Alternatively, you can to confirm that it's secure. Besides authentication and
use the Free tier to run a single instance of a web app. authorization, serving the web application over HTTPS
is one of the most important security measures you
You can learn more about how to scale your application can take. This is because, without HTTPS, intruders
in Azure App Service here. could see the traffic among your resources and use this
information for malicious purposes, like signing in to
your application. Additionally, HTTPS is a requirement
Using diagnostic logs for leading-edge features such as service workers.
An efficient way to monitor an application is by using Serving traffic to your web application over Secure
diagnostic logs to see live diagnostic logging from the Sockets Layer (SSL) is possible by importing an SSL
web app. You can even pipe the logs into the console certificate into Web Apps and binding it to one of
window. To do this, run the following command in your custom domain names. You can either import
Cloud Shell: your own SSL certificate or purchase one through
Azure App Service Certificates. This service makes it
az webapp log tail --name <app_name> easy to buy and validate certificates. After importing
--resourcegroup <myResourceGroup>
the certificate, couple it to one of the domain name
bindings of your web app. You can do all this from the
You'll be able to see diagnostic logs when you use the TLS/SSL settings in the web app.
web application to generate some traffic.
The Developer’s Guide to Azure 134
RESOURCE
HUB
09 /
Summary
In this guide, we introduced the power that Azure
can bring to your applications. Using Azure, you
can do incredible things with your applications,
including hosting and scaling your web applications,
and
taking advantage of containers, and using AI in your
applications, while only paying for what you use.
resources
every scenario, so it can help you no matter which
programming language you use or which platform
you write applications for. Before we wrap up, we will
provide you with some valuable resources to help you
embark on your Azure journey.
The Developer’s Guide to Azure 136
Learn TV
Azure tips and tricks Start your journey today by exploring our Azure
Browse a collection of useful ideas to help you become learning paths and modules, including Learn TV, which
more productive with Azure. features the latest digital content so you can always
keep updated on the latest announcements, features,
Azure Friday and products.
Take a look at Azure services and features with the
Microsoft engineering team.
Microsoft.Source
Receive a regular digest of relevant technical content,
events, and training. Learn about new technologies and
find opportunities to connect with other developers
online and locally.
The Developer’s Guide to Azure 137
Free resources
• Get up and running with Kubernetes: With
the Kubernetes collection, you'll get multiple
extravaganza
resources that will help you gain the knowledge
and hands-on experience necessary to get
started with Kubernetes—all in one place.
• Cloud Analytics with Microsoft Azure: Maximize
your BI impact by bringing data together from all
In addition to this guide, there are many other free
your sources with Azure Synapse Analytics.
resources related to Azure, including the following:
• Introducing Microsoft SQL Server 2019: Find
• Azure for Developers: A list of developer
out what's new in Microsoft SQL Server 2019,
resources for app development.
a platform for secure and compliant modern
• Azure for Architects: A comprehensive guide for
data management.
Azure architects.
• Azure Networking Cookbook: Configure,
• Azure Strategy and Implementation Guide: Get
manage, monitor, and troubleshoot networks
a step-by-step introduction to using Azure for
more effectively with networking solutions
your cloud infrastructure and learn how to create
from Azure.
a successful cloud adoption strategy with new
• Building Intelligent Cloud Applications: Build
innovations, capabilities, and security features
and deploy scalable deep learning and machine
from Microsoft Azure.
learning models using serverless architectures
• Learn Azure in a Month of Lunches: A practical
with Azure.
way to learn Azure from scratch over a month
of lunches. Thanks to the wealth of prebuilt solutions in Azure, the
• Azure Proof of Concept Guide for Developers: days of having to write complicated plumbing are over.
Prove whether a concept works or not before your Free yourself up to work on the things that matter to
organization makes a significant investment. Learn you by taking advantage of all that Azure offers. We
how to create and execute a proof of concept for hope you continue to consult this guide to become
developing applications in Azure, from a well- better acquainted with the vast range of Azure services
designed plan to measurable test results. and determine which ones best fit your needs.
• Azure Serverless Computing Cookbook:
Find use cases, hands-on recipes, and
tutorials for quickly configuring your own
serverless environment.
The Developer’s Guide to Azure 138
Chris Pietschmann
Chris Pietschmann is a principal cloud and DevOps
solution architect with Solliance, and a Microsoft MVP
with Azure and IoT. He's passionate about helping
individuals and teams be more productive in the cloud.