Puppet Class: profile::reportupdater::jobs::mysql

Defined in:
modules/profile/manifests/reportupdater/jobs/mysql.pp

Overview

Class profile::reportupdater::jobs::mysql

Installs reportupdater package, and sets up jobs that run reports and generate output from MySQL analytics slaves. This profile should only be included in a single role.

This requires the statistics module for the stats user and the published_path.



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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# File 'modules/profile/manifests/reportupdater/jobs/mysql.pp', line 8

class profile::reportupdater::jobs::mysql {
    require statistics
    require statistics::compute
    require ::profile::analytics::cluster::packages::common

    $base_path = '/srv/reportupdater'

    # Set up reportupdater to be executed on this machine
    class { 'reportupdater':
        user      => $::statistics::user::username,
        base_path => $base_path,
    }

    # And set up a link for periodic jobs to be included in published reports.
    # Because datasets/periodic is in published_path, files will be synced to
    # analytics.wikimedia.org/datasets/periodic/reports
    file { "${::statistics::compute::published_path}/datasets/periodic":
        ensure => 'directory',
        owner  => 'root',
        group  => 'wikidev',
        mode   => '0775',
    }
    file { "${::statistics::compute::published_path}/datasets/periodic/reports":
        ensure  => 'link',
        target  => "${base_path}/output",
        require => Class['reportupdater'],
    }

    # Set up various jobs to be executed by reportupdater
    # creating several reports on mysql research db.
    reportupdater::job { 'flow-beta-features':
        ensure     => absent,
        output_dir => 'metrics/beta-feature-enables',
    }
    reportupdater::job { 'edit-beta-features':
        ensure     => absent,
        output_dir => 'metrics/beta-feature-enables',
    }
    reportupdater::job { 'language':
        ensure     => absent,
        output_dir => 'metrics/beta-feature-enables',
    }
    reportupdater::job { 'published_cx2_translations':
        ensure      => absent,
        config_file => "${base_path}/jobs/reportupdater-queries/published_cx2_translations/config-mysql.yaml",
        output_dir  => 'metrics/published_cx2_translations',
    }
    reportupdater::job { 'mt_engines':
        ensure     => absent,
        output_dir => 'metrics/mt_engines',
    }
    reportupdater::job { 'cx':
        ensure     => absent,
        output_dir => 'metrics/cx',
    }
    reportupdater::job { 'ee':
        ensure     => absent,
        output_dir => 'metrics/echo',
    }
    reportupdater::job { 'ee-beta-features':
        ensure     => absent,
        output_dir => 'metrics/beta-feature-enables',
    }
    reportupdater::job { 'page-creation':
        ensure     => absent,
        output_dir => 'metrics/page-creation',
    }
}