Puppet Class: role::poolcounter

Defined in:
puppet/modules/role/manifests/poolcounter.pp

Overview

Class: role::poolcounter

Installs pool counter service and configures wikis to use it for article views.



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'puppet/modules/role/manifests/poolcounter.pp', line 6

class role::poolcounter {
    require_package('poolcounter')

    service { 'poolcounter':
        ensure  => 'running',
        enable  => true,
        require => Package['poolcounter'],
    }

    mediawiki::extension { 'PoolCounter':
        priority => $::load_early,
        settings => [
            '$wgPoolCountClientConf["servers"][] = "127.0.0.1";',
            '$wgPoolCountClientConf["timeout"] = 0.5;',
            '$wgPoolCounterConf["ArticleView"]["class"] = MediaWiki\Extension\PoolCounter\Client::class;',
            '$wgPoolCounterConf["ArticleView"]["timeout"] = 15;',
            '$wgPoolCounterConf["ArticleView"]["workers"] = 2;',
            '$wgPoolCounterConf["ArticleView"]["maxqueue"] = 100;',
        ],
        require  => Service['poolcounter'],
    }
}