The jtel Portal System is moving to use MySQL 8.x instead of the older MySQL 5.6.
Currently, the latest release of the portal 3.15 supports both versions of MySQL, however this is only an interim measure, and this will change in a coming release soon such that MySQL 8.x is required.
This procedure describes how to update the system to MySQL 8.x.
This is a non trivial operation. Only proceed if you have adequate rollback mechanisms in place, such as snapshots of your virtual machines and a backup of the database. ALL INSTALLATIONS
INSTALLATIONS WITH REPLICATION
|
yum-utils must be installed using yum -y install yum-utils
This is a multi-stage operation, since the MySQL system does not support missing out updates to versions - to move from 5.6 to 8.0 it is required to first update to 5.7.
Do not proceed unless the Pre-Requisites are done. The procedure WILL NOT WORK with an earlier version of the jtel Portal installed. |
There are several configuration items which need to be set in the slave configuration before proceeding.
Unfortunately, mysql 5.7 will use a different default binary log and relay log file name during the upgrade process (this is probably a bug), unless these steps are completed.
Complete this procedure for all slaves (also both masters in master-master replication).
|
Remember - for replicated installations, start with the slaves first. Then update the masters, one after the other.
|
Remove the old MySQL yum repository.
|
Next, install the new MySQL yum repository, using the command relevant to the OS version being used.
You can determine the OS being used, with the following command:
|
For CentOS 7:
|
For CentOS 6:
|
This involves clearing the version-lock table, and enabling the 5.7 update path.
Note, the yum command is issued without the -y option. You should check what the system is about to do before confirming this step.
|
Start the mysql Server without replication.
|
|
Either change the password in the following command, or simply use the -p option without specifying a password, and entering it at the prompt.
|
Check the output from this phase before proceeding - if this procedure is showing non-recoverable error messages, then the procedure has gone wrong, and you must rollback here.
Next restart the MySQL server.
|
|
|
Only proceed if no errors are found.
The jtel Portal is NOT compatible with MySQL 5.7 - you must continue the upgrade path to 8.x at this point. Upgrade ALL Servers to 5.7 before proceeding. |
Proceeding after this point without Version 3.15 or later of the jtel Portal installed, will break the database, and a rollback will be necessary. Remember - first the slaves, then the masters. One after the other. |
|
Note, the yum command is issued without the -y option. You should check what the system is about to do before confirming this step.
|
Start the mysql Server.
|
|
Note, that starting the mysql server may take some time. It may even appear to be hung, but wait for a few minutes and let it complete.
mysql_upgrade is run automatically by all current 8.x versions of MySQL Server. The output of mysql_upgrade can be found in /var/log/mysqld.log and errors will be in /var/log/messages Check these files for errors. |
Check Database and Replication and Version are OK
|
Run the Portal update script again. This will optimise the scripts for MySQL 8.x.
|
You can simply install the new version of the JBOSS Server, at least jboss-as-7.1.1.FINAL.14.tar.gz from cdn.jtel.de.
This contains the required components, but will require that the hazelcast.xml and standalone-full.xml files are updated as described in the installation of the webserver, see here: Role WEB
The JBOSS server requires a new connector to attach to MySQL 8.x.
This can be copied to the JBOSS server instance, using the following command (run for example from /home/jtel/shared/JTELCarrierPortal/Update), as the jtel user:
|
The standalone-full.xml configuration file requires some modifications.
A new connection property must be added to the datasource configurations for MySQL. This must be added to the datasource configurations for JTELWeb, JTELWebSlave, JTELStats, JTELLog and JTELReports.
See the following example:
|
In the drivers section, make sure that the driver class line is included for the mysql driver.
This will only be missing on very old jboss installations, if this is the case, it might be better to update the jboss server to a new release completely.
|
The Rollback string for MySQL Versions 8.x (in fact MySQL 5.7) and higher has changed, and will need to be reconfigured in 8-Server.
The new rollback string is:
|
8-Server should be restarted after making this change:
The DB scripts are being run from a different server than the updated MySQL server(s).
This is good! You should run them from the role STORE.
However, you will need to update the mysql client on these machines too. Do this (change the second line for CentOS 6.x - see above for the RPM required):
|
Now run the scripts again.
Try running the DB script again.
For example, earlier versions of DB Forge will fail when connecting to MySQL 8.x.
Update the tool.
The following series of commands issed in mysql might sometimes help to restart the slave, without rebuilding replication from scratch:
|
If the upgrade to 8.x fails, try rolling back to 5.7 as follows, and resolve the problem in 5.7 before proceeding.
|