All Sections:

Setting Up Ubuntu Desktop

These are the instructions to prepare your Ubuntu Desktop machine for running Storyplayer.

These instructions are written for Ubuntu 14.04 LTS. They should work without modification on Ubuntu 14.10 or later too.

Why Ubuntu Desktop?

Any tests that involve a web browser need a real X11 desktop to work, and Ubuntu Server does not come with an X11 desktop (although you can install one if you wish). Browsers do not work reliably when run inside Xnest or equivalent.

Update Your Package List

Start with an up-to-date list of available packages from the Ubuntu servers.

sudo apt-get -y update


Install the standard Linux compiler tools. You’ll need them for installing any PECL PHP extensions that you need in your tests, such as ZeroMQ.

sudo apt-get -y install build-essential libtool automake git pkg-config


Install PHP

Use Ubuntu’s standard PHP packages.

sudo apt-get -y install php5-cli php5-curl php5-json php5-mysql php5-dev php-pear

Install Composer

Download and install Composer. Composer is the modern package manager for PHP libraries. You’ll use Composer to install Storyplayer into your projects.

curl -sS | php
sudo mv composer.phar /usr/local/bin/composer
sudo chmod 755 /usr/local/bin/composer

Virtual Machine Tools

Install Virtualbox

Oracle provide a Debian package repo that we can use for installing Virtualbox (and for keeping it up to date!)

# add the virtualbox repo
# replace 'utopic' (Ubuntu 14.10) with 'vivid' (Ubuntu 15.04) or 'trusty' (Ubuntu 14.04)
wget -q -O - | sudo apt-key add -
sudo sh -c 'echo "deb utopic contrib" >> /etc/apt/sources.list.d/'

# pull down the list of packages in the virtualbox repo
sudo apt-get update

# install virtualbox
sudo apt-get -y install virtualbox-4.3

Install Vagrant

Vagrant has to be downloaded and installed by hand.

  1. Download the latest Vagrant .deb package.

    Vagrant is a CLI tool to manage creating and destroying virtual machines. It’s most often used with VirtualBox.

  2. Install the downloaded .deb package

# vagrant is downloaded from their website, there is no ppa or repo
# by default, your browser's downloads go into your Downloads/ folder
sudo dpkg -i ~/Downloads/vagrant_1.7.2_x86_64.deb


Install Ansible

If you’re using Ansible for provisioning, you can get Ansible from a third-party repo.

# add the ansible repo
sudo apt-add-repository ppa:rquillo/ansible

# update the repos
sudo apt-get update

# install packages
sudo apt-get -y install ansible

Web Browsers

Install Java JVM

Download and install a Java VM for OSX. Storyplayer uses Selenium v2 aka WebDriver to control real web browsers. Selenium is written in Java.

sudo apt-get install -y openjdk-7-jdk

Install Chrome

Download and install Google Chrome. Ubuntu comes with Mozilla Firefox already installed. Storyplayer can use either of these browsers for testing websites.


If you’re using ZeroMQ, you will need to build it from source:

# build libzmq first
git clone
cd zeromq4-x
sudo make install

# install PHP support
echo | sudo pecl install zmq-1.1.2
sudo bash -c 'echo "" > /etc/php5/mods-available/zmq.ini'
sudo php5enmod zmq

All Done

When you get to here, your Ubuntu desktop should be all setup for Storyplayer, and any other CLI apps written in PHP. Test your setup to make sure!