tiny-pilot / ansible-role-tinypilot

DEPRECATED: Merged into core tiny-pilot/tinypilot repo
https://tinypilotkvm.com
MIT License
117 stars 37 forks source link

Update Overhaul: Bring back permanent `/opt/tinypilot-updater` folder #206

Closed jdeanwallace closed 2 years ago

jdeanwallace commented 2 years ago

The update-overhaul no longer makes use of the /opt/tinypilot-updater directory and is now removed. However, the update-video-settings script heavily relies on this directory because it already contained the virtualenv and ansible-role-ustreamer which was used to update only the ustreamer settings on the device.

We no longer keep a local version of ansible roles that were used during the TinyPilot installation, so it's not easy to rerun a subset of our Ansible tasks to update video settings.

jdeanwallace commented 2 years ago

Possible solutions:

  1. Preserve the contents of our bundle file and bring back our /opt/tinypilot-updater directory (perhaps under a different name like /opt/tinypilot-installer) that gets nuked after each update.

    This would actually be ideal because all the dependencies (i.e. pip dependencies, ansible roles) would be available and ready to go.

  2. Download & untar a fresh copy of the bundle file each time we run update-video-settings.

    This might be slow depending on internet connection because we need to download the bundle file and recreate the virtualenv (i.e. pip install requirements) again.

  3. Reimplement update-video-settings script without the need for ansible.

    The script only runs one task (& 2 handlers) that rewrites the ustreamer systemd config.

mtlynch commented 2 years ago

Ah, good catch!

I'm assigning to @jotaen4tinypilot since he's now back from travel, and @jdeanwallace has been taking on a lot of the grungier work with the update overhaul.

I would eventually like to transition away from Ansible for the video settings, but we still depend on it in several scripts, so I don't want to block the update overhaul on reimplementing our scripts without Ansible.

Right now, the best solution to me would be to adjust the install script so that it places all the files from the bundle to /opt/tinypilot-updater just so we preserve behavior for scripts that depend on it.

This may mean that we have to unconditionally remove /opt/tinypilot-updater in prerm to prevent stale files from being left behind across versions.