Puppet Class: profile::microsites::transparency

Defined in:
modules/profile/manifests/microsites/transparency.pp

Overview

Provisions the Wikimedia Transparency Report static site hosted at <transparency.wikimedia.org>.



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
48
49
# File 'modules/profile/manifests/microsites/transparency.pp', line 4

class profile::microsites::transparency {

    include ::passwords::misc::private_static_site
    include ::passwords::ldap::production

    $repo_dir = '/srv/org/wikimedia/TransparencyReport'
    $docroot  = "${repo_dir}/build"

    $private_repo_dir = "${repo_dir}-private"
    $private_docroot = "${private_repo_dir}/build"

    git::clone { 'wikimedia/TransparencyReport':
        ensure    => latest,
        directory => $repo_dir,
    }

    $user = $passwords::misc::private_static_site::user
    $pass = $passwords::misc::private_static_site::pass

    git::clone { 'wikimedia/TransparencyReport-private':
        ensure    => latest,
        origin    => "https://${user}:${pass}@gerrit.wikimedia.org/r/wikimedia/TransparencyReport-private",
        directory => $private_repo_dir,
    }

    # LDAP configuration. Interpolated into the Apache site template
    # to provide mod_authnz_ldap-based user authentication.
    $auth_ldap = {
        name          => 'ops/wmf',
        bind_dn       => 'cn=proxyagent,ou=profile,dc=wikimedia,dc=org',
        bind_password => $passwords::ldap::production::proxypass,
        url           => 'ldaps://ldap-labs.eqiad.wikimedia.org ldap-labs.codfw.wikimedia.org/ou=people,dc=wikimedia,dc=org?cn',
        groups        => [
            'cn=ops,ou=groups,dc=wikimedia,dc=org',
            'cn=wmf,ou=groups,dc=wikimedia,dc=org',
        ],
    }

    httpd::site { 'transparency.wikimedia.org':
        content => template('role/apache/sites/transparency.wikimedia.org.erb'),
    }

    httpd::site { 'transparency-private.wikimedia.org':
        content => template('role/apache/sites/transparency-private.wikimedia.org.erb'),
    }
}