Puppet Class: profile::mariadb::misc
- Defined in:
- modules/profile/manifests/mariadb/misc.pp
Overview
miscellaneous services clusters
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 |
# File 'modules/profile/manifests/mariadb/misc.pp', line 2
class profile::mariadb::misc (
Profile::Mariadb::Valid_section $shard = lookup('mariadb::shard'),
) {
require profile::mariadb::mysql_role
require passwords::misc::scripts
$mysql_role = $profile::mariadb::mysql_role::role
$is_master = $mysql_role == 'master'
$read_only = profile::mariadb::section_params::is_read_only($shard, $mysql_role)
$is_writeable_dc = profile::mariadb::section_params::is_writeable_dc($shard)
$is_primary_master = $is_master and $is_writeable_dc
profile::mariadb::section { $shard: }
::profile::mariadb::ferm { 'misc': }
include profile::mariadb::monitor::prometheus
require profile::mariadb::packages_wmf
include profile::mariadb::wmfmariadbpy
include mariadb::service
class { 'mariadb::config':
config => 'role/mariadb/mysqld_config/misc.my.cnf.erb',
basedir => $profile::mariadb::packages_wmf::basedir,
datadir => '/srv/sqldata',
tmpdir => '/srv/tmp',
ssl => 'puppet-cert',
read_only => Integer($read_only),
p_s => 'on',
}
class { 'profile::mariadb::grants::production':
shard => $shard,
prompt => "MISC ${shard}",
password => $passwords::misc::scripts::mysql_cumin_pass,
}
class { 'mariadb::heartbeat':
shard => $shard,
datacenter => $::site,
enabled => $is_master,
}
class { 'mariadb::monitor_disk':
is_critical => $is_primary_master,
}
class { 'mariadb::monitor_process':
is_critical => $is_primary_master,
}
mariadb::monitor_readonly { $shard:
read_only => $read_only,
# XXX(kormat): Not using $is_primary_master, as we want to alert even for an inactive DC.
is_critical => $is_master,
}
if profile::mariadb::section_params::is_repl_client($shard, $mysql_role) {
$source_dc = profile::mariadb::section_params::get_repl_src_dc($mysql_role)
mariadb::monitor_replication { [ $shard ]:
is_critical => false,
source_dc => $source_dc,
}
}
class { 'mariadb::monitor_memory': }
}
|