Upgrading OpenVidu Pro



Be careful when upgrading your version of OpenVidu Pro:
  • Never upgrade across multiple major versions: to upgrade from 2.13.0 to 2.15.0, you must first go through 2.14.0.
  • Read carefully the Release Notes of any new version you plan to upgrade. Sometimes there are breaking changes that will require you to update your application.

Migrating from 2.13.0 to 2.14.0 🔗

Upgrading OpenVidu Server Pro Node 🔗

Connect to the OpenVidu Server Pro Node instance through SSH. Log with root permissions and go to OpenVidu installation path, by default /opt/openvidu

sudo -s
cd /opt/openvidu # Recommended and default installation path

Then you can run the upgrade script with this command:

curl https://s3-eu-west-1.amazonaws.com/aws.openvidu.io/install_openvidu_pro_2.14.0.sh | bash -s upgrade

The installation steps will output their progress as they run. If everything goes well, at the end you will see a message with the final instructions to successfully complete the upgrade process:

================================================
Openvidu successfully upgraded to version 2.14.0
================================================

1. A new file 'docker-compose.yml' has been created with the new OpenVidu 2.14.0 services.

2. The previous file '.env' remains intact, but a new file '.env-2.14.0' has been created.
Transfer any configuration you wish to keep in the upgraded version from '.env' to '.env-2.14.0'.
When you are OK with it, rename and leave as the only '.env' file of the folder the new '.env-2.14.0'.

3. If you were using Openvidu Call application, it has been automatically updated in file 
'docker-compose.override.yml'. However, if you were using your own application, a file called
'docker-compose.override.yml-2.14.0' has been created with the latest version of Openvidu Call.
If you don't plan to use it you can delete it.

4. Start new version of Openvidu
$ ./openvidu start

If you want to rollback, all the files from the previous installation have been copied to folder '.old-2.13.0'

For further information, check readme.md


Some notes on upgrading OpenVidu Server Pro Node 🔗
  • The upgrade process will restart all OpenVidu services. That means that all ongoing sessions will be destroyed.
  • Persistent data is preserved when upgrading. This means that all of your recordings and monitoring data (session history, ElasticSearch, Kibana) will be available in the new version.
  • Old Docker images will take up valuable disk space of your machine. If you don't plan to reuse them again, delete them to reclaim your GBs. docker system prune command is very useful for doing so.
  • Remember to update openvidu-browser library in your clients. Comply version compatibility according to Releases page.

Upgrading Media Node 🔗

Connect to the Media Node instance through SSH. Log with root permissions and go to OpenVidu installation path, by default /opt/kms

sudo -s
cd /opt/kms # Recommended and default installation path

Then you can run the upgrade script with this command:

curl https://s3-eu-west-1.amazonaws.com/aws.openvidu.io/install_media_node_2.14.0.sh | bash -s upgrade

The installation steps will output their progress as they run. If everything goes well, at the end you will see a message with the final instructions to successfully complete the upgrade process:

================================================
Openvidu successfully upgraded to version 2.14.0
================================================

1. A new file 'docker-compose.yml' has been created with the new OpenVidu 2.14.0 services.

2. The previous file '.env' remains intact, but a new file '.env-2.14.0' has been created.
Transfer any configuration you wish to keep in the upgraded version from '.env' to '.env-2.14.0'.
When you are OK with it, rename and leave as the only '.env' file of the folder the new '.env-2.14.0'.

3. Start new version of Media Node
$ ./media_node start

If you want to roll-back all the files from the previous installation are in the folder '.old-2.13.0'

For more information, check readme.md


Some notes on upgrading Media Nodes 🔗
  • The upgrade process will restart all OpenVidu services. That means that any ongoing sessions hosted by this Media Node will be terminated. Take this into account when upgrading your OpenVidu Pro cluster. If you have more than one Media Node, you can upgrade them one by one while others remain available to maintain your service.
  • Old Docker images will take up valuable disk space of your machine. If you don't plan to reuse them again, delete them to reclaim your GBs. docker system prune command is very useful for doing so.
  • You must perform the upgrading steps in all of your Media Nodes. Be sure to upgrade the OpenVidu Server Pro Node and all of the Media Nodes to the same version number.



Migrating from ≤2.12.0 to 2.13.0 🔗

Unfortunately upgrading OpenVidu Pro to 2.13.0 from any past version will require you to completely wipe out your past version, as the installation procedure has completely changed to a Docker deployment. Good news is that from this point in time, upgrading or downgrading versions will be extremely quick and easy!

The only thing to take into account is the data you may want to keep when upgrading to 2.13.0: recordings and Elasticsearch data.

Backup recordings 🔗

Only if you have used the recording feature you may want to keep your old recorded files available in your new deployment. This is as straightforward as copying the entire recording folder before wiping out your old server (≤2.12.0 config property openvidu.recording.path, by default /opt/openvidu/recordings). After successfully installing 2.13.0, simply paste this same folder at the recording path of your new installation. All of your recordings will be immediately available in the new version.

Backup Elasticsearch data 🔗

If you want to keep your Elasticsearch data, then you have to copy the Elasticsearch database from your old deployment to your new 2.13.0 deployment. Of course you have to do so before wiping out your old OpenVidu Server Pro instance. The following steps indicate how to automate all of this process with some simple commands:

1) Copy existing Elasticsearch data from your old ≤2.12.0 Openvidu Server Pro Node to your new 2.13.0 OpenVidu Server Pro Node 🔗

First compress the Elasticsearch database in your old OpenVidu Server Pro Node and then download the file. You can do it like this (a standard ubuntu installation of Elasticsearch is presumed at /var/lib/elasticsearch. This path is the default one for ≤2.12.0 OpenVidu deployments on AWS and is also the default path where Elasticsearch stores its data in Linux systems).

ssh -i SSH_KEY ubuntu@OLD_OPENVIDU_PRO_IP "sudo tar zcvfP /tmp/elasticsearch.tar.gz -C /var/lib/elasticsearch nodes"
scp -i SSH_KEY ubuntu@OLD_OPENVIDU_PRO_IP:/tmp/elasticsearch.tar.gz elasticsearch.tar.gz

We have zipped the old Elasticsearch data and downloaded to our computer. Now we will upload it to the new Openvidu Pro Instance:

scp -i SSH_KEY elasticsearch.tar.gz ubuntu@NEW_OPENVIDU_PRO_IP:/tmp/elasticsearch.tar.gz

2) Unzip Elasticsearch data in your new 2.13.0 OpenVidu Server Pro Node and restart services 🔗

Connect to your 2.13.0 Openvidu Server Pro instance through SSH:

ssh -i SSH_KEY ubuntu@NEW_OPENVIDU_PRO_IP

Change to root user:

sudo su

Stop OpenVidu Pro services (this assumes OpenVidu Pro is installed at the default recommended path /opt/openvidu/):

cd /opt/openvidu
./openvidu stop

Unzip the data from the old database into the appropriate path:

rm -rf elasticsearch/*
tar -zxvf /tmp/elasticsearch.tar.gz -C elasticsearch
chown -R 1000:1000 elasticsearch
rm /tmp/elasticsearch.tar.gz

Restart all services and you will have your Elasticsearch data available in your brand new OpenVidu Pro 2.13.0!

./openvidu start

NOTE: Remember to update openvidu-browser library in your clients. Comply version compatibility according to Releases