-
Notifications
You must be signed in to change notification settings - Fork 0
Using a VM for development
Rather than installing and running RapidFTR directly on your workstation/laptop/what-have-you, you can develop using a virtual machine. This will get you up and running more quickly than trying to install the components yourself. Performance may be slower than if you run "native." We'd recommend starting with a VM and setting up RapidFTR natively only once you understand a bit about how the system works and only if you find the performance of the VM annoying.
The development VM is run using Vagrant, which uses VirtualBox. It should work regardless of the OS you're running (Mac OS X, Linux, or Windows) so long as you have VirtualBox installed.
Here are the instructions to get up and running.
-
Set up Vagrant using these instructions, stopping before running any command starting with
vagrant(in the section "Your First Vagrant Virtual Environment") so that you have VirtualBox and Vagrant installed. - Clone the RapidFTR repository.
git clone git://github.com/rapidftr/RapidFTR.gitor for read-write access to your own fork, fork the RapidFTR repository and thengit clone git@github.com:duelinmarkers/RapidFTR.gitsubstituting your own git username after the colon. - From the root of the RapidFTR clone, run
vagrant upto download and boot the VM.- Beware, the box file is large (about 300MB). It should only have to download once.
- The first time
vagrant upis run the Chef recipes will be executed to provision the VM, this may take some time. - Once that command completes, the VM is running, headless, in the background.
-
vagrant sshto log into the VM. (You can do this from as many terminal windows as you like.) cd /vagrantrvm --create use 1.9.3-p392@rapidftrbundle install- Follow the instructions for Initial Seeding and Running starting from If you have not yet created admin username/password for CouchDB
- The software will already be installed on the VM and CouchDB started automatically so the steps under Make sure and Start CouchDB are not necessary if using the VM
- The commands should be run from the
/vagrantfolder on the VM
- Once the Rails server is running on the VM the RapidFTR website can be accessed from the standard port via a web browser on the host machine (http://localhost:3000/)
- CouchDB is automatically started on the VM and does not need to be started manually. It can be accessed from the standard port via a web browser on the host machine (http://localhost:5984/).
- Shut down the server with Ctrl-C (or open a new terminal window, go to your working directory, and use
vagrant sshto open a new connection).
When you're finished working on RapidFTR for a bit, you'll want to shut down the box.
-
vagrant suspendwill save the current running state of the machine. You can come back up from this withvagrant resume. -
vagrant haltwill shut down the machine. You can come back up from this withvagrant up.
If you want to trash the VM completely (and recover disk space), use vagrant destroy. After doing this you'll need to download the box again to run it again.