Skip to content

Setting up ob2 (the easy way)

Roger Chen edited this page Feb 24, 2016 · 2 revisions

Here are instructions for getting started with ob2 as quickly as possible:

  1. Download Vagrant and VirtualBox
  2. Download a copy of ob2 and run vagrant up inside the project root
  3. Use vagrant ssh to log in to the virtual machine
  4. Run sudo apt-get install linux-image-extra-$(uname -r) and then reboot the VM with vagrant reload. If apt-get reported that the kernel extras package is already installed, you don't need to reboot.
  5. Create a new Python virtual environment with virtualenv ./env
  6. Activate the new virtual environment with source ./env/bin/activate
  7. The ob2 code is mounted inside the virtual machine at ~/src, so enter the directory with cd src/
  8. Install the necessary Python packages with pip install -r requirements.txt
  9. The APSW python package is not available via PyPI, so build it manually by running ./build_apsw.sh
  10. You can now start the ob2 server with python -m ob2
  11. When ob2 starts, it will try to initialize the database, so press 'y' and hit Enter to continue
  12. The Vagrantfile bundled with ob2 should have forwarded port 5002 (the default web port) for you, so go to localhost:5002 to access the ob2 web interface.

At this point, you should have a working instance of ob2, but it will not be very useful. You won't be able to log in without GitHub OAuth tokens, and there won't be any jobs configured. See the article on Configuring ob2 to get started on setting up your own ob2 configuration.

VMware Fusion support

You can also use VMware Fusion instead of VirtualBox, if you have a VMware Fusion license and a Vagrant VMware Fusion Plugin license. To do so, open up the Vagrantfile and find this block of code at the beginning:

# VirtualBox
config.vm.box = "ubuntu/trusty64"
config.vm.network "private_network", ip: "192.168.162.42"
puppet_version = 3

# Uncomment for VMWare Fusion
# config.vm.box = "puppetlabs/ubuntu-14.04-64-puppet"
# config.vm.network "private_network", ip: "192.168.163.42"
# puppet_version = 4

Change it so that the first block is commented, while the second block is not.

Clone this wiki locally