opentelemetry-collector-releases
opentelemetry-collector-releases copied to clipboard
Why is there an APK package that contains a systemd service (non-compatible with Alpine)?
What is the use case of the APK package releases containing a systemd service? From my understanding, Alpine Linux is not compatible with systemd services and would need a different service setup to work correctly using open-rc.
When installing the package on Alpine, I don't get any errors, files are copied correctly into the right places, but also the service is not started, so I guess it fails somewhat silently.
The APK package contains a systemd service because the OpenTelemetry Collector releases are designed to be compatible with multiple Linux distributions, not just Alpine Linux. The use case for including a systemd service in the APK package is to provide a consistent way to manage the OpenTelemetry Collector service across different Linux distributions that use systemd for service management.
The package includes a systemd service file, which is placed in the /lib/systemd/system directory. This is standard for distributions that use systemd, ensuring that the OpenTelemetry Collector can be managed as a systemd service on those systems. The inclusion of the systemd service in the APK package allows for consistent service management across various Linux distributions, even though Alpine Linux itself does not use systemd [1][2][3][4][5].
The postinstall.sh script handles service registration and startup by checking if the systemctl command is available. If systemctl is available, it enables the otelcol.service and starts it if the configuration file /etc/otelcol/config.yaml exists. There is no specific logic for Alpine Linux in the provided script [6].
For Alpine Linux, which uses OpenRC instead of systemd, you would need to create and manage an OpenRC service script manually, as the current package does not include OpenRC-specific scripts or configurations.
To continue talking to Dosu, mention @dosu.
@dosu what other linux distributions use APK packages?
Alpine Linux is the primary Linux distribution that uses APK packages. APK (Alpine Package Keeper) is the package management system used by Alpine Linux. Other distributions that are based on Alpine Linux, such as postmarketOS, also use APK packages. However, APK is not commonly used outside of Alpine Linux and its derivatives.
To continue talking to Dosu, mention @dosu.
so then this perfectly explains my doubts that the released APK packages are useful in their current state 😄
In the collector SIG meeting on August 7th, we decided to drop the APK packages from the releases for now and file an issue for a proper implementation using open-rc files.
Pinging @open-telemetry/collector-maintainers to get some more feedback on this since not many core people were in the SIG meeting