Saltstack Official Galera Formula
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

9 anos atrás
9 anos atrás
9 anos atrás
9 anos atrás
9 anos atrás
9 anos atrás
9 anos atrás
9 anos atrás
9 anos atrás
9 anos atrás
9 anos atrás
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. # All files in this package is subject to the GPL v2 license
  2. # More information is in the COPYING file in the top directory of this package.
  3. # Copyright (C) 2011 severalnines.com
  4. {%- if pillar.galera.get('master',{}).get('enabled', False) %}
  5. {%- from "galera/map.jinja" import master with context %}
  6. {%- set service = master %}
  7. {%- endif %}
  8. {%- if pillar.galera.get('slave',{}).get('enabled', False) %}
  9. {%- from "galera/map.jinja" import slave with context %}
  10. {%- set service = slave %}
  11. {%- endif %}
  12. [mysql]
  13. {% if service.get('ssl', {}).get('enabled', False) %}
  14. ssl-ca={{ service.ssl.ca_file }}
  15. ssl-cert={{ service.ssl.cert_file }}
  16. ssl-key={{ service.ssl.key_file }}
  17. {% endif %}
  18. [mysqld_safe]
  19. syslog
  20. [mysqld]
  21. datadir=/var/lib/mysql
  22. bind-address={{ service.bind.address }}
  23. port=3306
  24. max_connections={{ service.max_connections }}
  25. default-storage-engine=innodb
  26. binlog_format=ROW
  27. collation-server=utf8_general_ci
  28. init-connect='SET NAMES utf8'
  29. character-set-server=utf8
  30. default-storage-engine=innodb
  31. #log_error=/var/log/mysql/error.log
  32. skip-external-locking
  33. skip-name-resolve
  34. socket = /var/run/mysqld/mysqld.sock
  35. myisam_sort_buffer_size=64M
  36. wait_timeout=1800
  37. open_files_limit=102400
  38. table_open_cache=10000
  39. key_buffer_size=64M
  40. max_allowed_packet=256M
  41. query_cache_size=0
  42. query_cache_type=0
  43. innodb_file_format=Barracuda
  44. innodb_file_per_table=1
  45. innodb_buffer_pool_size={{ service.innodb_buffer_pool_size }}
  46. innodb_log_file_size=627M
  47. innodb_read_io_threads=8
  48. innodb_write_io_threads=8
  49. innodb_io_capacity=500
  50. innodb_flush_log_at_trx_commit=2
  51. innodb_flush_method=O_DIRECT
  52. innodb_doublewrite=0
  53. innodb_autoinc_lock_mode=2
  54. innodb_locks_unsafe_for_binlog=1
  55. wsrep_cluster_address="gcomm://{% for member in service.members %}{{ member.host}}:4567{% if not loop.last %},{% endif %}{% endfor %}/?pc.wait_prim=no"
  56. wsrep_provider={{ service.wsrep_provider }}
  57. wsrep_cluster_name="openstack"
  58. wsrep_slave_threads=8
  59. wsrep_sst_method=xtrabackup-v2
  60. wsrep_sst_auth={{ service.admin.user }}:{{ service.admin.password }}
  61. wsrep_node_address={{ service.bind.address }}
  62. wsrep_provider_options="gcache.size = 256M"
  63. wsrep_provider_options="gmcast.listen_addr = tcp://{{ service.bind.address }}:4567"
  64. {% if service.get('ssl', {}).get('enabled', False) %}
  65. wsrep_provider_options="socket.ssl=yes;socket.ssl_key={{ service.ssl.key_file }};socket.ssl_cert={{ service.ssl.cert_file }};socket.ssl_ca={{ service.ssl.ca_file }}"
  66. ssl-ca={{ service.ssl.ca_file }}
  67. ssl-cert={{ service.ssl.cert_file }}
  68. ssl-key={{ service.ssl.key_file }}
  69. {% endif %}
  70. [xtrabackup]
  71. parallel=4
  72. [sst]
  73. streamfmt=xbstream
  74. transferfmt=socat
  75. sockopt=,nodelay,sndbuf=1048576,rcvbuf=1048576