Puppet Class: profile::mariadb::wmf_root_client
- Defined in:
- modules/profile/manifests/mariadb/wmf_root_client.pp
Overview
hosts with client utilities to conect to remote servers This role provides remote access to mysql server **DO NOT ADD** to non-dedicated hosts**
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 |
# File 'modules/profile/manifests/mariadb/wmf_root_client.pp', line 4
class profile::mariadb::wmf_root_client {
# prevent accidental addition on a db server or a non-dedicated client
if !($::fqdn in ['cumin1002.eqiad.wmnet', 'cumin2002.codfw.wmnet']) {
fail('role::mariadb::wmf_root_client should only be used on root-owned, \
dedicated servers.')
}
require profile::mariadb::packages_client
include profile::mariadb::wmfmariadbpy
include passwords::misc::scripts
class { 'mariadb::config':
config => 'profile/mariadb/mysqld_config/root_client.my.cnf.erb',
socket => '/run/mysqld/client.sock', # use a non default one
ssl => 'puppet-cert',
ssl_ca => '/etc/ssl/certs/wmf-ca-certificates.crt',
ssl_cert => '/etc/mysql/ssl/cert.pem',
ssl_key => '/etc/mysql/ssl/server.key',
datadir => false,
basedir => $profile::mariadb::packages_client::basedir,
}
$password = $passwords::misc::scripts::mysql_cumin_pass
$labsdb_password = $passwords::misc::scripts::mysql_labsdb_root_pass
$replication_user = $passwords::misc::scripts::mysql_repl_user
$replication_password = $passwords::misc::scripts::mysql_repl_pass
file { '/root/.my.cnf':
owner => 'root',
group => 'root',
mode => '0400',
show_diff => false,
content => template('profile/mariadb/mysqld_config/root.my.cnf.erb'),
}
# small script to perform an emergency query killing on a database
file { '/usr/local/bin/db-kill':
owner => 'root',
group => 'root',
mode => '0540',
source => 'puppet:///modules/profile/mariadb/db_kill.py',
require => [ Package['python3-wmfmariadbpy'], # dependency on wmfmariadbpy.dbutil
Package['percona-toolkit'], # dependency on pt-kill
],
}
}
|