- Isolated/dedicated environment for securely running App Service apps.
- High scale: Multiple ASEs can be used to scale horizontally
- Isolation and secure network access
- Isolated running only one customers applications.
- Always deployed into a VNet.
- Can have network security groups (NSGs) to control inbound & outbound traffic.
- Can have web application firewalls (WAFs)
- It's deployed on App Service Plan.
- Can run Web Apps, Docker containers, Mobile Apps, Functions
- Pricing: comes with its own pricing tier "Isolated offering"
- ❗ Limitations
- Everything in-between from
- Single instance in 100 app service plans
- 100 instances in a single App Service plan
- Everything in-between from
- Consists of two parts
- Front-ends: Responsible for HTTP/HTTPS termination, automatic load balancing.
- Workers: Host customer apps. Three fixed size:
- One VPU/3.5 GB RAM,Two vCPU/7GB RAM, Four vCPU/14 GB RAM
- VNET Integration exists only in Standard, Premium, Isolated.
- Create an Azure Service Web App
- Create resource group => Create app service plan => Create web app => Deploy the app
- Choose Docker image
- or with deployment configuration file for Docker Compose / Kubernetes image from Azure Container Registry, Docker Hub, Private Registry.
- Web App for Containers vs Azure Container Instances
- Web Apps for Containers
- Deploy web applications on Linux using containers
- Azure Container Instances
- Easy way to run containers on Azure with a single command without any orchestration.
- Web Apps for Containers
-
Background tasks that enables you to run a program or script in the same context as a web app.
- E.g.
.cmd
,.bat
,.exe
,.ps1
,.sh
,.php
,.py
,.js
,.jar
- E.g.
-
To create you can have CI/CD from GitHub or upload
.zip
containing your WebJob directly. -
Set "Always On" for reliability.
-
📝 Scheduled vs continuous
Context Scheduled Continuous Start When scheduled or triggered manually. Immediately. Runs in an endless loop. Multiple instances of WebJobs On a single instance that's load balanced. Runs all on instances Remote debugging Not supported Supported Scaling Not supported Determines whether the program or script runs on all instances or just one instance. ❗ Not possible on Free or Shared pricing tiers.
- Swagger is set of tools around OpenAPI (JSON standard to define APIs)
- Swashbuckle
-
.NET Core package that builds swagger documents from code.
-
Embeds UI for customizing swagger documents.
-
Set up:
- In
Startup.ConfigureServices
:services.AddSwaggerGen(c => c.SwaggerDoc("v1", new Info { Title = "My API", Version = "v1" }));
- You can here document other information such as Contact, License, TermsOfService, and Description.
- In
-
Enable middleware & set-up json UI in
Startup.Configure
:app.UseSwagger(); app.UseSwaggerUI(c => c.SwaggerEndpoint("/swagger/v1/swagger.json", "My API V1");
- Swagger is then accessible at
/swagger/v1/swagger.json
and/swagger
- Swagger is then accessible at
-
Build swagger from XML documentation:
-
Enable XML documentation file in .csproj:
<GenerateDocumentationFile>true</GenerateDocumentationFile>
-
You'll get warning for undocumented types and members.
- You can suppress them with inline code or set
<NoWarn>$(NoWarn);1591</NoWarn>
in.csproj
.
- You can suppress them with inline code or set
-
In
Startup.ConfigureServices
enable XML documents via reflection:c.IncludeXmlComments(Path.Combine(AppContext.BaseDirectory, $"{Assembly.GetExecutingAssembly().GetName().Name}.xml"));
-
You can then just XML document Action results with
<summary>
and<param name ="id">
tags.
-
-
- Declaring models with attributes
- You can set attributes on view models such as
[Required]
or[DefaultValue(false)]
- On controller you can use
[Produces("application/json")]
- On actions you can use
[ProducesResponseType(201)]
and then document with<response code="201"/>
XML tag.
- You can set attributes on view models such as
- IPaaS: Integration Platform as a Service
- Automate tasks & integrates apps, data, systems and services by automating tasks and business processes as workflows.
- Workloads e.g.:
- Move uploaded file from an SFTP or FTP server to Azure Storage.
- Process and route orders across on-premises systems and cloud services.
- Monitor tweets for a specific subject, analyze the sentiment, and create alerts or tasks for items that need review.
- 200+ integrations such as Service Bus, Functions, Microsoft 365, Oracle DB etc.
- Each connector provides triggers and/or actions specifically.
- Enterprise Integration Pack
- Handles B2B integrations, like BizTalk.
- Can handle different protocols such as As2, X12, EDIFACT
- Can transform different formats.
- Support for encryption & digital signatures.
- Flow
- Create an integration account in the portal => Add partners, schemas, artifacts, maps & agreements (reusable artifacts) => Create logic map => Link Logic app to the account => In Logic App, you can use partners and other artifacts from the integration account.
- You can have custom connectors.
- They're function-based (Azure Functions).
- Flow: Build your API => Describe your API (Swagger/OpenAPI) and define connector => Use connector => (Optional) Share & Verify your connector
- Applications are defined in a JSON file, they support ARM.
- You can use Azure portal or Visual Studio.
- Visual Studio
- You can add apps to source control, publish different versions.
- Flow: New > Project => Visual C# => Select Resource Group => Modify
LogicApp.json
=> Deploy
- Visual Studio