Upgrade 3.19: различия между версиями

Материал из WiKi - UserSide
Нет описания правки
Нет описания правки
 
(не показано 7 промежуточных версий 2 участников)
Строка 10: Строка 10:
* Now we have "[[Two-Factor Authentication (2FA)]]". Don't neglect security and use it.
* Now we have "[[Two-Factor Authentication (2FA)]]". Don't neglect security and use it.


* Most files in the userside web directory have, for security reasons, changed their location several levels up and are now inaccessible via the web.
* Most files in the userside web directory have, for security reasons, changed their location several levels up and are now inaccessible via the web. Also changed the name of the directory that should be the root directory for the web to the default name public.


* System page/link routing has been changed
* System page/link routing has been changed
Строка 20: Строка 20:
* In version 3.19, the sections are declared obsolete:
* 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
** "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
** "[[Unknown MAC-addresses]]". In version 3.20 the section will be removed
** "Technical support interface". In version 3.20 the section will be removed
** "Technical support interface". In version 3.20 the section will be removed


* [[Upgrade_(installer)|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.
* [[Upgrade]]. '''Recommended to 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.


* Our Telegram group for mutual communication of clients with each other: https://t.me/usersideeu and the news channel: https://t.me/userside
* Our Telegram group for mutual communication of clients with each other: https://t.me/usersideeu and the news channel: https://t.me/userside
Строка 31: Строка 31:
When upgrading in a Docker environment, refer to the [https://github.com/userside/userside-docker/tree/v3.18 instructions] in the Docker bundle repository.
When upgrading in a Docker environment, refer to the [https://github.com/userside/userside-docker/tree/v3.18 instructions] in the Docker bundle repository.


* If you are upgrading from a version 3.10 - check out the page: [[Upgrade 3.11 EN| Upgrade 3.11]]
* 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 EN| Upgrade 3.12]]
* 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 EN| Upgrade 3.13]]
* 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 EN| Upgrade 3.14]]
* 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 EN| Upgrade 3.15]]
* 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 EN| Upgrade 3.16]]
* 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 EN| Upgrade 3.17]]
* 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 EN| Upgrade 3.18]]
* 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.
* 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.
Строка 74: Строка 74:
</pre>
</pre>


* 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:
* create a new public directory inside the userside directory (if you have it installed elsewhere, edit the command before executing):
<pre>
sudo mkdir -p /var/www/userside/public
</pre>
 
* In the NGINX server configuration (/etc/nginx/conf.d/userside.conf), change the paths to the root directory. The line:
<pre>
root  /var/www/userside/userside3;
</pre>
Replace it with:
<pre>
root  /var/www/userside/public;
</pre>
* Also change there <code>location /</code> in its entirety for the next:
<pre>
location / {
    try_files $uri $uri/ /index.php$is_args$args;
}
</pre>
* Also there for <code>location ~ \.php$</code> change the value for fastcgi_pass from:
  fastcgi_pass  unix:/run/php/php8.1-fpm.sock;
  fastcgi_pass  unix:/run/php/php8.1-fpm.sock;
on a line
to
  fastcgi_pass  unix:/run/php/php8.3-fpm.sock;
  fastcgi_pass  unix:/run/php/php8.3-fpm.sock;
and reread the nginx configuration:
and reread the nginx configuration:
  sudo nginx -s reload
  sudo nginx -s reload


* In NGINX, change the primary <code>location /</code> entirely for the next:
* For the websocket-user (websock-user) of the RabbitMQ broker, you need to change the permissions as follows:
<pre>
<pre>
location / {
sudo rabbitmqctl set_permissions -p "/" "websock-user" "^erp-stomp:id-.*" "" "^erp-stomp:id-.*"
    try_files $uri $uri/ /index.php$is_args$args;
}
</pre>
</pre>
If your websocket-user name is different from websock-user, specify it instead of websock-user in the above commands.


* Note that when you invoke the command <code>php</code> 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.
* Note that when you invoke the command <code>php</code> 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 [[Python-update EN|must install the newer version]] before proceeding. Preferably use Python 3.11.
* USERSIDE 3.19 ''requires Python3 of any currently supported version. The status of versions can be viewed here:"[https://devguide.python.org/versions/ Status of Python versions]". It is recommended to use a version with "security" or "bugfix" status. Versions marked as "end-of-life" are not supported. Versions marked as "feature" are not recommended. If you have an unsupported version ("end-of-life") installed on your host, you should be sure to [[Python-update_EN|install additionally]] a more recent version of Python.''


* Use the automatic [[Installer|installer]] to perform [[Upgrade_(installer)|upgrade]]:
* Use the automatic [[Installer|installer]] to perform [[Upgrade|upgrade]]:
  sudo -u www-data php userside_install.phar install
  sudo -u www-data php userside_install.phar install


Строка 121: Строка 139:
'''List of changes:''' [[3.19_EN|view]]
'''List of changes:''' [[3.19_EN|view]]


'''Performing an upgrade:''' [[Upgrade_(installer)|instruction]]
'''Performing an upgrade:''' [[Upgrade|instruction]]

Текущая версия от 12:49, 18 октября 2024

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. Also changed the name of the directory that should be the root directory for the web to the default name public.
  • 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. Recommended to 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
  • create a new public directory inside the userside directory (if you have it installed elsewhere, edit the command before executing):
sudo mkdir -p /var/www/userside/public
  • In the NGINX server configuration (/etc/nginx/conf.d/userside.conf), change the paths to the root directory. The line:
root   /var/www/userside/userside3;

Replace it with:

root   /var/www/userside/public;
  • Also change there location / in its entirety for the next:
location / {
    try_files $uri $uri/ /index.php$is_args$args;
}
  • Also there for location ~ \.php$ change the value for fastcgi_pass from:
fastcgi_pass  unix:/run/php/php8.1-fpm.sock;

to

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

and reread the nginx configuration:

sudo nginx -s reload
  • For the websocket-user (websock-user) of the RabbitMQ broker, you need to change the permissions as follows:
sudo rabbitmqctl set_permissions -p "/" "websock-user" "^erp-stomp:id-.*" "" "^erp-stomp:id-.*"

If your websocket-user name is different from websock-user, specify it instead of websock-user in the above commands.

  • 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 Python3 of any currently supported version. The status of versions can be viewed here:"Status of Python versions". It is recommended to use a version with "security" or "bugfix" status. Versions marked as "end-of-life" are not supported. Versions marked as "feature" are not recommended. If you have an unsupported version ("end-of-life") installed on your host, you should be sure to install additionally a more recent version of Python.
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