The recommended procedure is to install using RPM packages in CentOS 7.x. If you are interested in building from sources, check this document.
- 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
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.
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
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).
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.
- Upgrading to 0.14.1 and beyond from a pre-0.14.1 version
- Upgrading to 0.19.0 and beyond from a pre-0.19.0 version
- Upgrading to 0.21.0 and beyond from a pre-0.21.0 version
- Upgrading to 1.3.0 and beyond from a pre-1.3.0 version
- Upgrading to 1.5.0 and beyond from a pre-1.5.0 version
- Upgrading to 2.2.0 and beyond from a pre-2.2.0 version
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).
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