The installer knew one distribution: Debian, with docker, on a new enough release. Everything else it would have offered and then failed at. Three facts now decide what the matrix offers, and each is read from the machine rather than assumed: - The container runtime. Docker where the machine has one, podman on the Red Hat family, which ships no docker at all. Both go through the same compose plugin: compose speaks the Docker API and podman serves it, so there is one compose file and one deployment path, not two. Telling a Fedora operator to add Docker's own repository to a machine that already has a container runtime would have been the wrong trade. - glibc. The server binary is downloaded, not built here, and it is linked against 2.39. Rocky 9 (2.34), Debian 12 and Ubuntu 22.04 cannot run it, so the host shape is refused there with the version found and the container shape named as the answer -- rather than installing a file that cannot start. - The operating system itself. This compiles for macOS and Windows because Go compiles anything, and on either it would read no os-release, find no systemd, and describe a machine that does not exist. It now says what it is and exits. Two bugs the other distributions found, both of which Debian could not have: - The survey reported the first thing in the way and stopped, so on Fedora it asked to start podman.socket, and then -- having done it -- asked for the compose plugin. Needs are named now, not described, and reported together. - apply used the survey taken before dependencies were installed, so on a machine that had no runtime at all it installed podman and then reached for docker. It re-surveys after resolving, and stops if containers still are not usable. The lab takes DISTRO now: debian13, debian12, ubuntu2404, fedora, rocky9, arch, each with its own disk and ssh port so several can be up at once. The cases no longer say "docker" either. install-local passes on Debian 13, Fedora 43 and Rocky 9 -- 20 checks each, ending with a sign-in to the webmail the installer put there.
37 lines
1.4 KiB
Bash
Executable File
37 lines
1.4 KiB
Bash
Executable File
#!/bin/bash
|
|
# SPDX-FileCopyrightText: 2026 Coffey Labs
|
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
#
|
|
# Build the installer, copy it into the lab machine, and run a case there.
|
|
#
|
|
# e2e/vm/run.sh e2e/cases/containers.sh rewind, then run that case
|
|
# KEEP=1 e2e/vm/run.sh e2e/cases/hosts.sh run it on the machine as it is
|
|
#
|
|
# The rewind is the point: every case starts on an identical machine, so a
|
|
# failure is the installer's and not the last run's leftovers.
|
|
set -euo pipefail
|
|
CASE="${1:?usage: run.sh e2e/cases/<case>.sh}"
|
|
ROOT="$(cd "$(dirname "$0")/../.." && pwd)"
|
|
. "$(dirname "$0")/lib.sh"
|
|
|
|
DISTRO="${DISTRO:-debian13}"
|
|
LAB="${LAB:-$HOME/.cache/inbuxa-lab/$DISTRO}"
|
|
MEM="${MEM:-4096}"; VCPUS="${VCPUS:-2}"; SSH_PORT="${SSH_PORT:-$(distro_port "$DISTRO")}"
|
|
DISK="$LAB/lab.qcow2"; CLEAN="$LAB/lab-clean.qcow2"; SEED="$LAB/seed.iso"
|
|
LOG="$LAB/console.log"; PIDFILE="$LAB/qemu.pid"
|
|
|
|
[ -f "$ROOT/$CASE" ] || { echo "no such case: $CASE" >&2; exit 1; }
|
|
[ "${KEEP:-}" = 1 ] || "$(dirname "$0")/reset.sh"
|
|
vm_running || { echo "the lab is not up -- run e2e/vm/up.sh" >&2; exit 1; }
|
|
|
|
echo "==> building the installer"
|
|
(cd "$ROOT" && GOOS=linux GOARCH=amd64 go build -o "$LAB/inbuxa" ./cmd/inbuxa)
|
|
|
|
echo "==> copying it in"
|
|
vm_scp "$LAB/inbuxa" [email protected]:/tmp/inbuxa >/dev/null
|
|
vm_scp "$ROOT/$CASE" [email protected]:/tmp/case.sh >/dev/null
|
|
vm_ssh 'chmod +x /tmp/inbuxa /tmp/case.sh'
|
|
|
|
echo "==> running $(basename "$CASE")"
|
|
vm_ssh 'sudo -E bash /tmp/case.sh'
|