Skip to content

Updating

Automator has the capability to update:

  1. itself
  2. the Surfmeter Lab extension
  3. its config

Furthermore you may want to update the browser (Chrome for Testing on amd64, or Chromium on ARM) to the latest version from time to time; see Updating Your Browser for details.

We recommend that you regularly update Automator and the extension — updating the config is optional and only necessary if you push a new config to your devices centrally.

Do I need to update the Docker image?

If you are using the Docker image for Surfmeter, you should update the image itself, which will give you the latest version of the Automator, our Surfmeter Lab extension, and the config (unless you created an override). The Docker image will also always contain the latest version of our dependencies, like Chromium.

Update the image by pulling the latest version, as explained in our setup guide.

Prerequisites

In order to update, you need to check the automatorConfig.json file and see if it contains the settings for the update server. If you do not have this file, ask AVEQ for it.

Updating Automator

Updating Automator itself is possible via the updateSelf command:

./surfmeter-lab-automator/surfmeter-automator-headless updateSelf

Note

When you update Automator from the same directory that it is installed in, any future commands might not work, because the whole directory was replaced. Open a new shell or navigate to another directory first, then go back to the original location where Automator was installed.

docker exec --user surfmeter -it surfmeter surfmeter-lab-automator/surfmeter-automator-headless updateSelf

This may fix bugs or will enable new functionality and should always be done before updating either the extension or configuration (see below).

Updating the Extension

Updating the Surfmeter Lab extension is possible via the updateExtension command:

./surfmeter-lab-automator/surfmeter-automator-headless updateExtension
docker exec --user surfmeter -it surfmeter surfmeter-lab-automator/surfmeter-automator-headless \
    updateExtension

This may fix bugs or will enable new functionality for the measurements themselves.

Updating the Config

Updating the Surfmeter Lab config is possible via the updateConfig command:

Updating the config will overwrite your existing config

Updating the config will overwrite your existing config files (automatorConfig.json and publicConfig.json). If you have made any changes to the config, you will lose them. This does not affect the automatorConfig.local.json and publicConfig.local.json files.

./surfmeter-lab-automator/surfmeter-automator-headless updateConfig
docker exec --user surfmeter -it surfmeter surfmeter-lab-automator/surfmeter-automator-headless \
    updateConfig

Updating the config will perform the following:

  • Update the automatorConfig.json file
  • Update the publicConfig.json file
  • Load the schedule for performing studies
  • Load the schedule for performing updates

If your configuration defines a schedule, you will see a notice that the schedule has been loaded into the crontab.

Since we're talking about crontabs now, let's cover how to schedule studies (and updates) in the next section.

Updating Your Browser

Which browser you have depends on your platform: on native amd64 the setup script installs Chrome for Testing, and on ARM it installs the distribution's Chromium. Choose the matching update method below. Keep the browser and ChromeDriver in step — the two must share the same major version — which each method below does for you.

Updating Chrome for Testing

Chrome for Testing provides stable, versioned downloads designed for automation. The easiest way to update is to re-run the install script shipped next to the Automator, which installs both Chrome for Testing and the matching ChromeDriver:

cd ~/surfmeter/surfmeter-lab-automator
sudo ./install_chrome_for_testing.sh

This downloads and installs the latest Chrome for Testing and ChromeDriver, replacing the existing installation. Re-running the full sudo ./setup.sh does the same, except it pins the browser to the version in the bundled .chrome_version file.

Don't use regular Chrome

Regular Chrome (stable/beta/dev) removed extension loading support in v142+. Only Chrome for Testing keeps the automation flags we require.

Updating Chromium (ARM)

If you run a GUI, Chromium updates itself and prompts you to relaunch it. To check for an update, open Chromium and go to chrome://settings/help.

On a headless system, update Chromium and its driver through the package manager:

sudo apt update && sudo apt install chromium chromium-driver
sudo snap install chromium chromium-ffmpeg

Manually Setting Up the Update Server

You can also point the updates to your own server in case your organization has a dedicated server for this purpose. Just replace the url with your own server's endpoint that returns the latest version of the files.

This is also particularly useful if you want to provision the configuration yourself. In that case, just add the publicConfig.json file and automatorConfig.json file to a .tar.bz2 archive and serve it via your own server.

automatorConfig.json
{
    // ...
    "globalUpdateSettings": {
        "auth": {
            "username": "...",
            "password": "..."
        },
    },
    "updates": {
        "automator": {
            "url": "https://example.com/download/surfmeter-lab-automator/latest.tar.bz2",
        },
        "extension": {
            "url": "https://example.com/download/surfmeter-lab/latest.zip",
        },
        "config": {
            "url": "https://example.com/download/surfmeter-lab-automator-config/latest.tar.bz2",
        }
    },
}

When auth is set, the update server will require basic authentication. The username and password are specified in the globalUpdateSettings section, or can be specified in the auth section of the individual update settings.