proxmox-install: build agent binary for serving
CI / Lint + build + test (push) Failing after 5m22s

The agent binary is never run on the LXC, but it has to be present
so /assets/vetting-agent-linux-amd64 can serve it to target hosts
via the quick-register one-liner. Install was failing because only
orchestrator-linux was being built.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-04-18 00:12:41 -04:00
parent af41644929
commit a3d5e2d0a4
+11 -6
View File
@@ -10,9 +10,14 @@
# 2. Drops Go into /usr/local/go if a recent enough toolchain isn't # 2. Drops Go into /usr/local/go if a recent enough toolchain isn't
# already present. # already present.
# 3. Clones the repo to /opt/vetting-src (or pulls latest if already # 3. Clones the repo to /opt/vetting-src (or pulls latest if already
# there), then `make orchestrator-linux`. # there), then `make orchestrator-linux agent-linux`. The agent
# 4. Hands off to deploy/install.sh to lay down the binary, the # binary isn't run on the LXC — it's only built so the LXC can
# systemd unit, the example config, and the vetting user. # serve it at /assets/vetting-agent-linux-amd64 for target hosts
# to fetch via the quick-register one-liner.
# 4. Hands off to deploy/install.sh to lay down the orchestrator
# binary, the agent binary (into /var/lib/vetting/assets for
# serving), the systemd unit, the example config, and the
# vetting user.
# #
# Override via env: GO_VERSION, TEMPL_VERSION, SRC_DIR, BRANCH, REPO_URL. # Override via env: GO_VERSION, TEMPL_VERSION, SRC_DIR, BRANCH, REPO_URL.
set -euo pipefail set -euo pipefail
@@ -69,9 +74,9 @@ fi
echo "==> installing templ ${TEMPL_VERSION}" echo "==> installing templ ${TEMPL_VERSION}"
GOBIN=/usr/local/bin go install "github.com/a-h/templ/cmd/templ@${TEMPL_VERSION}" GOBIN=/usr/local/bin go install "github.com/a-h/templ/cmd/templ@${TEMPL_VERSION}"
echo "==> building orchestrator (make orchestrator-linux)" echo "==> building orchestrator + agent (make orchestrator-linux agent-linux)"
cd "${SRC_DIR}" cd "${SRC_DIR}"
make orchestrator-linux make orchestrator-linux agent-linux
echo "==> running deploy/install.sh" echo "==> running deploy/install.sh"
bash deploy/install.sh --binary "bin/vetting-linux-amd64" bash deploy/install.sh --binary "bin/vetting-linux-amd64"
@@ -81,7 +86,7 @@ cat <<EOF
vetting source is at ${SRC_DIR}. vetting source is at ${SRC_DIR}.
To upgrade later, rerun this one-liner, or from the source dir: To upgrade later, rerun this one-liner, or from the source dir:
cd ${SRC_DIR} && git pull && make orchestrator-linux \\ cd ${SRC_DIR} && git pull && make orchestrator-linux agent-linux \\
&& sudo ./deploy/install.sh --binary bin/vetting-linux-amd64 \\ && sudo ./deploy/install.sh --binary bin/vetting-linux-amd64 \\
&& sudo systemctl restart vetting && sudo systemctl restart vetting