# Install on every neuron host as /etc/sudoers.d/helexa_gitea_ci # (owner root:root, mode 0440). Required by .gitea/workflows/deploy.yml, # which SSHes as gitea_ci@ to roll out helexa-neuron- # package upgrades and config changes. # # Filename convention `helexa_gitea_ci` (vs bare `gitea_ci`) so other # helexa-org apps can drop their own sudoers files on the same host # without overwriting this one. # # All three CUDA flavours are listed because a host's flavour can change # (e.g. GPU swap) and we don't want the sudoers file to need to change # in lockstep. Only one flavour can be installed at a time (the packages # Conflict: with each other), so the attack surface is bounded to "wrong # flavour installed" — vandalism, not privilege escalation. gitea_ci ALL=(root) NOPASSWD: /usr/bin/rsync * /etc/neuron/neuron.toml gitea_ci ALL=(root) NOPASSWD: /usr/bin/systemctl start neuron.service gitea_ci ALL=(root) NOPASSWD: /usr/bin/systemctl stop neuron.service gitea_ci ALL=(root) NOPASSWD: /usr/bin/systemctl daemon-reload gitea_ci ALL=(root) NOPASSWD: /usr/bin/dnf install --refresh --allowerasing -y helexa-neuron-ampere gitea_ci ALL=(root) NOPASSWD: /usr/bin/dnf upgrade --refresh --allowerasing -y helexa-neuron-ampere gitea_ci ALL=(root) NOPASSWD: /usr/bin/dnf install --refresh --allowerasing -y helexa-neuron-ada gitea_ci ALL=(root) NOPASSWD: /usr/bin/dnf upgrade --refresh --allowerasing -y helexa-neuron-ada gitea_ci ALL=(root) NOPASSWD: /usr/bin/dnf install --refresh --allowerasing -y helexa-neuron-blackwell gitea_ci ALL=(root) NOPASSWD: /usr/bin/dnf upgrade --refresh --allowerasing -y helexa-neuron-blackwell # sudoers reserves `:` and `=` and requires `\` escaping inside command # arguments — without it visudo errors at the first `:` in `https://`. gitea_ci ALL=(root) NOPASSWD: /usr/bin/dnf config-manager addrepo --from-repofile\=https\://rpm.lair.cafe/lair-cafe-unstable.repo gitea_ci ALL=(root) NOPASSWD: /usr/bin/dnf config-manager setopt lair-cafe-unstable.enabled\=1 gitea_ci ALL=(root) NOPASSWD: /usr/bin/dnf config-manager addrepo --from-repofile\=https\://developer.download.nvidia.com/compute/cuda/repos/rhel9/x86_64/cuda-rhel9.repo gitea_ci ALL=(root) NOPASSWD: /usr/bin/dnf install -y libcudnn9-cuda-13 gitea_ci ALL=(root) NOPASSWD: /usr/bin/firewall-cmd --add-service=helexa-neuron --permanent gitea_ci ALL=(root) NOPASSWD: /usr/bin/firewall-cmd --reload