test(install): assert agent socket access for #293 (#333)
Heimdall Gitea / Detect CI scope (push) Successful in 5s
Heimdall Gitea / Build and tests (push) Successful in 23m29s
Heimdall Gitea / Build and scan server image (push) Skipped
Heimdall Gitea / Build and scan agent image (push) Skipped
Heimdall Gitea / Build and scan NVIDIA Agent image (push) Skipped
Heimdall Gitea / Publish versioned installer release (push) Skipped
Heimdall Gitea / CI policy (push) Successful in 2s
Heimdall Gitea / Detect CI scope (push) Successful in 5s
Heimdall Gitea / Build and tests (push) Successful in 23m29s
Heimdall Gitea / Build and scan server image (push) Skipped
Heimdall Gitea / Build and scan agent image (push) Skipped
Heimdall Gitea / Build and scan NVIDIA Agent image (push) Skipped
Heimdall Gitea / Publish versioned installer release (push) Skipped
Heimdall Gitea / CI policy (push) Successful in 2s
Co-authored-by: Arnaud Dartois <admin@tordais.cc>
This commit was merged in pull request #333.
This commit is contained in:
1 parent
ec80e31e33
commit
c8a428555a
2 files changed
+9
-1
No files matched your search
@@ -45,7 +45,7 @@ For installer, Compose, image, and documentation work that can proceed independe
|
||||
|
||||
## Acceptance
|
||||
|
||||
Run `bash -n install/install-server.sh`, validate PowerShell syntax when `pwsh` is available, and run `docker compose config --quiet` for both the installer output and `docker/docker-compose.prod.yml`. Exercise a first install and a second run against an isolated temporary directory: confirm secrets and nondefault `.env` values are byte-for-byte unchanged, the old Compose is backed up, missing new variables are added once, and no volume removal command appears. Then follow `skills/compose-disposable-recipe/SKILL.md` with a unique project, generated credentials, isolated ports/volumes, and an EXIT cleanup trap installed before build/start. Never connect the recipe to a deployed Docker daemon or production data.
|
||||
Run `bash -n install/install-server.sh`, validate PowerShell syntax when `pwsh` is available, and run `docker compose config --quiet` for both the installer output and `docker/docker-compose.prod.yml`. Exercise a first install and a second run against an isolated temporary directory: confirm secrets and nondefault `.env` values are byte-for-byte unchanged, the old Compose is backed up, missing new variables are added once, and no volume removal command appears. For the Site Install UI, assert generated CPU/GPU Compose and `docker run` references use the signed `image@sha256:` digest, mount `/var/run/docker.sock`, and pass the socket group to the non-root Agent (`DOCKER_GID` in Compose; detected socket GID for Linux `docker run`). Then follow `skills/compose-disposable-recipe/SKILL.md` with a unique project, generated credentials, isolated ports/volumes, and an EXIT cleanup trap installed before build/start. Never connect the recipe to a deployed Docker daemon or production data.
|
||||
|
||||
When a runtime Dockerfile changes for OS security updates, source-build and health-check the corresponding Central/Agent image, then scan its saved image archive with the pinned Trivy version and the same `HIGH,CRITICAL` severities used by CI. Record the finding IDs and fixed package versions; do not hide a nonzero scan behind application acceptance.
|
||||
|
||||
|
||||
@@ -93,6 +93,12 @@ public class SiteDetailTests : PageTestBase
|
||||
compose.ShouldNotContain("ollama");
|
||||
var agent = GetAgentService(ParseCompose(compose));
|
||||
agent.Children.ShouldNotContainKey(new YamlScalarNode("deploy"));
|
||||
var volumes = (YamlSequenceNode)agent.Children[new YamlScalarNode("volumes")];
|
||||
volumes.Children.Select(node => ((YamlScalarNode)node).Value)
|
||||
.ShouldContain("/var/run/docker.sock:/var/run/docker.sock");
|
||||
var groups = (YamlSequenceNode)agent.Children[new YamlScalarNode("group_add")];
|
||||
groups.Children.Select(node => ((YamlScalarNode)node).Value)
|
||||
.ShouldContain("${DOCKER_GID:-0}");
|
||||
var environment = (YamlMappingNode)agent.Children[new YamlScalarNode("environment")];
|
||||
((YamlScalarNode)environment.Children[new YamlScalarNode("Agent__InferenceExecutionProvider")]).Value.ShouldBe("CPU");
|
||||
});
|
||||
@@ -160,6 +166,8 @@ public class SiteDetailTests : PageTestBase
|
||||
run.ShouldContain("--gpus all");
|
||||
run.ShouldContain("Agent__InferenceExecutionProvider=CUDA");
|
||||
run.ShouldContain("registry.example/heimdall-agent-gpu@sha256:" + new string('b', 64));
|
||||
run.ShouldContain("--group-add \"$(stat -c '%g' /var/run/docker.sock)\"");
|
||||
run.ShouldContain("-v /var/run/docker.sock:/var/run/docker.sock");
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user