Vagrant setup for Arethusa
- Vagrant
- Virtual Box
- an ssh client
- comes with OS/X and Linux. On Windows you can try Putty
- a local clone of the following example data and arethusa-configs repositories
-
Clone this repository
git clone https://github.com/alpheios-project/arethusa-vagrant
-
Edit the file named
Vagrantfile
in the newly cloned repository in a text editor. The following are example command-line instructions, but you can also navigate there in your File Explorer/Finder and use whatever text editor you are comfortable with.On OS/X or Linux:
cd arethusa-vagrant vi Vagrantfile
On Windows
cd c:\\Users\My Documents\JohnSmith\arethusa-vagrant notepad Vagrantfile
-
In the text editor with the Vagrantfile open, find the following lines
config.vm.synced_folder "/path/to/arethusa-example-data", "/arethusa-example-data" config.vm.synced_folder "/path/to/arethusa-configs", "/arethusa-configs"
-
Edit the paths to your local github clones of the example data and arethusa-configs
Replace
/path/to/arethusa-example-data
with the path to your local clone of the arethusa-example-data repo.Replace
/path/to/arethusa-configs
with the path to your local clone of the arethusa-configs repo -
You may also need to change local port mappings and network card settings. Instructions are provided in the Vagrantfile
-
Verify installation
You should be able to load the following in your browser: http://localhost:8081/arethusa/app/#/vagrant?doc=1.2&s=2
N.B. The vagrant config is currently a READ-ONLY file setup.
-
Create a branch on your local clone of the arethusa-example-data repo
-
Add a treebank file for testing into the arethusa-example-data/data/treebanks directory (make sure the treebank/@format attribute is set to the name of the format you want to test
-
Create a branch on your local clone of the arethusa-configs repo
-
Add/update your files
-
Build on the vagrant box:
vagrant ssh (or on windows via putty telnet to localhost:2222 login as vagrant/vagrant) cd /arethusa-configs git checkout yourbranch rvm use 2.0 rake build
-
Verify that your new/updated file is in the /arethusa-configs/dist directory
-
Load your testing treebank file in the local arethusa instance. E.g. http://localhost:8081/arethusa/app/#/vagrant?doc=newfile&s=2