diff --git a/vagrant-local-test/Vagrantfile b/vagrant-local-test/Vagrantfile new file mode 100644 index 0000000000000000000000000000000000000000..e550aea1464e2fac487050658d1341d62eb4fcf4 --- /dev/null +++ b/vagrant-local-test/Vagrantfile @@ -0,0 +1,33 @@ + +API_VERSION = "2" +DEB = "etcd_0.3.0_amd64.deb" + +$setup_host_file = <<SCRIPT +echo 192.168.50.2 etcd1 >> /etc/hosts +echo 192.168.50.3 etcd2 >> /etc/hosts +SCRIPT + +Vagrant.configure(API_VERSION) do |config| + config.vm.box = "wheezy" + + config.vm.provision "shell", inline: $setup_host_file + + config.vm.provision "shell", + inline: "dpkg -i /vagrant/#{DEB} ; apt-get -y -f install" + + config.vm.define "etcd1" do |m| + m.vm.network "private_network", ip: "192.168.50.2" + m.vm.provision "shell", inline: "hostname etcd1" + m.vm.provision "shell", + inline: "echo BOOTSTRAP=1 > /etc/default/etcd" + end + + config.vm.define "etcd2" do |m| + m.vm.network "private_network", ip: "192.168.50.3" + m.vm.provision "shell", inline: "hostname etcd2" + m.vm.provision "shell", + inline: "echo ETCD_SERVER=etcd1 > /etc/default/etcd" + end + +end +