Files
grid/unit/grid-node.service
zeekayandHanzo Dev e13a6357f0 What a machine runs to be part of the cluster
Upstream k3s, unforked: every path it defaults to under /etc/rancher and
/var/lib/rancher is already a flag with an environment variable, so the
estate's names cost two lines in a unit file rather than a rebase
against upstream forever. Both live nodes run it.

Co-authored-by: Hanzo Dev <[email protected]>
2026-09-09 11:53:21 -07:00

39 lines
1.2 KiB
Desktop File

[Unit]
# grid — what a machine runs to be part of the cluster.
#
# The binary is upstream k3s, unforked. Every path it defaults to under
# /etc/rancher and /var/lib/rancher is a flag with an env var, so the estate's
# own names cost two lines here instead of a fork to rebase forever.
#
# The data directory is NOT moved yet, deliberately. Every running container's
# bind mounts point into it, so renaming it while they run breaks them — that one
# pairs with the partition work, which needs the node drained anyway.
Description=Hanzo Grid (Kubernetes node)
Documentation=https://hanzo.ai
Wants=network-online.target
After=network-online.target
[Install]
WantedBy=multi-user.target
[Service]
Type=notify
EnvironmentFile=-/etc/hanzo/grid/env
KillMode=process
Delegate=yes
User=root
LimitNOFILE=1048576
LimitNPROC=infinity
LimitCORE=infinity
TasksMax=infinity
TimeoutStartSec=0
Restart=always
RestartSec=5s
ExecStartPre=-/sbin/modprobe br_netfilter
ExecStartPre=-/sbin/modprobe overlay
ExecStart=/usr/local/bin/k3s agent \
--config /etc/hanzo/grid/config.yaml \
--private-registry /etc/hanzo/grid/registries.yaml \
--node-label hanzo.ai/gpu=amd \
--node-label hanzo.ai/arch=amd64