Merge pull request #287 from bcwaldon/vagrantfile

Add Vagrantfile
This commit is contained in:
Brandon Philips
2013-11-02 14:29:17 -07:00
2 changed files with 35 additions and 0 deletions

4
.gitignore vendored
View File

@@ -4,3 +4,7 @@ pkg/
/go-bindata
release_version.go
/machine*
.vagrant/
conf
info
log

31
Vagrantfile vendored Normal file
View File

@@ -0,0 +1,31 @@
# This Vagrantfile is targeted at developers. It can be used to build and run etcd in an isolated VM.
$provision = <<SCRIPT
apt-get update
apt-get install -y python-software-properties git
add-apt-repository -y ppa:duh/golang
apt-get update
apt-get install -y golang
cd /vagrant && ./build
/vagrant/etcd -c 0.0.0.0:4001 -s 0.0.0.0:7001 &
SCRIPT
Vagrant.configure("2") do |config|
config.vm.box = 'precise64'
config.vm.box_url = 'http://files.vagrantup.com/precise64.box'
config.vm.provider "virtualbox" do |vbox|
vbox.customize ["modifyvm", :id, "--memory", "1024"]
end
config.vm.provision "shell", inline: $provision
config.vm.network "forwarded_port", guest: 4001, host: 4001, auto_correct: true
config.vm.network "forwarded_port", guest: 7001, host: 7001, auto_correct: true
end