forked from poanetwork/deployment-playbooks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVagrantfile
47 lines (38 loc) · 1.13 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
38
39
40
41
42
43
44
45
46
47
ENV["LC_ALL"] = "en_US.UTF-8"
Vagrant.configure("2") do |config|
servers = [ "validator", "explorer", "moc", "bootnode", "netstat" ]
platform_os = ENV["poa_platform"]
if platform_os == "ubuntu"
platform = "ubuntu/xenial64"
elsif platform_os == "centos"
platform = "centos/7"
else
platform = "ubuntu/xenial64"
end
servers.each do |machine|
config.vm.define machine do |node|
node.vm.box = platform
node.vm.hostname = machine
node.vm.provision :ansible do |ansible|
ansible.compatibility_mode = "2.0"
ansible.playbook = "site.yml"
ansible.groups = {
"validator" => ["validator"],
"explorer" => ["explorer"],
"netstat" => ["netstat"],
"moc" => ["moc"],
"bootnode" => ["bootnode"],
}
ansible.groups[platform_os] = [ "validator", "explorer", "netstat", "moc", "bootnode" ]
end
node.vm.provision :shell do |shell|
shell.path = "./tests/#{machine}.sh"
end
end
end
config.vm.provider "virtualbox" do |vb|
vb.memory = 1024
vb.cpus = 1
vb.linked_clone = true
end
end