Add Linux Fleet Node packaging and installer - #970
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cf88a9078d
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
cf88a90 to
e2bf384
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e2bf384783
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cf1fbfa40e
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Reviewable diff: +468/-0 across 7 files (excludes generated, test, and story files).
Summary
Adds installable Linux amd64 and arm64 Fleet Node releases with a checksum-verifying installer and hardened systemd unit. Stable and nightly publishing carry the Fleet Node archives, checksum sidecars, and installer from the artifact build into GitHub Releases, matching the installer's default download location.
How it works
The artifact workflow builds Fleet Node and its required plugins with CGO disabled on native amd64 and arm64 runners, then verifies the Go ELF binaries are statically linked. Each matrix run creates a versioned tarball and SHA-256 sidecar. Stable and nightly publishers download both architectures, verify that each checksum is bound to the expected filename, and publish the archives, sidecars, and installer as release assets.
An operator runs the installer with an explicit release version. The installer verifies that
nmapis available, selects the host architecture, downloads and validates the matching archive, installs the program under/opt/fleetnode, creates protected config and state directories, and installs the unit under/etc/systemd/system. Existing active services are stopped for replacement and restarted afterward; fresh installations are explicitly disabled and remain stopped for enrollment.Areas of the code involved
.github/workflows/proto-fleet-artifact-build.yml.github/workflows/release.yml.github/workflows/nightly-builds.ymldeployment-files/fleetnode/install-fleetnode.shnmapprerequisite, and upgrade behaviordeployment-files/fleetnode/fleetnode.service.github/workflows/deployment-config-checks.yml.github/path-filters.ymldeployment-files/fleetnode/tests/test-install-fleetnode.shKey technical decisions & trade-offs
CGO_ENABLED=0and fail packaging if an ELF interpreter or shared-library dependency is present.nmapremains a host prerequisite instead of being copied from a runner-specific distribution into the archive.latest, keeping archive and checksum selection deterministic./etc/fleetnodeand/var/lib/fleetnoderemain outside the replacement tree.Testing & validation
nmap, stale service enablement, fresh installation, active-service upgrade, program replacement, config/state preservation, fixed systemd paths, and checksum rejection.bash -n.just lintpasses.CGO_ENABLED=0.actionlint,shellcheck, and localreadelfwere unavailable; workflow static-link checks usereadelfon Ubuntu runners, and localfileinspection confirmed static ELF output.