Миграция оркестратора на Debian 13: platform layer, preflight, status/diagnostics и structured logging
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user