Azure Services Flashcards
App Service Plans
containers for the apps that you deploy in App Service. App Service plans are offered in different tiers, with more functionality provided by higher, more expensive tiers
App Service Plan Tiers
Free (Windows only): Run a small number of apps for free
Shared (Windows only): Run more apps and provides support for custom domains
Basic: Run unlimited apps and scale up to three instances with built-in load balancing
Standard: The first tier recommended for production workloads. It scales up to ten (10) instances with Autoscaling support and VNet integration to access resources in your Azure virtual networks without exposing them to the internet
Premium: Scale up to 20 instances and additional storage over the standard tier
Isolated: Scale up to 100 instances, runs inside of an Azure Virtual Network isolated from other customers, and supports private access use cases
Azure App Service
Azure App Service Web Apps, or simply Web Apps, are the instances of your websites and web applications hosted in Azure App Service. For most scenarios, Web Apps is the best choice for hosting websites and web applications in Azure. Each Web App is deployed into an App Service plan. Web Apps are DevOps-ready, and can be deployed using a variety of continuous deployment tools.
App Service Advisor
can make recommendations based on your application’s CPU, memory, and connections history
Deployment slots
allow you to have separate instances of your application that have their own hostnames. This is useful for several reasons:
You can organize your workflow by having dedicated testing and staging slots in addition to the default production slot.
Once you have vetted a new release in the staging slot, you can swap it into production to avoid having to warm up the production application.
By swapping releases into production, the previous release remains in a slot where it can easily be swapped back into production if an issue is found in the new release.
Each deployment slot maintains its own configuration and application settings. Deployment slots are available with the standard and premium App Service plans.
Facets of Web Apps in Azure
Metrics: Metrics are collected for Web Apps and measured by server-level information, such as the number of failed requests, average response time, and data in/out. You have seen metrics at work in the charts visible on Web Apps overview blades. Metrics is a global service that is part of Azure Monitor.
Diagnostic Logs: Collect logs from your application and/or from the web server hosting your application. The level of detail of the logs can be configured.
Resource health: Monitors your App Services for Azure service issues that may be impacting your Web Apps.
Service health: Service health is a general service that reports broad service outages, and not individual resource health. If a complete App Service outage is being experienced, Service health will report the outage, but because the outage affects the individual health of individual resources,
Application Insights
application performance management (APM) service. Some of the features of Application Insights include the ability to:
Find and diagnose performance issues Find and diagnose runtime exceptions Monitor and alert on application health Analyze customer usage Create custom key performance indicator (KPI) dashboards
Application Insights can collect data from applications in Azure, running on-prem, or on other clouds. The integration with Azure Web Apps makes it exceptionally easy to use in Azure.
Azure Service Bus
cloud-based publish/subscribe messaging service from Microsoft. It’s used to facilitate communication between applications and services. By communicating with each other through a messaging service, the applications and services can be decoupled. Decoupling is desirable because it results in solutions that scale easily and are more robust against failures.
Azure Service Bus Pricing Tiers
Basic: Allows you to use Queues, but not Topics.
Standard: In addition to Topics, you can make use of message Deduplication and Sessions.
Premium: Similar to Standard, but includes Availability Zone support, Resource Isolation, and larger maximum message size of 1MB.
Steps of Creating Azure Service Bus
- Create globally unique namespace
- Create a storage account to run cloudshell
- Create a Topic
- Create a Subscription
Azure CLI command to display list of Azure Service Bus namespaces
az servicebus namespace list
Topic in Azure Service Bus
enables one-to-many communication
Queue in Azure Service Bus
only allow processing by a single consumer
Azure CLI command to create Topic in Azure Service Bus
az servicebus topic create \
- -resource-group $(az group list –query ‘[0].name’ –output tsv) \
- -namespace-name $(az servicebus namespace list –query ‘[0].name’ –output tsv) \
- -name lab-topic
the name of the resource group and the namespace are fetched in subshells. Notice that you have specified the –output option to be tab-separated values (tsv). The default output is JSON, which would quote the string and cause errors.
Azure CLI command to create Subscription to Topic in Azure Service Bus
RESOURCE_GROUP=$(az group list –query ‘[0].name’ –output tsv)
NAMESPACE_NAME=$(az servicebus namespace list –query ‘[0].name’ –output tsv)
TOPIC_NAME=$(az servicebus topic list –namespace-name $NAMESPACE_NAME –resource-group $RESOURCE_GROUP –query ‘[0].name’ –output tsv)
az servicebus topic subscription create \
- -resource-group $RESOURCE_GROUP \
- -namespace-name $NAMESPACE_NAME \
- -topic-name $TOPIC_NAME \
- -name lab-subscription
This command is making use of variables in Bash. The resource group, namespace name, and topic name are fetched and stored in variables prior to creating the Subscription. This has two benefits, it makes the command easier to read, and it means that the resource group and namespace name are only fetched once, making the command faster to execute.
Azure Functions
Microsoft’s primary serverless compute service. With Azure Functions you gain development agility by focusing on your code and not worrying about maintaining servers.
Steps of creating Azure Function
- Create Azure Function App
- Create a Azure Function (may need to create other resources before doing this, eg: Blob Storage Container before using BlobTrigger)
- Go to “Code + Test” to do the actual coding
Remote Desktop Protocol (RDP)
protocol developed by Microsoft that enables a remote connection to a Windows host. Remote Desktop uses a client/server model, whereby the initiating computer runs Remote Desktop client software to connect to the remote computer, which must run Remote Desktop server software. Remote Desktop server software is built into the Windows operating system. Windows also ships with a Remote Desktop client. Many free Remote Desktop clients exist for Linux and macOS, including those from Microsoft and Apple
Azure Resource Manager (ARM) templates
allow you to specify groups of resources to be deployed together. ARM templates provide infrastructure as code allowing for quick and reproducible deployments.
Log Azure session to Azure from PowerShell
Add-AzAccount
View the storage account that contains your VMs virtual hard drive
Get-AzStorageAccount
Make a storage account the default for current powershell session
Set-AzCurrentStorageAccount -ResourceGroupName -StorageAccountName
Azure Blob storage
store unstructured data in Microsoft’s Azure cloud. Blobs can be any sort of data. Containers are used to organize blobs within a Storage Account. You can store up to 500TB of data in a single container.
Block blobs
made up of individual blocks that can be up to 100MB in size. A block blob can include up to 50,000 blocks, giving a maximum blob size of 4.75TB
Powershell command to create a container called images in Storage account
New-AzStorageContainer -Name images -Permission Off
Powershell command to upload an image
Set-AzStorageBlobContent -Container images -File C:\Users\student\Desktop\image.png`
Powershell command to get the details of an image
Get-AzStorageBlob -Container images -Blob image.png
Powershell command to get the URI of a blob
$blob = Get-AzStorageBlob -Container images -Blob image.png
$blob.ICloudBlob.StorageUri