-
Notifications
You must be signed in to change notification settings - Fork 2
/
Vagrantfile
47 lines (39 loc) · 1.27 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
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "bento/centos-6.7"
config.vm.provision "ansible" do |ansible|
ansible.playbook = "provisioning/maria.yml"
ansible.verbose = "v"
ansible.sudo = true
ansible.groups = {
"master" => ["db1"],
"slaves" => ["db2", "db3"]
}
end
config.vm.define "db1" do |db1|
db1.vm.hostname = "db1"
db1.vm.network "private_network", ip: "192.168.56.111"
#db1.vm.network "forwarded_port", guest: 3306, host: 3301
end
config.vm.define "db2" do |db2|
db2.vm.hostname = "db2"
db2.vm.network "private_network", ip: "192.168.56.112"
#db2.vm.network "forwarded_port", guest: 3306, host: 3302
end
config.vm.define "db3" do |db3|
db3.vm.hostname = "db3"
db3.vm.network "private_network", ip: "192.168.56.113"
#db3.vm.network "forwarded_port", guest: 3306, host: 3303
end
config.vm.define "maxscale" do |maxscale|
maxscale.vm.hostname = "maxscale"
maxscale.vm.network "private_network", ip: "192.168.56.114"
end
config.vm.provider "virtualbox" do |v|
v.memory = 512
v.cpus = 1
end
end