Give Idunn ownership of Yggdrasil VoidBot releases
This commit is contained in:
parent
4ffcf5d8e2
commit
c5d71e1991
7 changed files with 104 additions and 42 deletions
|
|
@ -12,14 +12,17 @@ $deployScriptsWithoutIdunnGuard = @(
|
|||
$IdunnDeploymentTargets |
|
||||
Where-Object { $_.Status -eq "enforced" -and -not [string]::IsNullOrWhiteSpace($_.Deploy) } |
|
||||
Where-Object {
|
||||
if ($_.Deploy -match '^sudo -n /usr/local/libexec/idunn-yggdrasil deploy [a-z0-9-]+$') {
|
||||
return $false
|
||||
}
|
||||
-not (Test-Path -LiteralPath $_.Deploy) -or
|
||||
-not ((Get-Content -Raw -LiteralPath $_.Deploy) -match 'IDUNN_ACTUATOR')
|
||||
-not ((Get-Content -Raw -LiteralPath $_.Deploy) -match 'IDUNN_ACTUATOR')
|
||||
}
|
||||
)
|
||||
$knownActuatorPaths = @{}
|
||||
foreach ($target in $IdunnDeploymentTargets) {
|
||||
foreach ($path in @($target.Deploy, $target.Restart) + @($target.Aliases)) {
|
||||
if (-not [string]::IsNullOrWhiteSpace($path)) {
|
||||
if (-not [string]::IsNullOrWhiteSpace($path) -and (Test-Path -LiteralPath $path)) {
|
||||
$knownActuatorPaths[[System.IO.Path]::GetFullPath($path).ToLowerInvariant()] = $target.Id
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -70,19 +70,6 @@ $IdunnDeploymentTargets = @(
|
|||
Aliases = @()
|
||||
Reason = "Weksa provider state and health are daemon-owned CultMesh/CultNet records; local restart is an Idunn actuator only."
|
||||
},
|
||||
[pscustomobject]@{
|
||||
Id = "voidbot"
|
||||
Repo = "VoidBot"
|
||||
LocalPath = "E:\Projects\VoidBot"
|
||||
Host = "starfire"
|
||||
Service = "VoidBot local stack"
|
||||
Status = "runtime-enforced"
|
||||
Health = "daemon-published-rudp:voidbot.cultnet-rudp-stack-health"
|
||||
Deploy = $null
|
||||
Restart = "$repoRoot\scripts\restart-voidbot.cmd"
|
||||
Aliases = @()
|
||||
Reason = "VoidBot stack health and provider state publish through daemon-owned CultMesh/CultNet records; restart is an Idunn actuator only."
|
||||
},
|
||||
[pscustomobject]@{
|
||||
Id = "starfire-muninn"
|
||||
Repo = "Odin"
|
||||
|
|
@ -166,6 +153,24 @@ $IdunnDeploymentTargets = @(
|
|||
ZeroDowntime = "restart-required"
|
||||
Reason = "Nightwing framebuffer compositor has a committed artifact manifest and automatic Idunn deploy lane."
|
||||
},
|
||||
[pscustomobject]@{
|
||||
Id = "yggdrasil-voidbot"
|
||||
Repo = "VoidBot"
|
||||
LocalPath = "/srv/build/VoidBot"
|
||||
Host = "yggdrasil"
|
||||
Service = "voidbot.service"
|
||||
Status = "enforced"
|
||||
Health = "daemon-published-rudp:voidbot.cultnet-rudp-stack-health"
|
||||
Deploy = "sudo -n /usr/local/libexec/idunn-yggdrasil deploy voidbot"
|
||||
Restart = "sudo -n /usr/local/libexec/idunn-yggdrasil restart voidbot"
|
||||
Aliases = @()
|
||||
UpstreamRemote = "origin"
|
||||
UpstreamBranch = "main"
|
||||
RolloutStrategy = "restart-after-verified-build"
|
||||
StateMigration = "daemon-owned-noop"
|
||||
ZeroDowntime = "restart-required"
|
||||
Reason = "Yggdrasil-local Idunn deploys upstream VoidBot releases through the narrow root-owned manifest; local checkouts have no deployment authority."
|
||||
},
|
||||
[pscustomobject]@{
|
||||
Id = "yggdrasil-bifrost"
|
||||
Repo = "Bifrost"
|
||||
|
|
|
|||
|
|
@ -20,6 +20,14 @@ case "$action:$target" in
|
|||
restart:streampixels)
|
||||
docker compose -f "$compose" restart streampixels-service streampixels-web
|
||||
;;
|
||||
deploy:voidbot|restart:voidbot)
|
||||
manifest="/srv/odin/deploy-manifests/voidbot"
|
||||
if [ ! -x "$manifest" ] || [ ! -O "$manifest" ]; then
|
||||
echo "root-owned executable deploy manifest is not installed: $manifest" >&2
|
||||
exit 1
|
||||
fi
|
||||
exec "$manifest" "$action"
|
||||
;;
|
||||
deploy:heimdall|deploy:repixelizer|deploy:streampixels)
|
||||
manifest="/srv/odin/deploy-manifests/$target"
|
||||
if [ ! -x "$manifest" ] || [ ! -O "$manifest" ]; then
|
||||
|
|
|
|||
|
|
@ -1,10 +0,0 @@
|
|||
@echo off
|
||||
if not "%IDUNN_ACTUATOR%"=="1" (
|
||||
echo restart-voidbot.cmd is an Idunn actuator body. Redeploy by poking Idunn; direct service restart is not an owned path. 1>&2
|
||||
exit /b 1
|
||||
)
|
||||
if /I not "%IDUNN_COMMAND_AUTHORITY%"=="idunn-daemon" (
|
||||
echo restart-voidbot.cmd is an Idunn actuator body. Redeploy by poking Idunn; direct service restart is not an owned path. 1>&2
|
||||
exit /b 1
|
||||
)
|
||||
powershell.exe -NoProfile -ExecutionPolicy Bypass -File E:\Projects\VoidBot\scripts\start-voidbot-stack.ps1
|
||||
Loading…
Reference in a new issue