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.
Always have a way back. Remember to backup your system before updating. |
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 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:
Note, this will only give you a chance of data consistency, not a guarantee.
If you do a manual backup, then as a minimum, backup the following:
Tar up the data directory on the active STORE machine as follows:
tar cfvz /srv/jtel/shared/Data_Before_Update.tar.gz /srv/jtel/shared/Data |
Backup the MySQL Master Database from the active STORE machine as follows:
mysqldump -uUSER -pPWD --single-transaction --master-data=2 --databases JTELWeb JTELStats JTELStats2 JTELLog --add-drop-database --add-drop-table --events --routines --triggers > /srv/jtel/shared/MySQL_Master_Before_Backup.sql |
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 |
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 |
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") |
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 |
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 cd /srv/jtel/shared/ |
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. | |
Web Servers | Wildfly | Anything | systemctl stop wildfly For installations not using systemctl: service wildfly stop |
Chat Servers | Chat Server | CHAT | systemctl stop jtel-clientmessenger For installations not using systemctl: service jtel-clientmessenger stop |
DB Servers | Platform UDP Listener | SOAP | systemctl stop jtel-listener For installations not using systemctl: service jtel-listener stop |
Pull the updates as follows: