Updating¶
How you update Surfmeter depends on how you installed it.
Docker Installation¶
The Docker image contains Automator, the Surfmeter Lab extension, Chromium, and the other runtime dependencies. Update a Docker installation by pulling the latest image and recreating the container:
Run these commands in the directory that contains your docker-compose.yml file. The Docker setup guide also explains how to schedule image updates.
Do not run updateSelf or updateExtension inside the container. Changes to these files would only affect that container and would be lost when Docker recreates it from the image.
The image also contains the default configuration. Configuration files in the ./config bind mount override these defaults and are not replaced when you update the image. See Updating the Config if you receive configuration updates from a central server.
Native Installation¶
A native installation can update:
- itself
- the Surfmeter Lab extension
You may also want to update the browser from time to time. Native amd64 installations use Chrome for Testing, while ARM installations use Chromium. See Updating Your Browser for details.
We recommend that you regularly update Automator and the extension.
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¶
Update Automator with the updateSelf command:
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.
This fixes bugs and adds new functionality. Update Automator before updating the extension or configuration.
Updating the Extension¶
Update the Surfmeter Lab extension with the updateExtension command:
This fixes bugs and adds measurement functionality.
Updating the Config¶
Configuration updates are separate from software updates. They are optional and only needed if you distribute new configuration to devices from a central server.
Update the Surfmeter Lab config with 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.
Updating the config will perform the following:
- Update the
automatorConfig.jsonfile - Update the
publicConfig.jsonfile - 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.
Updating Your Browser¶
This section applies only to native installations. Docker installations receive Chromium and its dependencies through the image update.
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:
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:
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.
{
// ...
"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.