Skip to content

Instantly share code, notes, and snippets.

@danielpcox
Last active December 25, 2015 21:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danielpcox/7042746 to your computer and use it in GitHub Desktop.
Save danielpcox/7042746 to your computer and use it in GitHub Desktop.
Simple Dev Box

Simple Dev Box

Spins up a very simple VM and installs a few important things.

Usage

  • Install VirtualBox
  • Install Vagrant
  • Download this gist and extract.
  • Run vagrant up from the same directory as Vagrantfile and provision.sh whenever you want to rebuild the VM.
  • Run vagrant (with no arguments) for a list of commands.
  • Run vagrant ssh to open an SSH session with your newly-booted VM.

Useful Information

  • The directory containing Vagrantfile is mounted as a shared directory inside the VM at /vagrant
  • vagrant destroy tears it down.
  • vagrant suspend and vagrant resume can be used instead of up and destroy.
# install stuff
sudo apt-get update && \
sudo apt-get install -y build-essential git curl openjdk-7-jdk maven
# sbt 0.13.0
wget http://repo.scala-sbt.org/scalasbt/sbt-native-packages/org/scala-sbt/sbt/0.13.0/sbt.deb && sudo dpkg -i sbt.deb
Vagrant::Config.run do |config|
config.vm.box = "precise32"
config.vm.box_url = "http://files.vagrantup.com/precise32.box"
config.vm.forward_port 4000, 4000
config.vm.provision :shell, :path => 'provision.sh'
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment