This workshop will start with the basics of serverless architectures and explain how Azure Functions play a part in building serverless solutions.
You will learn how to develop Azure Functions using .NET Core and Visual Studio 2019.
Next, you are going to build and deploy these with Azure DevOps using CI/CD.
Also covered is the lifecycle management and operations of serverless solutions.
artifacts: 'flowing' | |
from_pipelines: 'into' | |
cloud: 'environments' |
-
Making sense of Durable Functions blog post by Mikhail Shilkov
-
Serverless on Azure vlog by Marc Duiker
namespace DurableFunctions.Demo.DotNetCore.RetryCallsWithBackup | |
{ | |
public class EscalatingCallsOrchestrator | |
{ | |
[FunctionName(nameof(RunEscalatingCallsOrchestrator))] | |
public async Task RunEscalatingCallsOrchestrator( | |
[OrchestrationTrigger] IDurableOrchestrationContext context, | |
ILogger logger) | |
{ | |
var escalatingCallsInput = context.GetInput<EscalatingCallsInput>(); |
using Microsoft.Azure.WebJobs; | |
using Microsoft.Azure.WebJobs.Extensions.DurableTask; | |
using Microsoft.Extensions.Logging; | |
using System; | |
using System.Collections.Generic; | |
using System.Text; | |
using System.Threading; | |
using System.Threading.Tasks; | |
namespace DurableFunctions.Demo.DotNetCore.EscalateCalls |
ffmpeg -i input.mp4 -af "volume=10dB" -c:v copy -c:a aac -b:a 192k output.mp4 |
$prefix="frame_" | |
$files = Get-ChildItem "<Path where the pngs are>" -Filter *.png | Sort-Object | |
$fileCount = 0 | |
$files | | |
Foreach-Object { | |
$fileCount++ | |
$currentFileNumber = [int]$_.BaseName.Substring($prefix.Length) | |
if ($currentFileNumber -ne $fileCount) { | |
$newFileFormat = "$prefix{0:d4}.png" -f $fileCount | |
Rename-Item $_.FullName $newFileFormat |
This FFmpeg command reads images named frame_[4 char digit].png and converts it to an mp4 using the h264 encoding which Twitter accepts. The bitrate is set to 5M to reduce blocking as much as possible while keeping the size small.
ffmpeg -framerate 10 -i frame_%04d.png -c:v h264_qsv -b:v 5M video.mp4
ffmpeg -i input.mp4 -c:v h264_qsv -vf: scale=1080:-1 -b:v 5M output.mp4
$principalId = az functionapp identity show -n FUNC_APP_NAME -g RESOURCE_GROUP_NAME --query principalId | |
$appId = az ad sp show --id $principalId --query appId | |
az keyvault set-policy -n KEYVAULT_NAME --spn $appId --secret-permissions get |