Skip to content

Install Skosmos using a Vagrant VM

Miki Pernu edited this page Aug 29, 2018 · 5 revisions

Vagrant provides a virtual machine to host a local Skosmos setup.

In this Vagrant virtual environment, we use Ansible to deploy and run the Skosmos web application, while not deploying Jena-Fuseki. For data, we use another endpoint (http://api.dev.finto.fi/sparql).

Installation

To start using this Vagrant setup, you'll have to install Virtualbox, Vagrant, and Ansible.

Vagrant uses Virtualbox to manage the virtual machines it uses:

Then install Vagrant:

Check that the installation was successful:

vagrant --version

Finally, install Ansible. We use Ansible and its playbooks to deploy and run Skosmos.

Usage

From the root and same directory where the Vagrantfile resides, boot the virtual machine:

vagrant up

This downloads and launches an ubuntu/xenial64 virtual machine, deploys the application using Ansible, and runs it. After Ansible has finished, you can open localhost:8040/Skosmos/ in your browser to see Skosmos up and running.

If you make changes while the virtual machine is running, you can run the Ansible provisioner again with:

vagrant provision

To close the Skosmos application and stop the virtual machine, run:

vagrant halt

To stop and delete the virtual machine, run:

vagrant destroy

See the Vagrant Cheat Sheet for more commands.

Potential issues and quirks

  • If 'vagrant up' produces an error when trying to run the ansible-playbook, you have most likely not installed Ansible to your computer. To fix this, make sure to install Ansible to the Vagrant host computer.

  • Sometimes the Ansible Playbook installation might leave hanging or time out. Wait for the Ansible Playbook to run its course. Run vagrant up if it results in a timeout.

If you encounter other errors, try:

vagrant destroy

vagrant up