8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
|
# File 'manifests/mysql.pp', line 8
class kualicoeus::mysql {
# Install & Configure MySQL
case $::operatingsystem {
/^(RedHat|CentOS)$/ : {
class { '::mysql::server':
root_password => $::kualicoeus::mysql_root_pw,
restart => true,
override_options => {
'mysqld' => {
symbolic-links => '0',
open_files_limit => '20000',
innodb_locks_unsafe_for_binlog => '1',
default-storage-engine => 'InnoDB',
innodb => 'ON',
net_buffer_length => '32768',
interactive_timeout => '40000',
wait_timeout => '40000',
max_allowed_packet => '16M',
transaction-isolation => 'READ-COMMITTED',
lower_case_table_names => '1',
max_connections => '1000',
}
,
}
}
}
/^(Ubuntu|Debian)$/ : {
class { '::mysql::server':
root_password => $::kualicoeus::mysql_root_pw,
restart => true,
override_options => {
'mysqld' => {
max_allowed_packet => '16M',
transaction-isolation => 'READ-COMMITTED',
lower_case_table_names => '1',
max_connections => '1000',
}
}
}
}
default : {
fail("${::operatingsystem} is not currently supported")
}
}
# Configure MySQL
mysql::db { $::kualicoeus::mysql_kc_install_dbsvrnm:
user => $::kualicoeus::mysql_kc_install_un,
password => $::kualicoeus::mysql_kc_install_pw,
host => $::kualicoeus::db_hostname,
charset => 'utf8',
collate => 'utf8_bin',
}
mysql_grant { "${::kualicoeus::mysql_kc_install_un}@${::kualicoeus::db_hostname}/*.*":
ensure => 'present',
options => ['GRANT'],
privileges => [
'SELECT',
'INSERT',
'UPDATE',
'DELETE',
'CREATE',
'DROP',
'INDEX',
'ALTER',
'CREATE TEMPORARY TABLES',
'LOCK TABLES',
'CREATE VIEW',
'CREATE ROUTINE'],
table => '*.*',
user => "${::kualicoeus::mysql_kc_install_un}@${::kualicoeus::db_hostname}",
}
if $kualicoeus::kc_install_mode == 'EMBED' {
mysql::db { $::kualicoeus::kc_install_ricedbsvrnm:
user => $::kualicoeus::kc_install_riceun,
password => $::kualicoeus::kc_install_ricepw,
host => $::kualicoeus::db_hostname,
charset => 'utf8',
collate => 'utf8_bin',
}
mysql_grant { "${::kualicoeus::kc_install_riceun}@${::kualicoeus::kc_install_ricehostname}/*.*":
ensure => 'present',
options => ['GRANT'],
privileges => [
'SELECT',
'INSERT',
'UPDATE',
'DELETE',
'CREATE',
'DROP',
'INDEX',
'ALTER',
'CREATE TEMPORARY TABLES',
'LOCK TABLES',
'CREATE VIEW',
'CREATE ROUTINE'],
table => '*.*',
user => "${::kualicoeus::kc_install_riceun}@${::kualicoeus::kc_install_ricehostname}",
}
}
class { '::mysql::bindings':
java_enable => 1,
}
}
|