Add Idunn Raven capture mux watchdog
This commit is contained in:
parent
c3a021f96f
commit
6ad39e776e
6 changed files with 55 additions and 1 deletions
|
|
@ -49,7 +49,9 @@ Idunn now shares Odin's Rust body:
|
|||
- `src/Idunn/README.md` is the user-facing introduction for developers,
|
||||
operators, and daemon authors.
|
||||
- `scripts/start-idunn-local.ps1` starts resident local watchdogs, including
|
||||
VoidBot through `health-voidbot.cmd` and `restart-voidbot.cmd`.
|
||||
VoidBot through `health-voidbot.cmd` and `restart-voidbot.cmd`, and Raven's
|
||||
capture mux through `health-raven-capture-mux.cmd` and
|
||||
`restart-raven-capture-mux.cmd`.
|
||||
- `scripts/notify-idunn-operator-alarm.ps1` is the local operator crossing:
|
||||
Idunn invokes it only after raising an operator alarm, and it asks Bifrost to
|
||||
publish a typed `gamecult.operator_dm_request.v1` CultMesh command document
|
||||
|
|
@ -102,6 +104,10 @@ idunn.operator_alarm.v1
|
|||
environment variables to `E:\Projects\Bifrost\tools\operator-notification.mjs
|
||||
publish-idunn-alarm`. Bifrost publishes the typed CultMesh command document;
|
||||
Idunn only decides that an alarm exists.
|
||||
- Raven capture continuity is a remote keepalive path. Idunn probes
|
||||
`http://127.0.0.1:8801/health` through SSH to Raven's WireGuard address
|
||||
`10.77.0.4` and restarts through Mimir's `start-raven-daemon.ps1` with
|
||||
Mimir and OBS SRT targets declared separately.
|
||||
|
||||
## First Runtime Direction
|
||||
|
||||
|
|
|
|||
2
scripts/health-raven-capture-mux.cmd
Normal file
2
scripts/health-raven-capture-mux.cmd
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
@echo off
|
||||
powershell.exe -NoProfile -ExecutionPolicy Bypass -File E:\Projects\Odin\scripts\health-raven-capture-mux.ps1
|
||||
9
scripts/health-raven-capture-mux.ps1
Normal file
9
scripts/health-raven-capture-mux.ps1
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
param(
|
||||
[string] $RavenHost = "10.77.0.4",
|
||||
[string] $HealthUrl = "http://127.0.0.1:8801/health"
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
& ssh.exe -o BatchMode=yes -o ConnectTimeout=5 $RavenHost "curl.exe -fsS $HealthUrl >NUL"
|
||||
exit $LASTEXITCODE
|
||||
2
scripts/restart-raven-capture-mux.cmd
Normal file
2
scripts/restart-raven-capture-mux.cmd
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
@echo off
|
||||
powershell.exe -NoProfile -ExecutionPolicy Bypass -File E:\Projects\Odin\scripts\restart-raven-capture-mux.ps1
|
||||
28
scripts/restart-raven-capture-mux.ps1
Normal file
28
scripts/restart-raven-capture-mux.ps1
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
param(
|
||||
[string] $RavenHost = "10.77.0.4",
|
||||
[string] $MimirRepo = "E:\Projects\Mimir",
|
||||
[string] $TargetHost = "10.77.0.2",
|
||||
[int] $Port = 5200,
|
||||
[string] $ObsTargetHost = "10.77.0.2",
|
||||
[int] $ObsPort = 5204
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
$remoteScript = @"
|
||||
`$ErrorActionPreference = "Stop"
|
||||
`$startScript = Join-Path "$MimirRepo" "scripts\start-raven-daemon.ps1"
|
||||
if (-not (Test-Path -LiteralPath `$startScript)) {
|
||||
throw "Raven Mimir start script not found at `$startScript"
|
||||
}
|
||||
Get-CimInstance Win32_Process |
|
||||
Where-Object { `$_.Name -ieq "dotnet.exe" -and `$_.CommandLine -like "*Mimir.RavenDaemon*" } |
|
||||
ForEach-Object {
|
||||
& taskkill.exe /PID `$_.ProcessId /T /F | Out-Null
|
||||
}
|
||||
& powershell.exe -NoProfile -ExecutionPolicy Bypass -File `$startScript -TargetHost "$TargetHost" -Port $Port -ObsTargetHost "$ObsTargetHost" -ObsPort $ObsPort
|
||||
"@
|
||||
|
||||
$encoded = [Convert]::ToBase64String([Text.Encoding]::Unicode.GetBytes($remoteScript))
|
||||
& ssh.exe -o BatchMode=yes -o ConnectTimeout=10 $RavenHost "powershell.exe -NoProfile -EncodedCommand $encoded"
|
||||
exit $LASTEXITCODE
|
||||
|
|
@ -55,6 +55,13 @@ $watchdogs = @(
|
|||
Restart = "$repoRoot\scripts\restart-voidbot.cmd"
|
||||
IntervalSeconds = 300
|
||||
},
|
||||
[pscustomobject]@{
|
||||
Id = "raven-capture-mux"
|
||||
Name = "Raven capture mux"
|
||||
Verse = "raven.local"
|
||||
Health = "$repoRoot\scripts\health-raven-capture-mux.cmd"
|
||||
Restart = "$repoRoot\scripts\restart-raven-capture-mux.cmd"
|
||||
},
|
||||
[pscustomobject]@{
|
||||
Id = "nightwing-gjallar"
|
||||
Name = "Nightwing Gjallar framebuffer compositor"
|
||||
|
|
|
|||
Loading…
Reference in a new issue