Upgrade Procedure

Upgrade the Stream installation

The first step in the upgrade procedure is to upgrade Horizon component itself.

If Stream was installed using a repository

If you installed Stream using our repository (as described in the installation section), you should:

  • Unpin the Stream version by commenting out any line excluding the stream package in the /etc/yum.repos.d/stream.repo repository file :

[stream]
enabled=1
name=Stream Repository
# exclude=stream
  • Run yum update stream

Don’t forget to pin the version again by uncommenting the line that was previously commented.

If Stream was installed manually

You must retrieve the latest Stream RPM from the EverTrust repository manually using the user credentials you were provided.

Access the server through SSH with an account with administrative privileges;

Install the Stream package with the following command:

# yum localinstall stream-1.0-1.noarch.rpm

Upgrade the database schema

Some Stream versions require that you run migration scripts against your database. Stream comes bundled with an stream-upgrade script that handles this migration logic.

Therefore, after each upgrade, you should run stream-upgrade to check whether new migrations should be run.

Access the server through SSH with an account with administrative privileges;

Run the following command:

# /opt/stream/sbin/stream-upgrade -t <target version>

In most cases, stream-upgrade can detect the version you’re upgrading from by checking the database. if the source version is not automatically detected, you will encounter the following error:

*** Unable to infer the source version from your database. Specify it explicitly with the -s flag. ***

You’ll have to explicitly tell stream-upgrade which version you are upgrading from. To do that, simply set the source version explicitly with the -s flag :

# /opt/stream/sbin/stream-upgrade -t <target version> -s <source version>

Similarly, stream-upgrade will try to use the MongoDB URI that was configured by the Stream configuration utility. If it fails to auto-detect your database URI or you wish to migrate another database, specify the URI explicitly using the -m flag:

# /opt/stream/sbin/stream-upgrade -t <target version> -m "<mongo uri>"

The upgrade script requires a MongoDB client to connect to your database (either mongo or mongosh). If no client is installed on the host where Stream is running, consider installing the standalone mongosh client or running the upgrade script from another host that has access to the database.