Saltstack Official Galera Formula
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

89 Zeilen
2.8KB

  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. {%- if service.get('error_log_enabled', False) %}
  32. log_error = /var/log/mysql/error.log
  33. {%- else %}
  34. #log_error = /var/log/mysql/error.log
  35. {%- endif %}
  36. skip-external-locking
  37. skip-name-resolve
  38. socket = /var/run/mysqld/mysqld.sock
  39. myisam_sort_buffer_size=64M
  40. wait_timeout=1800
  41. open_files_limit=102400
  42. table_open_cache=10000
  43. key_buffer_size=64M
  44. max_allowed_packet=256M
  45. query_cache_size=0
  46. query_cache_type=0
  47. innodb_file_format=Barracuda
  48. innodb_file_per_table=1
  49. innodb_buffer_pool_size={{ service.innodb_buffer_pool_size }}
  50. innodb_log_file_size=627M
  51. innodb_read_io_threads={{ service.get('innodb_read_io_threads', 8) }}
  52. innodb_write_io_threads={{ service.get('innodb_write_io_threads', 8) }}
  53. innodb_io_capacity=500
  54. innodb_flush_log_at_trx_commit=2
  55. innodb_flush_method=O_DIRECT
  56. innodb_doublewrite=0
  57. innodb_autoinc_lock_mode=2
  58. innodb_locks_unsafe_for_binlog=1
  59. wsrep_cluster_address="gcomm://{% for member in service.members %}{{ member.host}}:4567{% if not loop.last %},{% endif %}{% endfor %}/?pc.wait_prim=no"
  60. wsrep_provider={{ service.wsrep_provider }}
  61. wsrep_cluster_name="openstack"
  62. wsrep_slave_threads={{ service.get('wsrep_slave_threads', 8) }}
  63. wsrep_sst_method=xtrabackup-v2
  64. wsrep_sst_auth={{ service.admin.user }}:{{ service.admin.password }}
  65. wsrep_node_address={{ service.bind.address }}
  66. wsrep_provider_options="gcache.size = 256M"
  67. wsrep_provider_options="gmcast.listen_addr = tcp://{{ service.bind.address }}:4567"
  68. {% if service.get('ssl', {}).get('enabled', False) %}
  69. 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 }}"
  70. ssl-ca={{ service.ssl.ca_file }}
  71. ssl-cert={{ service.ssl.cert_file }}
  72. ssl-key={{ service.ssl.key_file }}
  73. {% endif %}
  74. [xtrabackup]
  75. parallel={{ service.get('xtrabackup_parallel', 4) }}
  76. [sst]
  77. streamfmt=xbstream
  78. transferfmt=socat
  79. sockopt=,nodelay,sndbuf=1048576,rcvbuf=1048576