-
Notifications
You must be signed in to change notification settings - Fork 15
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:
- Download Vagrant and VirtualBox
- Download a copy of ob2 and run
vagrant up
inside the project root - Use
vagrant ssh
to log in to the virtual machine - Run
sudo apt-get install linux-image-extra-$(uname -r)
and then reboot the VM withvagrant reload
. If apt-get reported that the kernel extras package is already installed, you don't need to reboot. - Create a new Python virtual environment with
virtualenv ./env
- Activate the new virtual environment with
source ./env/bin/activate
- The ob2 code is mounted inside the virtual machine at
~/src
, so enter the directory withcd src/
- Install the necessary Python packages with
pip install -r requirements.txt
- The APSW python package is not available via PyPI, so build it manually by running
./build_apsw.sh
- You can now start the ob2 server with
python -m ob2
- When ob2 starts, it will try to initialize the database, so press 'y' and hit Enter to continue
- 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.
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.