Skip to content

Instantly share code, notes, and snippets.

@scheunemann
Last active February 16, 2017 13:58
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 scheunemann/e391ea6156d35495630fc18e0be96273 to your computer and use it in GitHub Desktop.
Save scheunemann/e391ea6156d35495630fc18e0be96273 to your computer and use it in GitHub Desktop.
A `Vagrantfile` setting up a virtual machine (Ubuntu 12.04), downloads the code of http://playfulmachines.com/.
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "hashicorp/precise64"
config.vm.provider "virtualbox" do |vb|
vb.name = "PlayfulMachines"
# Display the VirtualBox GUI when booting the machine
# vb.gui = true
# Customize the amount of memory on the VM:
#vb.memory = 4096
#vb.cpus = 4
#vb.customize ["modifyvm", :id, "--cpuexecutioncap", "80"]
#vb.customize ["modifyvm", :id, "--accelerate3d", "on"]
#vb.customize ["modifyvm", :id, "--accelerate2dvideo", "on"]
#vb.customize ["modifyvm", :id, "--vram", "64"]
end
config.vm.provision "shell", inline: <<-SHELL
sudo apt-get update
sudo apt-get -y upgrade
sudo apt-get install -y xfce4
sudo apt-get install -y python-software-properties
sudo add-apt-repository -y ppa:georg-martius/lpzrobots
sudo apt-get update
sudo apt-get install -y firefox playfulmachines
if ! [ -L /opt/playfulmachines ]; then
cp -r /opt/playfulmachines /vagrant
fi
SHELL
end
@scheunemann
Copy link
Author

scheunemann commented Feb 10, 2017

  • Install VirtualBox and Vagrant
  • Make some directory whereever convinient (referred to as for now)
  • Change to that directory in a terminal (e.g. bash or cmd)
  • You'll need VirtualBox guest additions: most conviniently keep them up-to-date via plugin: in terminal run vagrant plugin install vagrant-vbguest
  • Comment out the settings line 15-20 for your specific machine
  • Place the gist in and do vagrant up (needs an internet connection and patience)
  • A window of ViretualBox will open showing your guest terminal. Use user "vagrant" and password "vagrant" to enter, after vagrant setup has finished
  • If the window is not maximized (i.e. guest additions are not install), do vagrant halt && vagrant up in (it may need a restart)
  • Again, login in the opened VirtualBox window
  • Enter startx to start X.
  • CD into /vagrant/playfulmachines and do firefox index.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment