Vagrantfile 829 B

12345678910111213141516171819202122232425262728293031
  1. # This Vagrantfile is targeted at developers. It can be used to build and run etcd in an isolated VM.
  2. $provision = <<SCRIPT
  3. apt-get update
  4. apt-get install -y python-software-properties git
  5. add-apt-repository -y ppa:duh/golang
  6. apt-get update
  7. apt-get install -y golang
  8. cd /vagrant && ./build
  9. /vagrant/etcd -c 0.0.0.0:4001 -s 0.0.0.0:7001 &
  10. SCRIPT
  11. Vagrant.configure("2") do |config|
  12. config.vm.box = 'precise64'
  13. config.vm.box_url = 'http://files.vagrantup.com/precise64.box'
  14. config.vm.provider "virtualbox" do |vbox|
  15. vbox.customize ["modifyvm", :id, "--memory", "1024"]
  16. end
  17. config.vm.provision "shell", inline: $provision
  18. config.vm.network "forwarded_port", guest: 4001, host: 4001, auto_correct: true
  19. config.vm.network "forwarded_port", guest: 7001, host: 7001, auto_correct: true
  20. end