Getting Started

Michael Ben-David edited this page Jul 22, 2016 · 61 revisions

This guide will show you how to set up a machine and user environment to build RTBkit and run a demo program.

There are three levels of setup:

  1. you need to have a machine with all the right packages installed
  2. you need to install some packages within a user's home directory
  3. you need to build RTBkit.

We tested this release on:

An Ubuntu 14.04 AMI (ami-c6d485ae) is available in US East(N. Virginia).

1) Machine-level Setup

Important note: if you are using Amazon instances for this, please do not use a Micro instance, as it will have insufficient RAM to compile. Amazon Small instances should be sufficient to build RTBKit. To run RTBKit or its tests, you'll need at least a xlarge instance.

Make sure you have at least 16GB of disk for building from the source. Also, your CPU should have support for SSE4.2 as it greatly improves performance.

You should run the following command to ensure you have all of the required dependencies which can be installed via apt:

$ sudo apt-get install linux-tools-generic libbz2-dev python-dev scons\
                       libtool liblzma-dev libblas-dev make automake \
                       ccache ant openjdk-7-jdk libcppunit-dev doxygen \
                       libcrypto++-dev libACE-dev gfortran liblapack-dev \
                       libevent-dev libssh2-1-dev libicu-dev libv8-dev \
                       g++ google-perftools libgoogle-perftools-dev \
                       zlib1g-dev git pkg-config valgrind autoconf \
                       libcurl4-openssl-dev cmake libsigc++-2.0-dev

2) User-level Setup

Environment Variables

Add the following to your ~/.profile and/or whatever your shell requires for the equivalent effect:

# Add local directory for libraries, etc
mkdir -p $HOME/local/bin
mkdir -p $HOME/local/lib
export PKG_CONFIG_PATH="$HOME/local/lib/pkgconfig/:$HOME/local/lib/pkg-config/"

Then run this command to apply changes:

$ source ~/.profile

To see if your environment is properly setup run:

$ env | grep PATH

Make sure you get an output similar to this:



You should now be ready to install the rtbkit-deps:

$ git clone
$ cd rtbkit-deps
$ git submodule update --init

Ubuntu 12 You may choose if you want nodejs enabled NODEJS_ENABLED=1 or disabled NODEJS_ENABLED=0.

Ubuntu 14 You will have to disable nodejs NODEJS_ENABLED=0.

$ make all NODEJS_ENABLED=0

To speed up compilation times you should not use the -jX argument on make, but instead give it JOBS=X.

3) Building RTBkit

Now you're ready to build RTBkit.

$ sudo su - rtbkit
$ git clone
$ cd rtbkit
$ cp jml-build/

Again here you will have to use the NODEJS_ENABLED flag depending on which OS you're building.

Ubuntu 12 you may choose either NODEJS_ENABLED=1 or NODEJS_ENABLED=0

$ make dependencies NODEJS_ENABLED=1
$ make compile NODEJS_ENABLED=1
$ make test

Ubuntu 14 you will have to use NODEJS_ENABLED=0

$ make compile NODEJS_ENABLED=0
$ make test NODEJS_ENABLED=0

For the test suite to pass it is currently required that you do not have a bootstrap.json in your project root and that you do not try to run make test in parallel mode (-jX option).

Note that make should be invoked from the root directory of RTBKit.

Now what?

The best entry-points into the RTBkit source are in the /examples directory, especially the rtbkit_integration_test, which can be run with make rtbkit_integration_test

Also, some of those example components are used by the Demo Stack that provides a simple runnable RTB stack using a synthetic exchange.

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.