[ALL] Implement podman quadlet system for rootless systemd integration (untested)

Place these file like here within;

  /etc/containers/systemd/users/

for them to be available for all system users or place them within;

  /etc/containers/systemd/users/<UUID>
  ~/.config/containers/systemd/

for them to be available for that specific user.

The systemd service files can then be automagically be created by the command;

  $ systemctl --user daemon-reload

After which they can be started/enabled normally with;

  $ systemctl --user start ovos_messagebus
  $ systemctl --user start ovos_phal
  etc.
This commit is contained in:
j1nx 2023-08-30 11:50:40 +00:00
parent 502324992e
commit 37e6f47bf7
11 changed files with 208 additions and 0 deletions

View File

@ -0,0 +1,32 @@
[Unit]
Description=OpenVoiceOS Audio Service
After=local-fs.target
Wants=ovos_messagebus.service
After=ovos_messagebus.service
Wants=ovos_phal.service
After=ovos_phal.service
[Container]
ContainerName=ovos_audio
Image=docker.io/smartgic/ovos-audio:alpha
AutoUpdate=registry
LogDriver=journald
HostName=ovos_audio
Network=host
Timezone=local
Environment=PULSE_SERVER=unix:/run/user/1000/pulse/native
Environment=PULSE_COOKIE=/home/ovos/.config/pulse/cookie
Environment=DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
AddDevice=/dev/snd
Volume=%h/ovos/config:/home/ovos/.config/mycroft
Volume=%h/ovos/tmp:/tmp/mycroft
Volume=%h/.config/pulse/cookie:/home/ovos/.config/pulse/cookie:ro
Volume=%t/pulse:/run/user/1000/pulse:ro
Volume=%/bus:/run/user/1000/bus:ro
[Service]
TimeoutStartSec=900
Restart=always
[Install]
WantedBy=multi-user.target default.target

View File

@ -0,0 +1,21 @@
[Unit]
Description=OpenVoiceOS CLI
After=local-fs.target
[Container]
ContainerName=ovos_cli
Image=docker.io/smartgic/ovos-cli:alpha
AutoUpdate=registry
LogDriver=journald
HostName=ovos_cli
Network=host
Timezone=local
Volume=%h/ovos/config:/home/ovos/.config/mycroft
Volume=%h/ovos/tmp:/tmp/mycroft
[Service]
TimeoutStartSec=900
Restart=unless-stopped
[Install]
WantedBy=multi-user.target default.target

View File

@ -0,0 +1,32 @@
[Unit]
Description=OpenVoiceOS Core Service
After=local-fs.target
Wants=ovos_messagebus.service
After=ovos_messagebus.service
Wants=ovos_phal.service
After=ovos_phal.service
[Container]
ContainerName=ovos_core
Image=docker.io/smartgic/ovos-core:alpha
AutoUpdate=registry
LogDriver=journald
HostName=ovos_core
Network=host
Timezone=local
Environment=PULSE_SERVER=unix:/run/user/1000/pulse/native
Environment=PULSE_COOKIE=/home/ovos/.config/pulse/cookie
AddDevice=/dev/snd
Volume=%h/ovos/config:/home/ovos/.config/mycroft
Volume=%h/ovos/tmp:/tmp/mycroft
Volume=%h/.config/pulse/cookie:/home/ovos/.config/pulse/cookie:ro
Volume=%t/pulse:/run/user/1000/pulse:ro
Volume=ovos_nltk:/home/ovos/nltk_data
Volume=%h/ovos/share:/home/ovos/.local/share/mycroft
[Service]
TimeoutStartSec=900
Restart=always
[Install]
WantedBy=multi-user.target default.target

View File

@ -0,0 +1,33 @@
[Unit]
Description=OpenVoiceOS Dinkum Listener Service
After=local-fs.target
Wants=ovos_messagebus.service
After=ovos_messagebus.service
Wants=ovos_phal.service
After=ovos_phal.service
[Container]
ContainerName=ovos_listener
Image=docker.io/smartgic/ovos-listener-dinkum:alpha
AutoUpdate=registry
LogDriver=journald
HostName=ovos_listener
Network=host
Timezone=local
Environment=PULSE_SERVER=unix:/run/user/1000/pulse/native
Environment=PULSE_COOKIE=/home/ovos/.config/pulse/cookie
AddDevice=/dev/snd
Volume=%h/ovos/config:/home/ovos/.config/mycroft:ro
Volume=%h/ovos/tmp:/tmp/mycroft
Volume=%h/.config/pulse/cookie:/home/ovos/.config/pulse/cookie:ro
Volume=%t/pulse:/run/user/1000/pulse:ro
Volume=ovos_listener_records:/home/ovos/.local/share/mycroft/listener
Volume=ovos_models:/home/ovos/.local/share/precise-lite
Volume=ovos_vosk:/home/ovos/.local/share/vosk
[Service]
TimeoutStartSec=900
Restart=always
[Install]
WantedBy=multi-user.target default.target

View File

@ -0,0 +1,4 @@
[Volume]
User=mycroft
Group=mycroft
Label=name=ovos_listener_records

View File

@ -0,0 +1,21 @@
[Unit]
Description=OpenVoiceOS Messagebus Service
After=local-fs.target
[Container]
ContainerName=ovos_messagebus
Image=docker.io/smartgic/ovos-messagebus:alpha
AutoUpdate=registry
LogDriver=journald
HostName=ovos_messagebus
Network=host
Timezone=local
Volume=%h/ovos/config:/home/ovos/.config/mycroft:ro
Volume=%h/ovos/tmp:/tmp/mycroft
[Service]
TimeoutStartSec=900
Restart=unless-stopped
[Install]
WantedBy=multi-user.target default.target

View File

@ -0,0 +1,4 @@
[Volume]
User=mycroft
Group=mycroft
Label=name=ovos_models

View File

@ -0,0 +1,4 @@
[Volume]
User=mycroft
Group=mycroft
Label=name=ovos_nltk

View File

@ -0,0 +1,28 @@
[Unit]
Description=OpenVoiceOS PHAL Service
After=local-fs.target
Wants=ovos_messagebus.service
After=ovos_messagebus.service
[Container]
ContainerName=ovos_phal
Image=docker.io/smartgic/ovos-phal:alpha
AutoUpdate=registry
LogDriver=journald
HostName=ovos_phal
Network=host
Timezone=local
Environment=PULSE_SERVER=unix:/run/user/1000/pulse/native
Environment=PULSE_COOKIE=/home/ovos/.config/pulse/cookie
AddDevice=/dev/snd
Volume=%h/ovos/config:/home/ovos/.config/mycroft
Volume=%h/ovos/tmp:/tmp/mycroft
Volume=%h/.config/pulse/cookie:/home/ovos/.config/pulse/cookie:ro
Volume=%t/pulse:/run/user/1000/pulse:ro
[Service]
TimeoutStartSec=900
Restart=always
[Install]
WantedBy=multi-user.target default.target

View File

@ -0,0 +1,25 @@
[Unit]
Description=OpenVoiceOS PHAL Admin Service
After=local-fs.target
Wants=ovos_messagebus.service
After=ovos_messagebus.service
[Container]
ContainerName=ovos_phal_admin
Image=docker.io/smartgic/ovos-phal-admin:alpha
AutoUpdate=registry
LogDriver=journald
HostName=ovos_phal_admin
Network=host
Timezone=local
Volume=%h/ovos/config:/home/ovos/.config/mycroft
Volume=%h/ovos/tmp:/tmp/mycroft
Volume=/sys:/sys:ro
Volume=/dev:/dev:ro
[Service]
TimeoutStartSec=900
Restart=always
[Install]
WantedBy=multi-user.target default.target

View File

@ -0,0 +1,4 @@
[Volume]
User=mycroft
Group=mycroft
Label=name=ovos_vosk