Skip to content

Using the Vagrantfile

Asheesh Laroia edited this page Feb 20, 2016 · 3 revisions

Overview

At https://github.com/sandstorm-io/sandstorm , you can see we include a file called Vagrantfile. You can use this to:

  • Try Sandstorm by using just your main computer, without involving a cloud server

  • Run a Sandstorm server on a non-Linux operating system

  • Get a Linux VM ready for contributing to the Sandstorm code

This page explains how to do that.

By contrast, if you want to develop a Sandstorm app, we strongly suggest the all-inclusive vagrant-spk tool!

Pre-requisites

To usefully use the Vagrantfile, you must:

  • Install Vagrant from the Vagrant website

  • Make sure you have NFS available in your operating system (for me, this required running sudo modprobe nfs nfsd)

  • Have port 6080 free (sudo sandstorm stop might be required)

Try Sandstorm locally, or run Sandstorm on Mac OS/Windows

To try Sandstorm locally, if you have all the pre-requisites, you can run this in a terminal.

mkdir -p ~/projects/sandstorm
git clone https://github.com/sandstorm-io/sandstorm.git ~/projects/sandstorm
cd ~/projects/sandstorm
vagrant up

Quick notes:

  • This server has development accounts enabled by default, allowing anyone who can access it to log in. You can adjust that setting in /opt/sandstorm/sandstorm.conf.
  • This is a good way to run Sandstorm on non-Linux platforms, if you don't have a Linux server. If you go this route, please configure VirtualBox, Vagrant, and Sandstorm according to your preferences!
  • Most people, after doing this, will want to install Sandstorm on a server connected to the Internet.

To develop Sandstorm in a virtual machine

The Sandstorm Vagrantfile is primarily useful for demo-ing Sandstorm. If you want to use Vagrant so that you can run a development version of Sandstorm, and use a text editor outside the VM, please follow these instructions.

mkdir -p ~/projects/sandstorm
git clone https://github.com/sandstorm-io/sandstorm.git ~/projects/sandstorm
cd ~/projects/sandstorm
vagrant up
vagrant ssh

and at that point, read the documentation on hacking on the shell, which covers most user interaction, namely the web app Javascript and the styling (CSS/SCSS). There are also docs on modifying the the Sandstorm C++ code if you need them; you'll need to install some prerequisites in that case.

Clone this wiki locally