github.com/blacked/terraform@v0.6.2-0.20150806163846-669c4ad71586/website/Vagrantfile (about) 1 # -*- mode: ruby -*- 2 # vi: set ft=ruby : 3 4 # Vagrantfile API/syntax version. Don't touch unless you know what you're doing! 5 VAGRANTFILE_API_VERSION = "2" 6 7 $script = <<SCRIPT 8 sudo apt-get -y update 9 10 # RVM/Ruby 11 sudo apt-get -y install curl 12 # manually install GPG key in a proxy-friendly way 13 curl -sSL https://rvm.io/mpapis.asc | gpg --import - 14 curl -sSL https://get.rvm.io | bash -s stable 15 . ~/.bashrc 16 . ~/.bash_profile 17 rvm install 2.0.0 18 rvm --default use 2.0.0 19 20 # Middleman deps 21 cd /vagrant 22 gem install bundle 23 sudo apt-get install -y git-core 24 bundle 25 26 # Run the middleman server 27 bundle exec middleman server & 28 SCRIPT 29 30 Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| 31 config.vm.box = "chef/ubuntu-12.04" 32 config.vm.network "private_network", ip: "33.33.30.10" 33 config.vm.provision "shell", inline: $script, privileged: false 34 config.vm.synced_folder ".", "/vagrant", type: "rsync" 35 config.vm.network "forwarded_port", guest: 4567, host: 4567 36 end