Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Документ описывает процесс обновления сервера Webitel версии The document describes the process of updating Webitel server version 3.8 до версии to version 3.9.

Warning

Webitel 3.9

хранит записи разговоров в новом формате. К сожалению, это не позволит перенести графики уже настроенные в Kibana автоматически. Все отчеты необходимо будет создать повторно. Учтите это, прежде чем приступить к обновлению.

Резервное копирование

keeps a record of conversations in a new format. Unfortunately, this will not allow transferring schedules already configured to Kibana automatically. All reports will need to be re-created. Consider this before upgrading.

Backup

Before you proceed to the upgrade, we recommend that you back up the current configurationиПрежде чем преступить к обновлению, рекомендуем выполнить резервное копирование текущей конфигурации:

Code Block
/opt/orchestration/bin/bootstrap.sh backup

Процесс обновления

Update process

Delete all docker containers and update permissionsУдалить все docker контейнеры и обновить права доступа:

Code Block
sudo -s
docker rm -f $(docker ps -aq)

Обновить базовые пакеты Update basic Linux packages:

Code Block
apt update && apt -y upgrade && apt -y autoremove
curl -sSL https://get.docker.com/ | sh
curl -L "https://github.com/docker/compose/releases/download/1.20.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

В файлеIn the / opt / orchestration / env / environment измените версию webitel на 3file, change the version of the webitel to  3.9.0

Code Block
export WEBITEL_VERSION="3.9.0"

Обновить Refresh Webitel:

Code Block
cd /opt/orchestration
git checkout master
git pull
git checkout v3.9.0
./bin/bootstrap.sh pull

Миграция SQL базы данных в новый форматMigrate SQL database to new format:

Code Block
./bin/bootstrap.sh 3.8.x-3.9.0

Запуск обновленный серверRunning the updated server:

Code Block
./bin/bootstrap.sh up -d

Очищаем кеш браузера и webitel обновлен!

Перенос статистики

Clear browser cache and webitel updated!

Statistics transfer

Delete old dataУдаляем старые данные:

Code Block
languagebash
docker exec -it mongo mongo webitel --eval "db.agentStatusEngine.drop()"
docker exec -it mongo mongo webitel --eval "db.collectionPublic.drop()"
docker exec -it mongo mongo webitel --eval "db.collectionDefault.drop()"
docker exec -it mongo mongo webitel --eval "db.collectionExtension.drop()"
docker exec -it mongo mongo webitel --eval "db.collectionDomainVar.drop()"
docker exec -it mongo mongo webitel --eval "db.collectionAgentStatus.drop()"

Переходим к конвертации статистики Webitel из старого формата в новый.

Warning

Обратите внимание, что скорость переноса старой статистики в новый формат зависит от количества данных и мощности сервера.

We turn to converting Webitel statistics from the old format to the new one.

Warning

Please note that the speed of transferring old statistics to the new format depends on the amount of data and server capacity.

Run the processЗапускаем процесс:

Code Block
cd /opt/orchestration
./bin/bootstrap.sh cdr-upgrade

После того, как статистика перенесена и мы убедились, что все работает, смело удаляем старые данныеAfter the statistics have been transferred and we made sure that everything works, we can safely delete the old data:

Code Block
docker rmi $(docker images)
rm -rf /opt/webitel/elasticsearch5
docker exec -it mongo mongo webitel --eval "db.cdr.drop()"

Процесс завершенThe process is complete.