Upgrade 3.19

Материал из WiKi - UserSide

en | ru

Version: 3.19

Version required: 3.10 and above

A few words from the author

  • In version 3.19 we have done a lot to universalise and customise the system. Now every customer can switch off unused sections, create and operate completely arbitrary sections and entities, and change the naming of basic terms such as "Customers".
  • Most files in the userside web directory have, for security reasons, changed their location several levels up and are now inaccessible via the web.
  • System page/link routing has been changed
It was: /?core_section=customer&action=show&id=1234
It became: /customer/1234
  • In version 3.19, the sections are declared obsolete:
    • "Layout of construction lengths and assembled couplings for cable line routes". In version 3.20 the section will be removed
    • "Unknown MAC-addresses". In version 3.20 the section will be removed
    • "Technical support interface". In version 3.20 the section will be removed
  • Upgrade. It is recommended that you have two instances of the system. A separate operational one and a separate test one. On the test one you can periodically update the database from the operational system and perform updates to make sure that everything is working, familiarise yourself with innovations or identify things that have stopped working for you.

Specifics in performing the upgrade

When upgrading in a Docker environment, refer to the instructions in the Docker bundle repository.

  • If you are upgrading from a version 3.10 - check out the page: Upgrade 3.11
  • If you are upgrading from a version 3.11 and before - check out the page: Upgrade 3.12
  • If you are upgrading from a version 3.12 and before - check out the page: Upgrade 3.13
  • If you are upgrading from a version 3.13 and before - check out the page: Upgrade 3.14
  • If you are upgrading from a version 3.14 and before - check out the page: Upgrade 3.15
  • If you are upgrading from a version 3.15 and before - check out the page: Upgrade 3.16
  • If you are upgrading from a version 3.16 and before - check out the page: Upgrade 3.17
  • If you are upgrading from a version 3.17 and before - check out the page: Upgrade 3.18
  • Move/remove extraneous files, directories, etc. from the userside directory (/var/www/userside). Only distribution files of the system itself and files that the system creates during its operation should be there. Userside modules (usm) should not be stored there either. Use separate directories for them (e.g. /opt/userside). Extraneous files in the userside directory can be removed during the upgrade process.
  • Save the userside3/main/config/custom_api.php and userside3/main/skins/user_style.css (if any) files. These can come in handy in case of update errors and deleting them when doing so.
  • Most files in the userside web directory have, for security reasons, changed their location several levels up and are now inaccessible via the web.
  • Version 3.19 requires PHP version 8.3. You can install all the necessary packages in addition to your existing different PHP version. If you are using LDAP, also install php8.3-ldap. If you are using TurboSMS, install php8.3-soap.
sudo apt install -y php8.3-{fpm,cli,common,curl,intl,mbstring,opcache,pgsql,readline,xml,zip,snmp,gd}
  • If php8.3 is not in your repository, use an alternative repository such as deb.sury.org by adding it to your system as follows and then repeating the PHP8.3 installation command above:
sudo curl -sSLo /usr/share/keyrings/deb.sury.org-php.gpg https://packages.sury.org/php/apt.gpg
sudo sh -c 'echo "deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list'
sudo apt update
  • Change the PHP configuration as follows and restart the php-fpm service.
sudo sed -i "s@^;date.timezone.*@date.timezone = $(cat /etc/timezone)@" /etc/php/8.3/fpm/php.ini
sudo sed -i "s@^;date.timezone.*@date.timezone = $(cat /etc/timezone)@" /etc/php/8.3/cli/php.ini
sudo sed -i "s@;cgi.fix_pathinfo=1@cgi.fix_pathinfo=0@" /etc/php/8.3/fpm/php.ini
sudo sed -i "s@post_max_size = 8M@post_max_size = 100M@" /etc/php/8.3/fpm/php.ini
sudo sed -i "s@upload_max_filesize = 2M@upload_max_filesize = 100M@" /etc/php/8.3/fpm/php.ini
sudo sed -i "s@max_execution_time.*@max_execution_time = 300@" /etc/php/8.3/fpm/php.ini
sudo sed -i "s@max_input_time.*@max_input_time = 300@" /etc/php/8.3/fpm/php.ini
 
sudo systemctl restart php8.3-fpm
  • In NGINX, change the PHP version used for the updated copy of USERSIDE. If you followed the system installation instructions, in /etc/nginx/conf.d/default.conf or userside.conf or whatever you used to configure userside, change the line:
fastcgi_pass  unix:/run/php/php8.1-fpm.sock;

on a line

fastcgi_pass  unix:/run/php/php8.3-fpm.sock;

and reread the nginx configuration:

sudo nginx -s reload
  • In NGINX, change the primary location / entirely for the next:
location / {
    try_files $uri $uri/ /index.php$is_args$args;
}
  • Note that when you invoke the command php from the command line, php8.3 will now be invoked, since it is the latest version installed. If you're still using php8.1 anywhere, you'll need to change the php call in those places or change the alternate php command to run the version you want.
  • USERSIDE 3.19 requires Python version 3.9 or newer. If your version is lower than 3.9, you must install the newer version before proceeding. Preferably use Python 3.11.
sudo -u www-data php userside_install.phar install
  • The following action only needs to be performed if you updated Python. If you haven't updated, you don't need to do it:
cd /var/www/userside/microservice/poller
sudo rm -rf venv
sudo python3.11 -m venv venv
  • You need to update (install) the dependencies for poller:
cd /var/www/userside/microservice/poller
sudo venv/bin/pip install --upgrade pip
sudo venv/bin/pip install -U -r requirements.txt
  • Redesigned low-level interrogation of equipment (PON, TDR).
  • The system of two SNMP-communities is replaced by one SNMP-community. This one SNMP-community will be the one that was specified in the rw-community field. If the rw-community field was empty - the value of the ro-community field will be used
  • Don't forget to upgrade all modules to their latest versions
  • If you are using the usm_pon module - reconfigure it to run at the required frequency in system cron, depending on how many OLTs you have. The module now polls only one device per run (previously all devices were polled simultaneously without the ability to mitigate load and skip unnecessary devices). Devices will be polled one at a time. At each startup, the next device with polling enabled will be polled.
  • You can now configure separate notification templates for different types of tasks. Check your existing templates for correct migrations.

List of changes: view

Performing an upgrade: instruction