Updating
Three things are updated separately: the CLI, the Tailscale proxy configuration that the CLI installs, and the versions of the controller's modules.
None of them is done by running Install controller again. On an installed controller that is a reinstall that erases its data, /opt/storage included: see Reinstalling a controller.
Update the CLI
The CLI shows its version under the banner. When it starts, a released build checks whether a newer release has been published and, if so, asks before showing the menu:
A newer rosepetal-cli is available (<current> → <latest>). Update now?- Answer yes and the CLI downloads that release, replaces its own binary and exits. Run it again to use the new version. Replacing the binary needs root, so start the CLI with
sudo. - Answer no and it continues with the current version.
The check takes a few seconds at most and is skipped without a message when the version information cannot be downloaded.
Running the install command again gives the same result:
curl -fsSL https://storage.googleapis.com/rosepetal-cli-dist/install.sh | sudo bashRefresh the Tailscale Proxy
The install writes /opt/rosepetal/proxy.sh, the script that configures the Tailscale serves of the controller, from the copy inside the CLI. A newer CLI can carry a newer script. To apply it on an installed controller, update the CLI, run sudo rosepetal-cli and choose Refresh Tailscale proxy. It:
- Overwrites
/opt/rosepetal/proxy.shwith the copy inside the running CLI. - Resets the existing Tailscale serve and funnel configuration.
- Runs the script.
The controller ends up with the serves of the current CLI, all of them reachable from the tailnet only. The reset also removes the public funnels that older versions of the CLI configured.
The entry needs sudo and an installed controller; otherwise it is shown in red and cannot be selected.
Upgrade the Modules
The versions of the controller's modules, its containers, are changed with the menu entry Upgrade modules. It is reserved to accounts with the platform administrator role: the menu lists it after Sign in with such an account, and it needs sudo on an installed controller.
The entry shows the modules declared in /opt/rosepetal/docker-compose.yml together with the versions available for them, and the modules of the catalog that the controller does not have yet. The operator chooses a new version for a module, adds a module or removes one, reviews the list of changes and applies it. The CLI then downloads the new images (when the Node-RED module changes version, also the auxiliary images its nodes declare), has the Rosepetal API render the new docker-compose.yml, removes the containers of the modules taken out, writes the new file and restarts the modules that changed. Removing a module removes its container only: its image and its data under /opt/storage stay.
There is no rollback. A failure while the images are downloaded or the new file is rendered leaves the modules as they were. A failure once containers are being removed or restarted leaves the modules already handled in their new state and the rest as they were; run Upgrade modules again for what remains.