Skip to content

Instantly share code, notes, and snippets.

@alexlarsson
Last active May 3, 2023 11:11
Show Gist options
  • Save alexlarsson/8dd0a6286700d7afdb16609b067b44d0 to your computer and use it in GitHub Desktop.
Save alexlarsson/8dd0a6286700d7afdb16609b067b44d0 to your computer and use it in GitHub Desktop.
INSTALL:
$ dnf copr enable -y mperina/hirte-snapshot
$ dnf install hirte hirte-agent
CONFIGURE:
$ cp myagent.conf /etc/hirte/agent.conf.d/
$ cp myhirte.conf /etc/hirte/hirte.conf.d/
$ systemctl start hirte-agent.service
$ systemctl start hirte.service
INSTALL EXAMPLES:
$ cp *.service /etc/systemd/system
$ cp *.container /etc/containers/systemd/
$ systemctl daemon-reload
$ podman pull fedora
TEST EXAMPLES:
$ hirtectl list-units
$ hirtectl start foo sleep-short.service
$ hirtectl start foo wants-sleep-on-foo.service
$ hirtectl start foo sleep-in-container.service
[hirte-agent]
NodeName=foo
ManagerHost=127.0.0.1
[hirte]
AllowedNodeNames=foo
[Unit]
Description=A minimal container
[Container]
Image=fedora
Exec=sleep 60
[Service]
# Restart service when sleep finishes
Restart=always
[Unit]
[Service]
ExecStart=/bin/sleep 10000
[Unit]
[Service]
ExecStart=/bin/sleep 10
[Unit]
After=hirte-proxy@foo_sleep-long.service
Wants=hirte-proxy@foo_sleep-long.service
[Service]
ExecStart=/bin/true
[Unit]
After=sleep-long.service
Wants=sleep-long.service
[Service]
ExecStart=/bin/sleep 10000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment