forked from milinda/samza-ec2-ansible
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
37 lines (30 loc) · 1.03 KB
/
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
27
28
29
30
31
32
33
34
35
36
37
# -*- mode: ruby -*-
# vi: set ft=ruby :
$num_instances = 9
$instance_name_prefix = "samzasql-"
$vm_gui = false
$vm_memory = 2048
$vm_cpus = 2
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/trusty64"
(1..$num_instances).each do |i|
config.vm.define vm_name = "%s-%02d" % [$instance_name_prefix, i] do |config|
config.vm.hostname = vm_name
config.vm.provider :virtualbox do |vb|
vb.gui = $vm_gui
vb.memory = $vm_memory
vb.cpus = $vm_cpus
end
ip = "172.17.8.#{i+100}"
config.vm.network :private_network, ip: ip
config.vm.network :forwarded_port, guest: 2181, host: i+10181
config.vm.network :forwarded_port, guest: 9091, host: i+11091
config.vm.network :forwarded_port, guest: 8088, host: i+10088
config.vm.network :forwarded_port, guest: 8032, host: i+10032
config.vm.network :forwarded_port, guest: 50060, host: i+50060
config.vm.provision "ansible" do |ansible|
ansible.playbook = "ansible_kafka.yml"
end
end
end
end