Skip to content
Snippets Groups Projects
Commit 5e1ad1c6 authored by ale's avatar ale
Browse files

Vagrant config for a local cluster test

parent dc5a3171
No related branches found
No related tags found
No related merge requests found
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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment