Operations grimoire/Services: Difference between revisions

From Nasqueron Agora
(Created page with "== Systemd, rc and runit == Nasqueron infrastructure uses 3 services software: {| class="wikitable" |+ Service management |- ! OS !! Use case !! Software !! Commands |- | FreeBSD || Standard || rc || service <service> <command> |- | Linux || Standard || systemd || systemctl <command> <service> |- | Linux || Docker containers || runit || sv <service> <command> |} Note how systemd inverts the general order by putting the command before the service. == Systemd == === Se...")
 
(Cat, intro)
 
Line 1: Line 1:
Software running as daemons should be set as services to manage them at OS level a standard way.
== Systemd, rc and runit ==
== Systemd, rc and runit ==


Line 36: Line 38:
=== Template for operations repository ===
=== Template for operations repository ===
If you need to add a rc service, we've a template for the file: follow [https://devcentral.nasqueron.org/D3571 D3571 instructions]
If you need to add a rc service, we've a template for the file: follow [https://devcentral.nasqueron.org/D3571 D3571 instructions]
[[Category:Operations grimoire|Services]]

Latest revision as of 23:27, 15 September 2025

Software running as daemons should be set as services to manage them at OS level a standard way.

Systemd, rc and runit

Nasqueron infrastructure uses 3 services software:

Service management
OS Use case Software Commands
FreeBSD Standard rc service <service> <command>
Linux Standard systemd systemctl <command> <service>
Linux Docker containers runit sv <service> <command>

Note how systemd inverts the general order by putting the command before the service.

Systemd

Services

Search for .service file in operations repository for an idea. It's well documented on ArchLinux wiki and freedesktop.org site.

References:

Timers

  • Generally better to use a systemd service and a systemd timer than a crontab entry on Linux
  • Don't forget to start the timer, see this comment on D3674 for a demonstration

Howto for operations repository

You can follow this tutorial to deploy a service on Nasqueron infrastructure, it covers the step from software deployment, configuration, user creation and a systemd service.

FreeBSD rc

Template for operations repository

If you need to add a rc service, we've a template for the file: follow D3571 instructions