1
0
Fork 0
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
797 B
Plaintext

# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "ubuntu/xenial64"
config.vm.define "rqlite" do |rqlite|
config.vm.network "private_network", ip: "192.168.200.10"
config.vm.provision :shell, :path => "vagrant_setup.sh"
2 years ago
config.vm.provision :shell, :inline => "rqlited -node-id 1 ~/node.1 &"
if not ENV['CLUSTER_SIZE'].nil?
port = 4001
(2..ENV['CLUSTER_SIZE'].to_i).each do |i|
port = port + 1
2 years ago
config.vm.provision :shell, :inline => "rqlited -node-id #{i} -join localhost:4001 -raft-addr localhost:#{port} ~/node.#{i} &"
end
end
end
config.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--memory", "2048"]
end
end