ansible-role-tinypilot icon indicating copy to clipboard operation
ansible-role-tinypilot copied to clipboard

Document separation of concerns between ansible and app repos

Open jotaen4tinypilot opened this issue 2 years ago • 2 comments

It’s not always 100% clear where functionality should go, either to the ansible repo or the app one. So for example:

  • When do we create privileged scripts and implement the logic around it in a shell script, vs. when do we just add a sudoer’s entry for a specific command and implement the other logic in Python?
  • How do we go about repetition between the two repos, e.g. when certain parameters are needed in both repositories? Example: configfs paths for mass storage, that we have both in the app and in ansible.
  • Does the fact that we have mock scripts for local development justify single-line privileged scripts, only for the sake of mocking them out? Or is it okay to just use debug toggles for that? What is our general approach towards dev-prod-parity?

It’s probably hard to come up with a definite answer, but at least we could try writing up some guidelines that help us make consistent decisions.

PRs/Issues during which that discussion came up already:

  • https://github.com/tiny-pilot/tinypilot-pro/issues/414#issuecomment-1070520327
  • https://github.com/tiny-pilot/tinypilot-pro/pull/281#pullrequestreview-819399824

jotaen4tinypilot avatar Mar 17 '22 16:03 jotaen4tinypilot

We could consider putting this one on hold for now, since we might change or reconsider things when working on the upcoming update mechanism. At least we should keep the possibility of changes in mind, before putting effort into documenting the current design.

jotaen4tinypilot avatar May 24 '22 20:05 jotaen4tinypilot

That's true. I'll push this until next release.

mtlynch avatar May 24 '22 21:05 mtlynch