Commit graph

21 commits

Author SHA1 Message Date
0b0d326892
Add net-snmp base image as CI prerequisite
The ensure-netsnmp-base jobs check if the pre-built image exists in
GHCR before any Docker builds start. First run compiles from source
on native runners (~5 min), subsequent runs skip with a ~5s check.

build-branch and build-release now depend on ensure-netsnmp-manifest.
2026-02-11 08:01:23 -06:00
2386f0d5a5
Upgrade net-snmp to 5.9.5.2 to fix SIGSEGV in SNMP walks
Alpine 3.23 ships net-snmp 5.9.4 which has segfault bugs in varbind
construction and buffer overflows in octet string handling. Version
5.9.5.2 fixes these issues.

Adds a pre-built base image (Dockerfile.netsnmp) compiled from source
so the net-snmp build doesn't run on every agent deploy. The base
image is built separately via the netsnmp-base workflow and referenced
in the main Dockerfile.
2026-02-10 17:58:43 -06:00
0db587338e
Use Blacksmith runner for amd64 release build
Switches from ubuntu-latest (2 vCPU) to blacksmith-4vcpu-ubuntu-2404
to match the arm64 build runner and speed up Rust compilation.
2026-02-10 16:52:59 -06:00
6bb33d1f8a
Update CI Rust toolchain to 1.93 to match Docker build 2026-02-10 15:30:15 -06:00
c3e411a565 Fix AMD64 FFI crash by using native AMD64 runners
The AMD64 builds were crashing due to cross-compilation. Blacksmith runners
are ARM64, so when building linux/amd64 on them, Docker uses QEMU emulation
which breaks the C FFI code in native/snmp_helper.c.

Solution:
- AMD64 builds now use GitHub's ubuntu-latest runners (native x86_64)
- ARM64 builds continue using Blacksmith ARM64 runners (native)
- Both architectures now build natively, eliminating FFI segfaults
2026-02-10 15:07:53 -06:00
28571b0243
Add webhook notification step to release workflow
After publishing a GitHub Release, notify towerops.net to trigger
mass agent updates via the new webhook endpoint.
2026-02-10 13:40:49 -06:00
b0f3b57671
Add restart and self-update handlers, publish standalone binaries
Handle server-initiated restart (exit for Docker restart) and
self-update (download binary, verify SHA256, replace via exec)
commands received over the WebSocket channel. Report architecture
in heartbeat so the server can select the correct binary.

- Add restart and update handlers in websocket_client.rs
- Add self_update() with download, checksum verification, and exec
- Add arch field to AgentHeartbeat protobuf
- Add reqwest and sha2 dependencies
- chown binary in Dockerfile for non-root self-update
- Extract standalone binaries from Docker images in CI
- Create GitHub Releases with binary assets on version tags
2026-02-10 13:06:23 -06:00
0cb673d9c4
Mirror release images to Docker Hub for legacy agent updates
Agents deployed with the old Docker Hub image (gmcintire/towerops-agent)
auto-update via Watchtower. This pushes release builds to both GHCR and
Docker Hub so those agents continue receiving updates.
2026-02-10 11:28:27 -06:00
ded4aba536
Add stickydisk caching for cargo git deps and Rust toolchain
- Cache ~/.cargo/git for git-sourced dependencies
- Cache ~/.rustup to avoid re-downloading toolchain each run
- Move format check before cargo check (fail fast on formatting)
2026-02-10 08:55:47 -06:00
62f0e1572a
Add libsnmp-dev to CI test dependencies
The test job needs net-snmp headers to compile the native snmp_helper.c
2026-02-10 08:21:38 -06:00
5ecada7646
cache improvements in ci 2026-02-02 13:44:40 -06:00
667045c34b
use blacksmith for amd64 build too 2026-02-02 13:39:51 -06:00
blacksmith-sh[bot]
720b56544b
Migrate workflows to Blacksmith 2026-02-02 19:34:56 +00:00
2bf47951cd
fix: use correct GitHub ARM runner label (ubuntu-24.04-arm) 2026-02-02 12:50:28 -06:00
998c4c4471
fail fast in ci 2026-02-02 12:45:43 -06:00
fbf2435165
build arm/amd in parallel natively 2026-02-02 12:29:35 -06:00
fa42254cfb
ci cache improvements 2026-02-01 08:28:56 -06:00
72ea5d56f0
improve ci speed 2026-01-31 17:21:09 -06:00
4254f47ea5
github release fix 2026-01-31 17:01:09 -06:00
be054323a6
more caching in github ci 2026-01-31 16:53:25 -06:00
5636b00f33
add github ci 2026-01-31 16:48:28 -06:00