Puppet Class: dumps::web::xmldumps

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

Overview

Parameters:

  • v1_brownout_info_url (Stdlib::HTTPSUrl) —

    The page that the v1 brownout 404 response links to.

  • v1_brownout_first_day (Optional[Integer[1, 31]]) (defaults to: undef) —

    Return 404 for v1 meta-current and meta-history files from this day to the end of each month. If undef, there is no brownout.

  • web_hostname (Stdlib::Fqdn)
  • datadir (Stdlib::Unixpath)
  • xmldumpsdir (Stdlib::Unixpath)
  • miscdatasetsdir (Stdlib::Unixpath)
  • webuser (String[1])
  • webgroup (String[1])
  • blocked_user_agent_regex (String[1])
  • blocked_cidrs (Array[Stdlib::IP::Address]) (defaults to: [])


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

class dumps::web::xmldumps (
    Stdlib::Fqdn               $web_hostname,
    Stdlib::Unixpath           $datadir,
    Stdlib::Unixpath           $xmldumpsdir,
    Stdlib::Unixpath           $miscdatasetsdir,
    String[1]                  $webuser,
    String[1]                  $webgroup,
    String[1]                  $blocked_user_agent_regex,
    Stdlib::HTTPSUrl           $v1_brownout_info_url,
    Array[Stdlib::IP::Address] $blocked_cidrs         = [],
    Optional[Integer[1, 31]]   $v1_brownout_first_day = undef,
) {
    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',
    }
}