Saltstack Official Galera Formula
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
1.3KB

  1. {%- set master = salt['grains.filter_by']({
  2. 'Debian': {
  3. 'pkgs': ['mysql-server-wsrep', 'galera', 'rsync', 'python-mysqldb', 'libmysqlclient18', 'psmisc', 'netcat', 'percona-xtrabackup-21', 'socat'],
  4. 'service': 'mysql',
  5. 'wsrep_provider': '/usr/lib/galera/libgalera_smm.so',
  6. 'log_file': '/var/log/mysql.log',
  7. 'config': '/etc/mysql/my.cnf',
  8. },
  9. 'RedHat': {
  10. 'pkgs': ['galera', 'mariadb-galera-server', 'mariadb', 'MySQL-python', 'rsync'],
  11. 'service': 'mysqld',
  12. 'wsrep_provider': '/usr/lib64/galera/libgalera_smm.so',
  13. 'log_file': '/var/log/mariadb/mariadb.log',
  14. 'config': '/etc/my.cnf',
  15. },
  16. }, merge=salt['pillar.get']('galera:master')) %}
  17. {%- set slave = salt['grains.filter_by']({
  18. 'Debian': {
  19. 'pkgs': ['mysql-server-wsrep', 'galera', 'rsync', 'python-mysqldb', 'libmysqlclient18', 'psmisc', 'netcat', 'percona-xtrabackup-21', 'socat'],
  20. 'service': 'mysql',
  21. 'wsrep_provider': '/usr/lib/galera/libgalera_smm.so',
  22. 'log_file': '/var/log/mysql.log',
  23. 'config': '/etc/mysql/my.cnf',
  24. },
  25. 'RedHat': {
  26. 'pkgs': ['galera', 'mariadb-galera-server', 'mariadb', 'MySQL-python', 'rsync'],
  27. 'service': 'mysqld',
  28. 'wsrep_provider': '/usr/lib64/galera/libgalera_smm.so',
  29. 'log_file': '/var/log/mariadb/mariadb.log',
  30. 'config': '/etc/my.cnf',
  31. },
  32. }, merge=salt['pillar.get']('galera:slave')) %}