Adding RPM Packaging for CentOS 9 in Heka Insights
DEV Community

Adding RPM Packaging for CentOS 9 in Heka Insights

Heka Insights Agent now includes a dedicated RPM packaging workflow for CentOS Stream 9 and other Enterprise Linux 9-compatible distributions.

Repository: https://sl1nk.com/dpi1j6p

The project already supported packaged installation on Debian-based systems, but RPM-based environments need their own build format, package metadata, lifecycle scripts, and installation workflow. This release adds that missing path.

Supported RPM-based distributions

The new packaging flow targets:

  • CentOS Stream 9
  • Red Hat Enterprise Linux 9
  • Rocky Linux 9
  • AlmaLinux 9

Instead of attempting to reuse a Debian .deb package, operators can now build and install a native .rpm artifact using the standard dnf and rpm ecosystem.

What was added

The repository now includes a dedicated RPM packaging structure:

  • packaging/rpm/build_rpm.sh
  • packaging/rpm/heka-insights-agent.spec
  • packaging/rpm/heka-insights-agent.service

The build script:

  • Creates the standalone agent binary with PyInstaller.
  • Prepares the RPM build directories.
  • Copies the binary, systemd unit, documentation, and configuration example.
  • Runs rpmbuild.
  • Generates the final RPM and SHA-256 checksum.

The generated artifact follows the standard EL9 naming format:

heka-insights-agent-0.1.0-1.el9.x86_64.rpm

Why native RPM packaging matters

A .deb package is not a CentOS release artifact. Debian and Enterprise Linux distributions use different package formats, package managers, dependency metadata, and installation lifecycle hooks. CentOS 9 and related systems expect:

  • RPM package metadata
  • dnf-compatible dependency handling
  • RPM installation and removal scriptlets
  • EL9-compatible binaries
  • systemd integration
  • Enterprise Linux filesystem conventions

Building the agent directly on an EL9 system also reduces compatibility risks with native libraries such as glibc.

Consistent runtime model

The packaging format changes, but the agent's runtime model remains consistent. The RPM installs:

  • /usr/local/bin/heka-insights-agent
  • /usr/lib/systemd/system/heka-insights-agent.service
  • /etc/heka-insights-agent/
  • /var/log/heka-insights-agent/

Configuration is completed through the setup command:

sudo /usr/local/bin/heka-insights-agent setup

The service can then be enabled and started with:

sudo systemctl enable --now heka-insights-agent

Service output is available through the systemd journal:

sudo journalctl -u heka-insights-agent -f

The package also creates the agent service account and prepares the required configuration and log directories with restricted permissions.

Cleaner release artifacts

Platform-specific output is now separated inside dist/:

  • dist/ubuntu/
  • dist/centos9/

This keeps Debian and RPM artifacts clearly separated and makes multi-platform release automation easier to maintain. A release can now provide artifacts such as:

  • heka-insights-agent_0.1.0_amd64.deb
  • heka-insights-agent-0.1.0-1.el9.x86_64.rpm

Installation on CentOS 9

The generated RPM can be installed using:

sudo dnf install -y \
  ./heka-insights-agent-0.1.0-1.el9.x86_64.rpm

After configuration:

sudo /usr/local/bin/heka-insights-agent setup
sudo systemctl enable --now heka-insights-agent

The service can be verified with:

sudo systemctl status heka-insights-agent --no-pager

A practical release improvement

This is not a change to the telemetry engine itself, but it is an important operational improvement. Teams using CentOS Stream, RHEL, Rocky Linux, or AlmaLinux can now evaluate and deploy Heka Insights Agent using a package format that matches their infrastructure. That means:

  • fewer manual installation steps
  • clearer release documentation
  • native package management
  • easier upgrades and removals
  • more consistent production rollouts

Review the source, packaging scripts, and release documentation: https://sl1nk.com/dpi1j6p

Comments

No comments yet. Start the discussion.