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.

83 line
2.2KB

  1. {%- if pillar.galera.get('master',{}).get('enabled', False) %}
  2. {%- from "galera/map.jinja" import master with context %}
  3. {%- set service = master %}
  4. {%- endif %}
  5. [MYSQLD]
  6. user=mysql
  7. basedir=/usr/
  8. bind-address={{ service.bind.address }}
  9. datadir=/var/lib/mysql
  10. socket=/var/lib/mysql/mysql.sock
  11. pid_file=/var/lib/mysql/mysql.pid
  12. port=3306
  13. log_warnings=2
  14. innodb_buffer_pool_size={{ service.innodb_buffer_pool_size }}
  15. innodb_flush_log_at_trx_commit=2
  16. innodb_file_per_table=1
  17. innodb_data_file_path = ibdata1:100M:autoextend
  18. innodb_read_io_threads=8
  19. innodb_write_io_threads=8
  20. innodb_io_capacity=500
  21. innodb_doublewrite=0
  22. innodb_log_file_size=627M
  23. innodb_log_buffer_size=32M
  24. innodb_buffer_pool_instances=-1
  25. innodb_log_files_in_group=2
  26. innodb_thread_concurrency=64
  27. innodb_flush_method = O_DIRECT
  28. innodb_autoinc_lock_mode=2
  29. innodb_stats_on_metadata=0
  30. innodb_locks_unsafe_for_binlog=1
  31. default_storage_engine=innodb
  32. server_id=1
  33. binlog_format=ROW
  34. key_buffer_size = 64M
  35. tmp_table_size = 64M
  36. max_heap_table_size = 64M
  37. max_allowed_packet = 512M
  38. wait_timeout=1800
  39. myisam_sort_buffer_size = 64M
  40. open_files_limit=102400
  41. character-set-server=utf8
  42. skip_name_resolve
  43. memlock=0
  44. sysdate_is_now=1
  45. max_connections={{ service.max_connections }}
  46. thread_cache_size=512
  47. query_cache_type = 0
  48. query_cache_size = 0
  49. table_open_cache=10000
  50. lower_case_table_names=0
  51. performance_schema = 1
  52. performance-schema-max-mutex-classes = 0
  53. performance-schema-max-mutex-instances = 0
  54. wsrep_provider={{ service.wsrep_provider }}
  55. wsrep_on=ON
  56. wsrep_provider_options="gcache.size=512M; gmcast.segment=0"
  57. wsrep_cluster_name="my_wsrep_cluster"
  58. wsrep_cluster_address="gcomm://{% for member in service.members %}{{ member.host}}{% if not loop.last %},{% endif %}{% endfor %}"
  59. wsrep_slave_threads=8
  60. wsrep_certify_nonPK=1
  61. wsrep_max_ws_rows=131072
  62. wsrep_max_ws_size=1073741824
  63. wsrep_debug=0
  64. wsrep_convert_LOCK_to_trx=0
  65. wsrep_retry_autocommit=1
  66. wsrep_auto_increment_control=1
  67. wsrep_replicate_myisam=1
  68. wsrep_drupal_282555_workaround=0
  69. wsrep_causal_reads=0
  70. wsrep_sst_method=xtrabackup
  71. wsrep_sst_auth={{ service.admin.user }}:{{ service.admin.password }}
  72. [MYSQL]
  73. socket=/var/lib/mysql/mysql.sock
  74. [xtrabackup]
  75. parallel=4
  76. user={{ service.admin.user }}
  77. password={{ service.admin.password }}