-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathVagrantfile.pxc
39 lines (35 loc) · 929 Bytes
/
Vagrantfile.pxc
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
# -*- mode: ruby -*-
# vi: set ft=ruby :
NODE_NAMES = ["pxc01", "pxc02", "pxc03"]
START_IP = 5
Vagrant.configure("2") do |config|
config.ssh.insert_key = false
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.8" + 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/pxc.yml"
ansible.sudo = true
ansible.groups = {
"pxcnodes" => ["pxc01", "pxc02", "pxc03"]
}
#ansible.verbose = 'vvv'
ansible.extra_vars = {
mysql_cluster_nodes: ["192.168.56.85", "192.168.56.86", "192.168.56.87"],
mysql_version: '5.7',
mysql_cluster_type: 'pxc'
}
end
end