Update Tobira
Updating Tobira is super simple in theory: replace the old binary with the new one and restart the processes. But due to breaking changes and other reasons, there are a few things to look out for.
Note: this document is fairly long, but only to cover lots of cases that rarely occur. Usually, you can skip most of this.
Preparation
Read the release notes of all releases between your current Tobira version and the one you want to update to. Most importantly, check all breaking changes and act upon those as required. Reminder: the version labels are purely cosmetic and minor version bumps can have breaking changes!
Deal with some of the possible breaking changes:
- Update your Opencast to a version that will also work with the new Tobira.
- Make sure your Opencast satisfies all requirements of the new Tobira.
- Update your PostgreSQL to a version compatible with the new Tobira.
- Adjust your authentication integration if Tobira's auth system changed.
Now is a good time to perform a database backup. Of course, database backups are already created automatically regularly, right? Right?
Make changes
- Replace the old Tobira binary by the new one
- Update
config.toml
- We recommend doing this regardless of whether there was a breaking configuration change: it makes sure the config file stays as close to the upstream one as possible, making future updates easier.
- Note: Tobira does not watch nor automatically reload the config file on change. Thus, you can change the file in place: it only takes effect once you restart the process.
- This is best done via 3-way merge. For example, when updating from v1.3 to v1.4:
- "base" is the original
config.toml
for v1.3 (attached to the release). - "left" is the original
config.toml
for v1.4 (attached to the release). - "right" is your current
config.toml
that's deployed on the server. - There are mutliple 3-way merge tools you can use.
- "base" is the original
- Conditional: if required, update other files referenced by
config.toml
. - Conditional: if there were breaking Tobira CLI changes, update service files, scripts and other places as required.
Conditional: Update MeiliSearch
If Tobira requires a new MeiliSearch version, update that.
Note: when stopping the MeiliSearch process, Tobira's search functionality immediately ceases to work. How to best proceed depends on whether the old Tobira also works with the new MeiliSearch:
- If it does work: perform the Meili update before restarting Tobira to reduce search down-time.
- If it does not work: you can chose whether to update Meili before or after Tobira – you will have search down-time in any case, unfortunately.
All data in MeiliSearch can be rebuild quickly from the database. Thus, exporting an index dump, as described in the official Meili docs, is not worth it.
To update Meili:
- Update Meili as appropriate for your original installation method (e.g. replace binary, or update package).
- Remove the Meili data directory (e.g.
/opt/meili/data.ms
or/var/lib/meilisearch/data.ms
).- Assuming your Meili only contains Tobira data!
- Start the new Meili version.
- Once you updated Tobira, run
tobira search-index rebuild
.
Restart
- Run
tobira check
: This makes sure the config is valid and performs a number of other checks. This lets you fix problems before stopping the running process. - Restart processes: The big moment! Everything should work now 🤞
- Make sure:
- ... that the new version is running by visiting
/~tobira
. - ... that the home page works.
- ... that videos can be played.
- ... that search works.
- ... that the new version is running by visiting
If you encounter a problem only when restarting the processes and you think it should have been caught by tobira check
, let us know so that we can add that check!
Afterwards
- Conditional: if necessary, run
tobira search-index rebuild
(see above). - Conditional: if necessary, run a resync.