Upgrade Notes 23.05-23.07

backup

Be sure to back up the database before upgrading the system!

Update algorithm

  1. Complete stop of all Webitel services
  2. Upgrading Debian Linux and updating Webitel applications to v23.07
  3. Database migration from Webitel v23.05 to v23.07
  4. Restarting all services after upgrading to Webitel v23.07

Complete stop of all Webitel services:

systemctl stop webitel-api webitel-app webitel-uac messages-bot messages-srv \
  engine call_center storage flow_manager rabbitmq-server consul \
  freeswitch ngcp-rtpengine-daemon opensips grafana-server nginx

Upgrading Debian Linux and updating Webitel applications to v23.07. You need to request access to the Webitel repositories from your manager.

WBTU=webitel_repo_user
WBTP=webitel_repo_password

wget --http-user=$WBTU --http-password=$WBTP -O /usr/share/keyrings/webitel-repo.gpg http://deb.webitel.com/webitel-repo.gpg
echo "machine http://deb.webitel.com login $WBTU password $WBTP" > /etc/apt/auth.conf.d/webitel.conf
echo "deb [signed-by=/usr/share/keyrings/webitel-repo.gpg] http://deb.webitel.com/debian `lsb_release -sc` main" > /etc/apt/sources.list.d/webitel.list
echo "deb [signed-by=/usr/share/keyrings/webitel-repo.gpg] http://deb.webitel.com/debian `lsb_release -sc` 23.07-releases" >> /etc/apt/sources.list.d/webitel.list

apt update && apt upgrade

Database migration from Webitel v23.05 to v23.07

su postgres
cd ~
psql webitel -qxc "ALTER EXTENSION timescaledb UPDATE;" 
wget https://git.webitel.com/projects/WEP/repos/postgres/raw/migration/23.05-23.07.sql
psql webitel -f 23.05-23.07.sql
rm 23.05-23.07.sql
exit

Update or merge the nginx configuration file (if it was changed manually):

curl https://git.webitel.com/projects/WEP/repos/nginx/raw/default \
 -o /etc/nginx/sites-available/default.orig
vimdiff /etc/nginx/sites-enabled/default /etc/nginx/sites-available/default.orig
nginx -t

Restarting all services after upgrading to Webitel v23.07

systemctl restart consul
systemctl restart postgresql
systemctl restart rabbitmq-server

systemctl restart webitel-app webitel-uac webitel-api engine \
  messages-srv flow_manager messages-bot call_center storage \
  freeswitch ngcp-rtpengine-daemon opensips grafana-server nginx