Skip to content

Add native systemd units

Jörg Behrmann requested to merge behrmann/gitlab:systemd into master

What does this MR do?

  • This MR adds systemd units to use instead of the init script
  • Adds an optional Gem to that puma can use systemd's readiness protocol (Type=notify)

This MR does mostly the same as !52433 (closed) (sorry @matthewmuscat I don't want to step on your toes, will happily close this one if yours gets momentum), but incorporates feedback from that MR and adds documentation and the sd_notify gem so that puma can notify systemd that it is running, as described here

The services are mostly modelled on prior art in the Arch Linux packaging of GitLab

and OpenSuse

As !52433 (closed), this is a reaction to #299570 (closed) and addresses the continued problems even after the most basic functionality has been restored after two MRs.

In the longer term, adopting proper systemd support could allow for removing a lot of helper binaries used by the init script and opting into systemd's sandboxing capabilities - something I have left out in this MR, but which can be seen in the examples from Arch Linux - could greatly improve security.

Fixes: #299753 (moved)

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Edited by Peter Leitzen

Merge request reports