Skip to content
This repository was archived by the owner on Sep 27, 2019. It is now read-only.

Installation

pervazea edited this page Mar 2, 2018 · 72 revisions

Supported Platforms

Peloton is maintained on the following platforms. Please note that it will not compile on 32-bit systems.

  • Ubuntu Linux 14.04+ (64-bit)
  • Ubuntu Linux 16.04+ (64-bit)
  • Fedora Linux 27 (64-bit)
  • MacOS 10.12+ (64-bit)

Linux Quick Setup

  1. Clone Peloton repo

    git clone --recursive https://github.com/cmu-db/peloton.git
  2. Install the packages in the package list using this script.

    cd peloton/script/installation
    sudo bash packages.sh
  3. Now, go to the Build Peloton step.

OSX Quick Setup

  1. Xcode: Update your Xcode to 8.x, check out here. Peloton will not compile on newer versions of Xcode.

  2. Clone Peloton repo

    git clone --recursive https://github.com/cmu-db/peloton.git
  3. Install the packages in the package list using this script.

    cd peloton/script/installation
    bash packages.sh

    You might meet some permission problem. You can change the owner of the files. Here are some useful commands.

    sudo chown root /usr/local/bin/brew
    sudo chown -R $(whoami) /usr/local/Cellar
  4. Enter the build directory and run cmake:

    mkdir -p build
    cd build
    export LLVM_DIR=/usr/local/Cellar/[email protected]/3.7.1/lib/llvm-3.7
    cmake -DCMAKE_BUILD_TYPE=Release ..
    

Virtual Machine Quick Setup

  1. Install Git, Virtualbox, and Vagrant (if needed).

    Git Download Virtualbox Download

  2. Clone Peloton repo

    git clone --recursive https://github.com/cmu-db/peloton.git
  3. Initialize the vagrant box

    cd peloton/script/installation
    vagrant up

    NOTE: Actual VM is managed by VirtualBox, not stored in the local Peloton repo you just cloned.

  4. Connect to the vagrant box

    vagrant ssh
  5. Now, go to the Build Peloton step.

    In case you wish to reload the virtual machine so that any changes made in the Vagrantfile take effect, use this command:

    vagrant reload --provision

Build Peloton

Before building peloton, make sure that you have installed all its software dependencies by following the instructions given above in Ubuntu Quick Setup or OSX/Windows Quick Setup depending on your machine.

Enter the build directory and run cmake:

  • Ubuntu:

     mkdir -p build
     cd build
     cmake -DCMAKE_BUILD_TYPE=Release ..
  • Vagrant VirtualBox VM:

    /peloton on VM is automatically created as a shared folder linked to the repo on host. This might not support building directly in the repo, so a separate build dir needs to be created:

     mkdir -p ~/build
     cd ~/build
     cmake -DCMAKE_BUILD_TYPE=Release /peloton

If your system reports error then please try the following alternative instead (it is caused by code coverage not being supported under release mode):

cmake -DCMAKE_BUILD_TYPE=Release -DCOVERALLS=False ..

If your system can not find llvm under macOS, please try with following:

cmake -DCMAKE_PREFIX_PATH=`llvm-config-3.7 --prefix` -DUSE_SANITIZER=Address ..

If you are a developer, please refer to the Developer Build section.

Build and install Peloton

make -j4

If you want peloton to be in your path, update paths in .bashrc or .zshrc or your favorite shell's startup file :

export PATH=$(BUILD_DIR)/bin:$PATH

Enable SSL connection

By default, SSL is disabled. You can enable SSL by running the scripts to generate certificates and keys.

cd script/installation/
bash create_certificates.sh
Clone this wiki locally