Route Muninn discovery through Odin
This commit is contained in:
parent
8d5ab06057
commit
1f61494dba
2 changed files with 16 additions and 8 deletions
|
|
@ -12,6 +12,7 @@ param(
|
|||
[string] $IdunnDaemon = "nightwing-muninn",
|
||||
[string] $IdunnHealthContract = "muninn.cultnet-rudp-remote-telemetry-and-move-hid",
|
||||
[string] $OdinCultMeshUri = $(if ($env:ODIN_CULTMESH_URI) { $env:ODIN_CULTMESH_URI } else { "cultmesh://odin/rendezvous/provider-catalog" }),
|
||||
[string] $OdinCultMeshRudpEndpoint = $(if ($env:CULTMESH_URI_ODIN_RUDP) { $env:CULTMESH_URI_ODIN_RUDP } else { "10.77.0.2:17871" }),
|
||||
[string] $HidControllerRudpBind = "0.0.0.0:17888",
|
||||
[string] $HidControllerRudpAdvertise = $(if ($env:MUNINN_HID_CONTROLLER_RUDP_ADVERTISE) { $env:MUNINN_HID_CONTROLLER_RUDP_ADVERTISE } else { "10.77.0.3:17888" })
|
||||
)
|
||||
|
|
@ -140,7 +141,7 @@ set -- "`$@" \
|
|||
--idunn-health-contract '$IdunnHealthContract'
|
||||
$odinCultMeshUriSetBlock
|
||||
$hidControllerRudpSetBlock
|
||||
nohup '$MuninnExe' "`$@" \
|
||||
CULTMESH_URI_ODIN_RUDP='$OdinCultMeshRudpEndpoint' nohup '$MuninnExe' "`$@" \
|
||||
> '$LogRoot/muninn-serve.out.log' \
|
||||
2> '$LogRoot/muninn-serve.err.log' \
|
||||
< /dev/null &
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ param(
|
|||
[string] $IdunnDaemon = "starfire-muninn",
|
||||
[string] $IdunnHealthContract = "muninn.cultnet-rudp-local-telemetry-and-quest-access",
|
||||
[string] $OdinCultMeshUri = $(if ($env:ODIN_CULTMESH_URI) { $env:ODIN_CULTMESH_URI } else { "cultmesh://odin/rendezvous/provider-catalog" }),
|
||||
[string] $OdinCultMeshRudpEndpoint = $(if ($env:CULTMESH_URI_ODIN_RUDP) { $env:CULTMESH_URI_ODIN_RUDP } else { "127.0.0.1:17871" }),
|
||||
[string] $HidControllerRudpBind = "0.0.0.0:17888",
|
||||
[string] $HidControllerRudpAdvertise = $(if ($env:MUNINN_HID_CONTROLLER_RUDP_ADVERTISE) { $env:MUNINN_HID_CONTROLLER_RUDP_ADVERTISE } else { "10.77.0.2:17888" })
|
||||
)
|
||||
|
|
@ -91,13 +92,19 @@ $lockPath = "$StorePath.lock"
|
|||
function Start-MuninnServeProcess {
|
||||
param([string[]] $ArgumentList)
|
||||
|
||||
$process = Start-Process `
|
||||
-FilePath $MuninnExe `
|
||||
-ArgumentList $ArgumentList `
|
||||
-WindowStyle Hidden `
|
||||
-PassThru `
|
||||
-RedirectStandardOutput $serveOutLog `
|
||||
-RedirectStandardError $serveErrLog
|
||||
$previousOdinEndpoint = $env:CULTMESH_URI_ODIN_RUDP
|
||||
try {
|
||||
$env:CULTMESH_URI_ODIN_RUDP = $OdinCultMeshRudpEndpoint
|
||||
$process = Start-Process `
|
||||
-FilePath $MuninnExe `
|
||||
-ArgumentList $ArgumentList `
|
||||
-WindowStyle Hidden `
|
||||
-PassThru `
|
||||
-RedirectStandardOutput $serveOutLog `
|
||||
-RedirectStandardError $serveErrLog
|
||||
} finally {
|
||||
$env:CULTMESH_URI_ODIN_RUDP = $previousOdinEndpoint
|
||||
}
|
||||
$process.Id | Set-Content -Encoding ASCII -LiteralPath $pidPath
|
||||
return $process
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue