[GALERA] Prepare Vagrant and variables
parent
1b58f143fa
commit
d6173bd9b5
|
@ -6,14 +6,17 @@
|
||||||
Vagrant.configure("2") do |config|
|
Vagrant.configure("2") do |config|
|
||||||
|
|
||||||
vms = [
|
vms = [
|
||||||
["jessie-default-mysql-master", "debian/jessie64", "192.168.200.16", ["jessie","default","mysql","master"]],
|
["jessie-default-mysql-master", "debian/jessie64", "192.168.200.10", ["jessie","default","mysql","master"]],
|
||||||
["jessie-default-mysql-slave", "debian/jessie64", "192.168.200.17", ["jessie","default","mysql","slave"]],
|
["jessie-default-mysql-slave", "debian/jessie64", "192.168.200.11", ["jessie","default","mysql","slave"]],
|
||||||
["jessie-upstream-mariadb-master", "debian/jessie64", "192.168.200.18", ["jessie","upstream","mariadb","master"]],
|
["jessie-upstream-mariadb-master", "debian/jessie64", "192.168.200.12", ["jessie","upstream","mariadb","master"]],
|
||||||
["jessie-upstream-mariadb-slave", "debian/jessie64", "192.168.200.19", ["jessie","upstream","mariadb","slave"]],
|
["jessie-upstream-mariadb-slave", "debian/jessie64", "192.168.200.13", ["jessie","upstream","mariadb","slave"]],
|
||||||
["jessie-upstream-percona-master", "debian/jessie64", "192.168.200.20", ["jessie","upstream","percona","master"]],
|
["jessie-upstream-percona-master", "debian/jessie64", "192.168.200.14", ["jessie","upstream","percona","master"]],
|
||||||
["jessie-upstream-percona-slave", "debian/jessie64", "192.168.200.21", ["jessie","upstream","percona","slave"]],
|
["jessie-upstream-percona-slave", "debian/jessie64", "192.168.200.15", ["jessie","upstream","percona","slave"]],
|
||||||
["jessie-default-mariadb-master", "debian/jessie64", "192.168.200.22", ["jessie","default","mariadb","master"]],
|
["jessie-default-mariadb-master", "debian/jessie64", "192.168.200.16", ["jessie","default","mariadb","master"]],
|
||||||
["jessie-default-mariadb-slave", "debian/jessie64", "192.168.200.23", ["jessie","default","mariadb","slave"]]
|
["jessie-default-mariadb-slave", "debian/jessie64", "192.168.200.17", ["jessie","default","mariadb","slave"]],
|
||||||
|
["jessie-default-mariadb_galera-1", "debian/jessie64", "192.168.200.18", ["jessie","default","mariadb_galera","1"]],
|
||||||
|
["jessie-default-mariadb_galera-2", "debian/jessie64", "192.168.200.19", ["jessie","default","mariadb_galera","2"]],
|
||||||
|
["jessie-default-mariadb_galera-3", "debian/jessie64", "192.168.200.20", ["jessie","default","mariadb_galera","3"]]
|
||||||
]
|
]
|
||||||
|
|
||||||
config.vm.provider "virtualbox" do |v|
|
config.vm.provider "virtualbox" do |v|
|
||||||
|
|
10
tests/gen.pl
10
tests/gen.pl
|
@ -17,6 +17,9 @@ my @a = (
|
||||||
"jessie-upstream-percona-slave",
|
"jessie-upstream-percona-slave",
|
||||||
"jessie-default-mariadb-master",
|
"jessie-default-mariadb-master",
|
||||||
"jessie-default-mariadb-slave",
|
"jessie-default-mariadb-slave",
|
||||||
|
"jessie-default-mariadb_galera-1",
|
||||||
|
"jessie-default-mariadb_galera-2",
|
||||||
|
"jessie-default-mariadb_galera-3"
|
||||||
);
|
);
|
||||||
|
|
||||||
my $start_ip = '192.168.200.10';
|
my $start_ip = '192.168.200.10';
|
||||||
|
@ -41,6 +44,13 @@ foreach my $n (@a)
|
||||||
close(FILE);
|
close(FILE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($data[-1] =~ /^\d$/ && $data[-2] eq 'mariadb_galera')
|
||||||
|
{
|
||||||
|
open(FILE, '>', "host_vars/$n");
|
||||||
|
printf FILE (qq/galera_id: '%s'\n/, $data[-1]);
|
||||||
|
close(FILE);
|
||||||
|
}
|
||||||
|
|
||||||
open(FILE, '>', "group_vars/" . $data[2]);
|
open(FILE, '>', "group_vars/" . $data[2]);
|
||||||
printf FILE (qq/mysql_vendor: '%s'\n/, $data[2]);
|
printf FILE (qq/mysql_vendor: '%s'\n/, $data[2]);
|
||||||
close(FILE);
|
close(FILE);
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
mysql_vendor: 'mariadb_galera'
|
|
@ -0,0 +1 @@
|
||||||
|
galera_id: '1'
|
|
@ -0,0 +1 @@
|
||||||
|
galera_id: '2'
|
|
@ -0,0 +1 @@
|
||||||
|
galera_id: '3'
|
Loading…
Reference in New Issue