Ales Komarek | cba48ac | 2015-04-30 11:40:44 +0200 | [diff] [blame] | 1 | |
| 2 | {%- set master = salt['grains.filter_by']({ |
| 3 | 'Debian': { |
| 4 | 'pkgs': ['mysql-server-wsrep', 'galera', 'rsync', 'python-mysqldb', 'libmysqlclient18', 'psmisc', 'netcat', 'percona-xtrabackup-21', 'socat'], |
| 5 | 'service': 'mysql', |
Filip Pytloun | a3567b8 | 2016-02-16 14:39:22 +0100 | [diff] [blame] | 6 | 'wsrep_provider': '/usr/lib/galera/libgalera_smm.so', |
Filip Pytloun | e40d54c | 2016-02-16 14:22:02 +0100 | [diff] [blame] | 7 | 'log_file': '/var/log/mysql.log', |
Filip Pytloun | ca245cc | 2016-02-16 14:49:45 +0100 | [diff] [blame] | 8 | 'socket': '/var/run/mysqld/mysqld.sock', |
Ales Komarek | 721bd20 | 2015-04-30 15:48:17 +0200 | [diff] [blame] | 9 | 'config': '/etc/mysql/my.cnf', |
Ales Komarek | cba48ac | 2015-04-30 11:40:44 +0200 | [diff] [blame] | 10 | }, |
| 11 | 'RedHat': { |
Filip Pytloun | 05b3e6d | 2016-02-17 12:59:45 +0100 | [diff] [blame] | 12 | 'pkgs': ['galera', 'mariadb-galera-server', 'mariadb', 'MySQL-python', 'rsync', 'percona-xtrabackup', 'psmisc', 'socat'], |
Filip Pytloun | da67965 | 2016-02-17 10:56:10 +0100 | [diff] [blame] | 13 | 'xtrabackup_repo': 'http://www.percona.com/downloads/percona-release/redhat/0.1-3/percona-release-0.1-3.noarch.rpm', |
Filip Pytloun | 9d2d184 | 2016-02-16 14:50:40 +0100 | [diff] [blame] | 14 | 'service': 'mariadb', |
Filip Pytloun | a3567b8 | 2016-02-16 14:39:22 +0100 | [diff] [blame] | 15 | 'wsrep_provider': '/usr/lib64/galera/libgalera_smm.so', |
Filip Pytloun | e40d54c | 2016-02-16 14:22:02 +0100 | [diff] [blame] | 16 | 'log_file': '/var/log/mariadb/mariadb.log', |
Filip Pytloun | ca245cc | 2016-02-16 14:49:45 +0100 | [diff] [blame] | 17 | 'socket': '/var/run/mariadb/mysqld.sock', |
Filip Pytloun | 2ea33c7 | 2016-02-16 14:23:51 +0100 | [diff] [blame] | 18 | 'config': '/etc/my.cnf', |
Ales Komarek | cba48ac | 2015-04-30 11:40:44 +0200 | [diff] [blame] | 19 | }, |
| 20 | }, merge=salt['pillar.get']('galera:master')) %} |
| 21 | |
| 22 | {%- set slave = salt['grains.filter_by']({ |
| 23 | 'Debian': { |
| 24 | 'pkgs': ['mysql-server-wsrep', 'galera', 'rsync', 'python-mysqldb', 'libmysqlclient18', 'psmisc', 'netcat', 'percona-xtrabackup-21', 'socat'], |
| 25 | 'service': 'mysql', |
Filip Pytloun | a3567b8 | 2016-02-16 14:39:22 +0100 | [diff] [blame] | 26 | 'wsrep_provider': '/usr/lib/galera/libgalera_smm.so', |
Filip Pytloun | e40d54c | 2016-02-16 14:22:02 +0100 | [diff] [blame] | 27 | 'log_file': '/var/log/mysql.log', |
Filip Pytloun | ca245cc | 2016-02-16 14:49:45 +0100 | [diff] [blame] | 28 | 'socket': '/var/run/mysqld/mysqld.sock', |
Ales Komarek | 67ef806 | 2015-04-30 16:09:30 +0200 | [diff] [blame] | 29 | 'config': '/etc/mysql/my.cnf', |
Ales Komarek | cba48ac | 2015-04-30 11:40:44 +0200 | [diff] [blame] | 30 | }, |
| 31 | 'RedHat': { |
Filip Pytloun | 05b3e6d | 2016-02-17 12:59:45 +0100 | [diff] [blame] | 32 | 'pkgs': ['galera', 'mariadb-galera-server', 'mariadb', 'MySQL-python', 'rsync', 'percona-xtrabackup', 'psmisc', 'socat'], |
Filip Pytloun | da67965 | 2016-02-17 10:56:10 +0100 | [diff] [blame] | 33 | 'xtrabackup_repo': 'http://www.percona.com/downloads/percona-release/redhat/0.1-3/percona-release-0.1-3.noarch.rpm', |
Filip Pytloun | 9d2d184 | 2016-02-16 14:50:40 +0100 | [diff] [blame] | 34 | 'service': 'mariadb', |
Filip Pytloun | a3567b8 | 2016-02-16 14:39:22 +0100 | [diff] [blame] | 35 | 'wsrep_provider': '/usr/lib64/galera/libgalera_smm.so', |
Filip Pytloun | e40d54c | 2016-02-16 14:22:02 +0100 | [diff] [blame] | 36 | 'log_file': '/var/log/mariadb/mariadb.log', |
Filip Pytloun | ca245cc | 2016-02-16 14:49:45 +0100 | [diff] [blame] | 37 | 'socket': '/var/run/mariadb/mysqld.sock', |
Filip Pytloun | 2ea33c7 | 2016-02-16 14:23:51 +0100 | [diff] [blame] | 38 | 'config': '/etc/my.cnf', |
Ales Komarek | cba48ac | 2015-04-30 11:40:44 +0200 | [diff] [blame] | 39 | }, |
| 40 | }, merge=salt['pillar.get']('galera:slave')) %} |