Skip to content
Jakob Runge edited this page Jan 13, 2016 · 3 revisions

The vagrant.sndcomp setup

Note that this is only available on the vagrant branch.

The vagrant.sndcomp directory provides setup data for Vagrant that make it possible to demo the soundcomparisons website from a local machine independant of the installed operating system. While Linux users may directly use the docker setup, other setups may use Vagrant to get similar functionality.

The setup is described for Windows below, but works similar for other systems.

windows setup

To get the soundcomparisons website running under windows, it is necessary to get the following software installed and follow the provided setup steps:

  1. Get a git client and clone the lingdb/container repository.

    • A good choice for a git client under Windows or MacOS is GitHub Desktop, which is provided for free. The client has a nice, clean GUI and is specialized for GitHub.
    • When cloning the repository it makes sense to use a toplevel directory on your machine, because the sound files necessary for the soundcomparisons website can have rather long paths, and Windows limits paths to a length of 260 symbols.
  2. Copy the sound files into the nginx/sound folder in the project directory.

  3. Obtain a recent database dump for the soundcomparisons website, and place it in the project directory under mariadb/create making sure it's named dump.sql.

  4. Obtain a client_secrets.json file as described for the lingdb/sndcomp container and place it in the sndcomp directory.

  5. Download and install VirtualBox. VirtualBox will be used together with Vagrant to provide a virtual machine that will provide the website.

  6. Download and install Vagrant. Vagrant is the tool that will allow us to setup and start the virtual machine in VirtualBox.

  7. Perform vagrant up in the vagrant.sndcomp folder of the project directory. This step builds the virtual machine if necessary and starts it, so it can also be used to start the virtual machine after rebooting.

  8. Open a browser and visit http://localhost:8080. The website should load and work now.

Updates

To perform updates on the windows setup, it may be necessary to rebuild the Vagrant container. This makes it possible for the setup to be changed in several places and thus provides enough free room for further development of the setup. Updating is currently only manual, and the following steps are involved:

  • Updating sound files is done by just placing the sound files inside the nginx/sound directory.
  • Updating the database is done by placing the dump.sql inside the mariadb/create folder and running stopping/restarting the virtual machine. Stopping and starting can be done via the commands vagrant halt and vagrant up.
  • Updating the rest of the setup and/or the soundcomparisons website is done by using the git client to update the copy of the container repository and rebuilding the Vagrant container afterwards. Rebuilding is done by issuing vagrant halt, vagrant destroy and vagrant up in sequence.
Clone this wiki locally