Puppet Class: dumps::web::xmldumps

Defined in:
modules/dumps/manifests/web/xmldumps.pp

Overview

serve xml/sql dumps: wikitech.wikimedia.org/wiki/Dumps

Parameters:

  • web_hostname (Stdlib::Fqdn)
  • datadir (Any) (defaults to: undef)
  • xmldumpsdir (Any) (defaults to: undef)
  • miscdatasetsdir (Any) (defaults to: undef)
  • htmldumps_server (Any) (defaults to: undef)
  • webuser (Any) (defaults to: undef)
  • webgroup (Any) (defaults to: undef)
  • blocked_user_agent_regex (String) (defaults to: '')


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
# File 'modules/dumps/manifests/web/xmldumps.pp', line 2

class dumps::web::xmldumps(
    Stdlib::Fqdn $web_hostname,
    $datadir          = undef,
    $xmldumpsdir      = undef,
    $miscdatasetsdir  = undef,
    $htmldumps_server = undef,
    $webuser          = undef,
    $webgroup         = undef,
    String $blocked_user_agent_regex = '',
) {
    class {'dumps::web::html':
        datadir         => $datadir,
        xmldumpsdir     => $xmldumpsdir,
        miscdatasetsdir => $miscdatasetsdir,
        webuser         => $webuser,
        webgroup        => $webgroup,
    }

    $ssl_settings = ssl_ciphersuite('nginx', 'mid', true)

    acme_chief::cert { 'dumps':
        puppet_svc => 'nginx',
    }

    nginx::site { 'xmldumps':
        content => template('dumps/web/xmldumps/nginx.conf.erb'),
        notify  => Service['nginx'],
    }
    include dumps::web::nginx_logrot

    profile::auto_restarts::service { 'nginx': }

    file { "${xmldumpsdir}/favicon.ico":
        source => 'puppet:///modules/dumps/web/xmldumps/favicon.ico',
        owner  => 'root',
        group  => 'root',
        mode   => '0444',
    }

    prometheus::blackbox::check::http { $web_hostname:
        team               => 'wmcs',
        severity           => 'critical',
        body_regex_matches => ['Wikimedia Downloads'],
        probe_runbook      => 'https://wikitech.wikimedia.org/wiki/Dumps/SQL-XML_Dumps#NFS_share_and/or_web_server_issues',
    }
}