Skip to content
sqall01 edited this page Jan 31, 2021 · 8 revisions

Update

In this document the update process of an AlertR instance to a newer version is described.

Table of Contents

Updating AlertR

Updating AlertR

How to update your AlertR instance?

Since version 0.225, the update process is divided into four steps:

  • Stop your local AlertR instance (for example via the init.d script if you have installed it).
  • Execute "./alertRupdate.py -u" and follow the given instructions.
  • If needed, update your local configuration file and, if needed, update all your other AlertR instances. The script will warn you before starting the update process if you have to update your local configuration file and/or you have to update all your other AlertR instances (see the Versioning entry for further information).
  • Start your updated local AlertR instance.

After you have performed these four steps, your local AlertR instance is updated to the newest version provided by the repository.

NOTE: The update process will overwrite all files (excluding configuration files) that are different to the ones in the repository. If you have modified files of your local AlertR instance, they will be overwritten too. Therefore, backup your modifications before starting the update process.

NOTE: Starting with version 0.600, AlertR was completely rewritten for Python 3 (at least version 3.5). Therefore, if you want to update from a version prior to 0.600 the dependency check of the update script does not work properly. If you were on the latest 0.5xx version of each AlertR instance, you can update by forcing it with the command "./alertRupdate.py -u -f". If you were not on the latest 0.5xx version, you have to reinstall your AlertR setup.

NOTE: Version 0.700 changes the repository layout. If you have the latest 0.600-3 version installed, everything works fine. If you want to update from a version prior to 0.600-3, the updater does not work properly with the new layout. To work around this problem, you have to manually change the update URL in your configuration file to https://raw.githubusercontent.com/sqall01/alertR/v0.600-3/, update your AlertR installation to version 0.600-3, change the URL back to https://raw.githubusercontent.com/sqall01/alertR/master/ and update to version 0.700.

Example on how to update an AlertR instance.

Here is an example on how to update a local AlertR instance. In this example, the current running AlertR instance has version 0.300-0 and the newly available is 0.400-0.

sqall@towel:~/alertR/managerClientConsole$ ./alertRupdate.py -u

05/27/2016 19:22:57 INFO: [alertRupdate.py]: Current version: 0.300-0.

WARNING: You are about to make an update that changes the used network protocol. This means that after you have updated this AlertR instance you also have to update your AlertR server and all your AlertR clients in order to have a working system again.
Are you sure you want to continue and update this AlertR instance?
(y/n): y

WARNING: You are about to make an update that needs changes in the configuration file. This means that you have to manually update your used configuration file before you can use this AlertR instance again.
Are you sure you want to continue and update this AlertR instance?
(y/n): y

Please make sure that this AlertR instance is stopped before continuing the update process.
Are you sure this AlertR instance is not running?
(y/n): y
05/27/2016 19:23:04 INFO: [update.pyc]: Files to modify: 4; New files: 2
05/27/2016 19:23:04 INFO: [update.pyc]: Downloading file: 'lib/globalData.py'
05/27/2016 19:23:05 INFO: [update.pyc]: Download: 100%
05/27/2016 19:23:05 INFO: [update.pyc]: Successfully downloaded file: 'lib/globalData.py'

[...]

05/27/2016 19:23:05 INFO: [alertRupdate.py]: Update finished.

UPDATE FINISHED!
NOTE: Please make sure you update all your AlertR instances before you restart this instance.
NOTE: Please make sure you manually update the configuration file of this AlertR instance before you restart this instance.

As you can see, the update script warns you that you have to update the local configuration file manually, and since the used protocol has changed, you also have to update all other AlertR instances on your system. After that is done, you can start this AlertR instance again.

How to reset your modified local AlertR instance?

If you have modified the code of your local AlertR instance and want to change it back to the original code, you can use the update script as well. You just have to use the "force" argument in order to let the update script skip the version checks. This can be done by executing "./alertRupdate.py -u -f".

Clone this wiki locally