Puppet Class: coal::web

Defined in:
modules/coal/manifests/web.pp

Overview

Class: coal::web

The web API for data collected by coal::processor.

The API is exposed from, and used by, profile::webperf::site. Canonically at <performance.wikimedia.org>.



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
# File 'modules/coal/manifests/web.pp', line 8

class coal::web {
    include ::coal::common

    require_package('python-flask')
    require_package('python-numpy')
    require_package('python-requests')

    file { '/var/cache/coal_web':
        ensure => directory,
        owner  => 'www-data',
        group  => 'www-data',
        mode   => '0755',
    }

    systemd::tmpfile { 'coal_web':
        content => 'd /var/cache/coal_web 0755 www-data www-data 1d -',
    }

    uwsgi::app { 'coal':
        settings         => {
            uwsgi => {
                'plugins'   => 'python',
                'socket'    => '/run/uwsgi/coal.sock',
                'wsgi-file' => '/srv/deployment/performance/coal/coal/coal_web.py',
                'callable'  => 'app',
                'master'    => true,
                'processes' => 8,
            },
        },
    }

    base::service_auto_restart { 'uwsgi-coal': }
}