Skip to content

Latest commit

 

History

History
116 lines (76 loc) · 3.35 KB

File metadata and controls

116 lines (76 loc) · 3.35 KB

Jarvis Runtime Deployment (Application to VM)

Note: This guide covers deploying the Jarvis application to an Azure VM.
For infrastructure deployment (creating the Azure resources), see:


Prerequisites

Before deploying the application, ensure:

  1. Azure infrastructure deployed (VM, OpenAI, Speech, etc.)
    • Use Bicep templates: .\scripts\infra\Deploy-Infrastructure.ps1
  2. Entra ID app registration created
    • Use script: .\scripts\infra\Create-EntraApp.ps1
  3. VM configured (.NET Runtime, SSL cert, firewall)
    • Use script: .\scripts\infra\Configure-VM.ps1 (run on VM)
  4. Environment variables set in Azure Key Vault
    • Bot App ID and Password stored

Deployment Steps

1. Build and Package Application

# Build Release
dotnet build JarvisMeetingAssistant.sln -c Release
# Publish (repo-local folder)
dotnet publish .\src\MeetingBot\MeetingBot.csproj -c Release -o .\publish\JarvisApp
# Zip published output (creates JarvisApp.zip at repo root)
Compress-Archive -Path .\publish\JarvisApp\* -DestinationPath .\JarvisApp.zip -Force
  1. Copy JarvisApp.zip to VM (RDP drag & drop to Desktop)

  2. Extract on VM

Remove-Item -Recurse -Force C:\JarvisApp\* 2>$null
Expand-Archive -Path C:\Users\azureuser\Desktop\JarvisApp.zip -DestinationPath C:\JarvisApp -Force
  1. Set environment variables (elevated PowerShell)

Thumbprint binding only (import cert into LocalMachine\My first):

setx CERTIFICATE_THUMBPRINT 0DAB25EA7C57208F9D05E9825801E150D33A530B /M
setx APP_PORT 8080 /M
  1. Start application (non-container, non-service)
cd C:\JarvisApp
dotnet .\MeetingBot.dll
  1. Validate listeners (second PowerShell)
netstat -ano | findstr :8080
netstat -ano | findstr :443
  1. Health checks
# HTTP local
Invoke-WebRequest -Uri http://localhost:8080/healthz | Select-Object StatusCode
# HTTPS must use FQDN (cert CN/SAN = jarvis.aicollaborator.net). `https://localhost` would fail trust.
Invoke-WebRequest -Uri https://jarvis.aicollaborator.net/healthz | Select-Object StatusCode
  1. External TLS check (optional from another machine)
# PowerShell: use Invoke-WebRequest alias-safe form (HEAD request)
Invoke-WebRequest -Uri https://jarvis.aicollaborator.net/healthz -Method Head | Select-Object StatusCode, Headers

# (Optional) If you want native curl instead of PowerShell alias, call curl.exe explicitly:
curl.exe -I https://jarvis.aicollaborator.net/healthz
  1. Bot callback probe (TLS reachability)
Invoke-WebRequest -Uri https://jarvis.aicollaborator.net/api/calling/callback -Method POST -Body '{}' -ContentType 'application/json'
  1. (Optional) Update Bot Service endpoint if changed
./scripts/Update-BotEndpoint.ps1 -Endpoint "https://jarvis.aicollaborator.net/api/messages"
  1. Audio / wake word tests (after successful TLS & callback logs)

Notes:

  • Do not use https://localhost for certificate validation; hostname must match FQDN.
  • Re-run steps 1–3 only when code changes; otherwise skip to 4 for redeploy.
  • Keep this file updated if steps change.