|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
-
- {%- set master = salt['grains.filter_by']({
- 'Debian': {
- 'pkgs': ['mysql-wsrep-5.6', 'galera-3', 'rsync', 'python-mysqldb', 'psmisc', 'netcat', 'percona-xtrabackup', 'socat', 'libdbd-mysql', 'python-pymysql'],
- 'service': 'mysql',
- 'wsrep_provider': '/usr/lib/galera/libgalera_smm.so',
- 'log_file': '/var/log/mysql.log',
- 'socket': '/var/run/mysqld/mysqld.sock',
- 'config': '/etc/mysql/my.cnf',
- },
- 'RedHat': {
- 'pkgs': ['galera', 'mariadb-galera-server', 'mariadb', 'MySQL-python', 'rsync', 'percona-xtrabackup', 'psmisc', 'socat'],
- 'xtrabackup_repo': 'http://www.percona.com/downloads/percona-release/redhat/0.1-3/percona-release-0.1-3.noarch.rpm',
- 'service': 'mariadb',
- 'wsrep_provider': '/usr/lib64/galera/libgalera_smm.so',
- 'log_file': '/var/log/mariadb/mariadb.log',
- 'socket': '/var/run/mariadb/mysqld.sock',
- 'config': '/etc/my.cnf',
- },
- }, merge=pillar.galera.get('master', {})) %}
-
- {%- set slave = salt['grains.filter_by']({
- 'Debian': {
- 'pkgs': ['mysql-wsrep-5.6', 'galera-3', 'rsync', 'python-mysqldb', 'libmysqlclient18', 'psmisc', 'netcat', 'percona-xtrabackup', 'socat', 'libdbd-mysql', 'python-pymysql'],
- 'service': 'mysql',
- 'wsrep_provider': '/usr/lib/galera/libgalera_smm.so',
- 'log_file': '/var/log/mysql.log',
- 'socket': '/var/run/mysqld/mysqld.sock',
- 'config': '/etc/mysql/my.cnf',
- },
- 'RedHat': {
- 'pkgs': ['galera', 'mariadb-galera-server', 'mariadb', 'MySQL-python', 'rsync', 'percona-xtrabackup', 'psmisc', 'socat'],
- 'xtrabackup_repo': 'http://www.percona.com/downloads/percona-release/redhat/0.1-3/percona-release-0.1-3.noarch.rpm',
- 'service': 'mariadb',
- 'wsrep_provider': '/usr/lib64/galera/libgalera_smm.so',
- 'log_file': '/var/log/mariadb/mariadb.log',
- 'socket': '/var/run/mariadb/mysqld.sock',
- 'config': '/etc/my.cnf',
- },
- }, merge=salt['grains.filter_by']({
- 'trusty': {
- 'pkgs': ['mysql-wsrep-5.6', 'galera-3', 'rsync', 'python-mysqldb', 'libmysqlclient18', 'psmisc', 'netcat', 'percona-xtrabackup', 'socat', 'libdbd-mysql', 'python-pymysql'],
- 'service': 'mysql',
- 'wsrep_provider': '/usr/lib/galera/libgalera_smm.so',
- 'log_file': '/var/log/mysql.log',
- 'socket': '/var/run/mysqld/mysqld.sock',
- 'config': '/etc/mysql/my.cnf',
- },
- 'xenial': {
- 'pkgs': ['mysql-wsrep-5.6', 'galera-3', 'rsync', 'python-mysqldb', 'libmysqlclient-dev', 'psmisc', 'netcat', 'percona-xtrabackup', 'socat', 'libdbd-mysql', 'python-pymysql'],
- 'service': 'mysql',
- 'wsrep_provider': '/usr/lib/galera/libgalera_smm.so',
- 'log_file': '/var/log/mysql.log',
- 'socket': '/var/run/mysqld/mysqld.sock',
- 'config': '/etc/mysql/my.cnf',
- },
- }, grain='oscodename', merge=pillar.galera.get('slave', {}))) %}
-
- {% set clustercheck = salt['grains.filter_by']({
- 'default': {
- 'clustercheck': {
- 'enabled': True,
- 'user': clustercheck,
- 'password': clustercheck,
- 'port': '9200'
- },
- },
- }, merge=pillar.galera.get('clustercheck', {})) %}
-
|