Proposal: Optionally use systemd units instead of runit to manage services
Summary
Using systemd units would provide some interesting advantages over runit:
- Units are contained in cgroups, providing the option to get metrics on whole services.
- Prometheus can monitor unit states via the node_exporter systemd collector.
- Targets can be used to up/down everything.
- Units/Targets can explicitly state dependencies.
- Units can contain resource parameters like Memory and CPU limits, Process limits, Open file limits.
- Units can contain security isolation parameters like no access to files outside of specific directories.
Proposal
Add the option to enable transition from runit management to systemd units or not.
The main set of units should be installed as a user units, rather than a system units. This way we don't have to touch the host OS as deeply. For example, /var/opt/gitlab/.config/systemd/user/unicorn.service
.