This procedure describes the process required to update the jtel system, assuming a MySQL server 8.0.x and portal release 3.23 or above.
Running Commands
All of the commands on this page are designed to be run by the jtel user.
Backup
Always have a way back. Remember to backup your system before updating.
Snapshots
Cold Snapshots
The simplest way to backup a system is using cold snapshots - i.e. shutdown the relevant VMs and take a snapshot when they are powered off.
This will ensure a consistent backup.
Live Snapshots
Live snapshots may not work.
In particular, if you are using replication, a running "live" snapshot of two databases may be inconsistent, and you may need to rebuild the slave after restoring the snapshot.
Also, when using DRBD to replicate the file system, this may also not work.
If you do take live snapshots, then it is probably best to:
- Snapshot the slave database before the master. That way, you have a chance that the slave can catch up to the master. If you do it the other way round, the slave will always be inconsistent as the master will not have the next position in the binary logs when it starts.
- Snapshot the passive storage before the active storage. The same principle applies.
Note, this will only give you a chance of data consistency, not a guarantee.
Manual Backup
If you do a manual backup, then as a minimum, backup the following into /srv/jtel/shared/backup/<Folder_CurrentDate>:
Backup Folder
JT_DATE_TIME=$(date +%F) mkdir /srv/jtel/shared/backup/${JT_DATE_TIME}
Data Directory
Tar up the data directory on the active STORE machine as follows:
tar cfvz /srv/jtel/shared/backup/${JT_DATE_TIME}/Data_Before_Update.tar.gz /srv/jtel/shared/Data
JTEL and JTELCarrierPortal Repositories
tar cfvz /srv/jtel/shared/backup/${JT_DATE_TIME}/JTEL_Before_Update.tar.gz /srv/jtel/shared/JTEL tar cfvz /srv/jtel/shared/backup/${JT_DATE_TIME}/JTELCarrierPortal_Before_Update.tar.gz /srv/jtel/shared/JTELCarrierPortal
If jtel-system-java-services exists
tar cfvz /srv/jtel/shared/backup/${JT_DATE_TIME}/jtel-system-java-services_Before_Update.gz /srv/jtel/shared/jtel-system-java-services
If a customer directory exists
tar cfvz /srv/jtel/shared/backup/${JT_DATE_TIME}/<CustomerDir_Before_Update>.gz /srv/jtel/shared/<CustomerDir>
Manual Backups
Services on the Telephony Server must be backed up manually. The minimum of services is:
- 8Server
- PlatformUDPListener
- PBXConnector
There may also be services like jrest, IMAP or Exchange
MySQL
Backup the MySQL Master Database from the active STORE machine as follows:
CAUTION PASSWORD
mysqldump -uUSER -pPWD -hacd-dbm --single-transaction --master-data=2 --databases JTELWeb JTELStats JTELStats2 JTELLog --add-drop-database --add-drop-table --events --routines --triggers > /srv/jtel/shared/backup/${JT_DATE_TIME}/ACD-DBM_Before_Update.sql
After MySQL Version 8.0.27
mysqldump -uUSER -pPWD -hacd-dbm --single-transaction --source-data --databases JTELWeb JTELStats JTELStats2 JTELLog --add-drop-database --add-drop-table --events --routines --triggers > /srv/jtel/shared/backup/${JT_DATE_TIME}/ACD-DBM_Before_Update.sql
Check GIT Status
Check the GIT status of the repository on the active STORE as follows, for the JTEL and JTELCarrierPortal repositories:
cd /srv/jtel/shared/JTEL git status cd /srv/jtel/shared/JTELCarrierPortal git status cd /srv/jtel/shared/jtel-system-java-services git status
You should see output like this for both directories:
On branch release/stable-3.27 Your branch is up to date with 'origin/release/stable-3.27'. nothing to commit, working tree clean
Files which have been changed or are not tracked
Example
The following shows an example of this:
On branch release/stable-3.27 Your branch is up to date with 'origin/release/stable-3.27'. Changes not staged for commit: (use "git add <file>..." to update what will be committed) (use "git restore <file>..." to discard changes in working directory) modified: AppServer/jtel.Portal.Daemon.FTP.CheckUploads.j5 Untracked files: (use "git add <file>..." to include in what will be committed) DB/NetworkIVR/MyNewScript.sql no changes added to commit (use "git add" and/or "git commit -a")
Backup Changes and Untracked Files
Now, backup any files which have been changed, and any files which are not included in the repository.
Also, make a note of the exact commit, in which the repository was in.
The following script will do this for you:
# Directory Name in /srv/jtel/shared/backup JT_DATE_TIME=$(date +%F-%H%M%S) # JTEL Directory cd /srv/jtel/shared/JTEL mkdir -p ../backup/${JT_DATE_TIME}/JTEL git rev-parse HEAD > ../backup/${JT_DATE_TIME}/JTEL/README_git_commit_hash.txt git status > ../backup/${JT_DATE_TIME}/JTEL/README_git_status.txt rsync -R $(git ls-files --modified --others --exclude-standard) ../backup/${JT_DATE_TIME}/JTEL # JTELCarrierPortal Directory cd /srv/jtel/shared/JTELCarrierPortal mkdir -p ../backup/${JT_DATE_TIME}/JTELCarrierPortal git rev-parse HEAD > ../backup/${JT_DATE_TIME}/JTELCarrierPortal/README_git_commit_hash.txt git status > ../backup/${JT_DATE_TIME}/JTELCarrierPortal/README_git_status.txt rsync -R $(git ls-files --modified --others --exclude-standard) ../backup/${JT_DATE_TIME}/JTELCarrierPortal # jtel-system-java-services Directory cd /srv/jtel/shared/jtel-system-java-services mkdir -p ../backup/${JT_DATE_TIME}/jtel-system-java-services git rev-parse HEAD > ../backup/${JT_DATE_TIME}/jtel-system-java-services/README_git_commit_hash.txt git status > ../backup/${JT_DATE_TIME}/jtel-system-java-services/README_git_status.txt rsync -R $(git ls-files --modified --others --exclude-standard) ../backup/${JT_DATE_TIME}/jtel-system-java-services
Revert or Delete Files
Now, the files must be deleted or reverted.
The following script will do this for you:
# JTEL Directory cd /srv/jtel/shared/JTEL git checkout -- . git clean -fd # JTELCarrierPortal Directory cd /srv/jtel/shared/JTELCarrierPortal git checkout -- . git clean -fd # jtel-system-java-services Directory cd /srv/jtel/shared/jtel-system-java-services git checkout -- . git clean -fd cd /srv/jtel/shared/
Update
Stop Services
Stop the following services:
Machine(s) | Stop what | It is installed if you are using | How to stop |
---|---|---|---|
Telephony Servers | 8-Server | ACD / IVR | X the cmd file starter window. For service installations, stop the robot5 service. |
Platform UDP Listener | ACD / IVR | X the cmd file starter window. For service installations, stop the jtel Platform UDP Listener service. | |
REST API | REST | X the cmd file starter window. For service installations, stop the jtel jrest service. | |
Presence Aggregator | A PBX or presence connector which uses the presence aggregator:
| X the cmd file starter window. For service installations, stop the jtel Presence Aggregator service. | |
Telephony Connector | A PBX which uses a custom connector:
| X the cmd file starter window. For service installations, stop the service, for example the jtel TAPI service or jtel Innovaphone Service. | |
Exchange Connector | E-Mail with an Exchange or Office 365 Server | Stop the jtelEWSMailService service. | |
IMAP Connector | E-Mail with an IMAP(S) Server | Stop the jtelIMAPMailService service. | |
Web Servers | Wildfly | Anything | sudo systemctl stop wildfly For installations not using systemctl: sudo service wildfly stop |
Chat Servers | Chat Server | CHAT | sudo systemctl stop jtel-clientmessenger For installations not using systemctl: sudo service jtel-clientmessenger stop |
DB Servers | Platform UDP Listener | SOAP | sudo systemctl stop jtel-listener For installations not using systemctl: sudo service jtel-listener stop |
Pull the Updates
Pull the updates as follows:
JTEL
cd /srv/jtel/shared/JTEL git pull
JTELCarrierPortal
cd /srv/jtel/shared/JTELCarrierPortal git pull
jtel-system-java-services
cd /srv/jtel/shared/jtel-system-java-services git pull
Checkout the Release
Checkout the required release as follows:
cd /srv/jtel/shared/JTEL git checkout release/stable-3.34 cd /srv/jtel/shared/JTELCarrierPortal git checkout release/stable-3.34 cd /srv/jtel/shared/jtel-system-java-services git checkout release/stable-3.34
Check for a Customer Directory
Check if there is a customer directory with customised software.
This will be in /srv/jtel/shared and will resemble the customer name. For example, for jtel it might be cjtel-software.
Remember the directory name - you will need it in the next step.
Note: recommend you do not mess with this directory, unless you are the author of the directory contents.
Get the new Binaries and Run the Update Script
Run as follows:
cd /srv/jtel/shared/JTELCarrierPortal/Update bash ./get_binaries.sh sudo bash ./update_release.sh
You will be asked for the following:
Question | Answer |
---|---|
[sudo] password for jtel: | The jtel user password |
mysql host address: | acd-dbm For redundant installations only: acd-dbm1 or acd-dbm2, depending on which is active |
mysql user name: | root |
mysql password: | The MySQL root password |
customer directory: | The customer directory from above, or just ENTER if none is present. |
Check the Output
This is an example of a successful update (shortened):
-------------------------------------- JTELCarrierPortal - full update script -------------------------------------- mysql host address: acd-dbm mysql user name: root mysql password: xxxxxx customer directory: Settings -------- MYSQLHOST: acd-dbm MYSQLUSER: root MYSQLPASS: xxxxxx CUSTOMERDIR: ----------------------------------------- Phase 1 - files, directories, permissions ----------------------------------------- Copying Data/system/help from JTELCarrierPortal ... done! Copying Data/system/gui from JTEL ... done! Removing no longer needed .xls.jrxml files ... done! Copying Data/system/jasper from JTELCarrierPortal ... done! Ensure correct file permissions in JTELCarrierPortal ... done! Ensure correct file permissions in Data ... done! Ensure correct file permissions in JTEL ... done! Phase 1 - files, directories, permissions - DONE. -------------------- Phase 2 - DB Updates -------------------- Call update_all.sh in JTELCarrierPortal ... Updating database ... mysql_execute: portal Update_JTELDatabases.sql ... done! mysql_execute: portal Update_JTELWeb_Utils.sql ... done! mysql_execute: delete Delete_JTELLog.sql ... done! mysql_execute: delete Delete_JTELWeb.sql ... done! mysql_execute: delete Delete_JTELStats.sql ... done! mysql_execute: delete Delete_ResourcesParams.sql ... done! mysql_execute: fixes CSTUTT-278_JTELStats.FixStatistics_UsersLogin.sql ... done! mysql_execute: fixes CSTUTT-278_JTELStats.FixStatistics_UsersGroupsLogin.sql ... done! mysql_execute: fixes JTELWeb.RemoveTranslators.sql ... done! mysql_execute: init AreaCodes_AT.sql ... done! mysql_execute: cleaners Cleaners.sql ... done! mysql_execute: portal Update_JTELLog.sql ... done! mysql_execute: portal Update_JTELWeb.sql ... done! mysql_execute: portal Update_JTELStats.sql ... edone! mysql_execute: importexport2 Update_JTELWeb_ImportExport2.sql ... done! mysql_execute: hardstyle Update_JTELWeb_Hardstyle.sql ... done! mysql_execute: acd Update_JTELWeb_Acd.sql ... done! mysql_execute: acd Update_JTELStats_Acd.sql ... done! mysql_execute: cache Update_JTELWeb_Cache.sql ... done! mysql_execute: cache Update_JTELStats_Cache.sql ... done! mysql_execute: conf Update_JTELWeb_Conf.sql ... done! mysql_execute: conf Update_JTELStats_Conf.sql ... done! mysql_execute: dialler Update_JTELWeb_Dialler.sql ... done! mysql_execute: dialler Update_JTELStats_Dialler.sql ... done! mysql_execute: jts_service JTS_Service.sql ... done! mysql_execute: presence Update_Presence.sql ... done! mysql_execute: salesforce Update_SalesForce.sql ... done! mysql_execute: sap Update_SAP.sql ... done! mysql_execute: cockpit cockpit.sql ... done! mysql_execute: jtelstats2 Update_JTELWeb.sql ... done! mysql_execute: jtelstats2 Update_JTELStats2.sql ... done! mysql_execute: jrest jrest_ResourcesParams.sql ... done! mysql_execute: jrest Update_jrest.sql ... done! Database update done! Search for errors ... CONGRATULATIONS: no errors during update. Call update_all.sh in JTEL ... Updating database.......... CONGRATULATIONS: no errors during update. Call update_translations.sh in JTELCarrierPortal ... Updating translations ... mysql_execute: translations Update_JTELWeb_Translations.sql ... done! Database update done! Search for errors ... CONGRATULATIONS: no errors during update. Phase 2 - DB Updates - DONE. ------------------------------------------------------------------------------------------- All done. REMEMBER: the error checking in this script is not perfect - SO TEST, TEST, TEST! -------------------------------------------------------------------------------------------
Wildfly Font Patch
On each of the Wildfly Webservers, run the following script (as root or with sudo):
/home/jtel/shared/JTELCarrierPortal/Update/patch_debian_lucida.sh
Automatic Updates
Some services will update automatically, when they are restarted further below.
Manual Updates
The following services must currently be updated manually by copying the new binaries from //acd-store/shared.
Machine(s) | What | It is installed if you are using | How to update |
---|---|---|---|
Telephony Servers | Platform UDP Listener | ACD / IVR | For service installations only: start the listener once, manually using c:\PlatformUDPListener\startListener.bat then stop it again once it is running. |
REST API | REST | Copy all files from \\acd-store\shared\jtel-system-java-services\deploy\jrest\bin to the local installation directory. | |
Presence Aggregator | A PBX or presence connector which uses the presence aggregator:
| Copy all files from \\acd-store\shared\jtel-system-java-services\deploy\presence-aggregator\bin to the local installation directory. | |
Telephony Connector | A PBX which uses a custom connector:
| Copy all files, except for the configuration file, from the relevant directory in \\acd-store\shared\JTELCarrierPortal\WebServices\Install | |
Exchange Connector | E-Mail with an Exchange or Office 365 Server | Copy all files, except for jtelEWSMailService.exe.config from \\acd-store\shared\JTELCarrierPortal\WebServices\Install\jtelEWSMailService to the local installation directory. On older installations, the .NET Framework packages might need to be updated. The configuration file might also have to be changed if an older installation is being updated. | |
IMAP Connector | E-Mail with an IMAP(S) Server | Copy all files, except for jtelIMAPMailService.exe.config from \\acd-store\shared\JTELCarrierPortal\WebServices\Install\jtelIMAPMailService to the local installation directory. On older installations, the .NET Framework packages might need to be updated. The configuration file might also have to be changed if an older installation is being updated. |
8-Server Update
8-Server is updated by pulling the git repository, checking out the newest release (for example release/rc-5.23.27) and running copy_keyfile_en_mcp_v67.cmd from C:\8Server\deploy\OEM\JTEL\.
cd C:\8Server\deploy\OEM\JTEL\ copy_keyfile_en_mcp_v67.cmd
Cygwin Update
Cygwin is updated as follows from a .CMD window.
This also installs any packages which are not already present.
This assumes that cygwin installer .EXE is still in the downloads folder.
"%USERPROFILE%\Downloads\setup-x86_64.exe" ^ --site http://ftp-stud.hs-esslingen.de/pub/Mirrors/sources.redhat.com/cygwin/ ^ --no-shortcuts ^ --no-desktop ^ --quiet-mode ^ --root "c:\cygwin" ^ --arch x86_64 ^ --local-package-dir "c:\cygwin\packages" ^ --verbose ^ --prune-install ^ --packages openssh,ncftp,wget,curl,lftp,libiconv
Update all of the .NET Packages on the windows machines. Use the following Commands:
.NET Packages on all Windows Machines
powershell -command "& { Start-BitsTransfer -Source https://cdn.jtel.de/downloads/DotNET/dotnet-sdk-6.0.403-win-x64.exe -Destination $Env:UserProfile\Downloads }" powershell -command "& { start-process -FilePath $Env:UserProfile\Downloads\dotnet-sdk-6.0.403-win-x64.exe -ArgumentList '/install /passive /norestart' -Verb RunAs -wait }" powershell -command "& { Start-BitsTransfer -Source https://cdn.jtel.de/downloads/DotNET/NDP48-x86-x64-AllOS-ENU.exe -Destination $Env:UserProfile\Downloads }" powershell -command "& { start-process -FilePath $Env:UserProfile\Downloads\NDP48-x86-x64-AllOS-ENU.exe -ArgumentList '/install /passive /norestart' -Verb RunAs -wait }"
Install Java on Windows Machines
Download here and install:
https://adoptium.net/de/temurin/
Create MySQL User for Customer (If not exist)
And update the permissions for JTEL* and JTELCustomer DBs:
Role DATA - Create MySQL User for Customer Access (Debian/Win2019)
Update Backup-Routine
Add "JTELCustomer" to backup routine at acd-dbm.
vi /home/jtel/jtel_dailyjobs/jtel_backup.sh
Restart Services
Start the following services:
Machine(s) | Start what | It is installed if you are using | How to start |
---|---|---|---|
Telephony Servers | 8-Server | ACD / IVR | Explorer to shell:startup - start the link to startup_launcher.cmd For service installations, start the robot5 service. |
Platform UDP Listener | ACD / IVR | Explorer to shell:startup - start the link to startListener.bat For service installations, start the jtel Platform UDP Listener service. | |
REST API | REST | Explorer to shell:startup - start the link to start-jrest.cmd For service installations, start the jtel jrest service. | |
Presence Aggregator | A PBX or presence connector which uses the presence aggregator:
| Explorer to shell:startup - start the link to start-presence-aggregator.cmd For service installations, start the jtel Presence Aggregator service. | |
Telephony Connector | A PBX which uses a custom connector:
| Explorer to shell:startup - start the link to JTELInnovaphonePBXService.exe or jtelTAPIMonitorService.exe For service installations, start the service, for example the jtel TAPI service or jtel Innovaphone Service. | |
Exchange Connector | E-Mail with an Exchange or Office 365 Server | Start the jtelEWSMailService service. | |
IMAP Connector | E-Mail with an IMAP(S) Server | Start the jtelIMAPMailService service. | |
Web Servers | Wildfly | Anything | Update from deploy sudo /usr/local/bin/updatejb.sh Update Core Thread Configuration The following command is only required if a package update HAS ALREADY BEEN DONE - If the package update is being done, the changes that the script makes are already in there ./set_task_core_threads.sh Package Upgrade - If it has not already been done |
Chat Servers | Chat Server | CHAT | sudo /usr/local/bin/updatesc.sh |
DB Servers | Platform UDP Listener | SOAP | sudo /usr/local/bin/updatepl.sh |
Test
It goes without saying, that you should now run some tests.