Skip to content

PeARS Vagrant Developer Install Instructions

veesa edited this page Jul 2, 2015 · 1 revision

Install PeARS To Virtual Machine via Vagrant

Why Should I Do This?

By the end of this process you can have an installation of PeARS up and running on your network no matter what O/S you run. Vagrant will create a virtual machine on your network bridged from your network device on your local machine (currently configured to be static device 192.168.1.25), that will be accessible from that ip address on port 8080.

This ip address will need to be changed in the Vagrantfile to suit your own network.

Creating a Vagrant virtual machine will also have the advantage of having the original PeARS code in a directory synced with a the vagrant user's home directory on the virtual server editable on your host machine. Every developer can work on a copy of the same machine, eliminating tedious install hassles and the old "well it works on my machine" dilemma.

This is a living document and all corrections and suggestions should be sent to the author.

Dependencies

Before you install a PeARS machine on your network you must have

  1. Install VirtualBox for your operating system. I link to the download page here but it is probably best done through your distribution's package manager.
  2. Install Vagrant for your operating system, either from the website or from your distribution's package manager. On a current Arch Linux install it works from installation by the package manager, on a current Lubuntu 14.04 installation it had to be installed via the website.

Step-by-step Instructions:

Now we are ready to install and provision our PeARS server!

  1. In a Terminal create and change into the directory you wish to install PeARS in.
  2. $ vagrant init
  3. Download the Vagrantfile and copy it over the generic created one.
  4. Edit the new Vagrantfile to reflect the IP suitable for your network. It is commented where you should change it.
  5. $ vagrant box add ubuntu/trusty32
  6. $ vagrant up
  7. While the server is provisioning it will ask you what network device you want to bridge to. Select your option number and press Enter. It will now bring up a fully provisioned PeARS server with a static ip of the one you configured in the Vagrantfile.
  8. $ vagrant ssh
  9. The default password is 'vagrant'. Feel free to change.
  10. Change directory into the PeARS folder and 'sed -i "s/aurelie/vagrant/" */*.py'. These changes will be reflected in the /home/you/path/to/pears directory on your local machine.
  11. Success!! You are now ready to continue with Aurelie's instructions at the "Searching" header.
  12. To access your PeARS machine type http://your.configged.ip.here:8080 in the address bar of your browser.

To stop the PeARS virtual machine at any time you can use $ vagrant suspend, which will stop the machine at the point of time you suspend it and continue from there when you $ vagrant resume. Or you can use the $ vagrant halt which will effectively shutdown the virtual machine. To restart the machine do a $ vagrant up.