1. Preface
This guide outlines the upgrade process for the icom Router Management Server (On-Premises). It assumes that a working installation of icom Router Management Server 2024.07.0 is in place, which was installed following the instructions in the icom Router Management Server (On-Premises) Install Guide after July 2024. If the icom Router Management Server (On-Premises) was installed before December 2022, contact the support hotline to schedule a migration due to significant changes in the folder structure and naming conventions.
3. Preparations
3.1. PostgreSQL version
If PostgreSQL is installed in a version lower than 14, it must be updated before the upgrade process. To do so, follow the instructions in the PostgreSQL version upgrade guide.
The PostgreSQL version can be checked using the following command:
1
sudo -u postgres psql -c "SELECT version();"
3.2. Backup PostgreSQL database
The PostgreSQL database should be backed up before starting the upgrade process.
The pg_dump
command is used to create the backup.
1
sudo -i -u postgres pg_dump -d insysicomroutermgmt -f /tmp/insysicomroutermgmt_backup.bin -Fc
The database can be restored using the pg_restore
command only if necessary.
1
sudo -i -u postgres pg_restore -d insysicomroutermgmt /tmp/insysicomroutermgmt_backup.bin -Fc
3.3. Upgrade preparations
Download the latest version from the link provided by the support team.
Create a directory in the home directory and copy the installation archive, irm_linux_2024_10_0.zip
, into this newly created directory.
mkdir dist
unzip irm_linux_2024_10_0.zip -d dist
ls -aFl dist
The output should display the contents of the dist
directory.
-
insysicom-routermgmt
-
insysicom-autoupdate
The systemd service needs to be stopped.
1
sudo systemctl stop insysicom-routermgmt
The old binary must be backed up.
1
sudo cp /opt/insysicom-routermgmt/bin/insysicom-routermgmt /opt/insysicom-routermgmt/bin/insysicom-routermgmt.old
4. Upgrade process
4.1. Upgrade application server
Copy the new binary to the correct location.
1
sudo cp ./dist/insysicom-routermgmt /opt/insysicom-routermgmt/bin
Mark the new binary as executable.
1
2
sudo chown insysicom-routermgmt:insysicom-routermgmt /opt/insysicom-routermgmt/bin/insysicom-routermgmt
sudo chmod +x /opt/insysicom-routermgmt/bin/insysicom-routermgmt
Configure the necessary environment variables and execute the database migration.
If the default database credentials provided in the installation guide were not utilized, or if the database is hosted on a different server than the application, please refer to the correct values in the configuration file located at /opt/insysicom-routermgmt/etc/insysicom-routermgmt.conf
.
1
2
3
sudo -i -u insysicom-routermgmt
/opt/insysicom-routermgmt/bin/insysicom-routermgmt system upgrade -c /opt/insysicom-routermgmt/etc/insysicom-routermgmt.conf
exit
To prepare insysicom-routermgmt for communication with insysicom-autoupdate, change the following variables to the specified values in the insysicom-routermgmt.conf
file:
1
sudo vi /opt/insysicom-routermgmt/etc/insysicom-routermgmt.conf
1
2
3
4
...
bonaventure_grpc_server_port: 50052
bonaventure_grpc_server_host: "127.0.0.1"
...
4.2. Add the new autoupdate application
Copy the autoupdate binary to the correct location.
1
sudo cp ./dist/insysicom-autoupdate /opt/insysicom-routermgmt/bin
Mark it as executable.
1
2
sudo chown insysicom-routermgmt:insysicom-routermgmt /opt/insysicom-routermgmt/bin/insysicom-autoupdate
sudo chmod +x /opt/insysicom-routermgmt/bin/insysicom-autoupdate
To configure the autoupdate service, you need to create an environment file in the same directory as the router management configuration file.
1
sudo vi /opt/insysicom-routermgmt/etc/insysicom-autoupdate.env
Add the following content:
1
2
3
4
5
AUTOUPDATE_HTTP_PORT=8082
AUTOUPDATE_GRPC_PORT=50052
AUTOUPDATE_HTTP_READ_TIMEOUT=60s
AUTOUPDATE_SHUTDOWN_TIMEOUT=10s
FILE_STORAGE_TYPE=filesystem
The permissions for the newly created environment file must be set.
1
sudo chown insysicom-routermgmt:insysicom-routermgmt /opt/insysicom-routermgmt/etc/insysicom-autoupdate.env
Settings, that already exist in the routermanagement configuration file, are added to the environment file.
1
2
3
4
sudo -i -u insysicom-routermgmt
echo "MASTER_KEY=$(grep -oP '(?<=barracuda_master_key: ).*' /opt/insysicom-routermgmt/etc/insysicom-routermgmt.conf)" >> /opt/insysicom-routermgmt/etc/insysicom-autoupdate.env
echo "DATABASE_ARGS=\"$(grep -oP '(?<=barracuda_database_args: ).*' /opt/insysicom-routermgmt/etc/insysicom-routermgmt.conf) $(grep -oP 'dbname=.*' /opt/insysicom-routermgmt/etc/insysicom-routermgmt.conf)\"" >> /opt/insysicom-routermgmt/etc/insysicom-autoupdate.env
echo "DATA_DIRECTORY=$(grep -oP '(?<=barracuda_data_path: ).*' /opt/insysicom-routermgmt/etc/insysicom-routermgmt.conf)" >> /opt/insysicom-routermgmt/etc/insysicom-autoupdate.env
Initialize the autoupdate application.
1
2
3
4
5
set -a
source /opt/insysicom-routermgmt/etc/insysicom-autoupdate.env
set +a
/opt/insysicom-routermgmt/bin/insysicom-autoupdate -migrate
exit
Create a systemd service for the autoupdate application.
1
sudo vi /etc/systemd/system/insysicom-autoupdate.service
If Postgres does not run on the same machine, please remove the line After=postgresql.service from the Unit section of your service
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
[Unit]
Description=INSYS icom Autoupdateserver
After=postgresql.service
[Service]
Type=simple
User=insysicom-routermgmt
Group=insysicom-routermgmt
WorkingDirectory=/var/opt/insysicom-routermgmt
StandardOutput=file:/var/opt/insysicom-routermgmt/autoupdate_stdout.log
StandardError=file:/var/opt/insysicom-routermgmt/autoupdate_stderr.log
SyslogIdentifier=insysicom_autoupdate
EnvironmentFile=/opt/insysicom-routermgmt/etc/insysicom-autoupdate.env
ExecStart=/opt/insysicom-routermgmt/bin/insysicom-autoupdate -serve
[Install]
WantedBy=multi-user.target
Enable the autoupdate service.
1
sudo systemctl enable insysicom-autoupdate
4.3. Adapt cronjobs
For the application to work correctly, the existing cronjob must be adapted and a new one has to be added.
1
sudo crontab -e
Edit the existing cronjob to use the -c
parameter.
30 4 * * * /opt/insysicom-routermgmt/bin/insysicom-routermgmt system fetchDeviceInfo -c /opt/insysicom-routermgmt/etc/insysicom-routermgmt.conf;
And add the following line to the crontab file:
1
0 0 * * * /opt/insysicom-routermgmt/bin/insysicom-routermgmt system updateLicenseStatus -c /opt/insysicom-routermgmt/etc/insysicom-routermgmt.conf;
4.4. Adapt Nginx configuration
In the nginx site-configuration, edit the /autoupdate/
location by changing the proxy_pass
port from 9202
to 8082
.
1
sudo vi /etc/nginx/sites-enabled/insysicom-routermgmt
location /autoupdate/ {
proxy_pass http://127.0.0.1:8082;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
5. Confirm upgrade
Access the web interface of the icom Router Management Server (On-Premises) and verify the version number in the system information menu, or alternatively, utilize the curl
command to check the version number.
1
curl http://localhost:9203/api/admin/software-version
example output:
{"buildVersion":"2024.10.0", ... }
Back to the Configuration Guides for icom Router Management
Back to overview