Puppet Class: statistics::sites::analytics

Defined in:
modules/statistics/manifests/sites/analytics.pp

Overview

Class statistics::sites::analytics

analytics.wikimedia.org

This site will eventually supercede both stats.wikimedia.org and datasets.wikimedia.org. For now it is used to productionize various frontend dashboards that have historicaly been running in labs.

Bug: T132407



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
# File 'modules/statistics/manifests/sites/analytics.pp', line 10

class statistics::sites::analytics {
    require ::statistics::web

    $working_path = $::statistics::working_path
    # /srv/analytics.wikimedia.org
    $document_root = "${working_path}/analytics.wikimedia.org"
    # Allow statistics-web-users to modify files in this directory.

    git::clone { 'analytics.wikimedia.org':
        ensure    => 'latest',
        directory => $document_root,
        origin    => 'https://gerrit.wikimedia.org/r/analytics/analytics.wikimedia.org',
        owner     => 'root',
        group     => 'root',
        mode      => '0775',
    }

    # Use hardsync script to hardlink merge files from various stat box published-dataset
    # directories.  These are rsync pushed here from the stat boxes.
    class { '::statistics::published':
        hardsync_destination => "${document_root}/published",
        require              => Git::Clone['analytics.wikimedia.org'],
    }

    httpd::site { 'analytics':
        content => template('statistics/analytics.wikimedia.org.erb'),
        require => File[$document_root],
    }
}