Updating¶
Automator has the capability to update:
- itself
- the Surfmeter Lab extension
- its config
Furthermore you may want to update Google Chrome (or Chromium) to the latest version from time to time; see Updating Chrome or Chromium 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:
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 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:
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 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 Chrome or Chromium¶
Depending on your current operating system, you can update Google Chrome (or Chromium) to the latest version using the usual update mechanisms.
If you run a GUI, Chrome or Chromium will be updated automatically and prompt you to relaunch it.
To check if an update is available, open Chrome or Chromium and go to chrome://settings/help
.
Headless Chromium¶
Headless Chrome¶
The official Chrome package is available via a download link:
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome-stable_current_amd64.deb
ChromeDriver¶
To install the latest ChromeDriver that matches your browser, run:
npm install \
--unsafe-perm=true --allow-root -g \
chromedriver \
--detect_chromedriver_version \
--chromedriver-force-download
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.