Document local cloud startup and harden persistence

This commit is contained in:
Jacob Dubin
2026-05-25 00:30:41 -05:00
parent c36a01b142
commit 4e816e175a
17 changed files with 517 additions and 9 deletions

View File

@@ -2,6 +2,12 @@
These scripts help exercise the new .NET hosted cloud locally.
- `Start-OpenJiboDotNet.ps1`
Starts the current `.NET` cloud with local capture directories configured.
- `Start-OpenJiboNode.ps1`
Starts the legacy Node protocol oracle from `src/Jibo.Cloud/node`.
- `Start-OpenJiboPlayground.ps1`
Starts the direct local Jibo ASR/TTS Playground demo.
- `Invoke-CloudSmoke.ps1`
Runs a few quick HTTP checks against a local OpenJibo cloud instance.
- `Invoke-ProtocolFixture.ps1`
@@ -26,3 +32,5 @@ These scripts help exercise the new .NET hosted cloud locally.
Bash summary helper for captured websocket telemetry and exported fixtures.
- `import-websocket-capture-fixture.py`
Cross-platform import/sanitization helper for exported websocket fixtures.
See [docs/local-cloud-quickstart.md](../../docs/local-cloud-quickstart.md) for the full local setup guide.

View File

@@ -0,0 +1,41 @@
param(
[string]$ProjectPath = "src/Jibo.Cloud/dotnet/src/Jibo.Cloud.Api/Jibo.Cloud.Api.csproj",
[string]$LaunchProfile = "Jibo.Cloud.Api",
[string]$CaptureRoot = "captures",
[switch]$UseAzureBlobProfile,
[switch]$NoLaunchProfile
)
$ErrorActionPreference = "Stop"
$repoRoot = [System.IO.Path]::GetFullPath((Join-Path $PSScriptRoot "..\.."))
$resolvedProjectPath = [System.IO.Path]::GetFullPath((Join-Path $repoRoot $ProjectPath))
$resolvedCaptureRoot = [System.IO.Path]::GetFullPath((Join-Path $repoRoot $CaptureRoot))
$webSocketCaptureDirectory = Join-Path $resolvedCaptureRoot "websocket"
$httpCaptureDirectory = Join-Path $resolvedCaptureRoot "http"
if (-not (Test-Path -LiteralPath $resolvedProjectPath)) {
throw "Could not find .NET API project at $resolvedProjectPath"
}
New-Item -ItemType Directory -Force -Path $webSocketCaptureDirectory | Out-Null
New-Item -ItemType Directory -Force -Path $httpCaptureDirectory | Out-Null
$env:OpenJibo__Telemetry__DirectoryPath = $webSocketCaptureDirectory
$env:OpenJibo__ProtocolTelemetry__DirectoryPath = $httpCaptureDirectory
if ($UseAzureBlobProfile) {
$LaunchProfile = "Jibo.Cloud.Api.AzureBlob"
}
Write-Host "Starting OpenJibo .NET cloud"
Write-Host " - project: $resolvedProjectPath"
Write-Host " - websocket captures: $webSocketCaptureDirectory"
Write-Host " - http captures: $httpCaptureDirectory"
if ($NoLaunchProfile) {
Write-Host " - launch profile: disabled"
dotnet run --project $resolvedProjectPath --no-launch-profile
} else {
Write-Host " - launch profile: $LaunchProfile"
dotnet run --project $resolvedProjectPath --launch-profile $LaunchProfile
}

View File

@@ -0,0 +1,45 @@
param(
[string]$NodeDirectory = "src/Jibo.Cloud/node",
[switch]$Install
)
$ErrorActionPreference = "Stop"
$repoRoot = [System.IO.Path]::GetFullPath((Join-Path $PSScriptRoot "..\.."))
$resolvedNodeDirectory = [System.IO.Path]::GetFullPath((Join-Path $repoRoot $NodeDirectory))
$serverPath = Join-Path $resolvedNodeDirectory "open-jibo-link.js"
$packagePath = Join-Path $resolvedNodeDirectory "package.json"
$certPath = Join-Path $resolvedNodeDirectory "cert.pem"
$keyPath = Join-Path $resolvedNodeDirectory "key.pem"
if (-not (Test-Path -LiteralPath $serverPath)) {
throw "Could not find Node server at $serverPath"
}
if (-not (Test-Path -LiteralPath $packagePath)) {
throw "Could not find package.json at $packagePath"
}
if ($Install -or -not (Test-Path -LiteralPath (Join-Path $resolvedNodeDirectory "node_modules"))) {
Write-Host "Installing Node dependencies"
npm install --prefix $resolvedNodeDirectory
}
if (-not (Test-Path -LiteralPath $certPath) -or -not (Test-Path -LiteralPath $keyPath)) {
Write-Warning "cert.pem and key.pem are not present in $resolvedNodeDirectory."
Write-Warning "The Node oracle expects those files because it binds HTTPS on port 443."
Write-Warning "Use the same dev certificate material that your controlled Jibo routing already trusts."
}
Write-Host "Starting OpenJibo Node protocol oracle"
Write-Host " - directory: $resolvedNodeDirectory"
Write-Host " - server: $serverPath"
Write-Host " - port: 443"
Push-Location $resolvedNodeDirectory
try {
node .\open-jibo-link.js
}
finally {
Pop-Location
}

View File

@@ -0,0 +1,20 @@
param(
[string]$ProjectPath = "src/Playground/Playground.csproj"
)
$ErrorActionPreference = "Stop"
$repoRoot = [System.IO.Path]::GetFullPath((Join-Path $PSScriptRoot "..\.."))
$resolvedProjectPath = [System.IO.Path]::GetFullPath((Join-Path $repoRoot $ProjectPath))
if (-not (Test-Path -LiteralPath $resolvedProjectPath)) {
throw "Could not find Playground project at $resolvedProjectPath"
}
Write-Host "Starting OpenJibo Playground"
Write-Host " - project: $resolvedProjectPath"
Write-Host " - mode: direct local Jibo ASR/TTS client"
Write-Host ""
Write-Host "When prompted, enter the Jibo IP address on your local network."
dotnet run --project $resolvedProjectPath