Миграция оркестратора на Debian 13: platform layer, preflight, status/diagnostics и structured logging

This commit is contained in:
2026-05-03 02:16:52 +05:00
parent 18ff86058a
commit 52f1e5d909
12 changed files with 304 additions and 13 deletions
+7 -5
View File
@@ -1,7 +1,8 @@
import type { RuntimeContext } from "../types/context";
import { exists, readText } from "../lib/fs";
import { exists } from "../lib/fs";
import { fail, info } from "../lib/log";
import { run } from "../lib/process";
import { assertPlatform } from "../platform/assert";
async function isTcpPortListening(port: number): Promise<boolean> {
try {
@@ -43,10 +44,11 @@ export async function preflight(context: RuntimeContext): Promise<void> {
fail("sudo is required for installer smoke checks. Install it with: apt-get update && apt-get install -y sudo");
}
const osRelease = await readText("/etc/os-release");
if (!/^ID=debian$/m.test(osRelease) || !/^VERSION_ID="?12"?$/m.test(osRelease)) {
fail("HY2XS baseline supports only clean Debian 12");
}
await assertPlatform({
distro: "debian",
supportedVersions: [13],
architectures: ["amd64"]
});
if (!(await exists(`${context.options.packageDir}/systemd/hy2xs-admin.service`))) {
fail("missing hy2xs-admin systemd unit in package");