Az-204 App Service Plan
Advantage of Built in authentication
.Azure App Service allows you to integrate a variety of auth capabilities into your web app or API without implementing them yourself. .It's built directly into the platform and doesn't require any particular language, SDK, security expertise, or even any code to utilize. .You can integrate with multiple login providers. For example, Azure AD, Facebook, Google, Twitter.
function app run time support are
.NET core node JS java python PowerShell core
Each App Service plan defines:
.Region (West US, East US, etc.) .Number of VM instances .Size of VM instances (Small, Medium, Large) .Pricing tier (Free, Shared, Basic, Standard, Premium, PremiumV2, PremiumV3, Isolated)
To create any azure service we need
1. Subscription 2.Region 3. Resource groups 4. OS
How to add azure configuration in web application
1. create the key vault in app configuration in azure 2. Web application add the microsoft azure configuration for .net core using npm 3. program.cs in createhostbuilder add the bindings
types of logging
Application logging web server logging deployment logging detailed error logging track logs on real time
to add TlS/ssl settings
Azure has option to create certificate and add it to site using bindings. Or upload the certificate
Deployment slots can created using
Azure portals or CLI
Languages supported by azure function are
C# Javascript Java F# python powershell
run docker containers
Docker on a VM Azure Kubernetes Service Azure Fabric Service Azure App Service
To refer Function App connection string in Visual studio created function user
Environment.EnvironmentVariable("SQLAZURECONSTR_(prefix required)+ connection string name
cloud service model
IAAS PAAS SAAS
Async methods in c# instead of out parameter we should use
IAsyncCollector
Azure function logs class in c#-tracewriter is upgraded to
ILogger
KEDA
Kubernetes Event-Driven autoscaling. helps to set autoscaling for docker container
logging can be found in ---- section of azure web application
Monitoring
Function authorization and authentication is in which section of portal? Advantages of enabling function app authorization and authentication
Networking supports all authentication and authoriztion supported by portal-like microsoft signin, facebook, google..
App Service Plan
Reserved Servers Predictable monthly cost
examples for type of deployment slots
Staging, production....
Deployment slots are only available in the
Standard and Premium plan tiers
Isolate your app into a new App Service plan when:
The app is resource-intensive. You want to scale the app independently from the other apps in the existing plan. The app needs resource in a different geographical region.
workers
The roles that host the customer workload are called
consumption pricing tiers
This tier is only available to function apps. It scales the functions dynamically depending on workload
isolated-pricing tiers
This tier runs dedicated Azure VMs on dedicated Azure Virtual Networks. It provides network isolation on top of compute isolation to your apps. It provides the maximum scale-out capabilities.
Property used to set the proxies in local, portal
WEB_HOST
Types of triggers are
actions like http requests timer message blob creation...
orchestrator function executes
activity function
authentication levels for functions are
anonymous function admin
security for azure functions
api keys indentity provider
App configuration is used
appsetting to be applied for more than one application features to turn on or turn off them
azure cli command for deployment is
az functionapp deployment source config -g MyResourcegroup -n myfunctionapp -src myZip.zip
command line command to create a configuration
az webapp config set
command line command to create a web app of type html
az webapp up --location <location> --name <appln name> --html
Azurewebjobsstorage
azure function run time uses storage connection string except http triggered functions. storage should be general purpose like blob, queues and tables
Azure function code can be in
azure portal -code region visual studio-function in azure portal will NOT have the copy of this file Azure function core tools
cors can be configured in Azure using
azure portal-react or html proj web application under api select cors and enable+ add the source api url cli-az powershell webapp cors....allowed-origin url
TLS binding minimum service plan required is
basic
Hosting containers advantages
can be hosted in on premises or in another cloud provider containers can be hosted Azure -Azure container instance(ACI) -Azure kubernetes service(AKS)
Limitations on hosting function in containers
cannot use consumption pln -Auto scaling has to be done manually
pros of server less application
cheaper, simpler and scalable
Etags in task result parameter helps to prevent
concurrency issues
function hosting models
consumption plan app service plan premium plan Docker container
Azure App Service is a
distributed system
How to validate doamin ownership
domain register site using cname map azure url to domain name click validate again in custom domain and it takes about 10 minutes
pros of azure function
eliminate repetitive boiler plate code focus on core business logic
proxies in portal
environment variable
application logging can be
file sytem-12hrlimit blob
test environment alone minimum service plan required is
free tier
two ways to access application and web server loggings are
ftp to logs url provided in log tab log stream
Azure Functions Core Tools command to start localhost
func start
when do you use query parameter
http get method
when do you get value from body of the request body raw json data
http post method
Azure function in Docker- using image
images out of the box are Azure function dotnet-c#, F# Azure function node for javascript, Azure function python
Function authorization level option in function authorization how it is authorized
in Manage section of the function portal add key at function key (only for a function) or host keys (applies to all the function in the function app) same function/host can have multiple keys-u can use it for different companies or different departments etc Each function call from VScode-pass the the key values in header or in body
Consumption plan
is serverless per second billing 1000000 executions 400000 GB
Azure functions code has
json part--saves the bindings, appsettings required, methods-get or post, run.csx part
zip deployment
kudu api Azure function core tools Azure cli
proxies in local is set in
localsettings.json
Function log error
log errors in web application level or in function log-file storage-/LogFiles/Application/Functions
Azure function can be deployed using
manually git zip
Can a function have more than one trigger
no. exactly one trigger
To add azure features in web app
npm install feature management and use it in program
to find all the possible outbound ip addresses
possibleoutboundipaddresses az webapp show --resource-group <group_name> --name <app_name> --query possibleOutboundIpAddresses --output tsv
premium plan
pre-warned instances VNet integration longer run duration
cloud deployment model
public hybrid private
bindings supported by azure function are
queue, cosmos dB blob storage service bus table storage send grid
changes to function appsettings results in
restart of functions
front ends
roles that handle incoming HTTP or HTTPS requests are called
proxies for azure functions
route incoming requests static website transforms requests and responses
if the function code is built using VS what are changes you will see in azure portal
run.csx file option does not exist function.json file has the scriptfile (dll path)and entrypoint(function name namespace) params
additional features app function
security durable functions proxies
Add custom dns name minimum service plan required is
shared
few categories of pricing tiers
shared compute dedicated compute isolated consumption
why use Azure function
speed up development Reduce cost scale automatically
to create different environment minimum service plan required is
standard
Autoscaling minimum service plan required is basic -
standard basic sacling can be upto 3 but we have to do manually
triggers used for durable function are
starter function orchestrator function( executes) activity function
logging requires
storage configured in azure
To create azure function app we have to define
subscription Resource group runtime-stack url-should be unique publish method-code or docker region storage account plan type-function permium or app service plan operating system
Azure Durable function
to execute a workflow or to run multiple methods in parllel and final function is executed only when all parllel methods/function are done retries and error handling
function apps
unit of deployment share common configuration scale together logically related
proxy-function app
use different name for each function or direct to different destination-like access blob storage add/ remove headers for requests or responses or change body uses proxies.json
application insights
useful for debugging and monitoring sites
can Azure function run on App Service plan
yes. Azure function can run on App Service plan
How to add custom domain?
you have to register a domain name outside azure like godaddy In web app select custom domain option enter the domain name and verify. Now you have to validate domain ownership using cname or txt
Advantage of checking run as package file in VS publish tag
zip file is not unzipped. It is directly used without unzipping while using the app. So it is easy to switch between different version. portal configuration section-Website_run_from_Package