-
Notifications
You must be signed in to change notification settings - Fork 406
Getting Started
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:
- you need to have a machine with all the right packages installed
- you need to install some packages within a user's home directory
- you need to build RTBkit.
We tested this release on:
- Ubuntu 12.04.2 LTS (Precise Pangolin) 64-bit and compiled with gcc 4.6.
- [Ubuntu 14.04.1 LTS (Trusty Tahr)] (https://releases.ubuntu.com/trusty/) 64-bit and compiled with gcc 4.8.
An Ubuntu 14.04 AMI (ami-c6d485ae) is available in US East(N. Virginia).
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 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
- Please also have JDK8 installed.
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 PATH="$HOME/local/bin:$PATH" mkdir -p $HOME/local/lib export LD_LIBRARY_PATH="$HOME/local/lib:$LD_LIBRARY_PATH" 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:
LD_LIBRARY_PATH=/home/rtbkit/local/lib: PATH=/home/rtbkit/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games PKG_CONFIG_PATH=/home/rtbkit/local/lib/pkgconfig/:/home/rtbkit/local/lib/pkg-config/
You should now be ready to install the rtbkit-deps:
$ git clone https://github.com/rtbkit/rtbkit-deps.git $ 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
.
You would also need to add your SSH key to your github account to use git submodule update
. Please see github instruction
Now you're ready to build RTBkit.
$ sudo su - rtbkit $ git clone https://github.com/rtbkit/rtbkit.git $ cd rtbkit $ cp jml-build/sample.local.mk local.mk
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.
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.
- Getting Started
- Pull Request Guidelines
- Coding Standards
- Demo Stack
- How to compile static filters test
- RTBkit Binary Package
- Architecture
- Bid Request Lifecycle
- ZooKeeper Nodes
- Load Shedding
- Banker
- Post Auction Loop State Machine
- Post-Auction Loop Sharding
- ZMQ Endpoints