Puppet Class: profile::labs::db::wikireplica

Defined in:
modules/profile/manifests/labs/db/wikireplica.pp

Overview

Parameters:

  • mysql_root_clients (Array[String]) (defaults to: hiera('mysql_root_clients', []))


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
# File 'modules/profile/manifests/labs/db/wikireplica.pp', line 1

class profile::labs::db::wikireplica (
    Array[String] $mysql_root_clients = hiera('mysql_root_clients', []),
) {
    # mysql monitoring and administration from root clients/tendril
    $mysql_root_clients_str = join($mysql_root_clients, ' ')
    ferm::service { 'mysql_admin_standard':
        proto  => 'tcp',
        port   => '3306',
        srange => "(${mysql_root_clients_str})",
    }
    ferm::service { 'mysql_admin_alternative':
        proto  => 'tcp',
        port   => '3307',
        srange => "(${mysql_root_clients_str})",
    }

    ferm::service { 'mysql_labs_db_proxy':
        proto   => 'tcp',
        port    => '3306',
        notrack => true,
        srange  => '(@resolve((dbproxy1018.eqiad.wmnet)) @resolve((dbproxy1019.eqiad.wmnet)))',
    }

    ferm::service { 'mysql_labs_db_admin':
        proto   => 'tcp',
        port    => '3306',
        notrack => true,
        srange  => '(@resolve((labstore1004.eqiad.wmnet)) @resolve((labstore1005.eqiad.wmnet)))',
    }

    class { 'profile::mariadb::monitor::prometheus':
        mysql_group => 'labs',
        mysql_role  => 'slave',
        mysql_shard => 'multi',
        socket      => '/run/mysqld/mysqld.sock',
    }
    if os_version('debian == buster') {
        $basedir = '/opt/wmf-mariadb104/'
    }
    else {
        $basedir = '/opt/wmf-mariadb101/'
    }
    class { 'mariadb::config':
        config        => 'role/mariadb/mysqld_config/labsdb-replica.my.cnf.erb',
        basedir       => $basedir,
        datadir       => '/srv/sqldata',
        socket        => '/run/mysqld/mysqld.sock',
        tmpdir        => '/srv/tmp',
        read_only     => 'ON',
        p_s           => 'on',
        ssl           => 'puppet-cert',
        binlog_format => 'ROW',
    }

    mariadb::monitor_readonly{ 'wikireplica':
        port      => 3306,
        read_only => 1,
    }
}