Installing Orion

Introduction

The recommended procedure is to install using RPM packages in CentOS 6.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 6.3 but it should work also in any later CentOS/RedHat 6.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 2.6.9 (although it should work with later MongoDB 2.6.x and 3.0.x versions). It is not recommended using MongoDB 2.4.x., as some geolocated queries may not work.
    • Note that the officially supported MongoDB version is 2.6. In the case of using MongoDB 3.0 with its new authentication mechanism (SCRAM_SHA1) you may need to compile from sources using special switches for the MongoDB driver. See this issue for details.
  • 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: boost-filesystem, boost-thread, libmicrohttpd, logrotate, libcurl and boost-regex.
    • The contextBroker-test package (optional) depends on the following packages: python, python-flask, python-jinja2, curl, libxml2, libxslt, nc, mongo-10gen and contextBroker. The mongo-10gen dependency needs to configure MongoDB repository, check this piece of documentation about that.

Installation

Configure the FIWARE yum repository (as described in this post). 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 from the FIWARE Files area. Look for the "DATA-OrionContextBroker" entry.

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

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

Optional packages

Apart from the mandatory RPM described above, you can install the contextBroker-tests package, which contain utility tools:

yum install contextBroker-tests

or

rpm -i contextBroker-test-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).

Upgrading MongoDB version

You only need to pay attention to this if your upgrade path crosses 0.11.0 or 0.22.0. Otherwise, you can skip this section.

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 or 0.21.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 Files area. Look for the "DATA-OrionContextBroker" entry.

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

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