Upgrade

Upgrade the Stream installation

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

  • RPM

  • Debian

  • Kubernetes

  • Docker

Installation from the EverTrust 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.

Installing from RPM

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

Connect to the server with an account with administrative privileges;

Install the Stream package with the following command:

# yum localinstall stream-2.1.x-1.x86_64.rpm

Installation from the EverTrust repository

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

  • Unpin the Stream version by removing the pinned version for the stream package in the /etc/apt/preferences.d/stream repository file :

Package: stream
Pin: version <installed-version>
Pin-Priority: 1001
  • Run apt update stream

Don’t forget to pin the version again.

Installing from DEB

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

Connect to the server with an account with administrative privileges;

Install the Stream package with the following command:

# apt install stream-2.1.x_amd64.deb

When upgrading Stream, you’ll need to pull the latest version of the chart:

$ helm repo update evertrust

Verify that you now have the latest version of Stream (through the App version column):

$ helm search repo evertrust/stream
NAME                       	CHART VERSION	APP VERSION	DESCRIPTION
evertrust/stream          	0.9.3        	2.1.0      	EverTrust Stream Helm chart

Launch an upgrade by specifying the new version of the chart through the --version flag in your command:

$ helm upgrade <stream> evertrust/stream \
 --values override-values.yaml \
 --version 0.9.3
We recommended that you only change values you need to customize in your values.yml file to ensure smooth upgrading.

Pull the new image from the repository.

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.

  • RPM

  • Debian

  • Kubernetes

  • Docker

Connect to the server 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 "<MongoDB connection string>"

The upgrade script requires the mongo shell MongoSH to connect to your database (mongosh). If this client is not 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.

Connect to the server 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 "<MongoDB connection string>"

The upgrade script requires the mongo shell MongoSH to connect to your database (mongosh). If this client is not 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.

The chart will automatically create a Job that runs an upgrade script when it detects that the Stream version has changed between two releases. If the upgrade job fails to run, check the job’s pod logs. When upgrading from an old version of Stream, you may need to explicitly specify the version you’re upgrading from using the upgrade.from key.

Before upgrading to specific chart version, thoroughly read any Specific upgrade instructions for your version.

You can run the script on any computer that has access to your MongoDB database, provided that it has Docker installed:

$ docker run -it --rm registry.evertrust.io/stream-upgrade:<target version> \
  -m <mongo uri> \
  -t <target version> \
  -s <source version>

Specific upgrade instructions

Architecture-specific instructions

  • RPM

  • Debian

  • Kubernetes

  • Docker

No specific instructions.

No specific instructions.

Upgrading to 1.7.0

  • Switching to native Kubernetes leases implementation. CRDs leases aren’t used anymore.

Upgrading to 2.0.0

  • This version drops support for the Bitnami MongoDB subchart. Instead, a new temporaryDatabase key controls whether a temporary MongoDB instance should be created for the duration of the upgrade. To migrate from the Bitnami MongoDB subchart to a temporary instance or an external MongoDB database, you can use the mongodump and mongorestore utilities.

No specific instructions.