Jcrespo has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/404154 )
Change subject: proxysql: Changes added (simplifications) to the proxysql class ...................................................................... proxysql: Changes added (simplifications) to the proxysql class Most of those things have been added to the custom proxysql package. Some due to better packages (2.0), like systemd, other due to customizations for WMF. Bug: T171071 Change-Id: Idc9e758bb3d1d7d5632abf57949e532df55d9a42 --- M modules/profile/manifests/proxysql.pp D modules/profile/templates/initscripts/proxysql.systemd.erb M modules/proxysql/manifests/init.pp 3 files changed, 9 insertions(+), 58 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/54/404154/1 diff --git a/modules/profile/manifests/proxysql.pp b/modules/profile/manifests/proxysql.pp index 943bbbe..c1cf447 100644 --- a/modules/profile/manifests/proxysql.pp +++ b/modules/profile/manifests/proxysql.pp @@ -25,23 +25,6 @@ # notrack => true, #} - # we need to setup the service, as by default there is only an init.d script - # that start as root. We will not start it by default, but will have monitoring - # to check it is running. We can change that in the future. - systemd::unit { 'proxysql': - ensure => present, - content => systemd_template('proxysql'), - require => Class['proxysql'], - } - - file {'/run/proxysql': - ensure => directory, - owner => 'proxysql', - group => 'proxysql', - mode => '0755', - require => Class['proxysql'], - } - # Let's add proxysql user to the mysql group so it can access mysql's # tls client certs exec { 'proxysql membership to mysql': @@ -59,7 +42,7 @@ content => template('profile/proxysql/root.my.cnf.erb'), } - # I think with systemd there should be only 1 process running ? + # With systemd there should be only 1 process running nrpe::monitor_service { 'proxysql': description => 'proxysql processes', nrpe_command => '/usr/lib/nagios/plugins/check_procs -c 1:1 -C proxysql', diff --git a/modules/profile/templates/initscripts/proxysql.systemd.erb b/modules/profile/templates/initscripts/proxysql.systemd.erb deleted file mode 100644 index 8674450..0000000 --- a/modules/profile/templates/initscripts/proxysql.systemd.erb +++ /dev/null @@ -1,14 +0,0 @@ -[Unit] -Description=ProxySQL instance -Documentation=https://github.com/sysown/proxysql/wiki - -[Service] -LimitNOFILE=102400 -LimitCORE=1073741824 -Restart=always -User=proxysql -Group=proxysql -ExecStart=/usr/bin/proxysql -f - -[Install] -WantedBy=multi-user.target diff --git a/modules/proxysql/manifests/init.pp b/modules/proxysql/manifests/init.pp index 364dd97..8b330c6 100644 --- a/modules/proxysql/manifests/init.pp +++ b/modules/proxysql/manifests/init.pp @@ -6,42 +6,24 @@ $admin_user = 'admin', $admin_port = 6032, $admin_interface = '127.0.0.1', - $admin_socket = '/tmp/proxysql_admin.sock', + $admin_socket = '/run/proxysql_admin.sock', $mysql_port = 6033, $mysql_interface = '0.0.0.0', - $mysql_socket = '/tmp/proxysql.sock', + $mysql_socket = '/run/proxysql.sock', ) { - # We need to manualy setup users, as the package doesn't do it for us - group { 'proxysql': - ensure => present, - system => true, - } - - user { 'proxysql': - ensure => present, - gid => 'proxysql', - shell => '/bin/false', - home => '/nonexistent', - system => true, - managehome => false, - } + # install the proxy and the user/group + package { 'proxysql': + ensure => installed, + } # Minimal basic config, with the right owner - file { '/etc/proxysql.cnf': + file { '/etc/proxysql.cfg': ensure => present, owner => 'proxysql', group => 'proxysql', mode => '0440', content => template('proxysql/proxysql.cnf.erb'), - } - - # mostly sqlite internal config cache, let's make sure it has - # the right owner - file {'/var/lib/proxysql': - ensure => directory, - owner => 'proxysql', - group => 'proxysql', - mode => '0750', + requite => Package['proxysql'], } } -- To view, visit https://gerrit.wikimedia.org/r/404154 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idc9e758bb3d1d7d5632abf57949e532df55d9a42 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Jcrespo <jcre...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits