-
-
Notifications
You must be signed in to change notification settings - Fork 58
/
Copy pathparams.pp
91 lines (76 loc) · 2.57 KB
/
params.pp
1
2
3
4
5
6
7
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
# == Class proxysql::params
#
# This class is meant to be called from proxysql.
# It sets variables according to platform.
#
class proxysql::params {
$package_name = 'proxysql'
$package_ensure = 'installed'
$package_install_options = []
# Check your version in https://github.com/sysown/proxysql/releases
$package_source = 'https://www.percona.com/redir/downloads/proxysql/proxysql-1.3.2/binary/redhat/6/x86_64/proxysql-1.3.2-1.1.x86_64.rpm'
$service_name = 'proxysql'
$service_ensure = 'running'
$listen_ip = '0.0.0.0'
$listen_port = 6033
$listen_socket = '/tmp/proxysql.sock'
$admin_username = 'admin'
$admin_password = 'admin'
$admin_listen_ip = '127.0.0.1'
$admin_listen_port = 6032
case $::operatingsystem {
'Debian': {
$admin_listen_socket = '/tmp/proxysql_admin.sock'
$package_provider = 'dpkg'
$sys_owner = 'root'
$sys_group = 'root'
}
'Ubuntu': {
$admin_listen_socket = '/tmp/proxysql_admin.sock'
$package_provider = 'dpkg'
$sys_owner = 'proxysql'
$sys_group = 'proxysql'
}
'CentOS', 'Fedora', 'Scientific', 'RedHat', 'Amazon', 'OracleLinux': {
$admin_listen_socket = '/tmp/proxysql_admin.sock'
$package_provider = 'rpm'
$sys_owner = 'proxysql'
$sys_group = 'proxysql'
}
default: {
$admin_listen_socket = '/tmp/proxysql_admin.sock'
$package_provider = undef
$sys_owner = 'root'
$sys_group = 'root'
}
}
$monitor_username = 'monitor'
$monitor_password = 'monitor'
$datadir = '/var/lib/proxysql'
$config_file = '/etc/proxysql.cnf'
$manage_config_file = true
$mycnf_file_name = '/root/.my.cnf'
$manage_mycnf_file = true
$restart = false
$load_to_runtime = true
$save_to_disk = true
$rpm_repo_name = 'percona_repo'
$rpm_repo_descr = 'percona_repo_contains_proxysql'
$rpm_repo = 'http://repo.percona.com/release/$releasever/RPMS/$basearch'
$rpm_repo_key = 'https://www.percona.com/downloads/RPM-GPG-KEY-percona'
$config_settings = {
datadir => $datadir,
admin_variables => {
admin_credentials => "${admin_username}:${admin_password}",
mysql_ifaces => "${admin_listen_ip}:${admin_listen_port};${admin_listen_socket}",
},
mysql_variables => {
interfaces => "${listen_ip}:${listen_port};${listen_socket}",
},
mysql_servers => {},
mysql_users => {},
mysql_query_rules => {},
scheduler => {},
mysql_replication_hostgroups => {},
}
}