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.

68 linhas
1.9KB

  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.master is defined %}
  5. {%- from "galera/map.jinja" import master with context %}
  6. {%- set service = master %}
  7. {%- endif %}
  8. {%- if pillar.galera.slave is defined %}
  9. {%- from "galera/map.jinja" import slave with context %}
  10. {%- set service = slave %}
  11. {%- endif %}
  12. [mysqld]
  13. datadir=/var/lib/mysql
  14. bind-address={{ service.bind.address }}
  15. port=3306
  16. max_connections={{ service.get('max_connections', 20000) }}
  17. default-storage-engine=innodb
  18. binlog_format=ROW
  19. collation-server=utf8_general_ci
  20. init-connect='SET NAMES utf8'
  21. character-set-server=utf8
  22. default-storage-engine=innodb
  23. log_error=/var/log/mysql/error.log
  24. skip-external-locking
  25. skip-name-resolve
  26. myisam_sort_buffer_size=64M
  27. wait_timeout=1800
  28. open_files_limit=102400
  29. table_open_cache=10000
  30. key_buffer_size=64M
  31. max_allowed_packet=256M
  32. query_cache_size=0
  33. query_cache_type=0
  34. innodb_file_format=Barracuda
  35. innodb_file_per_table=1
  36. innodb_buffer_pool_size=3138M
  37. innodb_log_file_size=627M
  38. innodb_read_io_threads=8
  39. innodb_write_io_threads=8
  40. innodb_io_capacity=500
  41. innodb_flush_log_at_trx_commit=2
  42. innodb_flush_method=O_DIRECT
  43. innodb_doublewrite=0
  44. innodb_autoinc_lock_mode=2
  45. innodb_locks_unsafe_for_binlog=1
  46. wsrep_cluster_address="gcomm://{% for member in service.members %}{{ member.host}}:4567{% if not loop.last %},{% endif %}{% endfor %}/?pc.wait_prim=no"
  47. wsrep_provider={{ service.wsrep_provider }}
  48. wsrep_cluster_name="openstack"
  49. wsrep_slave_threads=8
  50. wsrep_sst_method=xtrabackup-v2
  51. wsrep_sst_auth={{ service.admin.user }}:{{ service.admin.password }}
  52. wsrep_node_address={{ service.bind.address }}
  53. wsrep_provider_options="gcache.size = 256M"
  54. wsrep_provider_options="gmcast.listen_addr = tcp://{{ service.bind.address }}:4567"
  55. [xtrabackup]
  56. parallel=4
  57. [sst]
  58. streamfmt=xbstream
  59. transferfmt=socat
  60. sockopt=,nodelay,sndbuf=1048576,rcvbuf=1048576