Puppet Class: profile::webperf::xhgui

Defined in:
modules/profile/manifests/webperf/xhgui.pp

Overview

Class: profile::webperf::xhgui

This class is still a work in progress! See phabricator.wikimedia.org/T180761.

Provision XHGui, a graphical interface for XHProf data built on MongoDB. Used by the Performance Team.

See also profile::webperf::site, which provisions a proxy to expose the service at <performance.wikimedia.org/xhgui/>.

Parameters:

  • ldap_config (Any) (defaults to: lookup('ldap', Hash, hash, {}))


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/webperf/xhgui.pp', line 12

class profile::webperf::xhgui (
    $ldap_config = lookup('ldap', Hash, hash, {}),
) {
    include ::passwords::ldap::production

    require_package('libapache2-mod-php7.0', 'php-mongodb')

    ferm::service { 'webperf-xhgui-http':
        proto  => 'tcp',
        port   => '80',
        srange => '$INTERNAL',
    }

    ferm::service { 'webperf-xhgui-mongo':
        proto  => 'tcp',
        port   => '27017',
        srange => '$INTERNAL',
    }

    class { '::mongodb': }

    $auth_ldap = {
        name          => 'nda/ops/wmf',
        bind_dn       => 'cn=proxyagent,ou=profile,dc=wikimedia,dc=org',
        bind_password => $passwords::ldap::production::proxypass,
        url           => "ldaps://${ldap_config[ro-server]} ${ldap_config[ro-server-fallback]}/ou=people,dc=wikimedia,dc=org?cn",
        groups        => [
            'cn=ops,ou=groups,dc=wikimedia,dc=org',
            'cn=nda,ou=groups,dc=wikimedia,dc=org',
            'cn=wmf,ou=groups,dc=wikimedia,dc=org',
        ],
    }

    git::clone { 'operations/software/xhgui':
        ensure    => 'latest',
        directory => '/srv/xhgui',
        branch    => 'wmf_deploy',
    }
    -> file { '/srv/xhgui/cache':
        ensure => directory,
        owner  => 'www-data',
        group  => 'www-data',
        mode   => '0755',
    }
    -> httpd::site { 'xhgui_apache_site':
        content => template('profile/webperf/xhgui/httpd.conf.erb'),
    }
}