Skip to content

Operate the daemons with the shared instrumentctl CLI - #30

Merged
mikelangmayr merged 9 commits into
mainfrom
mike/systemd-deployment
Oct 14, 2026
Merged

mikelangmayr merged 9 commits into
mainfrom
mike/systemd-deployment

Conversation

@mikelangmayr

Copy link
Copy Markdown
Contributor
  • Runs the daemons under systemd with the lris2 command, which comes from instrumentctl and is shared with the other instruments; all that is specific to LRIS2 is src/cli/instrument.toml and a console script
  • The template unit, polkit rule, sudoers drop-in and operator helpers are rendered from that config rather than committed, so doctor can report a host whose unit predates a template change instead of it going silently stale
  • systemd/install.sh is now only a bootstrap: it builds the venv and hands over to lris2 install. Everything after host setup needs no root
  • The unit is lris2@, so an instance is lris2@rpress and the instance files drop the redundant prefix
  • Adds the keyword archiver daemon and its config, which feeds the daemons into InfluxDB for Grafana
  • Verified on the instrument host: the CLI installs and runs, status --all resolves all three instances to their daemon scripts, and doctor diagnoses an unconfigured host with the right remedies. The root host setup has not been run there

@mikelangmayr
mikelangmayr force-pushed the mike/systemd-deployment branch from 41e3205 to e89a459 Compare October 12, 2026 21:55
Comment thread systemd/instances/rcam.env Outdated
# Needs the instrument's camera_interface build in the venv, which is not a
# git dependency: pip install <lris2-camerad-instrument>
LRIS2_DAEMON=camera
LRIS2_CONFIG=/etc/lris2/rcam.yaml

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good
I think one thing we might wanna look into is the config path is hardcoded, so if there was a need to change the location or the instrument's name we would have to change all config files

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, dropped it. The instance files now set only LRIS2_DAEMON, and the config path is derived as /.yaml, with the etc dir itself settable in instrument.toml. Needs the matching instrumentctl release before this merges, otherwise deploy still expects the variable.

@mikelangmayr
mikelangmayr merged commit b9c3a8a into main Oct 14, 2026
1 check failed
@mikelangmayr
mikelangmayr deleted the mike/systemd-deployment branch October 14, 2026 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants