-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathVagrantfile
26 lines (23 loc) · 1004 Bytes
/
Vagrantfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Vagrant.configure("2") do |config|
# Cluster Nodes
cluster_nodes=3
(1..cluster_nodes).each do |i|
config.vm.define "zookeeper-#{i}" do |node|
node.vm.box = "ubuntu/bionic64"
node.vm.hostname = "zookeeper#{i}.localhost"
node.vm.network :private_network, ip: "192.168.56.11#{i}"
node.vm.provision :hosts, :add_localhost_hostnames => false, :sync_hosts => true # required to autogenerate /etc/hosts on all nodes
end
end
# Setting CPU and Memory for All machines
config.vm.provider "virtualbox" do |vb|
vb.gui = false
vb.memory = "1024"
vb.cpus = 1
vb.customize [ "modifyvm", :id, "--uartmode1", "disconnected" ] # used for wsl2
end
# SSH config to use your local ssh key for auth instead of username/password
config.ssh.insert_key = false
config.vm.provision "file", source: "~/.ssh/id_rsa.pub", destination: "~/.ssh/authorized_keys"
config.vm.synced_folder '.', '/vagrant', disabled: true
end