Installing Orion


> :warning: If you plan to run orion in production, also read the information about high availability and performance tuning.

Introduction

The recommended procedure is to install using the official Orion docker container at dockerhub.

However, if you don't have a docker-ized infrastructure, the recommended procedure is to install using RPM packages in CentOS 8.x. If you are interested in building from sources, check this document.

Requirements

  • System resources: see these recommendations
  • Operating system: CentOS/RedHat. The reference operating system is CentOS 8.3.2011 but it should work also in any later CentOS/RedHat 8.x version.
  • Database: MongoDB is required to run either in the same host where Orion Context Broker is to be installed or in a different host accessible through the network. The recommended MongoDB version is 4.4 (Orion may work with older versions but we don't recommend it at all!).
  • RPM dependencies (some of these packages could not be in the official CentOS/RedHat repository but in EPEL, in which case you have to configure EPEL repositories, see http://fedoraproject.org/wiki/EPEL):
    • The contextBroker package (mandatory) depends on the following packages: libstdc++, boost-thread, boost-filesystem, gnutls, libgcrypt, libcurl, openssl, logrotate and libuuid

Installation

There are two available packages:

  • Nightly, which are built from master branch every night.
  • Release, "official" release RPMs. The usual release period is 1-2 months.

Depending on their type (nightly or release), packages have different versioning:

  • Release packages: contextBroker-X.Y.Z-1
  • Nightly packages: contextBroker-X.Y.Z-yyyy.mm.dd

Keep in mind, the version of nightly packages will always be ahead of release, and we advise to use nightly packages only for testing purposes.

From this point, if you want to use the nightly builds, remember that it has a different system of versions.

Configure the FIWARE yum repository as described here. Then you can install doing (as root):

yum install contextBroker

Sometimes the above commands fails due to yum cache. In that case, run yum clean all and try again.

Using RPM file

Download the package directly from the FIWARE Yum repository (both types of packages are provided).

Next, install the package using the rpm command (as root):

rpm -i contextBroker-X.Y.Z-1.x86_64.rpm

Upgrading from a previous version

Upgrade procedure depends on whether the upgrade path (i.e. from the installed Orion version to the target one to upgrade) crosses a version number that requires:

  • Upgrading MongoDB version
  • Migrating the data stored in DB (due to a change in the DB data model).

Migrating the data stored in DB

You only need to pay attention to this if your upgrade path crosses 0.14.1, 0.19.0, 0.21.0, 1.3.0, 1.5.0 and 2.2.0. Otherwise, you can skip this section. You can also skip this section if your DB are not valuable (e.g. debug/testing environments) and you can flush your DB before upgrading.

If your upgrade cover several segments (e.g. you are using 0.13.0 and want to upgrade to 0.19.0, so both "upgrading to 0.14.1 and beyond from a pre-0.14.1 version" and "upgrading to 0.19.0 and beyond from a pre-0.19.0 version" applies to the case) you need to execute the segments in sequence (the common part are done only one time, i.e. stop CB, remove package, install package, start CB). In the case of doubt, please ask using StackOverflow (remember to include the "fiware-orion" tag in your questions).

Standard upgrade

If you are using yum, then you can upgrade doing (as root):

yum install contextBroker

Sometimes the above commands fails due to yum cache. In that case, run yum clean all and try again.

If you are upgrading using the RPM file, then first download the new package from the FIWARE yum repository (both types of packages are provided).

Then upgrade the package using the rpm command (as root):

rpm -U contextBroker-X.Y.Z-1.x86_64.rpm