This section goes over some basic documentation of Vagrant for ease of use of the Odyssey application. Full documentation of Vagrant can be found on their website on the Vagrant site.

Configuration

The current configuration uses Vagrant 2.2.7 and Virtualbox 5.2, but any version of Vagrant should be compatible, while Virtualbox must be version 5.2 or below.

Vagrantfile

The Vagrantfile handles the basic setup of the Vagrant machine. The Vagrantfile for this project performs port forwarding to port 8080 and runs a shell script when the machine is provisioned. Full documentation of the Vagrantfile can be found on the Vagrant site.

Quick Startup

For quick setup of the Vagrant machine, first ensure there's a .pgpass file in the home directory with the following entries:

  • odyssey-dev-1.private.uwaterloo.ca:5501:*:_quest_ui:{password}
  • odyssey-dev-1.private.uwaterloo.ca:5501:*:_teaching_ui:{password}
  • odyssey-dev-1.private.uwaterloo.ca:5501:*:_grad_ui:{password}
  • odyssey-dev-1.private.uwaterloo.ca:5501:*:_print_ui:{password}
Then, navigate to the main directory of the project and type the following command:
  • vagrant up
Then, visit localhost:8080.

Some Useful Commands

  • vagrant up — Creates a Vagrant machine based on the Vagrantfile of the current working directory.
  • vagrant provision — Runs provisioners configured for the Vagrant machine (machine has to already be running).
  • vagrant destroy {name/id} — Destroys the Vagrant machine in the current working directory when invoked without any arguments or destroys based on name/id when provided one.
  • vagrant ssh {name/id} — SSH's into the Vagrant machine in the current working directory when invoked without any arguments or based on name/id when provided one.
  • vagrant global-status — Shows the id, name, state, and directory of all active Vagrant machines.