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.

map.jinja 1.9KB

9 anni fa
9 anni fa
12345678910111213141516171819202122232425262728293031323334353637383940
  1. {%- set master = salt['grains.filter_by']({
  2. 'Debian': {
  3. 'pkgs': ['mysql-server-wsrep-5.6', 'galera-3', 'rsync', 'python-mysqldb', 'libmysqlclient18', 'psmisc', 'netcat', 'percona-xtrabackup', 'socat', 'libdbd-mysql', 'python-pymysql'],
  4. 'service': 'mysql',
  5. 'wsrep_provider': '/usr/lib/galera/libgalera_smm.so',
  6. 'log_file': '/var/log/mysql.log',
  7. 'socket': '/var/run/mysqld/mysqld.sock',
  8. 'config': '/etc/mysql/my.cnf',
  9. },
  10. 'RedHat': {
  11. 'pkgs': ['galera', 'mariadb-galera-server', 'mariadb', 'MySQL-python', 'rsync', 'percona-xtrabackup', 'psmisc', 'socat'],
  12. 'xtrabackup_repo': 'http://www.percona.com/downloads/percona-release/redhat/0.1-3/percona-release-0.1-3.noarch.rpm',
  13. 'service': 'mariadb',
  14. 'wsrep_provider': '/usr/lib64/galera/libgalera_smm.so',
  15. 'log_file': '/var/log/mariadb/mariadb.log',
  16. 'socket': '/var/run/mariadb/mysqld.sock',
  17. 'config': '/etc/my.cnf',
  18. },
  19. }, merge=pillar.galera.get('master', {})) %}
  20. {%- set slave = salt['grains.filter_by']({
  21. 'Debian': {
  22. 'pkgs': ['mysql-server-wsrep', 'galera', 'rsync', 'python-mysqldb', 'libmysqlclient18', 'psmisc', 'netcat', 'percona-xtrabackup', 'socat', 'libdbd-mysql', 'python-pymysql'],
  23. 'service': 'mysql',
  24. 'wsrep_provider': '/usr/lib/galera/libgalera_smm.so',
  25. 'log_file': '/var/log/mysql.log',
  26. 'socket': '/var/run/mysqld/mysqld.sock',
  27. 'config': '/etc/mysql/my.cnf',
  28. },
  29. 'RedHat': {
  30. 'pkgs': ['galera', 'mariadb-galera-server', 'mariadb', 'MySQL-python', 'rsync', 'percona-xtrabackup', 'psmisc', 'socat'],
  31. 'xtrabackup_repo': 'http://www.percona.com/downloads/percona-release/redhat/0.1-3/percona-release-0.1-3.noarch.rpm',
  32. 'service': 'mariadb',
  33. 'wsrep_provider': '/usr/lib64/galera/libgalera_smm.so',
  34. 'log_file': '/var/log/mariadb/mariadb.log',
  35. 'socket': '/var/run/mariadb/mysqld.sock',
  36. 'config': '/etc/my.cnf',
  37. },
  38. }, merge=pillar.galera.get('slave', {})) %}