-
Notifications
You must be signed in to change notification settings - Fork 1
/
Vagrantfile.grepl
43 lines (39 loc) · 1.07 KB
/
Vagrantfile.grepl
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
# -*- mode: ruby -*-
# vi: set ft=ruby :
NODE_NAMES = ["proxy", "gr01", "gr02", "gr03"]
START_IP = 6
Vagrant.configure("2") do |config|
config.ssh.insert_key = false
config.hostmanager.enabled = true
config.hostmanager.manage_guest = true
config.hostmanager.include_offline = true
config.vm.box = "centos/7"
config.vm.provider "virtualbox" do |v|
v.memory = 1024
v.cpus = 2
v.linked_clone = true
end
i = START_IP
NODE_NAMES.each do |nn|
ipaddr = "192.168.56.9" + i.to_s
i = i+1
config.vm.define nn do |box|
box.vm.hostname = nn
box.vm.network 'private_network', ip: ipaddr
end
end
config.vm.provision "ansible" do |ansible|
ansible.playbook = "playbooks/grepl.yml"
ansible.sudo = true
ansible.groups = {
"grnodes" => ["gr01", "gr02", "gr03"],
"proxynodes" => ["proxy"]
}
ansible.extra_vars = {
mysql_cluster_nodes: ["192.168.56.97", "192.168.56.98", "192.168.56.99"],
mysql_gtid_mode: true,
mysql_version: '5.7',
mysql_cluster_type: 'grouprepl'
}
end
end