Implement IaaS, App Service Apps Flashcards

1
Q

What is Azure App Service

A

Azure App Service is an HTTP-based service for hosting web applications, REST APIs, and mobile back ends. This is PaaS

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Which languages are supported by Azure App Service

A

You can develop in your favorite language, be it .NET, .NET Core, Java, Ruby, Node.js, PHP, or Python.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

True or False? Azure App Service Applications can scale on Linux and Windows Environemnts

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How to Enable application logging on Windows

A

In Azure Portal, select the App Service and select App Service logs. Select on for Application Logging (Filesystem) or Application Logging (Blob)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the difference between Application Logging (Filesystem) and Application Logging (Blob) and what is the usage scope for each

A

The Filesystem option is for temporary debugging purposes, and turns itself off in 12 hours. The Blob option is for long-term logging, and needs a blob storage container to write logs to.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

In General, how to enable Logs for App Services

A

In Portal, Select the App and scroll down to Monitoring Sections, Find Logs and App Service Logs

https://docs.microsoft.com/en-us/azure/app-service/troubleshoot-diagnostic-logs?WT.mc_id=thomasmaurer-blog-thmaure

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What types of Web apps can save logs to Azure Blob storage?

  • Node.js apps on Windows.
  • Node.js apps on Linux.
  • ASP.NET Core apps on Linux.
A

Node.js apps on Windows.

Any app that runs on Windows can save logs to Blob storage.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Why is file system logging automatically turned off after 12 hours?

  • To optimize app performance.
  • So that storage space can be reused.
  • To enable Web apps to reinstantiate on different server instances, with different file system storage.
A

To optimize app performance.

Excessive logging can potentially cause app performance to degrade

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

True Or False? Only Windows Apps can write logs to Azure Blob Storage

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is the general syntax for Azure CLI regarding App Service Logging

A

‘az webapp log config’ and

az webapp log show

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Methods for retrieving log files?

A

Download via Azure CLI, Kudu or Azure Storage Explorer

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Supported Formats for Azure App Service Deployment

A

WAR or ZIP File

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Whats the limit for Azure App Service File Deployment (Size)

A

2 GB / 2048 MB

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

All valid Deployment Methods for App Services?

A
  • Run from zip package (package gets mounted)
  • Deploy zip or war (using the Kudu API with a POST message)
  • Deploy via FTP or FTPS
  • Sync with OneDrive or DropBox (cloud sync)
  • Deploy continuously (from Github, Bitbucket, or Azure repos)
  • Deploy via container registry
  • Deploy from build provider (like Github Actions or Azure Pipelines)
  • Deploy via ARM template (from Visual Studio)

All the officially supported deployment methods make changes to the files in the /home/site/wwwroot folder of your app.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Where do offical deployment methods store there data?

A

/home/site/wwwroot

The /wwwroot directory is a mounted storage location shared by all instances of your web app

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What Is Azure Pipelines?

A

Azure Pipelines combines continuous integration (CI) and continuous delivery (CD) to test and build your code and ship it to any target.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What is a YAML file

A

A yaml file contains instructions for Azure Pipelines. Syntax is more like docker syntax

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What is a typical file name for YAML file?

A

azure-pipelines.yaml

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

True or False? Web App Deploy Task can be used to deploy a Azure Web App after Build through yaml

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

What do all build-in Azure Tasks require for Azure Pipelines?

A

An Azure Service Connection

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

What is a Azure Web App Deploy task

A

Something used in Azure Pipelines to deploy a Web App after build

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

What kind of microservices does Azure App Services Provide

A

Web Apps, Mobile Back Ends and API apps

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

What is azuredeploy.json used for and how to get it?

A

Its a ARM (Azure Resource Manager) Template file that defines how to dpeloy resources. Used in Microservices tutorial

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

What are Deployment Slots in Azure App Services

A

A Slot where a instance of the app is running. For example good for staging and live environment.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

True or false: Azure App service can automatically scale your web application to meet traffic demand?

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

Which of the following is not a valid automated deployment source?

GitHub

Azure DevOps

SharePoint

Dropbox

A

Sharepoint

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

True or False? Its possible to deploy a web app to azure app services by using an container image from Container Registry

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

True or False? In DevOps, repeatability and predictability are keys to any successful deployment of a high-scale application composed of microservices

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
29
Q

How to configure Web Apps?

A

There is a section in the portal for Application settings and Connection Strings.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
30
Q

True or False? Web Apps Settings are provided as ENVIRONMENT VARIABLES

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
31
Q

How to replace connection strings when deployed to Azure

A

web.config connection strings will be replaced by name when provided in Azure Portal

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
32
Q

True Or False? App Service Domains are Free of charge

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
33
Q

What is a requirement for app service domains?

A

Its not available in the free pricing tier

34
Q

For what is the “Custom Domains” Button in the Settings Section of App Service

A

It is to buy custom domains for an Azure App Service.

35
Q

True or False? Azure App Service Custom Domains are automatically secured by SSL

A

False. You must configure SSL Bindings / Certificates

36
Q

True or False? Azure App Service can have multiple Host names provided by custom domains.

A

True

37
Q

How long is a Azure Custom Domain purchase valid (Renew time) ?

A

1 year

38
Q

How many workflows are available to scale Azure App Services and what are their names?

A

There are two workflows for scaling, scale up and scale out

39
Q

Describe what Scale Up means in Context of Azure App Services (Also called vertical scale up/down)

A

Add more resources to a single Node.

Get more CPU, memory, disk space, and extra features like dedicated virtual machines (VMs), custom domains and certificates, staging slots, autoscaling, and more.

40
Q

How to Scale Up in Context of Azure App Services

A

You scale up by changing the pricing tier of the App Service plan that your app belongs to.

41
Q

True or False: Other Resources your App Service depends on (Like a SQL DB) are scaled up as well when you change the Pricing Tier

A

False, you must scale up these resources separately.

42
Q

Describe what Scale out means in context of Azure App Services (Also called horizontal scale)

A

Adding more nodes to a (distributed) system.

Increase the number of VM instances that run your app. Load balancer distributes users/connections among multiple machines. You can scale out to as many as 30 instances, depending on your pricing tier. App Service Environments in Isolated tier further increases your scale-out count to 100 instances

43
Q

True or False? The Maximum Instance Count for Scale Out is 30 when pricing plan is “lower” then Isolated (In Context of Azure App Service)

A

True

44
Q

What is the Scale Instance Count for Azure App Service when pricing Plan is at least isolated?

A

> = 100

45
Q

True or False? Azure App Services supports only manual Scaling out

A

False, Auto Scale based on autoscale rules is possible.

46
Q

How does Auto Scaling work for Azure App Service, how does a rule get applied

A

If choosen Scale based on Metric, you must specify the Criteria when the rule applies. For Example a % threshold of CPU is reached or memory limit reached.

47
Q

True or False? It is possible to see the scale history in Azure Portal

A

True, for 90 days back in time

48
Q

True or False? It is possible to see json definition for scale definition

A

True

49
Q

What is an App Service Plan and what are its main components?

A

The compute environment. An app always runs in an app service plan.

Operating System

Region

Number of VM instances

Size of VM instances

Pricing tier (Free, Shared, Basic, Standard, Premium, PremiumV2, PremiumV3, Isolated, IsolatedV2)

50
Q

True of False? App Service Free and Shared service plans should only be used for development and testing purposes.

A

True

51
Q

What are the 5 types of built-in diagnostic logging in App Service that assist with debugging an app?

A

Application logging

Web server logging

Detailed error messages

Failed request tracing

Deployment logging

52
Q

Enable application logging (steps)

A

Logs generated by your app code.

  1. Navigate to App Service Logs
  2. Select On for either Application Logging (Filesystem) or Application Logging (Blob), or both
  3. Select category of log messages to show (i.e. “Warning” shows only warning, critical, and error log messages)
53
Q

2 types of app service plans:

A

Isolated (use this is you want fine-grained control)

Non-isolated

54
Q

What is Application Insights?

A

For developers.

How your app is performing and how it’s being used.

Sends telemetry to the Azure portal

55
Q

Azure Monitor?

A

Metrics and activity logs for most services in Azure.

Can be fed into Log Analytics.

As soon as you create a resource in Azure, Azure Monitor is enabled and starts collecting metrics and activity logs

Logs can be accessed in individual resources under Activity Logs, or in Azure Monitor

Resource logs about operations performed by a resource are also collected, such as getting a key from a keyvault

56
Q

Log Analytics?

A

Correlates Application Insights logs with Azure Monitor logs of the Azure resources that support the app.

Use the Log Analytics agent to push logs into Log Analytics.

57
Q

Collect and analyze resource logs from an Azure resource (steps)

A

Create a Log Analytics workspace in Azure Monitor

Create a diagnostic setting to collect resource logs (where to foward the logs)

Create a simple log query to analyze logs

Create an alert rule that is triggered based off certain conditions (optional)

58
Q

What is an Azure pipeline?

A

Defines the continuous integration and deployment process for your app.

Stages > jobs > steps (task or script)

Stages, jobs, and steps are defined in a YAML file

59
Q

How would one use containers in Ci/CD?

A

repository branch –> Container Registery –> App Service Slot

60
Q

What are the typical deployment slots one might find in CI/CD?

A

Dev
Stage
Master - warm the app here, then swap into production
Production

61
Q

How is App Service charged?

A

Hourly rate based on the pricing tier is applied to each scaled-out instance.

62
Q

Steps for setting up custom domain

A
  1. Create a custom domain (resource) in the Azure Portal
  2. Map it to Azure App (entails creating a DNS record for it in your provider)
  3. Configure SSL/TLS and binding
63
Q

Where do you enable web server logging?

A

Azure Portal –> App Service –> Your App –> App Service Logs

64
Q

How do you enable detailed error messaging and failed request tracing?

A

Azure Portal –> App Service –> Your App –> App Service Logs –> Under Detailed Error Logging or Failed Request Tracing, select On, then select Save.

65
Q

%HOME% directory in an app

A

It may include directories such as those for content, error and diagnostic logs, and earlier versions of the app created by source control. These directories are available to the app’s application code at runtime for read and write access. Because the files are not stored locally, they are persistent across app restarts.

66
Q

Scaling best practice

A

If you have a scale out rule, it is recommended that have a scale IN rule

67
Q

Map a custom domain to you app in App Services

A

Create a CNAME record (custom domain) and TXT record (contains the domain validation ID that proves that we actually own the domain)

68
Q

You are in TLS/SSL settings to add a binding to your custom domain. What are your cert options?

A

Import App Service cert (created in the portal as a resource)
Upload cert
Import Key Vault cert
Create App Service managed cert (newer option - creates a free cert for the app)

69
Q

What are two common metrics to look at in autoscaling rules?

A

CPU usage
HTTP requests

If these run high for longer than 10 minutes, you might want to increase the number of vms until the metric cools down.

70
Q

True or False. Autoscale settings are an Azure Resource Manager resource.

A

True

71
Q

How are autoscale rules organized?

A

Autoscale setting –> 1 or more Autoscale profiles –> 1 or more Autoscale rules (usually scale IN and scale OUT)

You can only have one Autoscale setting per resource.

72
Q

What must happen before an app is deployed in Azure App Services?

A

It must be built by a build provider. Examples of build providers are: Azure Pipelines, Github Actions, App Service Kudu Engine

73
Q

How to avoid interuptions to app during app deployment?

A
  • Run app directly from the ZIP package, without unpacking it.
  • Stop your app or enable offline mode for it during deployment.
  • Deploy to a staging slot with auto swap turned on.
74
Q

What is Kudu?

A

Engine behind a number of features in Azure App Service related to source control based deployment, and other deployment methods like Dropbox and OneDrive sync.

Anytime you create an app, App Service creates a companion Kudu app for it that’s accessible by adding “scm” to the url.

75
Q

When you add, remove, or edit app settings, App Service triggers an app restart. True or False?

A

True

76
Q

How are app settings formatted?

A

Name (key) - Value pairs

77
Q

What happens when Always On is enabled for an app?

A

the front-end load balancer sends a GET request to the application root every five minutes. The continuous ping prevents the app from being unloaded. Otherwise, the app is unloaded after 20 minutes of no incoming requests.

78
Q

App Service provides a managed identity for your app. True or False?

A

True, but it must be enabled using az webapp identity assign

Allows you to connect to back-end services without a connection string.

79
Q

Compare VMs to Azure App Service, Azure Container Instances, and Azure Functions.

A

Use a VM if you require full control of the host environment.
Use an Azcure Container Instance if you need full-fledged orchestration.
Use Azure Functions with event-driven workload with short-lived processes.
Use Azure App Service if you have a new app w/microservices architecture.
Use Azure App Service if it’s an existing app that can’t be containerized.
Use VM if it’s an existing commercial off the shelf app & can’t be containerized

80
Q

What does a request to an HTTP endpoint request typically look like?

A

https://APP_NAME.azurewebsites.net/api/FUNCTION_NAME?code=API_KEY

Note the API_KEY. Most HTTP trigger templates require an API key in the request.

The key can be included in a query string variable named code, as above. It can also be included in an x-functions-key HTTP header.

81
Q

What does the Azure Blob Storage trigger do?

A

Run a function as blob storage data changes (Trigger)
Read blob storage data in a function (Input binding)
Allow a function to write blob storage data (Output binding)

82
Q

What are two alternative triggers that can be used for data operations?

A
  1. Event Grid Trigger also has built-in support for blob events
  2. Queue Storage Trigger can respond to queue messages that correspond to blobs being created or modified