-
Notifications
You must be signed in to change notification settings - Fork 21
PeARS Vagrant Developer Install Instructions
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.
Before you install a PeARS machine on your network you must have
- 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.
- 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.
Now we are ready to install and provision our PeARS server!
- In a Terminal create and change into the directory you wish to install PeARS in.
$ vagrant init
- Download the Vagrantfile and copy it over the generic created one.
- Edit the new Vagrantfile to reflect the IP suitable for your network. It is commented where you should change it.
$ vagrant box add ubuntu/trusty32
$ vagrant up
- 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.
$ vagrant ssh
- The default password is 'vagrant'. Feel free to change.
- 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.
- Success!! You are now ready to continue with Aurelie's instructions at the "Searching" header.
- 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
.