2011-06-01 05:47:19 +02:00
# Class : mysql: : params
#
2012-02-09 20:26:00 +01:00
# The mysql configuration settings.
2011-06-01 05:47:19 +02:00
#
# Parameters:
#
# Actions:
#
# Requires :
#
# Sample Usage:
#
2012-02-09 20:26:00 +01:00
class mysql: : params {
2012-07-30 16:31:48 +02:00
$b ind_address = '127.0.0.1'
$ port = 3 3 0 6
$e tc_root_password = false
$ ssl = false
$ slow_query_log_file = false
$ long_query_time = 1 0
$c haracter_set_server = 'utf8'
$c ollation_server = 'utf8_general_ci'
$f t_min_word_len = 3
$ tmp_table_size = '16M'
$ max_heap_table_size = '16M'
$ max_tmp_tables = '32'
$ join_buffer_size = '3M'
$ read_buffer_size = '4M'
$ sort_buffer_size = '4M'
$ table_cache = '64'
$ table_definition_cache = '256'
$ open_files_limit = '1024'
$ thread_stack = '192K'
$ thread_cache_size = '8'
$ thread_concurrency = '10'
$ query_cache_size = '16M'
$ query_cache_limit = '1M'
$ tmp_table_size = '16M'
$ read_rnd_buffer_size = '256K'
$ key_buffer_size = '16M'
$ myisam_sort_buffer_size = '8M'
$ myisam_max_sort_file_size = '512M'
$ myisam_recover = 'BACKUP'
$ max_allowed_packet = "16M"
$ max_connections = '151'
$ wait_timeout = "28800"
$c onnect_timeout = "10"
$ innodb_file_per_table = '1'
$ innodb_status_file = '0'
$ innodb_support_xa = '0'
$ innodb_flush_log_at_trx_commit = '0'
$ innodb_buffer_pool_size = '8M'
$ innodb_log_file_size = '5M'
$ innodb_flush_method = 'O_DIRECT'
$ innodb_thread_concurrency = '8'
$ innodb_concurrency_tickets = '500'
$ innodb_doublewrite = '1'
$ read_only = false
$ replication_enabled = false
$ex pire_logs_days = '10'
$ max_binlog_size = '100M'
$ replicate_ignore_table = [ ]
$ replicate_ignore_db = [ ]
$ replicate_do_table = [ ]
$ replicate_do_db = [ ]
$ex tra_configs = {}
2012-02-09 20:26:00 +01:00
2012-03-16 23:56:04 +01:00
case $ : : operatingsystem {
"Ubuntu" : {
$ service_provider = upstart
2012-08-12 14:48:19 +02:00
$a pparmor_file = 'mysql/templates/apparmor.usr.sbin.mysqld.erb'
2012-03-16 23:56:04 +01:00
}
default : {
$ service_provider = undef
2012-08-12 14:48:19 +02:00
$a pparmor_file = undef
2012-03-16 23:56:04 +01:00
}
}
2012-02-09 20:26:00 +01:00
case $ : : osfamily {
'RedHat' : {
2012-05-02 06:42:34 +02:00
$ba sedir = '/usr'
$da tadir = '/var/lib/mysql'
2012-02-09 20:26:00 +01:00
$ service_name = 'mysqld'
$c lient_package_name = 'mysql'
2012-05-02 06:42:34 +02:00
$ server_package_name = 'mysql-server'
2012-02-09 20:26:00 +01:00
$ socket = '/var/lib/mysql/mysql.sock'
$c onfig_file = '/etc/my.cnf'
2012-04-12 02:06:35 +02:00
$ log_error = '/var/log/mysqld.log'
2012-02-09 20:26:00 +01:00
$ ruby_package_name = 'ruby-mysql'
$ ruby_package_provider = 'gem'
$ python_package_name = 'MySQL-python'
2012-04-24 06:24:01 +02:00
$ java_package_name = 'mysql-connector-java'
2012-05-02 06:42:34 +02:00
$ root_group = 'root'
$ ssl_ca = '/etc/mysql/cacert.pem'
$ ssl_cert = '/etc/mysql/server-cert.pem'
$ ssl_key = '/etc/mysql/server-key.pem'
2011-05-27 03:11:24 +02:00
}
2012-02-09 20:26:00 +01:00
'Debian' : {
2012-05-02 06:42:34 +02:00
$ba sedir = '/usr'
$da tadir = '/var/lib/mysql'
2011-06-17 00:34:04 +02:00
$ service_name = 'mysql'
$c lient_package_name = 'mysql-client'
2012-05-02 06:42:34 +02:00
$ server_package_name = 'mysql-server'
2012-01-11 02:16:32 +01:00
$ socket = '/var/run/mysqld/mysqld.sock'
$c onfig_file = '/etc/mysql/my.cnf'
2012-04-12 02:06:35 +02:00
$ log_error = '/var/log/mysql/error.log'
2012-01-11 20:01:02 +01:00
$ ruby_package_name = 'libmysql-ruby'
$ python_package_name = 'python-mysqldb'
2012-04-24 06:24:01 +02:00
$ java_package_name = 'libmysql-java'
2012-05-02 06:42:34 +02:00
$ root_group = 'root'
$ ssl_ca = '/etc/mysql/cacert.pem'
$ ssl_cert = '/etc/mysql/server-cert.pem'
$ ssl_key = '/etc/mysql/server-key.pem'
}
'FreeBSD' : {
$ba sedir = '/usr/local'
$da tadir = '/var/db/mysql'
$ service_name = 'mysql-server'
$c lient_package_name = 'databases/mysql55-client'
$ server_package_name = 'databases/mysql55-server'
$ socket = '/tmp/mysql.sock'
$c onfig_file = '/var/db/mysql/my.cnf'
$ log_error = "/var/db/mysql/${::hostname}.err"
$ ruby_package_name = 'ruby-mysql'
$ ruby_package_provider = 'gem'
$ python_package_name = 'databases/py-MySQLdb'
$ java_package_name = 'databases/mysql-connector-java'
$ root_group = 'wheel'
$ ssl_ca = undef
$ ssl_cert = undef
$ ssl_key = undef
2011-05-27 03:11:24 +02:00
}
2012-02-09 20:26:00 +01:00
2012-01-11 19:31:34 +01:00
default : {
2012-04-02 11:30:20 +02:00
case $ : : operatingsystem {
'Amazon' : {
$ba sedir = '/usr'
$da tadir = '/var/lib/mysql'
$ service_name = 'mysqld'
$c lient_package_name = 'mysql'
$ server_package_name = 'mysql-server'
$ socket = '/var/lib/mysql/mysql.sock'
$c onfig_file = '/etc/my.cnf'
$ log_error = '/var/log/mysqld.log'
$ ruby_package_name = 'ruby-mysql'
$ ruby_package_provider = 'gem'
$ python_package_name = 'MySQL-python'
$ java_package_name = 'mysql-connector-java'
$ root_group = 'root'
$ ssl_ca = '/etc/mysql/cacert.pem'
$ ssl_cert = '/etc/mysql/server-cert.pem'
$ ssl_key = '/etc/mysql/server-key.pem'
}
2012-08-14 19:09:33 +02:00
default : {
fail( "Unsupported osfamily: ${::osfamily} operatingsystem: ${::operatingsystem}, module ${module_name} only support osfamily RedHat, Debian, and FreeBSD, or operatingsystem Amazon" )
}
2012-04-02 11:30:20 +02:00
}
2012-01-11 19:31:34 +01:00
}
2011-05-27 03:11:24 +02:00
}
2012-02-09 20:26:00 +01:00
2011-05-25 08:22:43 +02:00
}