Skip to content

inhifistereo/traduire

Repository files navigation

Traduire

Overview

This is an application to demonstrates various Azure services. It will transcribe an audio podcast (up to 50mb in size) to text using Azure Cognitive Services. It uses the Saga pattern and Virtual Actors to manage the transcription process. It uses Dapr as the distributive runtime to manage communication between the various service components. The application exposes both a REST API consumed by a React-based UI and a gRPC API consumed by a commandline application

Languages

  • C# and dotnet 8
  • PowerShell
  • Hashicorp Terraform

Components

Component Usage
Azure Kubernetes Service Container Orchestration Runtime Platform
Azure Blob Storage Podcast Storage
Azure Cognitive Services Service that does actual transcription
Azure Service Bus Pubsub
Azure Web PubSub Real-time UI upates
Azure Static Web Apps Hosting platform for React UI
Azure PosgreSQL Backing store
Azure Key Vault Secret store
Kong API Gateway
Keda Autoscaler for saga components

Architecture

Dapr

Deployment

Prerequisite

Or use DevContainer

  • A Linux machine or Windows Subsytem for Linux or Docker for Windows
  • PowerShell 7 in Linux/WSL
  • Azure Cli and an Azure Subscription
  • Terraform
  • Kubectl
  • Helm 3
  • Docker
  • Azure subscription with Owner access permissions
  • AKS Preview Features
    • Script requires /usr/bin/watch which is not part of the default bash shell on macos.
    • Run brew install watch to install on macos

Infrastructure

  • pwsh
  • cd ./scripts
  • ./create_infrastructure.ps1 -Subscription BJD_AZ_SUB01 -Region southcentralus

Application Deployment

  • pwsh
  • cd ./scripts
  • ./deploy_application.ps1 -AppName $AppName -Subscription BJD_AZ_SUB01 -DomainName bjdazure.tech [-SkipBuild] [-BuildOnly] [-upgrade] -verbose
  • Update the DNS record of Uri to the IP Address returned by the script

UI Deployment

  • pwsh
  • cd ./scripts
  • ./deploy_ui.ps1 -AppName $AppName -DomainName bjdazure.tech -Verbose

Validate

Automated with Playwright

  • bash
  • cd ./scripts
  • ./run-tests.sh traduire.bjd.tech #Or whatever your default Url from Azure Static Web Apps
  • Playwright will test the UI functionality and display the trace on completion. Playwright

Manually

  • Launch Browser
  • Navigate to the URI outputed by the deploy_ui.ps1
    • Azure Static Website supports custom domain names, if desired.
  • Select and upload any podcast.
  • Click 'Check Status' to watch the transcription go through its stages
  • Then the final result should be:
    UI

Backlog

  • Add null_resource to bin Keda's identity to cluster
  • Test Cluster creation with new Terraform and Flux extension
  • Update Helm Chart - Service Accounts/Deployments
  • Test applciation deployment
  • Validate application functionality
  • Update to Workload Identity
  • Update React UI to Next.js
  • Update to dotnet8
  • Deployment Updates
  • Swap Cognitive Services with OpenAI

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published