The current Grafana Loki server, *loki0.pyrocufflink.blue*, runs Fedora CoreOS and is managed by Ignition and *cfg*. Since I have declared *cfg* a failed experiment, I'm going to re-deploy Loki on a new VM running Fedora Linux and managed by Ansible. The *loki* role installs Podman and defines a systemd-managed container to run Grafana Loki.
26 lines
580 B
Plaintext
26 lines
580 B
Plaintext
# vim: set ft=systemd :
|
|
[Unit]
|
|
Description=Grafana Loki
|
|
After=network-online.target
|
|
Wants=network-online.target
|
|
StartLimitIntervalSec=1m
|
|
StartLimitBurst=60
|
|
|
|
[Service]
|
|
ExecStartPre=/bin/install -o 10001 -g 10001 -d %S/%P
|
|
ExecStartPre=/bin/chcon -t container_file_t %S/%P
|
|
ExecReload=/usr/bin/podman kill --cidfile=%t/%N.cid --signal HUP
|
|
TimeoutStartSec=5m
|
|
Restart=always
|
|
RstartSec=1s
|
|
|
|
[Container]
|
|
Image=docker.io/grafana/loki:2.9.4
|
|
Exec=-config.file=/etc/loki/config.yml
|
|
Volume=%S/%P:/var/lib/loki:rw
|
|
Volume=/etc/loki:/etc/loki:ro
|
|
Network=host
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|