The Azure Guide/Printable version


The Azure Guide

The current, editable version of this book is available in Wikibooks, the open-content textbooks collection, at
https://en.wikibooks.org/wiki/The_Azure_Guide

Permission is granted to copy, distribute, and/or modify this document under the terms of the Creative Commons Attribution-ShareAlike 3.0 License.

Introduction

Here, we present a brief overview on what Azure is all about.

Introduction edit

Azure is most well known for its cloud services - it powers Office 365 to start with, and also offers a host of virtual machine facilities that can be run on the cloud. But it also offers a variety of other features, for example,

  • AI and machine learning
  • Speech and text recognition
  • Databases (SQL and Azure Databricks)
  • Web services
  • Active Directory (AD) services

and so on.

Usage edit

There are a wide variety of reasons as to why someone might want to use Azure. Consider the following scenarios:

  • A user wants to run a task which requires high computational power. Instead of having to upgrade what they have, they can easily create an Azure VM to be used for that period of time. When the task is done, the VM can be quickly deleted.
  • Applications requiring Windows Server 2008 or 2008 R2 at Azure will benefit from the former's free extended security updates under it.
  • Azure Virtual Desktop is a compelling option for applications which require Windows 7 (due to the same reason as mentioned above).
  • A user wants to use speech or text functionality within their application. They can easily make use of Azure's speech SDKs, and as they are online, do not need to be packed within the application.

Access edit

Azure is generally not free, with most services being provided through a subscription or as a PAYG (Pay as you Go) model. However, there are several ways for users to use Azure services for free:

  • Azure for Students - Gives $100 of credit that can be used for a year; only students are eligible for this promotion, however.
  • Azure Free - provides $200 of credit for a year. However, a credit card is required.

Note that the Azure name can be used even in cases where there is no direct relevance: Azure Dev tools for teaching being an example. Formerly called Imagine Standard/Premium, while it is a very useful program which provides free access to valuable tools like Visual Studio and Windows 10, it does not provide Azure credit by itself.

External tutorials edit

See External links.


Compute Vision

In this section, we take a look at another interesting feature of Azure, Compute Vision.

Introduction edit

It is a form of machine-learning, wherein we train the system with different images which are identified to different tags. Then this model can be further used in applications using the keys. Note that this is one service where there is no free substitute; there used to be a 'limited trial' option but such an option was recently discontinued. (Remember thought that Microsoft does have different promotions for Azure)

Also, the main portal (portal.azure.com) is not used; we use the computevision.ai website (which is still by Microsoft) instead.

Procedure edit

As stated above, an Azure subscription is required. If you don't, you will be unable to continue.

  • Go to the website computevision.ai, and create a new project. Then assign the project to a resource group, creating a new one if required.
  • Give a name for your project, and select the type. The options on this section mainly depend on the type of project you are looking for: are you looking to identify images or objects within an image? Which categories of images will your project being based upon? Choose them carefully based on your needs.

 

  • Add your images. Note that each image must be up to 6 MB, cannot be videos (as they are hard to train), and you can only add 150 images to the whole model. This process can be repeated. [Note: Depending on how you obtain your images, you may have to do some image-cleaning to remove nonsensical images.]

The Bing Image CLI service can be used to quickly get stock images given a tag.

  • Click Train. Note that if there is only one tag, then you'll get an error saying that "Your project can't be trained just yet. Make sure you have at least 2 tags and 5 images for every tag." Compute Vision will now run some iteration tests. As we see below, our model is fairly reliable (though adding more is usually always better for reliability).

 

  • Using the Quick Test option will allow you to try an image of your choosing for the Compute Vision model to evaluate. This is a very good way of making sure that your model is reliable. Our test image returned the following result:
Tag Probability
beer 99.9%
wine 0%

Such a one-sided result is likely to mean that it is accurate (and it was in this case).

  • Once you are ready, publish your iteration. You'll be then able to get the URLs required to integrate into your application, which will usually be in this form:

 

See also edit


Speech services

In this section, we take a look at another of Azure's services: speech and text recognition.

Introduction edit

It is a family of tools which enable developers to quickly and easily add speech and text (both ways) functionalities to their applications (which can be in various platforms). It also works online, and hence there is no need to pack anything with the program.

Unlike Compute Vision, this one does have a free tier[1], but it is significantly restricted in terms on the volume that can be processed. It is usually a better idea to use the paid tier for all but the most simple applications. Additionally, there is a dedicated 30-day trial which might be a better option[2].

Usage edit

Speech-to-text from Azure Speech Services, also known as speech-to-text, enables real-time transcription of audio streams into text that your applications, tools, or devices can consume, display, and take action on as command input. This service is powered by the same recognition technology that Microsoft uses for Cortana and Office products, and works seamlessly with the translation and text-to-speech.

https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/speech-to-text

It depends on the language used. For example, for Java projects, you need to use Maven[3]. It is recommended that you study the sample code and use that as a starting point to integrate in your final application. Note that there is no sample code available for Java when it comes for Text to Speech[4], so you'll have to try to understand it from the C# or Python code provided.

Remember that you'll need to get the Speech API key first from the Azure portal (portal.azure.com) and create Speech API keys to use for your application.

If you are previously using Bing Speech or Custom Speech Service, you'll need to migrate to Azure's Speech services[5] [6].

References edit


Azure Active Directory

Azure Active Directory can be thought of as a successor to the long-standing Active Directory feature that can be used to manage networked computers, but cloud-based and far more versatile.

Active Directory edit

It is a set of services that run on Windows Server that can be used to manage computers and assign permissions. A simple example is that of virtually any business - a higher ranked member will have higher permissions than a lower-ranked one - and AD can be used to set up user accounts for the whole network. Some examples of the services leveraged include Lightweight Directory Services, Certificate Services, Federation Services and Rights Management Services and so on[7].

Need for Azure edit

While immensely powerful, Active Directory is beset with limitations and its relative lack of interoperability with non-Windows users[8]. While Microsoft has Active Directory Federation Services as an alternative, an alternative was needed. There's where Azure comes in.

As we already know, Azure is the default hosting platform for Office 365 services. This means that Azure AD can be used to integrate multiple Microsoft services easily - for instance, it is possible to associate a user with an Office 365 account and an account which they can use to log in into the company servers.

While Azure AD does have a free tier, there are premium options available which enable additional features and advanced management options, amongst others[9].

The Office AD website provides a good explanation:

Let's take a look at how the Azure Active Directory, or Azure AD, identity model is able to effectively provide us with an Active Directory lite from the cloud. Azure AD may sound complex, but it isn't really. It's the default identity model for Office 365. So you may have already used it when creating users in Office 365. Imagine a database containing just a few user attributes, such as name, tenant, role, and password, all stored in the cloud using the highly available Azure Cloud Services that can scale to millions of records, an Active Directory lite, if you will, all without the layers and complexity that an on-premises Active Directory gives you.

There are no costs for using Azure Active Directory. There are, however, additional paid subscription levels for using the Azure Active Directory Basic and Premium tiers. These provide value-added features, such as company branding on the portal and user self-service password reset. To understand the Azure AD life cycle, let's first run through a typical scenario. A new user is created and then managed in Office 365.

The user account information is stored in Azure AD. And then whenever the user needs to be verified, all identity and access management is performed by Azure AD. This is always available, and it uses cloud-based Infrastructure as a Service, or IaaS. Azure AD allows you to move your Active Directory authentication services to the cloud. Whether these are public or private clouds, the data is always safe and available and stored in the data center.

If you want to retain local ownership, you can use Federation Services to provide on-premises identity whilst at the same time allowing you to extend your Active Directory environment to the cloud. We know that the cloud offers scalability and always-on availability. Because Azure AD is hosted in the cloud, it can be depended upon and accessed anywhere. Microsoft is able to expose Azure AD to other services via web-based protocols and application programming interfaces, or APIs, which allow trusted communications with Azure AD.

With these secure APIs, Azure AD can integrate with other services, such as on-premises AD, and allow the ability to have a single sign-on, or SSO, between separate services. Azure AD simplifies authentication by providing identity as a service. That is, Azure AD is responsible for verifying the identity of users. This can be achieved through a number of industry standard protocols, such as OAuth 2.0, SAML 2.0, OpenID Connect, and Web Services Federation, or WS-Federation.

When you use Office 365, Azure, or Intune, you are indirectly interfacing with Azure AD. There are also a number of tools to manage Azure AD. If you already have an Azure subscription, you can use the Azure portal if you only need to add or modify a few users. The Azure AD Connect tool, which replaces DirSync, is the primary synchronization tool and allows on-premises Active Directory accounts to be synced with Azure AD.

For more complex environments, you can manage on-premises resources with Active Directory Directory Services, or AD DS, with the Lightweight Directory Access Protocol, or LDAP. And Active Directory Federation Services, AD FS, can then be deployed on site, and this then provides single sign-on control locally. If you prefer working at the command line, you can also interact directly with Azure AD using the AD Graph API, which is a REST API, or by using the Azure AD PowerShell cmdlets, such as Get-AzureADUser and New-AzureADUser.

Azure AD can also be used by app developers to enable single sign on (SSO) integration with their applications, which is not possible with AD alone.

References edit


External links

It is not feasible to cover every single use-case of Azure, and hence we link to some useful tutorials on the Internet which you may wish to consult if you are using Azure for a specialised purpose. We do not guarantee accuracy in the content of any of these tutorials.


  1. https://azure.microsoft.com/en-us/pricing/details/cognitive-services/speech-services/
  2. https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/get-started
  3. https://docs.microsoft.com/en-in/azure/cognitive-services/speech-service/quickstart-java-jre
  4. https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/rest-text-to-speech
  5. https://docs.microsoft.com/en-in/azure/cognitive-services/speech-service/how-to-migrate-from-bing-speech
  6. https://docs.microsoft.com/en-in/azure/cognitive-services/speech-service/how-to-migrate-from-custom-speech-service
  7. https://searchwindowsserver.techtarget.com/definition/Active-Directory
  8. https://jumpcloud.com/blog/active-directory-azure-active-directory/
  9. https://docs.microsoft.com/en-us/azure/active-directory/fundamentals/active-directory-whatis