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.

31 lines
1.1KB

  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. 'log_file': '/var/log/mysql.log',
  6. 'config': '/etc/mysql/my.cnf',
  7. },
  8. 'RedHat': {
  9. 'pkgs': ['mariadb-galera-cluster', 'mariadb', 'MySQL-python', 'rsync'],
  10. 'service': 'mysqld',
  11. 'log_file': '/var/log/mariadb/mariadb.log',
  12. 'config': '/etc/my.cnf',
  13. },
  14. }, merge=salt['pillar.get']('galera:master')) %}
  15. {%- set slave = salt['grains.filter_by']({
  16. 'Debian': {
  17. 'pkgs': ['mysql-server-wsrep', 'galera', 'rsync', 'python-mysqldb', 'libmysqlclient18', 'psmisc', 'netcat', 'percona-xtrabackup-21', 'socat'],
  18. 'service': 'mysql',
  19. 'log_file': '/var/log/mysql.log',
  20. 'config': '/etc/mysql/my.cnf',
  21. },
  22. 'RedHat': {
  23. 'pkgs': ['mariadb-galera-cluster', 'mariadb', 'MySQL-python', 'rsync'],
  24. 'service': 'mysqld',
  25. 'log_file': '/var/log/mariadb/mariadb.log',
  26. 'config': '/etc/my.cnf',
  27. },
  28. }, merge=salt['pillar.get']('galera:slave')) %}