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.

9 jaren geleden
9 jaren geleden
9 jaren geleden
9 jaren geleden
9 jaren geleden
9 jaren geleden
9 jaren geleden
9 jaren geleden
9 jaren geleden
9 jaren geleden
9 jaren geleden
9 jaren geleden
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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. [mysqld_safe]
  13. syslog
  14. [mysqld]
  15. datadir=/var/lib/mysql
  16. bind-address={{ service.bind.address }}
  17. port=3306
  18. max_connections={{ service.max_connections }}
  19. default-storage-engine=innodb
  20. binlog_format=ROW
  21. collation-server=utf8_general_ci
  22. init-connect='SET NAMES utf8'
  23. character-set-server=utf8
  24. default-storage-engine=innodb
  25. skip-external-locking
  26. skip-name-resolve
  27. myisam_sort_buffer_size=64M
  28. wait_timeout=1800
  29. open_files_limit=102400
  30. table_open_cache=10000
  31. key_buffer_size=64M
  32. max_allowed_packet=256M
  33. query_cache_size=0
  34. query_cache_type=0
  35. {%- if service.get('error_log_enabled', False) %}
  36. log_error = /var/log/mysql/error.log
  37. {%- else %}
  38. #log_error = /var/log/mysql/error.log
  39. {%- endif %}
  40. innodb_file_format=Barracuda
  41. innodb_file_per_table=1
  42. innodb_buffer_pool_size={{ service.innodb_buffer_pool_size }}
  43. innodb_log_file_size=627M
  44. innodb_read_io_threads={{ service.get('innodb_read_io_threads', 8) }}
  45. innodb_write_io_threads={{ service.get('innodb_write_io_threads', 8) }}
  46. innodb_io_capacity=500
  47. innodb_flush_log_at_trx_commit=2
  48. innodb_flush_method=O_DIRECT
  49. innodb_doublewrite=0
  50. innodb_autoinc_lock_mode=2
  51. innodb_locks_unsafe_for_binlog=1
  52. wsrep_cluster_address="gcomm://"
  53. wsrep_provider={{ service.wsrep_provider }}
  54. wsrep_cluster_name="openstack"
  55. wsrep_slave_threads={{ service.get('wsrep_slave_threads', 8) }}
  56. wsrep_sst_method=xtrabackup-v2
  57. wsrep_sst_auth={{ service.admin.user }}:{{ service.admin.password }}
  58. wsrep_node_address={{ service.bind.address }}
  59. wsrep_provider_options="gcache.size = 256M"
  60. wsrep_provider_options="gmcast.listen_addr = tcp://{{ service.bind.address }}:4567"
  61. {% if service.get('ssl', {}).get('enabled', False) %}
  62. 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 }}"
  63. ssl-ca={{ service.ssl.ca_file }}
  64. ssl-cert={{ service.ssl.cert_file }}
  65. ssl-key={{ service.ssl.key_file }}
  66. {% endif %}
  67. [xtrabackup]
  68. parallel={{ service.get('xtrabackup_parallel', 4) }}
  69. [sst]
  70. streamfmt=xbstream
  71. transferfmt=socat
  72. sockopt=,nodelay,sndbuf=1048576,rcvbuf=1048576