Installing Orion

Introduction

The recommended procedure is to install using RPM packages in CentOS 7.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 7.4.1708 but it should work also in any later CentOS/RedHat 7.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 3.6 (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 or 1.3.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