blob: 2e22de6c81a7a7d4436da01951d102eedf1f7ca9 [file] [log] [blame]
Ales Komarekcba48ac2015-04-30 11:40:44 +02001
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 Pytlouna3567b82016-02-16 14:39:22 +01006 'wsrep_provider': '/usr/lib/galera/libgalera_smm.so',
Filip Pytloune40d54c2016-02-16 14:22:02 +01007 'log_file': '/var/log/mysql.log',
Filip Pytlounca245cc2016-02-16 14:49:45 +01008 'socket': '/var/run/mysqld/mysqld.sock',
Ales Komarek721bd202015-04-30 15:48:17 +02009 'config': '/etc/mysql/my.cnf',
Ales Komarekcba48ac2015-04-30 11:40:44 +020010 },
11 'RedHat': {
Filip Pytloun05b3e6d2016-02-17 12:59:45 +010012 'pkgs': ['galera', 'mariadb-galera-server', 'mariadb', 'MySQL-python', 'rsync', 'percona-xtrabackup', 'psmisc', 'socat'],
Filip Pytlounda679652016-02-17 10:56:10 +010013 'xtrabackup_repo': 'http://www.percona.com/downloads/percona-release/redhat/0.1-3/percona-release-0.1-3.noarch.rpm',
Filip Pytloun9d2d1842016-02-16 14:50:40 +010014 'service': 'mariadb',
Filip Pytlouna3567b82016-02-16 14:39:22 +010015 'wsrep_provider': '/usr/lib64/galera/libgalera_smm.so',
Filip Pytloune40d54c2016-02-16 14:22:02 +010016 'log_file': '/var/log/mariadb/mariadb.log',
Filip Pytlounca245cc2016-02-16 14:49:45 +010017 'socket': '/var/run/mariadb/mysqld.sock',
Filip Pytloun2ea33c72016-02-16 14:23:51 +010018 'config': '/etc/my.cnf',
Ales Komarekcba48ac2015-04-30 11:40:44 +020019 },
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 Pytlouna3567b82016-02-16 14:39:22 +010026 'wsrep_provider': '/usr/lib/galera/libgalera_smm.so',
Filip Pytloune40d54c2016-02-16 14:22:02 +010027 'log_file': '/var/log/mysql.log',
Filip Pytlounca245cc2016-02-16 14:49:45 +010028 'socket': '/var/run/mysqld/mysqld.sock',
Ales Komarek67ef8062015-04-30 16:09:30 +020029 'config': '/etc/mysql/my.cnf',
Ales Komarekcba48ac2015-04-30 11:40:44 +020030 },
31 'RedHat': {
Filip Pytloun05b3e6d2016-02-17 12:59:45 +010032 'pkgs': ['galera', 'mariadb-galera-server', 'mariadb', 'MySQL-python', 'rsync', 'percona-xtrabackup', 'psmisc', 'socat'],
Filip Pytlounda679652016-02-17 10:56:10 +010033 'xtrabackup_repo': 'http://www.percona.com/downloads/percona-release/redhat/0.1-3/percona-release-0.1-3.noarch.rpm',
Filip Pytloun9d2d1842016-02-16 14:50:40 +010034 'service': 'mariadb',
Filip Pytlouna3567b82016-02-16 14:39:22 +010035 'wsrep_provider': '/usr/lib64/galera/libgalera_smm.so',
Filip Pytloune40d54c2016-02-16 14:22:02 +010036 'log_file': '/var/log/mariadb/mariadb.log',
Filip Pytlounca245cc2016-02-16 14:49:45 +010037 'socket': '/var/run/mariadb/mysqld.sock',
Filip Pytloun2ea33c72016-02-16 14:23:51 +010038 'config': '/etc/my.cnf',
Ales Komarekcba48ac2015-04-30 11:40:44 +020039 },
40}, merge=salt['pillar.get']('galera:slave')) %}